Table of Contents

Class CoinService

Namespace
NArk.Core.Services
Assembly
NArk.Core.dll
public class CoinService : ICoinService
Inheritance
CoinService
Implements
Inherited Members

Constructors

CoinService(IClientTransport, IContractStorage, IEnumerable<IContractTransformer>, ILogger<CoinService>?)

public CoinService(IClientTransport clientTransport, IContractStorage contractStorage, IEnumerable<IContractTransformer> transformers, ILogger<CoinService>? logger = null)

Parameters

clientTransport IClientTransport
contractStorage IContractStorage
transformers IEnumerable<IContractTransformer>
logger ILogger<CoinService>

Methods

GetCoin(ArkContractEntity, ArkVtxo, CancellationToken)

Creates a spendable coin from a known contract entity and VTXO.

public Task<ArkCoin> GetCoin(ArkContractEntity contract, ArkVtxo vtxo, CancellationToken cancellationToken = default)

Parameters

contract ArkContractEntity
vtxo ArkVtxo
cancellationToken CancellationToken

Returns

Task<ArkCoin>

GetCoin(ArkVtxo, string, CancellationToken)

Creates a spendable coin from a VTXO by looking up the contract from storage.

public Task<ArkCoin> GetCoin(ArkVtxo vtxo, string walletIdentifier, CancellationToken cancellationToken = default)

Parameters

vtxo ArkVtxo
walletIdentifier string
cancellationToken CancellationToken

Returns

Task<ArkCoin>