Table of Contents

Class CATWallet

Namespace
chia.dotnet
Assembly
chia-dotnet.dll

Wraps a CAT wallet

public sealed class CATWallet : Wallet
Inheritance
CATWallet
Inherited Members
Extension Methods

Remarks

ctor

Constructors

CATWallet(uint, WalletProxy)

Wraps a CAT wallet

public CATWallet(uint walletId, WalletProxy walletProxy)

Parameters

walletId uint

The wallet_id to wrap

walletProxy WalletProxy

Wallet RPC proxy to use for communication

Remarks

ctor

Methods

GetAssetId(CancellationToken)

Get the asset id of a wallet's CAT

public Task<string> GetAssetId(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

A token to allow the call to be cancelled

Returns

Task<string>

The asset id

GetName(CancellationToken)

Get the name of a wallet's CAT

public Task<string> GetName(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

A token to allow the call to be cancelled

Returns

Task<string>

The CAT name

SetName(string, CancellationToken)

Set the name of the CAT

public Task SetName(string name, CancellationToken cancellationToken = default)

Parameters

name string

The new name

cancellationToken CancellationToken

A token to allow the call to be cancelled

Returns

Task

An awaitable Task

Spend(string, ulong, IEnumerable<string>?, ulong?, ulong?, IEnumerable<ulong>?, bool?, ulong, CancellationToken)

Spend a CAT

public Task<TransactionRecord> Spend(string innerAddress, ulong amount, IEnumerable<string>? memos = null, ulong? minCoinAmount = null, ulong? maxCoinAmount = null, IEnumerable<ulong>? excludeCoinAmounts = null, bool? reusePuzhash = null, ulong fee = 0, CancellationToken cancellationToken = default)

Parameters

innerAddress string

The inner address for the spend

amount ulong

The amount to put in the wallet (in units of mojos)

memos IEnumerable<string>

Optional list of byte string memos to include in the transaction

minCoinAmount ulong?
maxCoinAmount ulong?
excludeCoinAmounts IEnumerable<ulong>
reusePuzhash bool?
fee ulong

The fee to create the wallet (in units of mojos)

cancellationToken CancellationToken

A token to allow the call to be cancelled

Returns

Task<TransactionRecord>

A TransactionRecord

Validate(CancellationToken)

Validates that WalletId is a CAT

public override Task Validate(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken
Wraps a CAT wallet

Returns

Task

True if the wallet is a CAT wallet