woodland.sh (alpha)

GitHub
@ you · & player · tree · + stumpEntering the woodland...

Create player

Connecting...

Waiting for wallet...

Need test sats? Mutinynet faucet.

Checking wallet...
Player details

Actions

Loading...

        

Details

Player backup & restore

Download the private key and exact PLAYER_ID needed to reopen this player in another browser.

Keep the file secret. Anyone who has it controls the player and wallet. Restoring replaces this browser’s current key.

About woodland.sh and its VTXO contracts

A VTXO is a Bitcoin-backed Arkade output: a one-use box containing sats, assets, and game state. A contract never edits that box in place. It spends the current VTXO, checks the complete transaction, and permits only a valid replacement VTXO.

old player + old tree
        │ valid swing
        ▼
new player + new tree + extension + anchor

What enforces the game?

  • Bitcoin Taproot enforces which keys must sign each spending path.
  • Arkade Script covenants inspect transaction inputs, outputs, assets, and state packets.
  • Asset V1 tracks the fixed TREE, LOG, and XP supplies and their movement.

The browser and woodland server present and index the game. They do not decide whether a gameplay transaction is valid.

The two gameplay contracts

Player

One owner-specific VTXO per player. It holds 330 sats, one PLAYER_ID, a recursive roll, bounded luck credit, harvested LOG, and soulbound XP.

Its paths allow chopping, exact renewal by the owner or delegated watchtower, and owner-authorized LOG withdrawal. The XP asset is the sole progression backing, each earned unit represents 25 Woodcutting XP, and it has no withdrawal path.

Tree

Each of exactly 420 trees occupies a separate VTXO using one shared contract template. It holds 330 sats, one TREE marker, coordinates, health, and its remaining local LOG and XP.

Every tree starts with 50,000 LOG, 50,000 XP asset units representing 1,250,000 Woodcutting XP, and ten health. Its state paths are chopping, permissionless funded-stump regrowth, and rollover-authorized exact maintenance; there is no shared supply vault.

Why a swing uses two contracts

A swing spends the player and selected tree together. The player covenant verifies owner approval, roll, luck, PLAYER_ID, and soulbound XP. The tree covenant independently verifies its inventory and the reward movement. Both must approve the same transaction.

success: player LOG +1 · player Woodcutting XP +25
         tree LOG/XP assets -1 · tree health -1
miss:    assets and health unchanged · player roll/luck advances

This reciprocal check prevents crediting a player without debiting a tree, forging progression, or redirecting assets.

Renewal, regrowth, permission, and trust

Arkade VTXOs have finite batch lifetimes. Funded-stump regrowth resets only health from zero to ten and is permissionless apart from the Arkade operator and script-tweaked emulator closure. Active trees and terminal stumps use exact-state maintenance, which additionally requires the low-authority rollover signer.

If arkd charges an intent fee, renewal adds one clean asset-free wallet VTXO and returns same-contract change; gameplay state never funds fees. Bitcoin Taproot enforces each complete signer closure.

More technical details: the covenant scripts (not required to play)

Technical caveat. This section describes protocol implementation, transaction shapes, and signer rules. It is intended for reviewers and curious players; none of it is required to play woodland.sh.

Script inventory

The game uses six distinct Arkade covenant programs mounted as seven usable Taproot leaves. Player renewal is one program mounted twice with different signer sets.

VTXOArkade programsUsable Taproot leaves
PlayerChop, renewal, LOG withdrawalChop, owner renewal, watchtower renewal, withdrawal
TreeChop, regrowth, maintenanceThree corresponding leaves

Each contract also includes an Arkade-required delayed-exit leaf keyed to a NUMS point. It satisfies batch expiry accounting without providing a usable path around the recursive covenants.

How a covenant becomes a Taproot leaf

Arkade leaf
├─ Arkade Script: transaction and state rules
├─ ordinary signers: owner, rollover key, or Arkade operator
└─ introspector: emulator key tweaked by the covenant hash

tweaked emulator = emulator + H("ArkScriptHash", covenant)·G

The emulator evaluates the Arkade Script. Bitcoin Taproot enforces the complete signer closure, including the covenant-specific tweaked emulator key. Player leaves add the owner or rollover signer. Tree chop and regrowth use operator plus emulator; tree maintenance also adds rollover.

How to read the programs

The scripts are stack programs made from arithmetic checks and Arkade transaction-introspection opcodes. Most rules end in OP_EQUALVERIFY: a failed comparison immediately rejects the spend.

PUSHCURRENTINPUTINDEX
Proves which transaction input is executing this leaf.
INSPECTNUMINPUTS / OUTPUTS
Pins the complete transaction shape.
INSPECTINPUTVALUE / OUTPUTVALUE
Checks the sat value carried by an endpoint.
INSPECTINPUTSCRIPTPUBKEY / OUTPUTSCRIPTPUBKEY
Checks recursive P2TR destinations.
INSPECTINPUTPACKET / INSPECTPACKET
Compares previous and replacement state packets.
FINDASSETGROUPBYASSETID
Finds the packet group for TREE, LOG, XP, or PLAYER_ID.
INSPECTINASSETLOOKUP / OUTASSETLOOKUP
Reads asset assignment locations and amounts.
INSPECTASSETGROUPCTRL
Requires transfer groups to remain uncontrolled and non-reissuable.
PUSHCURRENTINPUTINDEX  1  EQUALVERIFY
INSPECTNUMINPUTS       2  EQUALVERIFY
INSPECTNUMOUTPUTS      4  EQUALVERIFY

