Table of Contents

Class AssetGroup

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

A group of asset inputs and outputs with optional AssetId, control asset, and metadata. Binary layout: [1B presence flags] [if 0x01: 34B AssetId] [if 0x02: AssetRef (variable)] [if 0x04: varint mdCount + Metadata[]] [varint inputCount][AssetInput...] [varint outputCount][AssetOutput...]

public class AssetGroup
Inheritance
AssetGroup
Inherited Members

Constructors

AssetGroup(AssetId?, AssetRef?, IReadOnlyList<AssetInput>, IReadOnlyList<AssetOutput>, IReadOnlyList<AssetMetadata>)

public AssetGroup(AssetId? assetId, AssetRef? controlAsset, IReadOnlyList<AssetInput> inputs, IReadOnlyList<AssetOutput> outputs, IReadOnlyList<AssetMetadata> metadata)

Parameters

assetId AssetId
controlAsset AssetRef
inputs IReadOnlyList<AssetInput>
outputs IReadOnlyList<AssetOutput>
metadata IReadOnlyList<AssetMetadata>

Properties

AssetId

public AssetId? AssetId { get; }

Property Value

AssetId

ControlAsset

public AssetRef? ControlAsset { get; }

Property Value

AssetRef

Inputs

public IReadOnlyList<AssetInput> Inputs { get; }

Property Value

IReadOnlyList<AssetInput>

IsIssuance

public bool IsIssuance { get; }

Property Value

bool

Metadata

public IReadOnlyList<AssetMetadata> Metadata { get; }

Property Value

IReadOnlyList<AssetMetadata>

Outputs

public IReadOnlyList<AssetOutput> Outputs { get; }

Property Value

IReadOnlyList<AssetOutput>

Methods

Create(AssetId?, AssetRef?, IReadOnlyList<AssetInput>, IReadOnlyList<AssetOutput>, IReadOnlyList<AssetMetadata>)

public static AssetGroup Create(AssetId? assetId, AssetRef? controlAsset, IReadOnlyList<AssetInput> inputs, IReadOnlyList<AssetOutput> outputs, IReadOnlyList<AssetMetadata> metadata)

Parameters

assetId AssetId
controlAsset AssetRef
inputs IReadOnlyList<AssetInput>
outputs IReadOnlyList<AssetOutput>
metadata IReadOnlyList<AssetMetadata>

Returns

AssetGroup

FromReader(BufferReader)

public static AssetGroup FromReader(BufferReader reader)

Parameters

reader BufferReader

Returns

AssetGroup

Serialize()

public byte[] Serialize()

Returns

byte[]

SerializeTo(BufferWriter)

public void SerializeTo(BufferWriter writer)

Parameters

writer BufferWriter

ToBatchLeafAssetGroup(byte[])

public AssetGroup ToBatchLeafAssetGroup(byte[] intentTxid)

Parameters

intentTxid byte[]

Returns

AssetGroup

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()