Dedicated Commerce View

Contract Commerce

A focused digital-goods checkout built on contract metadata and escrow settlement, without the rest of the wallet admin surface in the way.

Back to wallet

Wallet Context

Choose the buyer/seller accounts used in this demo.

No local accounts

Create or import a wallet on the main wallet page first.

Sample Contract Deploy

Select or upload a WASM artifact, deploy via RPC, and capture deploy metadata for the next interaction tasks.

WASM source

sha256 7d562dcf3e826ae30b459e4da794b30261d5ef580fa67d292814d630654202b5

sample_kv.wasm · 334 bytes

Source: contracts/sample-kv · language: wat

(module
(memory (export "memory") 1)
(global $count (mut i32) (i32.const 0))
;; Layout:
;; 0..255 -> key presence bitmap (u8 per key)
;; 1024..2047 -> values table (u32 per key)
(func $is_valid_key (param $key i32) (result i32)
local.get $key
i32.const 256
i32.lt_u
)
(func $presence_addr (param $key i32) (result i32)
local.get $key
)
(func $value_addr (param $key i32) (result i32)
i32.const 1024
local.get $key
i32.const 4
i32.mul
i32.add
)
(func (export "set") (param $key i32) (param $value i32) (result i32)
(local $addr i32)
(local $was_present i32)
local.get $key
call $is_valid_key
i32.eqz
if (result i32)
i32.const 0
else
local.get $key
call $presence_addr
local.tee $addr
i32.load8_u
local.set $was_present
local.get $addr
i32.const 1
i32.store8
local.get $key
call $value_addr
local.get $value
i32.store
local.get $was_present
i32.eqz
if
global.get $count
i32.const 1
i32.add
global.set $count
end
i32.const 1
end
)
(func (export "get") (param $key i32) (result i32)
local.get $key
call $is_valid_key
i32.eqz
if (result i32)
i32.const 0
else
local.get $key
call $presence_addr
i32.load8_u
i32.eqz
if (result i32)
i32.const 0
else
local.get $key
call $value_addr
i32.load
end
end
)
(func (export "del") (param $key i32) (result i32)
local.get $key
call $is_valid_key
i32.eqz
if (result i32)
i32.const 0
else
local.get $key
call $presence_addr
i32.load8_u
i32.eqz
if (result i32)
i32.const 0
else
local.get $key
call $presence_addr
i32.const 0
i32.store8
local.get $key
call $value_addr
i32.const 0
i32.store
global.get $count
i32.const 1
i32.sub
global.set $count
i32.const 1
end
end
)
(func (export "len") (result i32)
global.get $count
)
(func (export "reset")
(local $i i32)
i32.const 0
local.set $i
block $done
loop $loop
local.get $i
i32.const 256
i32.ge_u
br_if $done
local.get $i
call $presence_addr
i32.const 0
i32.store8
local.get $i
call $value_addr
i32.const 0
i32.store
local.get $i
i32.const 1
i32.add
local.set $i
br $loop
end
end
i32.const 0
global.set $count
)
)

Contract Interaction

Call and query methods on a deployed sample contract with typed input and rendered response output.

Contract Commerce Sample

Digital checkout with programmable order state and escrowed release.

This page isolates the product workflow so you can create sample orders, fund escrow, fulfill delivery, and settle payment without scrolling through unrelated wallet controls.

Checkout brief

Signal Kit

Create a sample order contract, reserve funds in escrow, and walk through fulfillment from buyer and seller accounts.

Product price2.4 SPC
BuyerSelect account
Merchant shortcut
Premium product flowContract + escrow hybridWallet-native demo

Programmable state

Order metadata stays explicit throughout the checkout lifecycle.

The contract records buyer, seller, price, fulfillment notes, and escrow linkage so the demo reads like an application workflow instead of a loose payment transfer.

Escrow settlement

Funds move only when the order reaches a valid release path.

Buyer funding, seller fulfillment, buyer confirmation, disputes, and refunds are expressed as concrete steps with role-aware controls.

Demo trust

Local browser state remains inspectable while the chain-facing actions stay deterministic.

The page keeps enough context in-browser to feel interactive, but contract and escrow transitions still round-trip through the same RPC surface used elsewhere in the wallet.

How this demo works

A compact operator view of the current commerce session.

Local wallets

0

Orders created

0

Current status

Ready to start

1

Select a digital product and choose a merchant account from local wallet context.

2

Create a contract checkout that links order metadata to a dedicated escrow id.

3

Walk the order through funding, fulfillment, release, dispute, or refund as distinct actors.

Live trust cues

Active buyer: No account selected

Escrow focus: No checkout selected

Selected Checkout

Pick or create an order to see the active commerce narrative.

Order Book

Track contract-backed sample orders created in this browser.

No contract orders yet

Create a contract checkout to begin.

Commerce Activity Timeline

Order-focused escrow activity for the selected commerce flow.

No order selected

Inspect a contract commerce order to see its escrow activity timeline.

Action Rail

Switch demo actors and settle the selected order end to end.

No order selected

Create or inspect an order to activate the commerce action rail.