davidatwhiletrue
released this
12 Jul 12:38
·
3 commits
to master
since this release
Casper .NET SDK v3.0.0-beta1
This is a beta version of the Casper.NET SDK v3.0. It is compatible with Casper node v2.0.0-rc3 and Casper node v1.5.6. This new version introduces some breaking changes. Read the changelog below in detail and the migration guide.
Added
- 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
TransactionV1
class to model the new type of transactions in Condor. - New global state keys added to the SDK:
AddressableEntityKey
,BalanceHoldKey
,BidAddrKey
,BlockGlobalAddrKey
,ByteCodeKey
,EntryPointKey
,MessageKey
,NamedKeyKey
andPackageKey
. - New
AddressableEntity
class added. It may represent an account, a stored smart contract, or a system smart contract. - New properties in the
StoredValue
class 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
,Package
andByteCode
. - New
Message
class to contain data for native events included in theTransactionAccepted
event from the SSE channel. - Added
TransactionAccepted
,TransactionProcessed
, andTransactionExpired
events to the list of events emitted by a node through the SSE interface.
Changed
- The
Block
class 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
Block
instance contains the previous switch block hash in theLastSwitchBlockHash
property. - Ther
EraEnd
class has changed to abstract the developer from the versioned records returned from the network. More info in the migration guide. - The
Transfer
class contained in the response for aGetBlockTransfers()
call or in aExecutionResult
object 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 theIPurseIdentifier
interface.PublicKey
,AccountHashKey
,URef
, andAddressableEntity
classes implement this interface. - The type to refer to block heights is now
ulong
across all the SDK. In previous version there was a mix ofulong
andint
. - When using the
GetNodeStatus()
method with a Casper 2.0 node, the response contains the hash for the latest switch block in theLatestSwitchBlockHash
property. GetDeploy()
response has changed and now contains aExecutionInfo
object when the deploy has been processed instead a list ofExecutionResult
objects. 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
StoredValue
class,Transfer
has been renamed toLegacyTransfer
. DeployApproval
class has been renamed toApproval
and is used forDeploy
as well as for the newTransactionV1
model.ActionThresholds
class has now newUpgradeManagement
property.- The
EntryPoint
class has new entry point types and a new propertyEntryPointPayment
. Both apply when working with Casper 2.0 only. Step
event from SSE contains a list ofTransform
objects instead of aExecutionEffect
instance.FinalitySignature
event containsBlockHeight
andChainNameHash
value when connected to a Casper 2.0 node.DeployProcessed
event from SSE contains aExecutionResultV1
object instead of aExecutionResult
object.
Deprecated
Proposer.isSystem
property is marked as Obsolete. UseIsSystem
with capitalI
instead.
Removed
GetAccountBalance()
method in the RPC client has been removed. UseQueryBalance()
instead.GetBalance()
method exists to usestate_get_balance
from the RPC interface if needed.
Security
- Upgraded the project to .NET 8 latest version to address CVE-2024-30105 vulnerability
- BouncyCastle package updated to 2.4.0 version.