Skip to content
    hazBasehazBaseDocs
    QUICKSTART

    Your first RWA application

    Issue, allocate and transfer tokens, then inspect holdings with a sample application. Choose equipment, inventory or access rights, and set an asset name and issuance cap.

    Choose a sample
    RIGHTS MODEL

    Test units representing contractual rights related to equipment

    Transferable

    Run the sample application

    Install Node.js 22 or later, download the sample and extract it into an empty folder. Place your downloaded hazbase-brief.json in that folder. The application runs on your computer and starts its own chain and test accounts.

    Download the sample application
    Run in the extracted folder
    npm ci
    npm start -- --brief hazbase-brief.json

    Open the printed http://127.0.0.1:3400 URL. Run npm start without a brief to use the equipment template. The first installation requires downloading dependencies.

    1. 01
      Define the asset

      The contract starts with the asset name, issuance cap and transfer policy.

    2. 02
      Issue & allocate

      Issue units to participants and inspect balances and transaction receipts.

    3. 03
      Transfer & record

      Transfer units when the template allows it, and add operating notes.

    4. 04
      Export the result

      Save settings, balances, transactions and operating notes as JSON.

    Operate the sample through your AI

    Configure MCP to run the same operations through your AI. Use the prompt below with the settings selected above.

    AI PROMPT
    Start the hazBase RWA sample application with these settings.
    Blueprint: equipment
    Asset: Delivery robot A-001
    Issuance cap: 1000 units
    
    1. Read hazbase_get_blueprint and hazbase_get_reference.
    2. Call hazbase_create_sandbox with the blueprint, assetName and units.
    3. Issue and allocate 10 units to operator; verify the balance.
    4. Add an operating note and call hazbase_export_handoff.
    5. Show the dashboard URL, transaction receipts and configuration needed for a production integration.
    
    Identify the local-chain scope and distinguish application operating notes from on-chain records.
    Connect through MCP

    Execution environment and data storage

    ScopeImplementation
    Issuance, allocation, transfers, balancesFlexibleToken and @hazbase/kit run on a local EVM (chain ID 31337). Chain state resets on restart.
    Asset metadata and operating notesStored in application memory. Export results before stopping; restarting resets them.
    Production integrationThe sample does not include production authentication, durable storage or external data connections. Configure and implement these for your use case, along with contractual rights mapping and the target chain.
    The sample covers representing rights as units and issuing, holding and transferring them. It does not transfer real-world rights or money. Consult the pattern guides and SDK reference to add revenue distribution, fund accounting or physical delivery workflows.

    Connect your service to the API

    Test connectivity with the public information API. For production issuance, transfers and other operations, check each API’s authentication, permissions and operating requirements. The sample environment does not require an API access application.

    Start using the API