- Add functionality for generating, and verifying account signatures.
- Support for protocol version 8 functionality:
ConfigureBakerPayload
supports the optionalsuspend
flag.BakerEvent
has new cases forBakerSuspended
andBakerResumed
when the flag is set in aConfigureBaker
transaction.SpecialTransactionOutcome
has new cases forValidatorSuspended
andValidatorPrimedForSuspension
, which occur when a validator is (or potentially will be) suspended.- New
UpdatePayload
typeValidatorScoreParametersCPV3
, which updates the maximum number of consecutive failures a validator can have before it faces suspension.
ContractInitializedEvent
adds theparameter
used to initialize the contract (supported from node version >= 8).- New functionality for querying which accounts have scheduled releases or cooldowns (supported
from node version >= 8):
get_scheduled_release_accounts
: Get the accounts (by index) with scheduled releases, and the timestamp of the first release.get_cooldown_accounts
: Get the accounts (by index) with stake in cooldown, and the timestamp at which the first cooldown expires.get_pre_cooldown_accounts
: Get the accounts (by index) with stake in pre-cooldown.get_pre_pre_cooldown_accounts
: Get the accounts (by index) with stake in pre-pre-cooldown.
- Update the
ContractClient
to optionally include a schema. - Update the
create
method to theContractClient
to look up the embedded schema from the chain. - Add the
new_with_schema
method to theContractClient
to create aContractClient
with a given schema. - Add
dry_run_update_with_reject_reason_info
anddry_run_update_raw_with_reject_reason_info
methods to theContractClient
. They are like thedry_run_update
anddry_run_update_raw
methods but in case of a reject, decode the reject reason into a human-readable error. - Add
decode_concordium_std_error
anddecode_smart_contract_revert
functions to facilitate reject reason decoding of failed transactions. - Add
cis3
module andCis3Contract
for interacting with CIS3 contracts. - Updated the
concordium-base
to version 6 to incorporate protocol 7 changes (cooldown and baker pool status changes). Specifically, this changes the following public types:AccountInfo
: Now has two new fields,cooldown: Vec<Cooldown>
andavailable_balance: Amount
. Thecooldown
field specifies the stake currently in cooldown for the account. Theavailable_balance
field denotes the total amount available to the account for transfers.BakerPoolStatus
: Thebaker_equity_capital
,delegated_capital
,delegated_capital_cap
,pool_info
andbaker_stake_pending_change
fields are moved into a new type,ActiveBakerPoolStatus
. A new field is added toBakerPoolStatus
which includes these fields, namelyactive_baker_pool_status: Option<ActiveBakerPoolStatus>
. This field isSome(..)
iffpool_info
is included in the node'sPoolInfoResponse
.
DelegationEvent
adds aBakerRemoved
case, asConfigureDelegation
can replace a baker with delegation from protocol 7.BakerEvent
adds aDelegationRemove
case, asConfigureBaker
can replace a delegator with a baker from protocol 7.- Removed the
postgres
feature and all associated functionality. The intent is for this to be part of the transaction logger instead.
- Bump MSRV to 1.73
- Update dependencies. In particular
concordium-base
andconcordium-smart-contract-engine
are bumped to version 5.
- Add a
ProcessorConfig
struct dual to theTraverseConfig
to help in writing indexers. - Bump MSRV to 1.72
- Fix incorrect calculation of the micro_ccd_per_eur helper.
- Add
ContractInitBuilder
for more ergonomic initialization of new smart contract instances with automatic NRG cost estimation. - Add
ModuleDeployBuilder
for more ergonomic deployment of contract modules with automatic dry run and validation.
- Add a
From<&AccountInfo>
instance forAccountAccessStructure
to ease verification of signatures usingGetAccountInfo
response. - Add a
get_finalized_block_item
method to theClient
to retrieve a finalized block item from the node. - Remove the V1 API.
- Add
Display
implementation toBlockIdentifier
. - Add
Display
andFromStr
implementations forAccountIdentifier
. - Rename
find_first_finalized_block_no_later_than
intofind_first_finalized_block_no_earlier_than
since that correctly reflects its semantics with respect to time and is much clearer. - Make the
Client::new
method slightly more general by accepting aTryInto<Endpoint>
. This allows passing URLs as strings directly. - Add a new
indexer
module that provides boilerplate for robustly traversing the chain. - Support protocol version 7.
- Support for smart contract debugging when running locally.
- Remove JSON serialization support of BlockSummary.
- Add an additional
indexer
to index all transaction outcomes and special events. - Make the
energy
field ofContractContext
optional since it is no longer required by the node. - Add
dry_run_update
anddry_run_update_raw
methods to theContractClient
to simulate smart contract updates. The return values of these can be used to immediately sign and send a transaction. - Update
rand
dependency to0.8
. - Update
tonic
to 0.10.
- The sdk now requires a
rustc
version at least 1.67 (Before it required version 1.66). - Add a
contract_update
helper analogous tocontract_init
to extract an execution tree from a smart contract update transaction. - Add a
ccd_cost
helper toChainParameters
to convert NRG cost to CCD. - Add support for
DryRun
. Requires a node version at least 6.2.
- Add a
commission_rates
field toCurrentPaydayBakerPoolStatus
which yields the commission rates of the baker for the reward period. Requires a node version at least 6.1. - Add support for
GetWinningBakersEpoch
. Requires a node version at least 6.1. - Add Support for
GetFirstBlockEpoch
. Requires a node version at least 6.1. - Add support for
GetBakersRewardPeriod
endpoint. Requires a node version at least 6.1. - Add Support for
GetBakerEarliestWinTime
endpoint. Requires a node version at least 6.1. - Add support for
GetBlockCertificates
. Requires a node version at least 6.1. - Add
make_update
andmake_update_raw
methods to theContractClient
. They are likeupdate
andupdate_raw
but instead of sending a transaction they only construct it and return it. - Add
make_register_credential
,make_revoke_credential_as_issuer
andmake_revoke_credential_other
to the CIS4 client. These are like the methods without themake_
prefix, except that they only construct the transaction, they do not send it. - Add
make_transfer
andmake_update_operator
functions to the CIS2 client. These are like the methods without themake_
, except that they only construct the transaction. - Update minimum supported rust version to
1.66
.
- Update
concordium_base
dependency to 3.0.1.
- The SDK requires node version 6 or later.
- Support relative and absolute block height as the block identifier in block queries.
- Add field
protocol_version
toBlockInfo
which is the protocol version of the queried block. - Extend enum
PendingUpdateEffect
with variants for protocol version 6. - Introduce
ChainParametersV2
struct for protocol version 6. - Introduce generic
gas_reward
inRewardParametersSkeleton
for supporting different versions of GASRewards. - Add
find_account_creation
helper to find a block where the account was created. - Deprecate
find_earliest_finalized
and replace it withfind_at_lowest_height
that avoids an extra call to the node. This is making use of the new API. - Re-export
http::Scheme
fromhttp
crate since it is often needed when configuring endpoints. - Add a new
ContractClient
that supports operations on smart contract instances such as queries and updates. - Add a
Cis4Contract
for interacting with Cis4 contracts. - Add a new
web3id
module that contains types and functionality for construcing Web3ID credentials and verifying Web3ID proofs. - Deprecate the client for V1 of the node's API.
ConsensusInfo
slot_duration
is now an optional field, only present in protocols 1-5.- a new field
concordium_bft_status
is added, that is present if protocol version is 6 or higher
BlockInfo
slot_number
is optional, and only present in protocols 1-5- new fields
round
andepoch
that are present in protocol 6 or higher.
BirkParameters
election_difficulty
is optional, and only present in protocols 1-5.
NextUpdateSequenceNumbers
- Add
timeout_parameters
,min_block_time
,block_energy_limit
, andfinalization_committee_parameters
sequence numbers.
- Add
- Re-export
concordium_base
to enable use ofconcordium_base_derive
serialization macros. - Bump minimum supported rust version to 1.64.
- When using derive(Serial,Deserial) macros from the smart_contracts modules
concordium_std
must be made available, for example asuse concordium_rust_sdk::smart_contracts::common as concordium_std
- Add
find_earliest_finalized
,find_instance_creation
,find_first_finalized_block_no_later_than
methods to thev2
client. - Bump MSRV to 1.62
- Add deprecation notices to
ModuleRef
andParameter
. UseModuleReference
andOwnedParameter
, respectively, instead.- Replace
AsRef<Vec<u8>>
withAsRef<[u8]>
forOwnedParameter
(and thereby also for the now deprecatedParameter
).- Migrate from
parameter.as_ref()
: Use¶meter.as_ref().to_vec()
instead.
- Migrate from
OwnedParameter
also has a number of additional methods and trait implementations, namely:- A
from_serial
method which constructs a new parameter by serializing the input and checking that the length is valid. - An
empty
method which constructs an empty parameter. - An
Into<Vec<u8>>
implementation for getting the innerbytes
. - An
as_parameter
method for converting it to the borrowed versionParameter(&[u8])
type (not to be confused with the now deprecatedParameter(Vec<u8>)
).
- Replace
- Add helpers to
WalletAccount
so that it can be constructed from genesis account format produced by the genesis creator tool, as well as from browser key export format. - Fix contract schema's
to_json
to output contract addresses in the correct format. - Add a
Display
implementation forContractEvent
. - Add
_single
family of functions toCis2Contract
to make it easier to do queries and updates for a single token or operator. - Generalize the signature of
Cis2Contract
methods that take a block identifier. They now takeimpl IntoBlockIdentifier
. All existing uses should remain working since&BlockIdentifier
implements this trait. - Add
is_rejected_account_transaction
helper toBlockItemSummary
to help extract reject reason for an account transaction. - Add
update_operator_dry_run
andtransfer_dry_run
methods toCis2Contract
. These dry-runupdate_operator
andtransfer
transactions usinginvoke_instance
. They can be used to estimate transaction costs, and check whether the call will succeed. - Add
is_payday_block
helper function tov2::Client
to identify whether a specific block is one that includes payday events. - Add
new_from_payload
helper toContractContext
for convenience when dry-running smart contract update transactions. - Add a notion of
TokenAddress
and its string representation based on base58 encoding.
- Add
WalletAccount
type that can be parsed from the browser extension wallet export. This supports the signer interface and so can be used to send transactions.
- Expose macros for deriving
Serial
andDeserial
fromconcordium-contracts-common
. - Address method
is_alias_of
is nowis_alias
. - Replaced
ReceiveName
andInitName
withOwnedReceiveName
andOwnedContractName
fromconcordium-contracts-common
. - Remove
ContractAddress
andAddress
in favor of their equivalents inconcordium-contracts-common
. AccountAddress::new
is replaced by a function calledaccount_address_from_registration_id
.Amount
now has a fieldmicro_ccd
instead ofmicrogtu
.- The default arithmetic (operator syntax, such as
+
,-
,*
) withAmount
is now unchecked. - There are no longer implementations of
From<u64> for Amount
andFrom<Amount> for u64
as the behavior of these is not obvious. Instead, the functionsAmount::from_micro_ccd
orAmount::from_ccd
and the gettermicro_ccd
should be used instead. - Implement
Display
andFromStr
forContractAddress
formatted as<index, subindex>
, E.g<145,0>
. - Implement
Display
andFromStr
forAddress
. The latter attempts to parse a contract address. If this fails it will attempt to parse anAccountAddress
. - Implement
FromStr
forOwnedReceiveName
. - Remove the
From<Vec<u8>>
implementation forParameter
. Instead aTryFrom
is provided that checks the length. - Add support for the node's GRPC V2 interface.
- Bump minimum supported Rust version to 1.57.
- Add support for CIS0 standard.
- The CIS2 support now uses the V2 node API. This has led so small changes in the API.
- Add support for protocol version 5 events and limitations.
- Deprecate
add_baker
,update_baker_keys
,remove_baker
,update_baker_stake
,update_baker_restake_earnings
functions. They only apply to protocol versions 1-3 and are replaced byconfigure_baker
.
Bump minimum supported Rust version to 1.56.
- Add V1 variant of root and level 1 key updates.
- Expose helper methods to wait for new blocks or finalization.
- Add some helper methods to
InstanceInfo
,ElectionDifficulty
andDelegationTarget
types. - Expose types and functions for interacting with CIS2 smart contracts.
- Let AmountFraction derive Display.
- Fix JSON parsing bug.
- Replace
send_transaction
withsend_block_item
. - Support protocol version 4 data formats.
- Support node version 4 API.