Releases: dkackman/chia-dotnet
Initial 1.3 support
This release has initial support for chia 1.3 changes.
https://www.nuget.org/packages/chia-dotnet/1.0.0-beta.1.3.6
- Changes to existing endpoints are incorporated
- Creating a CAT wallet tested
- Testing trades and offers still in progress
- Until this PR is merged (Chia-Network/chia-blockchain#10571) supply both a
start
andend
toTradeManager.GetOffers
. Otherwise it will fail.
- Until this PR is merged (Chia-Network/chia-blockchain#10571) supply both a
Add Bech32M
Add Bech32M implementation - credit to https://github.com/Playwo/ChiaRPC.Net/
1.2.11 changes
Updates for chia 1.2.11
https://www.nuget.org/packages/chia-dotnet/0.6.1
What's Changed
Full Changelog: v0.5.18...v0.6.1
1.2.9 changes
Updates for chia1.2.9
https://www.nuget.org/packages/chia-dotnet/0.5.18
- return id's of queued plots when calling
start_plotting
Beta 1
0.4.11 bug fix
0.4.11 bug fix
BigInteger formatting fix
change balances type to uint64 to match python
Getting ready for 1.0.0
I am using this library to implement rchia, the remote chia node management CLI app. This will vet out the implementation with real usage (as opposed as in unit and integration tests).
The API is looking pretty solid and getting ready for release. As rchia evolves there are some helper and convenience methods being added here:
- Helper extension methods
-- formatting of byte counts in human readable format
-- converting between mojo and chia
-- formatting chia amounts as human readable strings - GetAverageBlockTime
Incorporate chia 1.2.4
This release incorporates the chia 1.2.4 changes; specifically get_coin_records_by_names
.
It also includes additional api and type refinements.
Includes helper extension method to format byte count into human readable format.
https://github.com/dkackman/chia-dotnet/blob/main/src/chia-dotnet/Extensions.cs
#nullable reference type annotations
This release adds nullable annotations to guard against null reference exceptions. Anywhere a field is declared as Optional
in python, it will be nullable
in C#. All other fields will at minimum have a default or empty object value.
Static Types
This release moves from dynamic return types on the proxy interfaces, to static types.
This is a significant change as static types are much more familiar to .net developers than dynamics. For those of us used to learning an api by examining the the type system (and yes, using intellisense) this should be a welcome addition.
The beta release of this library will likely be based on these changes.
Example
Before
public async Task<dynamic> GetBlockchainState(CancellationToken cancellationToken = default)
After
public async Task<BlockchainState> GetBlockchainState(CancellationToken cancellationToken = default)
// where BlockChainState and the types it uses are all statically declared
public record BlockchainState
{
public ulong Difficulty { get; init; }
public bool GenesisChallengeInitiated { get; init; }
public int MempoolSize { get; init; }
public BlockRecord Peak { get; init; }
public BigInteger Space { get; init; }
public ulong SubSlotIters { get; init; }
public SyncState Sync { get; init; }
}
Notes
- The type names between python and C# are 90% the same
- There are cases where python uses unnamed dynamic type as dictionaries or tuples. Where the tuples are are concise, .net named tuples are used. In a couple of places intermediate types have been introduced in order to avoid awkward tuple declarations.
- All of the static chia types are declared as init-only record types.