Table of Contents

Class ArkadeProgramCompiler

Namespace
NArk.Arkade.Program
Assembly
NArk.Arkade.dll

Compiles an ArkadeProgram (plus constructor args and signer ArkadeProgramKeys) into per-function leaf scripts. Mirrors the ts-sdk's compileFunctions/resolveAsm/resolveSigner/validateTapscript, but reuses this codebase's existing tapleaf conventions (NofNMultisigTapScript, the "last OP_CHECKSIGVERIFY becomes OP_CHECKSIG" trick from UnilateralPathArkTapScript) instead of porting ts-sdk's parallel *Tapscript builders.

public static class ArkadeProgramCompiler
Inheritance
ArkadeProgramCompiler
Inherited Members

Methods

Compile(ArkadeProgram, IReadOnlyDictionary<string, AsmToken>, ArkadeProgramKeys)

Compile every function in program against args and keys.

public static IReadOnlyList<CompiledArkadeFunction> Compile(ArkadeProgram program, IReadOnlyDictionary<string, AsmToken> args, ArkadeProgramKeys keys)

Parameters

program ArkadeProgram
args IReadOnlyDictionary<string, AsmToken>

Bound values for the program's $param placeholders. Only Bytes and Number tokens are meaningful values here — mirrors the ts-sdk's ArkadeParamValue (Uint8Array | bigint | number, no string).

keys ArkadeProgramKeys

Returns

IReadOnlyList<CompiledArkadeFunction>

Exceptions

InvalidOperationException

The program's version is unsupported, it has no functions, a tapscript segment fails validation, a $param/signer reference cannot be resolved, or a covenant segment is present without an emulator key configured.