Table of Contents

Class TapscriptSegment

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

The Bitcoin-Script segment of a spending path — enforced on-chain. Mirrors the ts-sdk's TapscriptSegment.

public sealed class TapscriptSegment
Inheritance
TapscriptSegment
Inherited Members

Remarks

Asm and Csv may be set together (a condition-plus-CSV leaf); Cltv excludes both. Enforced later by validation, not by this data holder.

Properties

Asm

Optional standard-opcode condition (e.g. a hashlock), encoded into a condition-multisig leaf.

public IReadOnlyList<AsmToken>? Asm { get; init; }

Property Value

IReadOnlyList<AsmToken>

Cltv

Absolute timelock (CLTV). Mutually exclusive with Csv/Asm.

public LockTime? Cltv { get; init; }

Property Value

LockTime?

Csv

Relative timelock (CSV). Mutually exclusive with Cltv/Asm — enforced later by validation (mirroring the ts-sdk's validateTapscript, which runs at compile time, not here); NBitcoin.Sequence already distinguishes block-count vs. time-based (NBitcoin.SequenceLockType.Time) locks.

public Sequence? Csv { get; init; }

Property Value

Sequence?

Signers

Required signers. The tweaked co-signer key is appended automatically for covenant paths.

public required IReadOnlyList<AsmToken> Signers { get; init; }

Property Value

IReadOnlyList<AsmToken>

Witness

Items satisfying the condition (e.g. an HTLC preimage).

public IReadOnlyList<AsmToken>? Witness { get; init; }

Property Value

IReadOnlyList<AsmToken>