All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog].
- The
Accessproperty of theEntryPointclass was not deserialized correctly for aTemplateentry point. - The
BidAddrKeyclass was not deserializing correctly for aValidatorRevbid address.
- Added possibility to specify
sourceandtargetas URefs in the native transfers when using theTransactionBuilder. - Added
ProtocolVersionMajortoByPackageHashInvocationTargetandByPackageNameInvocationTargetclasses.
This version is identical to 3.0.0-beta4. Please review the changes in the previous beta releases, and refer to the Migration guide if you’re updating a project from v2.x.
- Added the
Unbondbid kind to theBidslist in the get auction info response.
- The
TransactionBuildernow accepts amount asulongtype for thePayment()method. - New
GlobalStateKey.FromValidatorKey()to get the bid address key of a validator. - New
GetNodeVersion()in the main client class as a convenient method to check node version. - New
GetValidatorBid()method to recover the bid information of a validator.
MessageKeycontains anAddressableEntityproperty instead of aHashAddrto represent the related contract entity.GetAuctionInfo()now uses the newstate_get_auction_info_v2RPC method in Casper 2.0.
- #99 SSE Listener emits the same event 3 times when listening to EventType.All
- Fixed the
TransactionV1.ValidateHashes()method to properly verify the hashes.
- Added
GetDelegatorRewardandGetValidatorRewardmethods to the RPC client. PR#76 and PR#80. - Added
GetStatePackagemethod to the RPC client. PR#82. - Added
ProtocolVersionto Get Node Status RPC response. PR#77. - Added a
TransactionBuilderto buildTransactionV1transactions for the different type of invocations ( to mint/auction system contracts, user stored contracts) and session deployments. PR#79.
- The
Transactiontype is now an abstraction forTransactionV1andDeploytransaction models. PR#79. - Updated
TransactionV1JSON and bytes serialization in alignment tocasper-node v2.0.0-rc5. PR-84 and PR-85 - Updated
MessageKeykey type in alignment tocasper-node v2.0.0-rc5. PR-86 EntryPointPayment.SelfOnlyconstant replaced withEntryPointPayment.DirectInvocationOnly.PR#87.
- Fixed a multi-thread bug when using the RPCLoggingHandler in the RPC client class. PR#81.
- v3.0.0-beta1 did not parse correctly
Stepevent emmitted by nodes in Casper v1.x. PR#78.
This version is compatible with Casper node v2.0.0-rc3 and Casper node v1.5.6.
- New
GetEntity()method added to the RPC client. - New
QueryBalanceDetails()method added to the RPC client. - New
PutTransaction()andGetTransaction()methods added to the RPC client. - New
TransactionV1class to model the new type of transactions in Condor. - New global state keys added to the SDK:
AddressableEntityKey,BalanceHoldKey,BidAddrKey,BlockGlobalAddrKey,ByteCodeKey,EntryPointKey,MessageKey,NamedKeyKeyandPackageKey. - New
AddressableEntityclass added. It may represent an account, a stored smart contract, or a system smart contract. - New properties in the
StoredValueclass that can be retrieved withQueryGlobalState()method:BidKind,Unbonding,AddressableEntity,Package,ByteCode,MessageTopicSummary,Message,NamedKey,Reservation, andEntryPoint. - New classes to represent data from the global state:
BidKind,UnbondingPurse,PackageandByteCode. - New
Messageclass to contain data for native events included in theTransactionAcceptedevent from the SSE channel. - Added
TransactionAccepted,TransactionProcessed, andTransactionExpiredevents to the list of events emitted by a node through the SSE interface.
- The
Blockclass has changed to abstract the developer from the versioned block records returned from the network in Condor version. Refer to the migration guide for more information. - For blocks produced in Casper 2.0, the
Blockinstance contains the previous switch block hash in theLastSwitchBlockHashproperty. - Ther
EraEndclass has changed to abstract the developer from the versioned records returned from the network. More info in the migration guide. - The
Transferclass contained in the response for aGetBlockTransfers()call or in aExecutionResultobject has changed to abstract from the versioned transfer records returned from the network. Refer to the migration guide for more information. - The input argument for the
QueryBalance()method in the RPC client is any object from a class implementing theIPurseIdentifierinterface.PublicKey,AccountHashKey,URef, andAddressableEntityclasses implement this interface. - The type to refer to block heights is now
ulongacross all the SDK. In previous version there was a mix ofulongandint. - When using the
GetNodeStatus()method with a Casper 2.0 node, the response contains the hash for the latest switch block in theLatestSwitchBlockHashproperty. GetDeploy()response has changed and now contains aExecutionInfoobject when the deploy has been processed instead a list ofExecutionResultobjects. The execution info itself contains block information and a result object.- Starting with this version of the SDK, only public keys are checksummed with the CEP-57 standard. The rest of the keys and hashes are not checksummed anymore.
- In the
StoredValueclass,Transferhas been renamed toLegacyTransfer. DeployApprovalclass has been renamed toApprovaland is used forDeployas well as for the newTransactionV1model.ActionThresholdsclass has now newUpgradeManagementproperty.- The
EntryPointclass has new entry point types and a new propertyEntryPointPayment. Both apply when working with Casper 2.0 only. Stepevent from SSE contains a list ofTransformobjects instead of aExecutionEffectinstance.FinalitySignatureevent containsBlockHeightandChainNameHashvalue when connected to a Casper 2.0 node.DeployProcessedevent from SSE contains aExecutionResultV1object instead of aExecutionResultobject.
Proposer.isSystemproperty is marked as Obsolete. UseIsSystemwith capitalIinstead.
GetAccountBalance()method in the RPC client has been removed. UseQueryBalance()instead.GetBalance()method exists to usestate_get_balancefrom the RPC interface if needed.
- BouncyCastle package updated to 2.4.0 version.
- Upgraded the project to .NET 8 (see Security section).
- Addressed CVE-2024-30105 by upgrading the project to .NET 8.
- Updated BouncyCastle.Cryptography dependency to
v2.4.0to address a vulnerability inv2.3.0.
- Compatibility with
netstandard2.0framework. - Multi-framework nuget package.
- Changes to QueryGlobalState and GetAccountInfo methods to support changes in Casper node v1.5.5 PR#50.
- We use
ToLowerInvariant()instead ofToLower()to avoid problems with some CultureInfos PR#52. - XML Documentation included into the nuget packages PR#53.
isSystemproperty in the Block Proposer class marked obsolete and replaced withIsSystemPR#51.
- The SDK now links with
BouncyCastle.Cryptographypackage instead ofBouncyCastle.NetCorewhich was based on a mirror of the official package. - Testnet node in the examples updated to a working URL.
- Breaking change! the type for the
Proposerproperty in the body block has changed fromPublicKeytoProposer. This new type permits to parse correctly the value"00"used for system blocks in Casper network starting from v1.5.
- Added client method for new
query_balanceRPC endpoint. - Added client method for new
speculative_execfeature in casper node v1.5.0. - Added client method for new
info_get_chainspecRPC endpoint. - Added client method for new
chain_get_era_summaryRPC endpoint. - Added support for
block_heightparameter inquery_global_stateRPC endpoint. - Added new key types:
chainspec-registry-,system-contract-registry-,checksum-registry-,era-summary,unbond-. - Added support for new key prefix 'contract-package-'.
- Added new fields related to node sync in
info_get_statusRPC response. - Added support optional fields in
info_get_deployRPC response. - Added
lock_statusfield toContractPackageStatus.
- The SDK now builds with .NET 7 Framework.
- New RPC method
GetEraSummary(). - New global state key
era-summary-0000...0000.
- Skip
block_identifierparam ifHashvalue isnullin RPC requests to be compatible with Casper node v150.
- New in casper-node 1.4.5. Added optional
finalized_approvalsparameter toGetDeploymethod. CLValueclass offers a new methodSome()to extract values wrapped in theOption(CLType)type.
- Removed the dependency with the external library Humanizer.
NetCasperClientimplementsICasperClient. Similarly,ServerEventsClientimplementsISSEClient.
- Replace
Thread.Sleep()withTask.Delay()to run asynchronously. - Call await instead of Result in
GetAccountBalanceRPC method to run asynchronously.
- Initial release of Casper .NET SDK.