diff --git a/src/chia-dotnet/ChiaTypes/AmountFilter.cs b/src/chia-dotnet/ChiaTypes/AmountFilter.cs new file mode 100644 index 00000000..30f83825 --- /dev/null +++ b/src/chia-dotnet/ChiaTypes/AmountFilter.cs @@ -0,0 +1,11 @@ +using System.Collections.Generic; + +namespace chia.dotnet +{ + public record AmountFilter + { + public IEnumerable Values { get; init; } = new List(); + + public FilterMode Mode { get; init; } = FilterMode.Exlude; + } +} diff --git a/src/chia-dotnet/ChiaTypes/AmountWithPuzzlehash.cs b/src/chia-dotnet/ChiaTypes/AmountWithPuzzlehash.cs new file mode 100644 index 00000000..43bbdba9 --- /dev/null +++ b/src/chia-dotnet/ChiaTypes/AmountWithPuzzlehash.cs @@ -0,0 +1,11 @@ +using System.Collections.Generic; + +namespace chia.dotnet +{ + public record AmountWithPuzzlehash + { + public IEnumerable Values { get; init; } = new List(); + + public FilterMode Mode { get; init; } = FilterMode.Exlude; + } +} diff --git a/src/chia-dotnet/ChiaTypes/Announcement.cs b/src/chia-dotnet/ChiaTypes/Announcement.cs index cdfd1e04..91fe0a42 100644 --- a/src/chia-dotnet/ChiaTypes/Announcement.cs +++ b/src/chia-dotnet/ChiaTypes/Announcement.cs @@ -6,16 +6,4 @@ public record Announcement public string Message { get; init; } = string.Empty; public string MorphBytes { get; init; } = string.Empty; } - public record CoinAnnouncement - { - public string CoinId { get; init; } = string.Empty; - public string Message { get; init; } = string.Empty; - public string MorphBytes { get; init; } = string.Empty; - } - public record PuzzleAnnouncement - { - public string PuzzleHash { get; init; } = string.Empty; - public string Message { get; init; } = string.Empty; - public string MorphBytes { get; init; } = string.Empty; - } } diff --git a/src/chia-dotnet/ChiaTypes/AutoClaimSettings.cs b/src/chia-dotnet/ChiaTypes/AutoClaimSettings.cs new file mode 100644 index 00000000..f9aecf0a --- /dev/null +++ b/src/chia-dotnet/ChiaTypes/AutoClaimSettings.cs @@ -0,0 +1,10 @@ +namespace chia.dotnet +{ + public record AutoClaimSettings + { + public bool Enabled { get; init; } + public ulong TxFee { get; init; } + public ulong MinAmount { get; init; } + public ushort BatchSize { get; init; } + } +} diff --git a/src/chia-dotnet/ChiaTypes/BlockchainState.cs b/src/chia-dotnet/ChiaTypes/BlockchainState.cs index af5dad5c..6f7f3ab3 100644 --- a/src/chia-dotnet/ChiaTypes/BlockchainState.cs +++ b/src/chia-dotnet/ChiaTypes/BlockchainState.cs @@ -7,12 +7,23 @@ namespace chia.dotnet /// public record BlockchainState { + public string NodeId { get; init; } = string.Empty; public ulong Difficulty { get; init; } public bool GenesisChallengeInitiated { get; init; } public int MempoolSize { get; init; } + public int MempoolCost { get; init; } + public ulong MempoolFees { get; init; } + public MempoolMinFees MempoolMinFees { get; init; } = new(); + public int MempoolMaxTotalCost { get; init; } + public int BlockMaxCost { get; init; } public BlockRecord? Peak { get; init; } public BigInteger Space { get; init; } public ulong SubSlotIters { get; init; } public SyncState Sync { get; init; } = new(); } + + public record MempoolMinFees + { + public double Cost5000000 { get; init; } + } } diff --git a/src/chia-dotnet/ChiaTypes/CoinAnnouncement.cs b/src/chia-dotnet/ChiaTypes/CoinAnnouncement.cs new file mode 100644 index 00000000..8515a99a --- /dev/null +++ b/src/chia-dotnet/ChiaTypes/CoinAnnouncement.cs @@ -0,0 +1,9 @@ +namespace chia.dotnet +{ + public record CoinAnnouncement + { + public string CoinId { get; init; } = string.Empty; + public string Message { get; init; } = string.Empty; + public string MorphBytes { get; init; } = string.Empty; + } +} diff --git a/src/chia-dotnet/ChiaTypes/CoinRecordOrder.cs b/src/chia-dotnet/ChiaTypes/CoinRecordOrder.cs new file mode 100644 index 00000000..456e3863 --- /dev/null +++ b/src/chia-dotnet/ChiaTypes/CoinRecordOrder.cs @@ -0,0 +1,8 @@ +namespace chia.dotnet +{ + public enum CoinRecordOrder : byte + { + ConfirmedHeight = 1, + SpentHight = 2 + } +} diff --git a/src/chia-dotnet/ChiaTypes/CoinType.cs b/src/chia-dotnet/ChiaTypes/CoinType.cs new file mode 100644 index 00000000..cd9f9dd8 --- /dev/null +++ b/src/chia-dotnet/ChiaTypes/CoinType.cs @@ -0,0 +1,8 @@ +namespace chia.dotnet +{ + public enum CoinType : byte + { + Normal = 0, + Clawback = 1 + } +} diff --git a/src/chia-dotnet/ChiaTypes/FarmerRewards.cs b/src/chia-dotnet/ChiaTypes/FarmerRewards.cs new file mode 100644 index 00000000..69a6941b --- /dev/null +++ b/src/chia-dotnet/ChiaTypes/FarmerRewards.cs @@ -0,0 +1,11 @@ +namespace chia.dotnet +{ + public record FarmerRewards + { + public ulong FarmedAmount { get; init; } + public ulong PoolRewardAmount { get; init; } + public ulong FarmerRewardAmount { get; init; } + public ulong FeeAmount { get; init; } + public ulong LastHeightFarmed { get; init; } + } +} diff --git a/src/chia-dotnet/ChiaTypes/FilterMode.cs b/src/chia-dotnet/ChiaTypes/FilterMode.cs new file mode 100644 index 00000000..be21cbe7 --- /dev/null +++ b/src/chia-dotnet/ChiaTypes/FilterMode.cs @@ -0,0 +1,8 @@ +namespace chia.dotnet +{ + public enum FilterMode : byte + { + Include = 1, + Exlude = 2 + } +} diff --git a/src/chia-dotnet/ChiaTypes/HashFilter.cs b/src/chia-dotnet/ChiaTypes/HashFilter.cs new file mode 100644 index 00000000..d5e6396f --- /dev/null +++ b/src/chia-dotnet/ChiaTypes/HashFilter.cs @@ -0,0 +1,11 @@ +using System.Collections.Generic; + +namespace chia.dotnet +{ + public record HashFilter + { + public IEnumerable Values { get; init; } = new List(); + + public FilterMode Mode { get; init; } = FilterMode.Exlude; + } +} diff --git a/src/chia-dotnet/ChiaTypes/InternalNode.cs b/src/chia-dotnet/ChiaTypes/InternalNode.cs new file mode 100644 index 00000000..089c5097 --- /dev/null +++ b/src/chia-dotnet/ChiaTypes/InternalNode.cs @@ -0,0 +1,12 @@ +namespace chia.dotnet +{ + public record InternalNode + { + public string Hash { get; init; } = string.Empty; + public string LeftHash { get; init; } = string.Empty; + public string RightHash { get; init; } = string.Empty; + // TODO - need test case for serialization for this - tuple might not be the right type + public (string, string) Pair { get; init; } = new(); + public string Atom { get; init; } = string.Empty; + } +} diff --git a/src/chia-dotnet/ChiaTypes/Layer.cs b/src/chia-dotnet/ChiaTypes/Layer.cs new file mode 100644 index 00000000..e0c4b3b1 --- /dev/null +++ b/src/chia-dotnet/ChiaTypes/Layer.cs @@ -0,0 +1,9 @@ +namespace chia.dotnet +{ + public record Layer + { + public Side OtherHashSide { get; init; } + public string OtherHash { get; init; } = string.Empty; + public string CombinedHash { get; init; } = string.Empty; + } +} diff --git a/src/chia-dotnet/ChiaTypes/LineageProof.cs b/src/chia-dotnet/ChiaTypes/LineageProof.cs new file mode 100644 index 00000000..c88cae57 --- /dev/null +++ b/src/chia-dotnet/ChiaTypes/LineageProof.cs @@ -0,0 +1,9 @@ +namespace chia.dotnet +{ + public record LineageProof + { + public string? ParentName { get; init; } + public string? InnerPuzzleHash { get; init; } + public ulong? Amount { get; init; } + } +} diff --git a/src/chia-dotnet/ChiaTypes/Mirror.cs b/src/chia-dotnet/ChiaTypes/Mirror.cs new file mode 100644 index 00000000..c0422f7b --- /dev/null +++ b/src/chia-dotnet/ChiaTypes/Mirror.cs @@ -0,0 +1,13 @@ +using System.Collections.Generic; + +namespace chia.dotnet +{ + public record Mirror + { + public string CoinId { get; init; } = string.Empty; + public string LauncherId { get; init; } = string.Empty; + public ulong Amount { get; init; } + public IEnumerable Urls { get; init; } = new List(); + public bool Ours { get; init; } = true; + } +} diff --git a/src/chia-dotnet/ChiaTypes/NFTInfo.cs b/src/chia-dotnet/ChiaTypes/NFTInfo.cs index b3aeabc5..a190c185 100644 --- a/src/chia-dotnet/ChiaTypes/NFTInfo.cs +++ b/src/chia-dotnet/ChiaTypes/NFTInfo.cs @@ -7,23 +7,93 @@ namespace chia.dotnet /// public record NFTInfo { + /// + /// Launcher coin ID + /// public string LauncherId { get; init; } = string.Empty; + /// + /// Current NFT coin ID + /// public string NFTCoinID { get; init; } = string.Empty; + /// + /// Owner DID + /// public string? OwnerDID { get; init; } + /// + /// Percentage of the transaction fee paid to the author, e.g. 1000 = 1% + /// public ushort? RoyaltyPercentage { get; init; } + /// + /// uzzle hash where royalty will be sent to + /// public string? RoyaltyPuzzleHash { get; init; } = string.Empty; + /// + /// A list of content URIs + /// public IEnumerable DataUris { get; init; } = new List(); + /// + /// Hash of the content + /// public string DataHash { get; init; } = string.Empty; + /// + /// A list of metadata URIs + /// public IEnumerable MetadataUris { get; init; } = new List(); + /// + /// Hash of the metadata + /// public string MetaataHash { get; init; } = string.Empty; + /// + /// A list of license URIs + /// public IEnumerable LicenseUris { get; init; } = new List(); - public ulong SeriesTotal { get; init; } - public ulong SeriesNumber { get; init; } + /// + /// Hash of the license + /// + public string LicenseHash { get; init; } = string.Empty; + /// + /// How many NFTs in the current edition + /// + public ulong EditionTotal { get; init; } + /// + /// Number of the current NFT in the edition + /// + public ulong EditionNumber { get; init; } + /// + /// Puzzle hash of the metadata updater in hex + /// public string UpdaterPuzhash { get; init; } = string.Empty; + /// + /// Information saved on the chain in hex + /// public string ChainInfo { get; init; } = string.Empty; + /// + /// Block height of the NFT minting + /// public uint MintHeight { get; init; } + /// + /// If the inner puzzle supports DID + /// public bool SupportsDID { get; init; } + /// + /// Indicate if the NFT is pending for a transaction + /// public bool PendingTransaction { get; init; } + /// + /// Puzzle hash of the singleton launcher in hex + /// public string LauncherPuzhash { get; init; } = string.Empty; + /// + /// DID of the NFT minter + /// + public string? MinterDID { get; init; } + /// + /// Serialized off-chain metadata + /// + public string? OffChainMetadata { get; init; } + /// + /// The innermost puzzle hash of the NFT + /// + public string P2Address { get; init; } = string.Empty; } } diff --git a/src/chia-dotnet/ChiaTypes/NFTMintingInfo.cs b/src/chia-dotnet/ChiaTypes/NFTMintingInfo.cs index 4dc072eb..b67c35f0 100644 --- a/src/chia-dotnet/ChiaTypes/NFTMintingInfo.cs +++ b/src/chia-dotnet/ChiaTypes/NFTMintingInfo.cs @@ -17,7 +17,7 @@ public record NFTMintingInfo public string? MetaHash { get; init; } public IEnumerable LicenseUris { get; init; } = new List(); public string? LicenseHash { get; init; } - public ulong SeriesTotal { get; init; } = 1; - public ulong SeriesNumber { get; init; } = 1; + public ulong EditionTotal { get; init; } = 1; + public ulong EditionNumber { get; init; } = 1; } } diff --git a/src/chia-dotnet/ChiaTypes/NodeType.cs b/src/chia-dotnet/ChiaTypes/NodeType.cs index 3dcbd3fd..565de257 100644 --- a/src/chia-dotnet/ChiaTypes/NodeType.cs +++ b/src/chia-dotnet/ChiaTypes/NodeType.cs @@ -1,4 +1,4 @@ -namespace chia.dotnet +namespace chia.dotnet { public enum NodeType { @@ -7,6 +7,7 @@ public enum NodeType FARMER = 3, TIMELORD = 4, INTRODUCER = 5, - WALLET = 6 + WALLET = 6, + DATA_LAYER = 7 } } diff --git a/src/chia-dotnet/ChiaTypes/OfferStore.cs b/src/chia-dotnet/ChiaTypes/OfferStore.cs new file mode 100644 index 00000000..54200402 --- /dev/null +++ b/src/chia-dotnet/ChiaTypes/OfferStore.cs @@ -0,0 +1,11 @@ +using System.Collections.Generic; + +namespace chia.dotnet +{ + public record OfferStore + { + public string StoreID { get; init; } = string.Empty; + + public IEnumerable> Inclusions { get; init; } = new Dictionary(); + } +} diff --git a/src/chia-dotnet/PlotterConfig.cs b/src/chia-dotnet/ChiaTypes/PlotterConfig.cs similarity index 100% rename from src/chia-dotnet/PlotterConfig.cs rename to src/chia-dotnet/ChiaTypes/PlotterConfig.cs diff --git a/src/chia-dotnet/ChiaTypes/PluginStatus.cs b/src/chia-dotnet/ChiaTypes/PluginStatus.cs new file mode 100644 index 00000000..91ebce24 --- /dev/null +++ b/src/chia-dotnet/ChiaTypes/PluginStatus.cs @@ -0,0 +1,10 @@ +using System.Collections.Generic; + +namespace chia.dotnet +{ + public record PluginStatus + { + public IDictionary> Uploasders { get; init; } = new Dictionary>(); + public IDictionary> Downloaders { get; init; } = new Dictionary>(); + } +} diff --git a/src/chia-dotnet/ChiaTypes/PoolState.cs b/src/chia-dotnet/ChiaTypes/PoolState.cs index 4c480824..784ff6c4 100644 --- a/src/chia-dotnet/ChiaTypes/PoolState.cs +++ b/src/chia-dotnet/ChiaTypes/PoolState.cs @@ -31,7 +31,7 @@ public record PoolState public string OwnerPubkey { get; init; } = string.Empty; // the blockchain doesn't like it when the trailing slash is encoded into the nft (won't be able to decode and find wallet info) - public string? PoolUrl { get => poolUrl is not null ? poolUrl.TrimEnd('/') : null; init => poolUrl = value; } + public string? PoolUrl { get => poolUrl?.TrimEnd('/'); init => poolUrl = value; } public uint RelativeLockHeight { get; init; } } diff --git a/src/chia-dotnet/ChiaTypes/PrivateKey.cs b/src/chia-dotnet/ChiaTypes/PrivateKey.cs index d705d540..c4056b54 100644 --- a/src/chia-dotnet/ChiaTypes/PrivateKey.cs +++ b/src/chia-dotnet/ChiaTypes/PrivateKey.cs @@ -2,8 +2,11 @@ { public record PrivateKey { - public string PK { get; init; } = string.Empty; - - public string Entropy { get; init; } = string.Empty; + public uint Fingerprint { get; init; } + public string Sk { get; init; } = string.Empty; + public string Pk { get; init; } = string.Empty; + public string FarmerPk { get; init; } = string.Empty; + public string PoolPk { get; init; } = string.Empty; + public string Seed { get; init; } = string.Empty; } } diff --git a/src/chia-dotnet/ChiaTypes/PrivateKeyData.cs b/src/chia-dotnet/ChiaTypes/PrivateKeyData.cs new file mode 100644 index 00000000..a79794b2 --- /dev/null +++ b/src/chia-dotnet/ChiaTypes/PrivateKeyData.cs @@ -0,0 +1,9 @@ +namespace chia.dotnet +{ + public record PrivateKeyData + { + public string PK { get; init; } = string.Empty; + + public string Entropy { get; init; } = string.Empty; + } +} diff --git a/src/chia-dotnet/ChiaTypes/PrivateKeyDetail.cs b/src/chia-dotnet/ChiaTypes/PrivateKeyDetail.cs deleted file mode 100644 index 304531de..00000000 --- a/src/chia-dotnet/ChiaTypes/PrivateKeyDetail.cs +++ /dev/null @@ -1,12 +0,0 @@ -namespace chia.dotnet -{ - public record PrivateKeyDetail - { - public uint Fingerprint { get; init; } - public string Sk { get; init; } = string.Empty; - public string Pk { get; init; } = string.Empty; - public string FarmerPk { get; init; } = string.Empty; - public string PoolPk { get; init; } = string.Empty; - public string Seed { get; init; } = string.Empty; - } -} diff --git a/src/chia-dotnet/ChiaTypes/Proof.cs b/src/chia-dotnet/ChiaTypes/Proof.cs new file mode 100644 index 00000000..0a4113a5 --- /dev/null +++ b/src/chia-dotnet/ChiaTypes/Proof.cs @@ -0,0 +1,12 @@ +using System.Collections.Generic; + +namespace chia.dotnet +{ + public record Proof + { + public string Key { get; init; } = string.Empty; + public string Value { get; init; } = string.Empty; + public string NodeHash { get; init; } = string.Empty; + public IEnumerable Layers { get; init; } = new List(); + } +} diff --git a/src/chia-dotnet/ChiaTypes/PuzzleAnnouncement.cs b/src/chia-dotnet/ChiaTypes/PuzzleAnnouncement.cs new file mode 100644 index 00000000..eec1d74c --- /dev/null +++ b/src/chia-dotnet/ChiaTypes/PuzzleAnnouncement.cs @@ -0,0 +1,9 @@ +namespace chia.dotnet +{ + public record PuzzleAnnouncement + { + public string PuzzleHash { get; init; } = string.Empty; + public string Message { get; init; } = string.Empty; + public string MorphBytes { get; init; } = string.Empty; + } +} diff --git a/src/chia-dotnet/ChiaTypes/Side.cs b/src/chia-dotnet/ChiaTypes/Side.cs new file mode 100644 index 00000000..fe823275 --- /dev/null +++ b/src/chia-dotnet/ChiaTypes/Side.cs @@ -0,0 +1,8 @@ +namespace chia.dotnet +{ + public enum Side : byte + { + Left = 0, + Right = 1 + } +} diff --git a/src/chia-dotnet/ChiaTypes/SingletonRecord.cs b/src/chia-dotnet/ChiaTypes/SingletonRecord.cs new file mode 100644 index 00000000..3d6042ce --- /dev/null +++ b/src/chia-dotnet/ChiaTypes/SingletonRecord.cs @@ -0,0 +1,20 @@ +using System; +using Newtonsoft.Json; + +namespace chia.dotnet +{ + public record SingletonRecord + { + public string CoinId { get; init; } = string.Empty; + public string LauncherId { get; init; } = string.Empty; + public string Root { get; init; } = string.Empty; + public string InnerPuzzleHash { get; init; } = string.Empty; + public bool Confirmed { get; init; } + public uint ConfirmedAtHeight { get; init; } + public LineageProof LineageProof { get; init; } = new(); + public int Generation { get; init; } + public ulong Timestamp { get; init; } + [JsonIgnore] + public DateTime DateTimestamp => Timestamp.ToDateTime(); + } +} diff --git a/src/chia-dotnet/ChiaTypes/StoreProofs.cs b/src/chia-dotnet/ChiaTypes/StoreProofs.cs new file mode 100644 index 00000000..881a605d --- /dev/null +++ b/src/chia-dotnet/ChiaTypes/StoreProofs.cs @@ -0,0 +1,10 @@ +using System.Collections.Generic; + +namespace chia.dotnet +{ + public record StoreProofs + { + public string StoreId { get; init; } = string.Empty; + public IEnumerable Proofs { get; init; } = new List(); + } +} diff --git a/src/chia-dotnet/ChiaTypes/TerminalNode.cs b/src/chia-dotnet/ChiaTypes/TerminalNode.cs new file mode 100644 index 00000000..dd602dfb --- /dev/null +++ b/src/chia-dotnet/ChiaTypes/TerminalNode.cs @@ -0,0 +1,9 @@ +namespace chia.dotnet +{ + public record TerminalNode + { + public string Hash { get; init; } = string.Empty; + public string Key { get; init; } = string.Empty; + public string Value { get; init; } = string.Empty; + } +} diff --git a/src/chia-dotnet/ChiaTypes/TransactionTypeFilter.cs b/src/chia-dotnet/ChiaTypes/TransactionTypeFilter.cs new file mode 100644 index 00000000..849624bc --- /dev/null +++ b/src/chia-dotnet/ChiaTypes/TransactionTypeFilter.cs @@ -0,0 +1,10 @@ +namespace chia.dotnet +{ + public record TransactionTypeFilter + { + public string AssetId { get; init; } = string.Empty; + public string Name { get; init; } = string.Empty; + public uint FirstSeenHeight { get; init; } + public string SenderPuzzleHash { get; init; } = string.Empty; + } +} diff --git a/src/chia-dotnet/ChiaTypes/UInt32Range.cs b/src/chia-dotnet/ChiaTypes/UInt32Range.cs new file mode 100644 index 00000000..8cb03800 --- /dev/null +++ b/src/chia-dotnet/ChiaTypes/UInt32Range.cs @@ -0,0 +1,8 @@ +namespace chia.dotnet +{ + public record UInt32Range + { + public uint Start { get; init; } + public uint Stop { get; init; } + } +} diff --git a/src/chia-dotnet/ChiaTypes/UInt64Range.cs b/src/chia-dotnet/ChiaTypes/UInt64Range.cs new file mode 100644 index 00000000..5e52ffce --- /dev/null +++ b/src/chia-dotnet/ChiaTypes/UInt64Range.cs @@ -0,0 +1,8 @@ +namespace chia.dotnet +{ + public record UInt64Range + { + public ulong Start { get; init; } + public ulong Stop { get; init; } + } +} diff --git a/src/chia-dotnet/ChiaTypes/VCLineageProof.cs b/src/chia-dotnet/ChiaTypes/VCLineageProof.cs new file mode 100644 index 00000000..7586cf9b --- /dev/null +++ b/src/chia-dotnet/ChiaTypes/VCLineageProof.cs @@ -0,0 +1,10 @@ +namespace chia.dotnet +{ + /// + /// The covenant layer for exigent metadata layers requires to be passed the previous parent's metadata too + /// + public record VCLineageProof : LineageProof + { + public string? ParentProofHash { get; init; } + } +} diff --git a/src/chia-dotnet/ChiaTypes/VCProofs.cs b/src/chia-dotnet/ChiaTypes/VCProofs.cs new file mode 100644 index 00000000..6ed3863a --- /dev/null +++ b/src/chia-dotnet/ChiaTypes/VCProofs.cs @@ -0,0 +1,9 @@ +using System.Collections.Generic; + +namespace chia.dotnet +{ + public record VCProofs + { + public IDictionary KeyValuePairs { get; init; } = new Dictionary(); + } +} diff --git a/src/chia-dotnet/ChiaTypes/VCRecord.cs b/src/chia-dotnet/ChiaTypes/VCRecord.cs new file mode 100644 index 00000000..e0fef31e --- /dev/null +++ b/src/chia-dotnet/ChiaTypes/VCRecord.cs @@ -0,0 +1,8 @@ +namespace chia.dotnet +{ + public record VCRecord + { + public VerifiedCredential VC { get; init; } = new(); + public uint ConfirmedAtHeight { get; init; } + } +} diff --git a/src/chia-dotnet/ChiaTypes/VerifiedCredential.cs b/src/chia-dotnet/ChiaTypes/VerifiedCredential.cs new file mode 100644 index 00000000..a706d3e2 --- /dev/null +++ b/src/chia-dotnet/ChiaTypes/VerifiedCredential.cs @@ -0,0 +1,18 @@ +namespace chia.dotnet +{ + /// + /// This class serves as the main driver for the entire VC puzzle stack. Given the information below, it can sync and + /// spend VerifiedCredentials in any specified manner.Trying to sync from a spend that this class did not create will + /// likely result in an error. + /// + public record VerifiedCredential + { + public Coin Coin { get; init; } = new(); + public LineageProof SingletonLineageProof { get; init; } = new(); + public VCLineageProof EMLLineageProof { get; init; } = new(); + public string LauncherId { get; init; } = string.Empty; + public string InnerPuzzleHash { get; init; } = string.Empty; + public string ProofProvider { get; init; } = string.Empty; + public string? ProofHash { get; init; } + } +} diff --git a/src/chia-dotnet/ChiaTypes/WalletBalance.cs b/src/chia-dotnet/ChiaTypes/WalletBalance.cs index 62cc0590..35bd6839 100644 --- a/src/chia-dotnet/ChiaTypes/WalletBalance.cs +++ b/src/chia-dotnet/ChiaTypes/WalletBalance.cs @@ -9,5 +9,9 @@ public record WalletBalance public ulong MaxSendAmount { get; init; } public int UnspentCoinCount { get; init; } public int PendingCoinRemovalCount { get; init; } + public WalletType WalletType { get; init; } + public string? AssetId { get; init; } + public uint WalletId { get; init; } + public int? Fingerprint { get; init; } } } diff --git a/src/chia-dotnet/ChiaTypes/WalletType.cs b/src/chia-dotnet/ChiaTypes/WalletType.cs index 51d11b8e..ece36c7e 100644 --- a/src/chia-dotnet/ChiaTypes/WalletType.cs +++ b/src/chia-dotnet/ChiaTypes/WalletType.cs @@ -15,6 +15,9 @@ public enum WalletType : byte RECOVERABLE = 7, DISTRIBUTED_ID = 8, POOLING_WALLET = 9, - NFT = 10 + NFT = 10, + DATA_LAYER = 11, + DATA_LAYER_OFFER = 12, + VC = 13 } } diff --git a/src/chia-dotnet/DaemonProxy.cs b/src/chia-dotnet/DaemonProxy.cs index 1d65c4bc..e24ffdbf 100644 --- a/src/chia-dotnet/DaemonProxy.cs +++ b/src/chia-dotnet/DaemonProxy.cs @@ -243,14 +243,14 @@ public async Task RemoveKeyringPassphrase(string currentPassphrase, Cancellation /// The fingerprint /// A token to allow the call to be cancelled /// The - public async Task GetKeyForFingerprint(uint fingerprint, CancellationToken cancellationToken = default) + public async Task GetKeyForFingerprint(uint fingerprint, CancellationToken cancellationToken = default) { dynamic data = new ExpandoObject(); data.fingerprint = fingerprint; var response = await SendMessage("get_key_for_fingerprint", data, cancellationToken).ConfigureAwait(false); - return new PrivateKey() + return new PrivateKeyData() { PK = response.pk, Entropy = response.entropy @@ -303,9 +303,9 @@ public async Task AddPrivateKey(string mnemonic, string passphrase, Cancellation /// /// A token to allow the call to be cancelled /// The first - public async Task GetFirstPrivateKey(CancellationToken cancellationToken = default) + public async Task GetFirstPrivateKey(CancellationToken cancellationToken = default) { - return await SendMessage("get_first_private_key", null, "private_key", cancellationToken).ConfigureAwait(false); + return await SendMessage("get_first_private_key", null, "private_key", cancellationToken).ConfigureAwait(false); } /// @@ -313,9 +313,9 @@ public async Task GetFirstPrivateKey(CancellationToken cancellationT /// /// A token to allow the call to be cancelled /// All of the s - public async Task> GetAllPrivateKeys(CancellationToken cancellationToken = default) + public async Task> GetAllPrivateKeys(CancellationToken cancellationToken = default) { - return await SendMessage>("get_all_private_keys", null, "private_keys", cancellationToken).ConfigureAwait(false); + return await SendMessage>("get_all_private_keys", null, "private_keys", cancellationToken).ConfigureAwait(false); } /// diff --git a/src/chia-dotnet/NFTWallet.cs b/src/chia-dotnet/NFTWallet.cs index 1348d2be..7db9a3f5 100644 --- a/src/chia-dotnet/NFTWallet.cs +++ b/src/chia-dotnet/NFTWallet.cs @@ -1,6 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; +using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; @@ -90,8 +88,8 @@ public async Task MintNFT(NFTMintingInfo info, ulong fee = 0, Cance data.meta_uris = info.MetaUris; data.license_uris = info.LicenseUris; data.hash = info.Hash; - data.series_number = info.SeriesNumber; - data.series_total = info.SeriesTotal; + data.edition_number = info.EditionNumber; + data.edition_total = info.EditionTotal; data.meta_hash = info.MetaHash; data.license_hash = info.LicenseHash; data.did_id = info.DIDID; diff --git a/src/chia-dotnet/WalletProxy.cs b/src/chia-dotnet/WalletProxy.cs index 6b146db1..9d39658f 100644 --- a/src/chia-dotnet/WalletProxy.cs +++ b/src/chia-dotnet/WalletProxy.cs @@ -126,12 +126,12 @@ public async Task GetLoggedInFingerprint(CancellationToken cancellationTok /// The fingerprint /// A token to allow the call to be cancelled /// The private key for the fingerprint - public async Task GetPrivateKey(uint fingerprint, CancellationToken cancellationToken = default) + public async Task GetPrivateKey(uint fingerprint, CancellationToken cancellationToken = default) { dynamic data = new ExpandoObject(); data.fingerprint = fingerprint; - return await SendMessage("get_private_key", data, "private_key", cancellationToken).ConfigureAwait(false); + return await SendMessage("get_private_key", data, "private_key", cancellationToken).ConfigureAwait(false); } /// diff --git a/src/chia-dotnet/bech32/HexBytes.cs b/src/chia-dotnet/bech32/HexBytes.cs index 7c2e32c4..d4ba5fdf 100644 --- a/src/chia-dotnet/bech32/HexBytes.cs +++ b/src/chia-dotnet/bech32/HexBytes.cs @@ -8,7 +8,7 @@ namespace chia.dotnet.bech32 /// Utility to perform operations on an array of bytes and represent them as a Hex string /// /// adapted from https://github.com/Playwo/ChiaRPC.Net/blob/master/ChiaRPC.Net/Utils/Bech32M.cs - public struct HexBytes + public readonly struct HexBytes { /// /// hex string representation