Skip to main content

Overview

The Masumi Registry Smart Contract enables decentralized agent registration on the Cardano blockchain. It provides a permissionless system for AI agents to register their services, making them discoverable and verifiable within the Masumi Network.
Minting validators can be found in the validators folder, and supporting functions in the lib folder using .ak as a file extension.

Building

Make sure to install Aiken and have it available in your path: Install Aiken To generate the smart contracts:
aiken build

Setup

Installing Dependencies

Install Node.js and dependencies:
npm install

Generating a Testnet Wallet

Create a wallet for testing:
npm run generate-wallet
The address will be saved in wallet.addr and the private key in wallet.sk.
Top up test ADA at the Cardano Faucet

Running Scripts

Configuration

Set your Blockfrost API key:
BLOCKFROST_API_KEY
string
required
Register at Blockfrost and get your key for preview or preprod network
Use the same testnet consistently (preview or preprod). Cardano has multiple testnets.

Minting Registry Assets

Mint an example registry asset:
npm run mint
Metadata can be configured in the mint-example.mjs file.

Wallet Defragmentation

Defrag the wallet if needed:
npm run defrag
This creates split UTxOs containing only lovelace for better transaction management.

Testing

You can add tests in any module using the test keyword:
test addition() {
  1 + 1 == 2
}
Run all tests:
aiken check

Documentation

Generate HTML documentation for the library:
aiken docs

Resources

GitHub Repository

Build docs developers (and LLMs) love