Player covenant programs

1. Player chop — player_chop_covenant_script

The player half proves owner-specific state continuity. It requires player input zero, the two-input/four-output swing shape, the same player P2TR and 330 sats, and one genuine world TREE marker with unchanged tree P2TR and value at both tree endpoints.

preserve: player P2TR, 330 sats, PLAYER_ID, XP asset
advance:  roll = SHA256(previous roll), canonical luck credit
derive:   reward threshold from input XP asset balance
pin:      merged extension, canonical anchor, immutable TREE asset

It validates the canonical reward calculation but leaves the actual health, LOG, and XP deltas to the reciprocal tree script. This keeps owner continuity on the player side and global supply accounting on the tree side.

2. Player renewal — player_renewal_covenant_script

This exact-state self-send program is used by both the owner-renewal and watchtower-renewal leaves. The base intent proof has a fake message input at index zero, the real player VTXO at index one, replacement state at output zero, and the extension at output one. A fee-bearing proof adds one clean wallet input and same-contract change.

same P2TR and 330 sats
same roll and luck packets
same one-unit PLAYER_ID
same LOG and XP presence and balances
optional fee input and change are asset-free with the same P2TR
no assets in the extension output

The owner leaf requires owner, operator, and emulator. The watchtower leaf replaces the owner with the low-authority rollover key. Both execute the same preservation program, so the watchtower cannot chop or withdraw.

3. Player LOG withdrawal — player_withdraw_covenant_script

The transaction spends player state plus one ordinary wallet funding input. It recreates player state, sends LOG to the owner-selected destination, and carries the standard extension and anchor.

player LOG in - player LOG out = destination LOG
player XP in                    = player XP out
destination sat value           = wallet funding input value
player state value              = 330 sats before and after

Roll, luck, XP assets, and PLAYER_ID are preserved exactly. The destination script is intentionally unrestricted because LOG is liquid. The player’s 330 sats never fund the destination.

Tree covenant programs

4. Tree chop — tree_covenant_script

This is the main game-rule program. It requires tree input one, two inputs, four outputs, and the canonical PLAYER_ID, TREE, LOG, XP, STONE, and IRON ORE asset groups when present. It authenticates all six spending leaves and the NUMS internal key of the owner-specific player contract, rejecting alternate escape paths. Player and tree scripts, sat values, immutable tree state, the extension, and the anchor must all be canonical.

The script hashes the previous player roll, converts the new roll into a bucket modulo 10,000, derives probability from the input XP asset balance, applies bounded luck credit, and leaves one canonical reward bit G.

tree health in         = tree health out + G
tree LOG in            = tree LOG out + G
player LOG out         = player LOG in + G
tree XP in             = tree XP out + G
player XP out          = player XP in + G

Each successful G transfers one soulbound XP asset unit, which deterministically represents 25 user-facing Woodcutting XP.

It also requires positive input health and one conserved TREE marker. A miss has G = 0: assets and health stay fixed while roll and luck still advance.

5–6. Tree regrowth and maintenance

tree_regrowth_covenant_script and tree_maintenance_covenant_script share exact P2TR, sat-value, immutable-state, TREE, LOG, and XP preservation, but their health rules and signer closures are disjoint.

funded-stump regrowth:
    input health = 0 and LOG reserve > 0
    output health = 10
    signers = operator + tweaked emulator
active or terminal maintenance:
    output health = input health
    signers = operator + rollover + tweaked emulator

No timer or height witness gates either transition. Regrowth derives eligibility from the stump’s conserved local LOG reserve; maintenance cannot change any state.

Canonical packet encoding

Health and luck credit use fixed-width numeric packets. Each program checks byte length and canonical signed-magnitude encoding, rejecting alternate forms such as negative zero. Player progression is derived only from the soulbound XP asset balance at 25 Woodcutting XP per earned unit. The player roll is a fixed 32-byte packet.

Activation and manifest checks

Activation is not a separate covenant leaf: it spends an ordinary wallet VTXO and creates the first player state. On the first recursive spend, every player leaf recognizes the direct-activation shape and requires the P2TR-witness-program-derived roll, PLAYER_ID group zero, and initial luck credit 8,000.

A custom client can choose roll and luck before entering the player contract. Every recursive path checks that the axe tier is backed by earned XP: Wooden requires the first successful chop, Stone requires level 5, and Iron requires level 15. Once entered, the complete player contract preserves progression and enforces state transitions.

The signed schema 4 world manifest binds endpoints, service and lifecycle signers, ruleset, asset IDs, layout, and raw tree script commitments to the deployer key. Clients verify its BIP340 signature, rebuild the contract, and require every P2TR and Arkade Script byte to match before using any manifest URL. Protocol v4 requires a fresh world with its entire initial asset supply locked in the tree contracts.