Skip to content

feat(tx-manifest): resolve references and classes - #13

Merged
Arvolear merged 1 commit into
devfrom
feature/tx-manifest-references
Sep 14, 2026
Merged

Arvolear merged 1 commit into
devfrom
feature/tx-manifest-references

Conversation

@lukachi

@lukachi lukachi commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

Stack

PR 4 of 9 in the tx-manifest merge train.

What this adds

  • Normalizes free actions and both generations of class/method declarations.
  • Resolves request parameters, arguments, deployment fields, bare references, and the deprecated compile_params. namespace by reference site.
  • Encodes supported SimplicityHL compile parameters from declared types, including asset-id byte order and fixed-width covenant hashes.
  • Reads deployed class instances and derives instances created by constructors.
  • Computes dependent covenant hashes to a bounded fixed point and refuses non-converging or malformed compiler results.
  • Follows the manifest's declared debug-symbol build mode for ordinary covenant derivation and computed hashes.
  • Integrates real smplx covenant compilation and parameter-type discovery while releasing WASM handles deterministically.
  • Carries the complete immutable covenant derivation through review: source, arguments, leaves, build mode, address, and scriptPubKey.

Review boundaries

This slice deliberately does not add:

  • multi-asset funding, issuance, confidential inputs or outputs, or blinding;
  • semantic input/output guards and validation actions;
  • developer tooling and corpus-wide inspection;
  • confirmation rendering or clear signing;
  • credentials, signing, activation, broadcast, or release wiring.

Those remain in later stacked PRs.

Verification

Verified from commit b994c0f in a clean detached worktree with the committed submodules:

  • smplx 8f0215c, SDK package 0.0.10
  • bun run typecheck:packages
  • focused strict TypeScript check for the smplx adapter
  • bun run lint (exit 0; existing repository warnings only)
  • bun run format:check
  • bun test packages/tx-manifest apps/extension/src/core/chains/liquid/adapters/smplx
  • 224 tests passed, 0 failed

The repository-wide TypeScript gate has a pre-existing clean-install React/Zod duplicate-type baseline. This stack uses the focused tx-manifest/smplx gate until the cumulative activation/release slice restores and proves the full root check.

Base automatically changed from feature/tx-manifest-engine to dev September 14, 2026 10:15
* whereas a partially-read map would silently leave a parameter untyped, and an untyped parameter
* is one this wallet then declines to encode for a reason about the wrong thing.
*/
export function createSmplxContractParamTypes(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please rename everywhere.

Suggested change
export function createSmplxContractParamTypes(
export function createSmplxCovenantParamTypes(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's delete this file.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's delete this one too.

* These are not gaps waiting to be filled in by pattern. Each one names something the position
* does not say, and a value written there would have to be guessed at rather than read.
*/
const UNENCODABLE: Record<string, string> = {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't fully understand that. Why can't we require a definite encoding here?

return { ok: false, reason: `"${text}" cannot be used as ${accepted.describes}.` };
}

if (reference.deprecated) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd just remove any deprecated stuff.

Comment on lines +164 to +167
for (let round = 1; round <= ITERATION_BOUND; round += 1) {
const next: Record<string, string> = {};

for (const { name, node, source } of computed) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see this is O(n^2) complexity. Can this be rewritten via topological sort to acheive linear O(n) complexity?

@Arvolear Arvolear left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good for now. See the comments.

@Arvolear
Arvolear merged commit 3a8ffac into dev Sep 14, 2026
2 checks passed
@Arvolear
Arvolear deleted the feature/tx-manifest-references branch September 14, 2026 13:47
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.

2 participants