Table of Contents

Class HashLockedArkPaymentContract

Namespace
NArk.Core.Contracts
Assembly
NArk.Core.dll
public class HashLockedArkPaymentContract : ArkContract
Inheritance
HashLockedArkPaymentContract
Inherited Members

Constructors

HashLockedArkPaymentContract(OutputDescriptor, Sequence, OutputDescriptor, byte[], HashLockTypeOption)

public HashLockedArkPaymentContract(OutputDescriptor server, Sequence exitDelay, OutputDescriptor user, byte[] preimage, HashLockTypeOption hashLockType)

Parameters

server OutputDescriptor
exitDelay Sequence
user OutputDescriptor
preimage byte[]
hashLockType HashLockTypeOption

Fields

ContractType

public const string ContractType = "HashLockPaymentContract"

Field Value

string

Properties

DefaultScope

Hash-locked payment funds live off-chain as a VTXO.

public override ContractScope DefaultScope { get; }

Property Value

ContractScope

ExitDelay

public Sequence ExitDelay { get; }

Property Value

Sequence

Hash

public byte[] Hash { get; }

Property Value

byte[]

HashLockType

public HashLockTypeOption HashLockType { get; }

Property Value

HashLockTypeOption

Preimage

public byte[] Preimage { get; }

Property Value

byte[]

Type

Contract type discriminator string (e.g. "vtxo", "boarding").

public override string Type { get; }

Property Value

string

User

Output descriptor for the user key.

public OutputDescriptor User { get; }

Property Value

OutputDescriptor

Methods

CreateClaimScript()

public ScriptBuilder CreateClaimScript()

Returns

ScriptBuilder

GetContractData()

Returns the key-value map of contract parameters used for serialization.

protected override Dictionary<string, string> GetContractData()

Returns

Dictionary<string, string>

GetScriptBuilders()

Returns the script builders for each tapscript leaf in the tree.

protected override IEnumerable<ScriptBuilder> GetScriptBuilders()

Returns

IEnumerable<ScriptBuilder>

Parse(Dictionary<string, string>, Network)

public static ArkContract Parse(Dictionary<string, string> contractData, Network network)

Parameters

contractData Dictionary<string, string>
network Network

Returns

ArkContract

UnilateralPath()

public ScriptBuilder UnilateralPath()

Returns

ScriptBuilder