Table of Contents

Interface ISpendExtensionPacketProvider

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

Plug-point that lets a higher layer (e.g. NArk.Arkade) contribute extra IExtensionPacket records to the single Extension OP_RETURN a spend carries, without NArk.Core taking a dependency on that layer. Mirrors the role IBatchSessionExtension plays for batch flows, but for the offchain spend path.

public interface ISpendExtensionPacketProvider

Remarks

Providers are invoked at transaction-assembly time with the spend's inputs in transaction-input order (index i = vin = i), so packets that bind data to specific inputs (like the Arkade emulator packet) can emit correct vin values. A provider with nothing to contribute for a given spend MUST return an empty list, in which case it adds no output.

Methods

BuildPackets(IReadOnlyList<ArkCoin>)

Build any extension packets this provider wants attached to the spend's Extension OP_RETURN. Return an empty list to contribute nothing.

IReadOnlyList<IExtensionPacket> BuildPackets(IReadOnlyList<ArkCoin> coinsByVin)

Parameters

coinsByVin IReadOnlyList<ArkCoin>

Spend inputs in transaction-input order.

Returns

IReadOnlyList<IExtensionPacket>