Table of Contents

Interface IContractTransformer

Namespace
NArk.Core.Transformers
Assembly
NArk.Core.dll

Transforms a contract + VTXO pair into a spendable ArkCoin. Register multiple transformers to handle different contract types (payment contracts, hash-locked contracts, VHTLCs, etc.).

public interface IContractTransformer

Methods

CanTransform(string, ArkContract, ArkVtxo)

Returns true if this transformer can handle the given contract/VTXO pair.

Task<bool> CanTransform(string walletIdentifier, ArkContract contract, ArkVtxo vtxo)

Parameters

walletIdentifier string
contract ArkContract
vtxo ArkVtxo

Returns

Task<bool>

Transform(string, ArkContract, ArkVtxo)

Transforms the contract/VTXO pair into a spendable coin with signing metadata.

Task<ArkCoin> Transform(string walletIdentifier, ArkContract contract, ArkVtxo vtxo)

Parameters

walletIdentifier string
contract ArkContract
vtxo ArkVtxo

Returns

Task<ArkCoin>