Skip to content
DigiStamp Contracts, home

⚠️ NOTICE: Deployment Testing in Progress We have recently deployed a major platform update and are currently performing post-deployment testing and validation. Please do not use this website or submit any transactions until testing is complete. Some features may be unavailable or behave unexpectedly. Thank you for your patience as we work to ensure everything is functioning correctly.

← Template gallery

DigiAsset delivery after verified payment

Once the buyer's DGB payment is confirmed and verified, the seller's DigiAsset is transferred to the buyer. The transfer is simulated against DigiAsset indexer rules before anyone signs it.

Commercedigiassetpaymenttransfersaleasset-delivery-after-payment v1

Simulation only

This template moves value (transfer a digiasset). Financial execution has no production approval: on mainnet it can be drafted and simulated, never executed. On a test network it runs only where an operator has enabled and approved it.

Who enforces what

  • Condition paid DGB payment confirmedApplication-enforced
  • Action deliver Transfer a DigiAssetDigiAsset-indexer-enforcedFinancial
  • Action deliver Record the outcomeApplication-enforced
Consensus-enforced
Every DigiByte node enforces it. Nobody can override it, including Contracts.
DigiAsset-indexer-enforced
DigiAsset indexers apply it after a transaction confirms. It is not DigiByte consensus: a valid DigiByte transaction can still be treated as burning assets.
Application-enforced
Contracts decides it in its own application, from data you can check. You trust Contracts' nodes, records and evaluation.
Cryptographically verifiable
Anyone can check it from public data and mathematics alone (wallet signatures, drand). Contracts records it; you need not trust Contracts to verify it.

Before it can be signed, fill in

  • a DigiByte address for every party
  • the DigiAsset id
  • the address the buyer pays
  • the price

Simulation

The standard scenarios, run through the same rule engine the live service uses, with example values in every blank (addresses nobody holds keys for, and a format-valid example asset).

ScenarioOutcomeActions

Nothing happens

Everyone signs, then nobody does anything until expiry.

lapsednone

Paid: deliver the asset happens

The least that makes rule “Paid: deliver the asset” true happens at block 24500005.

stops: needs an operator
deliver: transfer asset (disabled)
deliver: update contract state (cancelled)

Data unavailable

The rule conditions are met, but every outside data source is unreachable. Nothing irreversible may happen.

nonenone

Rules

  1. 1. Paid: deliver the asset

    When “paid”

    • → Transfer 1 units of Example item from the seller to the buyer. Noncustodial: the seller signs the transaction with their own wallet; nothing moves without that signature.DigiAsset-indexer-enforcedIrreversibleFinancial · execution disabled
    • → Record the outcome: fulfilled. The contract ends.Application-enforcedIrreversible
  2. Expiry

    At DigiByte block 24,540,320 (20 confirmations), if no outcome has been recorded, the contract ends as lapsed. Nothing that happens at or after expiry counts.

Conditions

  • paidDGB payment confirmedApplication-enforced

    The buyer pays at least 1 DGB to D89e6HXB…KMMirB, carrying this contract's reference, with 20 confirmations.

    The payment is an ordinary DigiByte transaction between the parties. Contracts observes it on the chain and decides whether it counts.

    • Without a payment reference, any payment of the amount to the address counts. Use an address reserved for this contract.
    • Contracts never holds or forwards the funds.

What you are trusting

DigiByte itself does not enforce these rules. Contracts evaluates them from public data and records the outcome; the parties’ signatures and any anchors can be checked by anyone.

  • Contracts' evaluation and records
  • Contracts' DigiByte node
  • Contracts' evaluation

Irreversible once done

  • Paid: deliver the asset: Transfer 1 units of Example item from the seller to the buyer. Noncustodial: the seller signs the transaction with their own wallet; nothing moves without that signature.
  • Paid: deliver the asset: Record the outcome: fulfilled. The contract ends.

These run only when every condition they depend on is known. Missing or unconfirmed data never triggers them.

This draft uses disabled features (financial actions or oracles). It can be saved but not sent for signature.

Use it from code

The same template is available from the API (GET /api/contracts/v1/templates/asset-delivery-after-payment) and the TypeScript SDK:

const { draft } = await client.templates.get("asset-delivery-after-payment");
// fill in addresses, asset ids and amounts, then:
const { id } = await client.contracts.create(draft, { idempotencyKey: crypto.randomUUID() });