Table of Contents

Class ArkadeProgramValidator

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

Validates an ArkadeProgram's constructor-parameter declarations against the bound args. When a program declares Params they are authoritative: every declared param must be bound, every $name reference in the program must be declared, and every typed entry (Type set) validates its bound value. Bare (untyped) entries still get the structural checks; only the value type-check is skipped.

public static class ArkadeProgramValidator
Inheritance
ArkadeProgramValidator
Inherited Members

Remarks

.NET models timelocks as concrete NBitcoin.Sequence/NBitcoin.LockTime rather than $param references, so — unlike the ts-sdk — csv/cltv carry no param references and are not walked here.

Methods

Validate(ArkadeProgram, IReadOnlyDictionary<string, AsmToken>)

Validate program's params against args. A no-op only when the program declares no params.

public static void Validate(ArkadeProgram program, IReadOnlyDictionary<string, AsmToken> args)

Parameters

program ArkadeProgram
args IReadOnlyDictionary<string, AsmToken>

Exceptions

InvalidOperationException

A declared param is unbound, a $name reference is undeclared, or a typed value has the wrong kind/length.