Skip to content
    hazBasehazBaseDocs
    IMPLEMENTATION GUIDE

    Issue, transfer & operate

    Define the represented rights, participants, transfer conditions and operational records before issuance. Then choose the contracts that express that design.

    Start with the rights model

    Even for the same physical asset, ownership-related rights, access eligibility and revenue rights require different data and constraints. Define how agreements, asset IDs and token IDs relate.

    Explore implementation patterns

    A common implementation flow

    01Define & deploy
    02Issue & allocate
    03Transfer & use
    04Operate & record

    Separate preparation and submission

    prepareTransfer provides details such as recipient, amount and execution policy for review. submitTransfer requests execution. Successful preparation does not complete a transfer.

    typescript
    import { createHazbaseWalletClient,
      type PrepareTransferInput } from "@hazbase/kit/wallet";
    
    const wallet = createHazbaseWalletClient();
    export async function previewTransfer(input: PrepareTransferInput) {
      const prepared = await wallet.prepareTransfer(input);
      return { display: prepared.display, policy: prepared.policy };
    }

    Show the details in your UI and submit only after the required authentication and approval. Retain userOpHash and transactionHash, then reconcile status with the on-chain result.

    Check units and execution results

    Amount units vary by API and Helper. Avoid floating-point arithmetic for smallest units and consult the method types. BigInt cannot be passed directly to JSON; define an explicit storage representation.

    Contract state changes, bank payments, physical delivery and contractual rights are separate processes. Provide reconciliation with your business systems.