Blueprint Management (CIP-57)
Guide to managing smart contract blueprints with the Anvil API - creating, finding, and deleting blueprints.
Overview
The Anvil API provides powerful endpoints for managing Cardano smart contract blueprints. These endpoints allow you to create, retrieve, update, and delete CIP-57 compliant blueprints in a standardized way. This is usually the compiled plutus.json file from an Aiken build.
SECURITY NOTE
All blueprint operations require an API key, which serves as your authentication credential and determines which blueprints you can access. The system maintains blueprint isolation between users, ensuring that:
When you create a blueprint, it's associated with your API key
When you search for blueprints, you only see blueprints created with your API key
When you delete blueprints, you can only remove blueprints you own
This security model ensures that your smart contract blueprints remain private to your account while still enabling collaboration through controlled sharing mechanisms.
Blueprint Management API Endpoints
/blueprints
POST
Create or update a blueprint
blueprint: CIP-57 compliant blueprint
refs: Reference UTXOs
/blueprints
GET
Find blueprints matching criteria
None
title, version, limit, offset, sortBy, order
/blueprints
DELETE
Remove blueprints
title: Blueprint title
version: Blueprint version
/blueprints/apply-params
POST
Apply parameters to validators - See Documentation
params: Validator hash to params mapping
blueprint: CIP-57 blueprint (if not uploaded)
Common Setup
The following setup is common to all blueprint operations:
Creating or Updating Blueprints
Use the POST method to upload a new blueprint or update an existing one. The API automatically determines whether to create or update based on the blueprint's title and version.
Finding Blueprints
Use the GET method to search for blueprints by title, version, or other criteria.
Deleting Blueprints
Use the DELETE method to remove blueprints from the system.
Last updated
Was this helpful?

