Skip to content

Add just file to simplify local testing - #136

Open
ikripaka wants to merge 54 commits into
devfrom
feat/just-tests
Open

Add just file to simplify local testing#136
ikripaka wants to merge 54 commits into
devfrom
feat/just-tests

Conversation

@ikripaka

Copy link
Copy Markdown
Collaborator
  • This PR suggests a bug fix and I've added the necessary tests.
  • This PR introduces a new feature and I've discussed the update in an Issue or with the team.
  • This PR is just a minor change like a typo fix.

Add a just file for local test simplification

Hrom131 and others added 30 commits July 30, 2026 18:44
…imization

Add CompiledProgram to the Program structure
…_hash

Add get_tapleaf_hash function to the Program struct
CI runs `cargo clippy --workspace --all-targets --all-features` under
`RUSTFLAGS: -Dwarnings`, so a pedantic warning fails the build. This branch
carried twenty-two of them: six in the SDK and sixteen in the binding.

Most are mechanical — backticks around SimplicityHL, OP_RETURN and BitMachine
in prose, `#[must_use]` on three accessors that return a value and touch
nothing, `if let` where a `match` destructured a single pattern.

Two are judgement calls, both recorded where they are made.

`Option<String>` stays on the four binding entry points clippy wants borrowed.
wasm-bindgen implements no `OptionFromWasmAbi` for `&str`, so an optional string
argument has to arrive owned; the alternative is not a nicer signature but a
crate that does not compile. The allow sits on each function with the reason
above it rather than at the crate root, so a genuine case elsewhere still fails.

`required_signature` stops returning `Result`. It parses a name it has already
proved non-empty and has no failing path, and a `?` at its call site claimed
otherwise. `add_contract_input` keeps its nine arguments: it is the binding
surface a caller reaches for, and folding them into a parameter object would
move the shape into JavaScript for a lint.

Claude-Session: https://claude.ai/code/session_0133RUq5DKdBerk4ypVdpAZK
Pass the workspace clippy gate with warnings denied
…-with-state

Add support for git rev and tag during installation
Arvolear and others added 24 commits August 14, 2026 18:42
…ith-flattened-simf

feat: add writing dev information to metadata.json file
Silence Git errors during `simplex install`
Remove #[must_use] from set_storage_at function
A wallet driving this SDK from JavaScript could not express several things a
covenant spend needs, and one of them was silently wrong.

- Issuance is exposed on both input shapes, so a transaction that creates an
  asset can be assembled from JavaScript.
- A contract's parameters carry their declared types across the boundary,
  instead of arriving as untyped values the caller had to guess at.
- A covenant being spent is rebuilt from the same parts it was committed to,
  so the leaf that is revealed matches the one in the tree.
- A transaction can declare the height it may not be mined before, which a
  timelocked covenant requires. A zero height is treated as no height, because
  writing zero into an input reads back as a constraint that can never be met
  and refuses every spend.
- A covenant that refuses now says what the transaction declared, naming the
  locktime and the sequence, so a refusal can be diagnosed without a debugger.
Four free functions sat at the crate root where the review asked why they were
there. None of them is used by more than one type.

- Reading an id and the issuer contract built from it move onto
  `TransactionBuilder`, beside the other private helpers its inputs already use.
- Writing an id and the report built from it move onto `IssuanceReport`, which
  is the only thing that returns them.
- Both locktime setters document the panic they carry: `LockTime` is a height
  below `500_000_000` and a time at or above it, and the wrong side of that
  boundary aborts the module.

No exported binding changes.
A height ends at 499_999_999 and 500_000_000 is already a time, so the note
named the first value that aborts as though it were allowed.
Two unrelated things carried the word. Elements calls the document an
issuer publishes about an asset its *contract*, and mixes a hash of it
with the outpoint being spent to derive the asset id; that sense stays,
because `ContractHash` is Elements' own type and the SDK uses the word
at `crates/sdk/src/utils.rs`.

The other sense was borrowed from Ethereum for a Simplicity program that
locks money. In Bitcoin and Elements that is a covenant, which is what
this crate already called it at the two places nobody exports: the error
`dryRunContractInput` raised said "is not a covenant input", and the
comment in `program_input` said "the covenant being spent".

`Contract`, `contractAddress`, `contractParameterTypes`, `addContractInput`,
`addContractIssuanceInput` and `dryRunContractInput` take the chain's word.

`read_id` and `write_id` go with them. Neither read nor wrote: each was one
direction of the byte-order flip between an id as displayed and the bytes
it is made of. `ContractHash` is `#[hash_newtype(backward)]` and `Midstate`
sets `DISPLAY_BACKWARD`, so `from_str` and `to_string` already do exactly
this. The four on-chain issuance vectors still derive the assets Liquid
holds, which is what proves the substitution.

The length check `read_id` carried stays, because `from_str` alone reports
a wrong-length id and a non-hex id with the same sentence.

Written by Claude.
Build and sign covenant spends from JavaScript
…and bump HL version to `0.7.2` (#134)

* fix: deps installation in fixtures

* fix: add simplex install command to fixtures.yml

* fix: move simplex install command after cd

* fix: add simplex install in one more place

* fix: delete intermediate dependency in a fixture

* feat: add --all flag to the simplex clean command

* fmt: apply cargo fmt

* bump: SimplicityHL version to 0.7.2

* refactor: fix review comemnts
@ikripaka
ikripaka requested a review from Arvolear as a code owner August 27, 2026 19:36
@ikripaka ikripaka mentioned this pull request Aug 27, 2026
3 tasks
@ikripaka
ikripaka deleted the branch dev September 2, 2026 13:17
@ikripaka ikripaka closed this Sep 2, 2026
@ikripaka ikripaka reopened this Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants