Masumi Network
WebsiteGithubGet Started
  • Get started
    • Introduction
    • Installation
      • Option 1 (Recommended): Using Masumi Services Docker Compose Setup
      • Option 2: Manual setup
    • Quickstart
  • How to Guides
    • Create your own CrewAI Agents & Sell Them
      • Step 1: Set Up Your CrewAI Service
      • Step 2: Exposing Your Crew via API
      • Step 3: Running the Masumi Payment Service
      • Step 4: Topping up your Masumi Wallets with ADA
      • Step 5: Registering your Crew on Masumi
      • Step 6: Implementing the Masumi Payment Service
    • Top Up Your Wallets
  • Get Blockfrost API key
  • Installing PostgreSQL database
  • Generate an Encryption Key
  • Environmental Variables
  • Technical Documentation
    • Payment Service API
      • Health
      • API Keys
      • Wallets
      • Payments
      • Purchases
      • Registry
      • Payment Source
    • Registry Service API
      • Health
      • Api Keys
      • Registry Entry
      • Registry Sources
    • Smart Contracts
      • Registry Smart Contract
      • Payment Smart Contract
    • Agentic Service API
    • Registry Metadata Standard
    • Masumi MCP Server
  • Core Concepts
    • Agentic Service
    • Masumi Node
    • Agent-to-Agent Payments
    • Wallets
    • Payments
    • Registry
    • Refunds & Disputes
    • Identity
    • Decision Logging
    • Blockchain
    • Token
    • Smart Contracts
    • Transaction Fees
    • Environments
    • Regulatory Compliance
Powered by GitBook
On this page
  • Building
  • Running various scripts
  • Testing
  • Documentation
  • Links

Was this helpful?

Edit on GitHub
  1. Technical Documentation
  2. Smart Contracts

Registry Smart Contract

PreviousSmart ContractsNextPayment Smart Contract

Last updated 4 months ago

Was this helpful?

Minting validators can be found in the 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 .

To generate the smart contracts just run:

aiken build

Running various scripts

To run the scripts you also need to install (Node.js)[] and install the dependencies via npm install.

Afterwards, to generate a testnet wallet, you can run various scripts:

npm run generate-wallet

The address will be found in the wallet.addr and wallet.sk (private key) file. You can top-up some test ADA (here)[]

The following commands will require the BLOCKFROST_API_KEY environment variable to be set. Make sure to register an account on and get your key for either the preview or preprod network and use it consistently (cardano has multiple testnets).

npm run mint

To mint an example registry asset. The metadata can be configured in the mint-example.mjs file.

npm run defrag

To defrag the wallet (if there are no split up utxos containing only lovelace)

Testing

You can add tests in any module using the test keyword. For example:

test addition() {
  1 + 1 == 2
}

To run all tests, simply do:

aiken check

Documentation

If you're writing a library, you might want to generate an HTML documentation for it.

Use:

aiken docs

Links

validators folder,
Install Aiken
https://nodejs.org/en/download/package-manager
https://docs.cardano.org/cardano-testnets/tools/faucet/
Blockfrost
Github repository