Table of Contents

Class AssetInput

Namespace
NArk.Core.Assets
Assembly
NArk.Core.dll

An input in an asset group, referencing a transaction input (vin) and amount. Binary layout: Local (type=1): [0x01][2B vin LE][varint amount] Intent (type=2): [0x02][32B txid][2B vin LE][varint amount]

public class AssetInput
Inheritance
AssetInput
Inherited Members

Properties

Amount

public ulong Amount { get; }

Property Value

ulong

IntentTxid

public byte[]? IntentTxid { get; }

Property Value

byte[]

Type

public AssetInputType Type { get; }

Property Value

AssetInputType

Vin

public ushort Vin { get; }

Property Value

ushort

Methods

Create(ushort, ulong)

public static AssetInput Create(ushort vin, ulong amount)

Parameters

vin ushort
amount ulong

Returns

AssetInput

CreateIntent(byte[], ushort, ulong)

public static AssetInput CreateIntent(byte[] txid, ushort vin, ulong amount)

Parameters

txid byte[]
vin ushort
amount ulong

Returns

AssetInput

CreateIntent(string, ushort, ulong)

public static AssetInput CreateIntent(string txidHex, ushort vin, ulong amount)

Parameters

txidHex string
vin ushort
amount ulong

Returns

AssetInput

FromReader(BufferReader)

public static AssetInput FromReader(BufferReader reader)

Parameters

reader BufferReader

Returns

AssetInput

Serialize()

public byte[] Serialize()

Returns

byte[]

SerializeTo(BufferWriter)

public void SerializeTo(BufferWriter writer)

Parameters

writer BufferWriter

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.

Validate()

public void Validate()