Table of Contents

Class VerifiedCredentialManager

Namespace
chia.dotnet
Assembly
chia-dotnet.dll

API wrapper for those wallet RPC methods dealing with verified credentials

public sealed class VerifiedCredentialManager
Inheritance
VerifiedCredentialManager
Inherited Members
Extension Methods

Constructors

VerifiedCredentialManager(WalletProxy)

API wrapper for those wallet RPC methods dealing with verified credentials

public VerifiedCredentialManager(WalletProxy walletProxy)

Parameters

walletProxy WalletProxy
API wrapper for those wallet RPC methods dealing with verified credentials

Properties

WalletProxy

The WalletProxy to use for communcation

public WalletProxy WalletProxy { get; init; }

Property Value

WalletProxy
API wrapper for those wallet RPC methods dealing with verified credentials

Methods

AddProofs(VCProofs, CancellationToken)

Add a set of proofs to the DB that can be used when spending a VC. VCs are near useless until their proofs have been added.

public Task AddProofs(VCProofs proofs, CancellationToken cancellationToken = default)

Parameters

proofs VCProofs
cancellationToken CancellationToken

A token to allow the call to be cancelled

Returns

Task

An awaitable Task

Get(string, CancellationToken)

Given a launcher ID get the verified credential.

public Task<VCRecord> Get(string vcId, CancellationToken cancellationToken = default)

Parameters

vcId string

launcher ID

cancellationToken CancellationToken

A token to allow the call to be cancelled

Returns

Task<VCRecord>

VCRecord

GetList(uint, uint, CancellationToken)

Get a list of verified credentials in the specified range and any 'proofs' associated with the roots contained within.

public Task<IEnumerable<VCRecord>> GetList(uint start = 0, uint end = 50, CancellationToken cancellationToken = default)

Parameters

start uint
end uint
cancellationToken CancellationToken

A token to allow the call to be cancelled

Returns

Task<IEnumerable<VCRecord>>

A list of VCRecord

GetProofsForRoot(string, CancellationToken)

Given a specified vc root, get any proofs associated with that root.

public Task<IDictionary<string, string>> GetProofsForRoot(string root, CancellationToken cancellationToken = default)

Parameters

root string
cancellationToken CancellationToken

A token to allow the call to be cancelled

Returns

Task<IDictionary<string, string>>

A Dictionary of strings

Mint(string, string, ulong, CancellationToken)

Mint a verified credential using the assigned DID.

public Task<(VCRecord VCRecord, IEnumerable<TradeRecord> Transactions)> Mint(string targetAddress, string didId, ulong fee = 0, CancellationToken cancellationToken = default)

Parameters

targetAddress string
didId string
fee ulong

Fee (in units of mojos)

cancellationToken CancellationToken

A token to allow the call to be cancelled

Returns

Task<(VCRecord VCRecord, IEnumerable<TradeRecord> Transactions)>

a VCRecord and list of TradeRecord

Revoke(string, bool?, ulong, CancellationToken)

Revoke an on chain VC provided the correct DID is available.

public Task<IEnumerable<TransactionRecord>> Revoke(string vcParentId, bool? reusePuzhash = null, ulong fee = 0, CancellationToken cancellationToken = default)

Parameters

vcParentId string
reusePuzhash bool?
fee ulong

Fee (in units of mojos)

cancellationToken CancellationToken

A token to allow the call to be cancelled

Returns

Task<IEnumerable<TransactionRecord>>

A list of TransactionRecord

Spend(string, string?, string?, string?, bool?, ulong, CancellationToken)

Spend a verified credential.

public Task<IEnumerable<TransactionRecord>> Spend(string vcId, string? newPuzhash = null, string? providerInnerPuzhash = null, string? newProofHash = null, bool? reusePuzhash = null, ulong fee = 0, CancellationToken cancellationToken = default)

Parameters

vcId string
newPuzhash string
providerInnerPuzhash string
newProofHash string
reusePuzhash bool?
fee ulong

Fee (in units of mojos)

cancellationToken CancellationToken

A token to allow the call to be cancelled

Returns

Task<IEnumerable<TransactionRecord>>

A list of TransactionRecord