Skip to main content

IPFS and Milkomeda API

In addition to the Cardano ecosystem, Blockfrost also offers entry points to other ecosystems:

NetworkEndpoint
InterPlanetary File System (IPFS)https://ipfs.blockfrost.io/api/v0/
Milkomeda mainnethttps://milkomeda-mainnet.blockfrost.io/api/v0/
Milkomeda testnethttps://milkomeda-testnet.blockfrost.io/api/v0/

IPFS

IPFS, or InterPlanetary File System, is a distributed, peer-to-peer protocol designed for efficient and secure sharing of files and data across a global network. Is it commonly utilized for storing digital content externally from the main chain.

export BLOCKFROST_PROJECT_ID_IPFS=ipfs_YOUR_PROJECT_ID
curl "https://ipfs.blockfrost.io/api/v0/ipfs/add" \
-X POST \
-H "project_id: $BLOCKFROST_PROJECT_ID_IPFS" \
-F "file=@./static/img/logo.svg"

When executed correctly, you will receive a response in JSON format, resembling the following:

{
"name": "logo.svg",
"ipfs_hash": "QmUCXMTcvuJpwHF3gABRr69ceQR2uEG2Fsik9CyWh8MUoQ",
"size": "5617"
}

To learn more how to use IPFS with Blockfrost, have a look at the official Blockfrost documentation

Milkomeda

Milkomeda is a protocol that brings EVM capabilities to non-EVM blockchains. As development progresses, Milkomeda will expand to offer L2 solutions (rollups) for several major blockchains including Cardano, Solana, and Algorand.

export BLOCKFROST_PROJECT_ID_MILKOMEDA_MAINNET=ipfs_YOUR_PROJECT_ID
curl "https://milkomeda-mainnet.blockfrost.io/api/v0/" \
-X POST \
-H "project_id: $BLOCKFROST_PROJECT_ID_MILKOMEDA_MAINNET" \
-d '{"jsonrpc": "2.0", "id": 1, "method": "eth_blockNumber", "params": []}'

When executed correctly, you will receive a response in JSON format, resembling the following:

{
"jsonrpc": "2.0",
"id": 1,
"result": "0xa06919"
}

To learn more about how to use different JSON-RPC API calls or to setup the Metamask wallet, have a look at the official Blockfrost documentation.