Table of Contents

Class HashLockTapScript

Namespace
NArk.Core.Scripts
Assembly
NArk.Core.dll
public class HashLockTapScript : ScriptBuilder
Inheritance
HashLockTapScript
Inherited Members

Constructors

HashLockTapScript(uint160)

public HashLockTapScript(uint160 hash)

Parameters

hash uint160

HashLockTapScript(uint256)

public HashLockTapScript(uint256 hash)

Parameters

hash uint256

HashLockTapScript(byte[], HashLockTypeOption, int?)

public HashLockTapScript(byte[] hash, HashLockTypeOption hashLockType, int? preimageSize = null)

Parameters

hash byte[]
hashLockType HashLockTypeOption
preimageSize int?

Properties

Hash

public byte[] Hash { get; }

Property Value

byte[]

HashLockType

public HashLockTypeOption HashLockType { get; }

Property Value

HashLockTypeOption

PreimageSize

When set, the preimage must be exactly this many bytes or the script fails before the hash is even computed.

public int? PreimageSize { get; }

Property Value

int?

Remarks

A bare hash lock accepts any preimage that hashes correctly. With HASH160 that includes a preimage which is itself the 20-byte digest of something else, so a hash lock can be satisfied by a value the party who chose it never intended as the secret. Pinning the length closes that off, which is why the VHTLC v2 construction gates every claim-family leaf on 32 bytes.

Methods

BuildScript()

Returns the opcodes for this tapscript leaf.

public override IEnumerable<Op> BuildScript()

Returns

IEnumerable<Op>