Repository navigation
wasm: export coin checks, forfeits and releases for Arca - #33
Merged
GracedEternalKingCabbageMan merged 1 commit intoOct 3, 2026
Merged
GracedEternalKingCabbageMan merged 1 commit into
GracedEternalKingCabbageMan merged 1 commit into
Conversation
A page could verify a leaf taken from a round but not a coin received
out of round, and could not build what it signs when it gives a leaf up:
the forfeit and the release. The native kit has had these; the bindings
now carry them, on ArkVerifier and at the median time each call names.
verifyCoin checks a coin record against the rounds and boards its
lineage came from, for the wallet's key and nonce. The lineage check
needs the chain, which a page reaches only asynchronously, so
coinLineage first names the lineage scripts and boards to look up, and
verifyCoin then takes what the chain source found ({ paid, spent }):
a coin with a lineage script paid or a board spent is refused, kind
on_chain; without it the verdict says the coin rests on the operator's
rule.
forfeitRefresh, forfeitOffboard, releaseRefresh and releaseOffboard wrap
the native builders, so h and M come from the leaf and round the wallet
validated. Each returns the message as signCsfs takes it, with its
digest, and M in display hex.
The byte-order vector gains a release (M display at the edge, internal
in the message, from the Arca signer vectors) and a received coin (its
asset display as the kit gives it, internal in the record), each
checked in Rust and through the bindings. ark_regtest mines a round
paying a new leaf, an offboard output and the operator's connector;
the bindings' four digests equal the native ones and the signatures
they make with the old leaves' keys verify natively.
GracedEternalKingCabbageMan
deleted the
feature/wasm-arca-coin-forfeit-release
branch
October 3, 2026 12:45
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A page could verify a leaf taken from a round, but not a coin received out of round, and it could not build what it signs when it gives a leaf up: the forfeit and the release. The native kit already has these. The bindings now carry them on
ArkVerifier, each at the median time the call names.Coins.
verifyCoin(coin, rounds, ownerKey, ownerNonce, now, chain?)checks a coin record against the rounds and boards its lineage came from, for the wallet's key and nonce.coinLineage(coin, rounds, now)first lists the lineage scripts and boards to look up, andverifyCointhen takes what the chain source found ({ paid, spent }).on_chain. Withoutchain, the verdict says the coin rests on the operator's rule.Forfeits and releases.
forfeitRefresh,forfeitOffboard,releaseRefreshandreleaseOffboardwrap the native builders, sohandMcome from the leaf and round the wallet validated. Each returns the message in the formsignCsfstakes, with its digest, and givesMin display hex.Byte-order vector. It gains a release (
Min display hex at the edge, internal order in the message, taken from the Arca signer vectors) and a received coin (its asset in display hex as the kit gives it, internal order in the record). Both are checked in Rust and through the bindings.Tested:
ark_records.js:on_chain;salt, another key or nonce withowner, and a missing board transaction withround;{ payd: [] }is refused:unknown field \payd``.ark_regtest:Mis that round's connector asset;signCsfsmakes with the old leaves' keys verify natively;M;arca_signers.js,arca_regtest.py(Tests successful),lwk_signer(26 tests; 27 withark) andlwk_wolletark::(29) all pass.