Mint & Transfer Objects

Mint objects from templates and transfer them between wallets using the Event Bus.

15 minIntermediate

Prerequisites

  • Completed the Create Your First Template tutorial
  • A template ID from the previous tutorial

What You'll Build

In this tutorial you'll mint a tokenized object from the template you created, inspect it, and then transfer it to another wallet via the Event Bus action system.

Step 1 — Mint an Object

Objects are instances of templates. Minting creates a new object owned by your wallet with the default properties defined in the template. Mint operations go through the Event Bus via /ebus/execute:

bash
curl -X POST https://gateway-48587430648.europe-west6.run.app/ebus/execute \
  -H "Authorization: Bearer $DUAL_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "action": {
      "mint": {
        "template_id": "your-template-id",
        "custom": {
          "holder_name": "Alice Smith",
          "points": 100
        }
      }
    }
  }'

The response returns the newly minted object with a unique id and the custom properties you specified. Object data lives in the custom field.

Step 2 — Inspect the Object

Retrieve the full object details including its current state, ownership, and properties:

bash
curl https://gateway-48587430648.europe-west6.run.app/objects/{objectId} \
  -H "Authorization: Bearer $DUAL_TOKEN"

Key fields in the response:

FieldDescription
idUnique object identifier
template_idTemplate this object was minted from
ownerCurrent owner's wallet address
propertiesObject data (points, tier, etc.)

Step 3 — Transfer via the Event Bus

The Event Bus processes actions on objects. A transfer action changes the object's owner from your wallet to another. All actions go through /ebus/execute:

bash
curl -X POST https://gateway-48587430648.europe-west6.run.app/ebus/execute \
  -H "Authorization: Bearer $DUAL_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "action": {
      "transfer": {
        "id": "your-object-id",
        "to": "recipient-dual-wallet-id"
      }
    }
  }'

Important: The to field must be the recipient's DUAL wallet ID (not an Ethereum address or email). The Event Bus validates the action against the template's rules, updates the object's owner, and emits an event that can trigger webhooks.

Step 4 — Verify the Transfer

Fetch the object again to confirm the owner field has changed:

bash
curl https://gateway-48587430648.europe-west6.run.app/objects/{objectId} \
  -H "Authorization: Bearer $DUAL_TOKEN"

Understanding the Action Pipeline

When an action is submitted to the Event Bus, it goes through several stages:

  1. Validation — The action is checked against template rules and permissions
  2. Execution — The state change is applied off-chain
  3. Sequencing — The Sequencer orders and batches the action
  4. Anchoring — The batch fingerprint is written on-chain

What's Next?

Now that you can mint and transfer, try Building a Web Face to give your objects a custom interactive display.