Skip to content

Latest commit

 

History

History
420 lines (363 loc) · 24.4 KB

File metadata and controls

420 lines (363 loc) · 24.4 KB

Changelog

Unreleased

  • Support for Protocol 11
  • Added ProtocolVersion.V11 corresponding to Protocol version 11
  • Added getTokenList endpoint for querying the list of protocol level tokens
  • Added getTokenAuthorizations endpoint for querying authorizations of a given token
  • Added UpdateMetadataTokenOperation updating the metadata of a given token
  • Added TokenAdminRole enum holding admin roles defined for the current token module implementation
  • Added AssignAdminRolesTokenOperation and RevokeAdminRolesTokenOperation managing admin roles of a given account for a given token

12.1.0

  • Added MintTokenOperation implementing protocol level token mint
  • Added protocol level token mint example, see MintToken in concordium-sdk-examples
  • Added deserialization for the ConfigureDelegation payload
  • Fixed incorrect deserialization of the UpdateContract payload parameter
  • Fixed inability to create verifiable presentations (proofs) with certain order of statements

12.0.0

  • Support for Protocol 10
  • Added ProtocolVersion.V10 corresponding to Protocol version 10
  • Added AccountTransactionV1 which is the sponsored transaction, signed by both the sender and the sponsor
  • Added BlockItemType.ACCOUNT_TRANSACTION_V1 corresponding to AccountTransactionV1
  • Added ability to create and complete sponsored transactions via TransactionFactory
  • Added SponsoredTransaction example
  • Added TransactionFactory.newPayloadSubmission() builder to create transactions with any payload, including RawPayload
  • Changed ClientV2.sendTransaction() method to accept any BlockItem
  • Removed ClientV2.sendCredentialDeploymentTransaction() method. Such a transaction can now be submitted via the sendTransaction() method
  • Added optional sponsorDetails to AccountTransactionDetails, which is present if the transaction was sponsored
  • Added Payload.fromBytes() deserialization method
  • Added TokenUpdate.fromBytes() deserialization method
  • Removed long unsupported EncryptedTransfer and TransferToEncrypted. Only TransferToPublic remained
  • Added Expiry.from() method to create it from UInt64
  • Add human-readable toString() implementation for TransferTokenOperation

Breaking changes in handling of the transactions

Since the sponsored transactions feature from Protocol 10 introduces a new way of representing the same transactions, existing conveniences around AccountTransaction are rendered useless. Please, go through the following list of changes to understand how to fix the code after updating to 12.0.0. There are also updated examples.

  • Payload no longer holds TransactionHeader and TransactionSignature. Its purpose is now purely to define the action executed by either AccountTransaction or AccountTransactionV1. Use TransactionFactory instead
  • Removed Payload.getDataToSign() method. Use the getDataToSign() method from either AccountTransaction or AccountTransactionV1 instead (the data differs for a sponsored transaction)
  • Removed Payload.calculateEnergyCost() method. Use the calculateMaxEnergyCost method from either TransactionHeader or TransactionHeaderV1 instead (the cost is bigger for a sponsored transaction)
  • Renamed Payload getTrasnactionType() method to just getType()
  • TransactionFactory.new***() methods now require Payload as an argument. For example, newTransfer() requires Transfer payload. Methods invoking smart contracts, like newUpdateContract(), also take max contract execution energy as the second argument (what used to be set through the maxEnergyCost() method)
  • Replaced TransactionFactory builder signer() and build() methods with just sign(), which now returns the final AccountTransaction
  • TransactionFactory now only returns AccountTransaction, or AccountTransactionV1 for sponsored transactions
  • Removed specific AccountTrasnaction implementations like TransferTransaction, TokenUpdateTransaction, etc. Replace occurrences of the removed types with AccountTransaction and use TransactionFactory to create such transactions
  • Merged TransferPayload and Transfer to just Transfer
  • Merged TransferWithMemoPayload and TransferWithMemo to just TransferWithMemo
  • Merged ConfigureBakerPayload and ConfigureBaker to just ConfigureBaker
  • Merged ConfigureDelegationPayload and ConfigureDelegation to just ConfigureDelegation
  • Merged InitContractPayload and InitContract to just InitContract
  • Changed TransactionHeader.expiry field type from UInt64 to Expiry
  • Removed various TransactionHeader builders. Do not manipulate headers directly, use TransactionFactory instead
  • Removed AccountTransaction builder and extended constructor. Use TransactionFactory instead

11.2.1

  • Fixed discrepancies with JavaScript SDK in creation of verifiable presentation

11.2.0

  • Added ability for wallets to create verifiable presentations (proofs) from identities and accounts. The entrypoint is VerificationRequestV1. This change does not include audit.
  • Removed checked exception from AtomicStatement.canBeProvedBy()
  • AtomicStatements now implement equals() and hashCode()
  • Hash is now fully JSON and CBOR serializable

11.1.0

  • Made TokenOperations deserializable from CBOR. TokenUpdate.builder().operationsSerialized() can be used for deserialization
  • Added TaggedTokenHolderAccount.getAddress() returning the address in a convenient form

11.0.2

  • Fixed always empty tokens in AccountInfo

11.0.1

  • Made Android package compatible with 16 KB alignment requirement

11.0.0

  • Support for Protocol 9
  • Added ProtocolVersion.V9 corresponding to Protocol version 9
  • Added tokens field to AccountInfo, containing list of related protocol level tokens
  • Added new account transaction, TokenUpdate, used to execute protocol level tokens operations
  • Added TokenOperation interface for protocol level tokens operations
  • Added TransferTokenOperation implementing protocol level token transfer
  • Added protocol level token transfer example, see SendTokenTransfer in concordium-sdk-examples
  • Added tokenUpdate result to AccountTransactionDetails
  • Added createPltUpdate authorization to AuthorizationsV1
  • Added RejectReasonTokenUpdateTransactionFailed and RejectReasonNotExistentTokenId transaction reject reasons
  • Added CborMapper singleton providing Jackson CBOR object mapper
  • Fixed having the Lombok library transitive

10.0.1

  • Added getPassiveDelegationInfo endpoint providing information about the passive delegators at the end of a given block
  • Exposed Payload.calculateEnergyCost method
  • Fixed base cost of ConfigureDelegation transaction being bigger than needed

10.0.0

  • Changed openForDelegation field in ConfigureBakerPayload from boolean to OpenStatus: what used to be false is now OpenStatus.OPEN_FOR_ALL, what used to be true is now OpenStatus.CLOSED_FOR_NEW, and it is now possible to set OpenStatus.CLOSED_FOR_ALL as well

9.0.0

  • Support for Protocol 8
  • Added ProtocolVersion.V8 corresponding to Protocol version 8
  • Added BakerSuspended and BakerResumed transaction result events
  • Added ValidatorSuspended and ValidatorPrimedForSuspension special outcomes for the GetBlockSpecialEvents endpoint
  • Added ChainParametersV3 for Protocol version 8, adding ValidatorScoreParameters
  • Added GetConsensusDetailedStatus endpoint for querying detailed consensus status information
  • Added GetScheduledReleaseAccounts endpoint for querying the list of accounts that have scheduled releases
  • Added GetCooldownAccounts, GetPreCooldownAccounts and GetPrePreCooldownAccounts endpoints for querying the lists of accounts that have pending cooldowns in protocol version 7 onwards
  • Added parameter field to ContractInitializedResult containing the parameter passed to the init function
  • Added isSuspended field to Baker and BakerPoolStatus which, since Protocol version 8, indicates whether the account is suspended and is not participating in the consensus algorithm
  • Added missedRounds and isPrimedForSuspension fields to CurrentPaydayStatus which, since Protocol version 8, reflect validator score status
  • Added suspended field to ConfigureBakerPayload which, since Protocol version 8, indicates whether the validator is suspended
  • Added FinalizationCommitteeParameters and ValidatorScoreParameters entries of PendingUpdateType, therefore new possible update types in PendingUpdateV2
  • Added validatorScoreParameters field to NextUpdateSequenceNumbers which corresponds to updates in ChainParametersV3.validatorScoreParameters

8.0.0

  • Support for Protocol 7
  • Added ProtocolVersion.V7 corresponding to Protocol version 7
  • Added cooldowns list to AccountInfo
  • Added availableBalance to AccountInfo
  • Made optional the following BakerPoolStatus fields: bakerEquityCapital, delegatedCapital, delegatedCapitalCap, poolInfo
  • Added BakerDelegationRemoved and DelegationBakerRemoved transaction result events
  • Removed previously deprecated encrypted transfers (EncryptedTransferTransaction, EncryptedTransferWithMemoTransaction, TransferToEncryptedTransaction)

7.2.0

  • Added MessageSigningDigest class to generate digests for message signing
  • Added support for company identity attributes
  • Deprecated encrypted transfers. They are partially removed since protocol version 7

7.1.0

  • Removed unnecessary amount parameter from InvokeInstanceRequest.
  • Added utility functions for converting between CCDAmount and Energy. Present in utility class Converter.
  • Fixed a bug in CustomEvent. Removed unnecessary tag field.
  • Added Web3IdProof class with getWeb3IdProof method to create Presentations. (And supporting classes)
  • Added method getFinalizedBlocksFrom for retrieving finalized blocks starting from a given height.
  • Added method getBlocksAtHeight for retrieving live blocks at a given height.
  • Added method findAtLowestHeight for finding the earliest block satisfying some condition.
  • Added method findAccountCreation for finding the block in which an account was created.
  • Fixed an issue where ConcordiumHdWallet.fromSeedPhrase always produced an invalid seed as hex.
  • Added AcceptableRequest class with acceptableRequest and acceptableAtomicStatement to check if a request satisfies wallet rules.

7.0.0

  • Make the energy parameter for invoking an instance Optional.
  • Parse the underlying reject reasons into AccountTransactionDetails.
  • Introduced Cis2Client for interfacing with CIS2 compliant smart contracts.
  • Support for deserializing contract update transactions.
  • Fix a bug where contract invocations used the wrong format for parameters.
  • Fix a bug in the serialization of AccountIndex
  • Fix a bug that caused getAccountInfo to fail for delegator and baker accounts if they had no stake pending changes.
  • Cleanup the API a bit for configure baker transaction by using PartsPerHundredThousands for determining the commission rates.
  • Fix serialization of ConfigureDelegation transaction
  • Remove AccountNonce in favor of just using the Nonce type across the API.
  • Fix a bug in the serialization of AccountIndex
  • Fix a bug that caused getAccountInfo to fail for delegator and baker accounts if they had no stake pending changes. This change is also propagated to the type level such that Baker and AccountDelegation retains an Optional<PendingChange> as opposed to just PendingChange.
  • Fix .equals() for AccountInfo such that all fields are used to deduce equality.

6.1.0

  • Purge remaining usages of V1 GRPC API.
  • Added support for android through an AAR artifact.
  • Added ConcordiumHdWallet class for deriving Concordium specific keys and randomness from a seed phrase.
  • Added Identity class with methods createIdentityRequest for creating identity requests and createIdentityRecoveryRequest for creating identity recovery requests.
  • Added Credential class exposing methods required to create, sign and sending a credential deployment transaction.
  • Added release on maven central.

6.0.0

  • Added method waitUntilFinalized for waiting until a given transaction is finalized.
  • Removed deprecated V1 API from the SDK. Consumers of the (now removed) getBlockSummary endpoint should refer to GetBlockTransactionEvents, GetBlockSpecialEvents and GetBlockPendingUpdates.
  • Added support for GRPC V2 GetWinningBakersEpoch for getting a list of bakers that won the lottery in a particular historical epoch. Only available when querying a node with version at least 6.1.
  • Added support for GRPC V2 GetFirstBlockEpoch for getting the block hash of the first finalized block in a specified epoch. Only available when querying a node with version at least 6.1.
  • Added support for GRPC V2 GetBakerEarliestWinTime for getting the projected earliest time at which a particular baker will be required to bake a block. Only available when querying a node with version at least 6.1.
  • Added support for GRPC V2 GetBakerRewardPeriodInfo for getting all the bakers in the reward period of a block. Only available when querying a node with version at least 6.1.
  • Added support for GRPC V2 GetBlockCertificates for retrieving certificates for a block supporting ConcordiumBF, i.e. a node with at least version 6.1.
  • Extended CurrentPaydayStatus with CommissionRates that apply for the current reward period. Requires at least node version 6.1.
  • Implemented custom JSON serialization of AbstractAddress to enable AbstractAddress as a smart contract parameter, and added class ListParam for conveniently using lists of objects, AbstractAddress, ContractAddress and AccountAddress as smart contract parameters.
  • Added support for creating and serializing smart contract parameters using the abstract class SchemaParameter and a provided Schema.

5.1.0

  • Fixed a regression that made it harder to deserialize transactions from bytes.
  • toString on CCD amount now displays the amount as micro CCD.
  • Fix bug where Details type was not correctly set when querying status of a block item.

5.0.2

  • Remove an unused import from ClientV2 which could make compilation fail on some jdks.

5.0.1

  • Fix a bug that caused custom http headers to be set for ClientV2.

5.0.0

  • Added typing for baker keys and moved createBakerKeys to BakerKeys. Likewise the TransactionFactory.newUpdateBakerKeys takes in the generated baker keys.
  • Added support for getBlockTransactionEvents for retrieving events emitted by transactions.
  • Added support for InvokeInstance for executing a smart contract instance locally.
  • Removed Account instead one should simply use AccountAddress.
  • All timestamps are now exposed as Timestamps with convenience method for getting ZonedDateTime.
  • Renamed AccountRequest to AccountQuery.
  • Added support for GRPC V2 GetBlockChainParameters for retrieving the parameters of the chain.
  • Deprecated the Client. Instead one should use ClientV2 which leverages the GRPCv2 API of the node.
  • Support for protocol V6.
  • Added support for GRPC V2 GetPeersInfo for retrieving information of the peers that the node holds.
  • Added support for GRPC V2 GetNodeInfo for retrieving various information of the node queried.
  • Added support for GRPC V2 GetBannedPeers for retrieving a list of the banned peers.
  • Added support for GRPC V2 BanPeer for banning a peer,
  • Added support for GRPC V2 UnbanPeer for unbanning a peer
  • Added support for GRPC V2 GetBlockSpecialEvents for retrieving a list of events not generated directly by any transaction
  • Added support for GRPC V2 GetBlockFinalizationSummary for retrieving summary of the finalization data in a given block
  • Added support for importing mobile & browser extension wallet exports as well as exports in the genesis format
  • Added support for GRPC V2 GetAccountInfo
  • Added support for GRPC V2 GetAccountList
  • Added support for GRPC V2 GetNextAccountNonceNumber
  • Added support for GRPC V2 GetBlockItems
  • Added support for GRPC V2 GetConsensusStatus
  • Added support for GRPC V2 GetCryptographic Parameters
  • Added support for GRPC V2 GetIdentityProviders
  • Added support for GRPC V2 SendBlockItem for sending a transaction.
  • Added support for GRPC V2 PeerConnect for instructing the node to connect to a specific peer.
  • Added support for GRPC V2 PeerDisconnect for instructing the node to drop a peer.
  • Added support for GRPC V2 GetPeersInfo for acquiring information of the peers that the node is connected to.
  • Added support for GRPC V2 GetBlockItemStatus for retrieving the status of an individual transaction
  • Added support for GRPC V2 DumpStart which instructs the node to start dumping network packages at a specified path.
  • Added support for GRPC V2 DumpStop which instructs the node to stop dumping packages.
  • Fixed incorrect transaction event with respect to a transaction status for when a delegator decreased its stake.
  • Added support for GRPC V2 GetBlockInfo for retrieving information of the block being queried.
  • Added support for GRPC V2 GetTokenomicsInfo for acquiring various tokenomics related information for a block.
  • Added support for GRPC V2 GetInstanceList for retrieving the contract instances at a certain block.
  • Added support for GRPC V2 GetAncestors for getting specified no of ancestor blocks for the input block.
  • Added support for GRPC V2 GetBakerList for retrieving the bakers at a certain block.
  • Added support for GRPC V2 GetAccountNonFinalizedTransactions for querying transactions from a particular account that have not yet been finalized.
  • Added support for GRPC V2 GetBranches for getting branches of the chain (i.e. descendants of the last finalized block).
  • Added support for GRPC V2 GetPassiveDelegators for getting the passive delegators at a certain block.
  • Added support for GRPC V2 GetPoolDelegators for getting the delegators for a specified baking pool at a certain block.
  • Added support for GRPC V2 GetElectionInfo for getting the bakers at a certain block and other metadata of the election.
  • Added support for GRPC V2 GetInstanceState for getting state of any Contract Instance
  • Added support for GRPC V2 InstanceStateLookup for getting value of a particular key in Contract Instance.
  • Added support for GRPC V2 GetPoolInfo for getting information about a given pool at the end of a given block.
  • Added support for GRPC V2 GetModuleList for getting list of smart contract module at the end of a given block.
  • Added support for GRPC V2 GetInstanceInfo for getting information about a contract instance at the end of a given block.
  • Added support for GRPC V2 GetPoolDelegatorsRewardPeriod for getting fixed list of Pool Delegators for a given pool at the end of a given block.
  • Added support for GRPC V2 GetPassiveDelegatorsRewardPeriod for getting fixed list of Passive Delegators for a given pool at the end of a given block.
  • Added support for GRPC V2 GetNextUpdateSequenceNumbers for getting next available sequence numbers for updating chain parameters after a given block.
  • Added support for GRPC V2 GetBlockPendingUpdates for getting the pending updates to chain parameters at the end of a given block.
  • Added support for GRPC V2 Shutdown For shutting down the network layer of the Node.
  • Added support for GRPC V2 GetModuleSource for getting binary source of Smart Contract Module.

4.2.0

  • Added initial support for GRPC V2
  • Added initial support for GRPC V2 query GetAnonymityRevokers
  • Added CLI example for GRPC V2 query GetAnonymityRevokers
  • Added support for GRPC V2 GetBlocks
  • Added support for GRPC V2 GetFinalizedBlocks
  • Added support for M1/M2 Mac

4.1.0

  • Added support for Transfer With Schedule.
  • Added support for Transfer With Schedule With Memo.
  • Added support for Update Credentials Keys.
  • Added support for Transfer to public wallet.
  • Added support for Transfer To Encrypted wallet.
  • Added support for Encrypted Transfer.
  • Added support for Encrypted Transfer with Memo.
  • Added support for Configuring a baker.
  • Added support for Configuring the account as a Delegator.
  • A new native dependency has been introduced in order to support the new transaction types mentioned above, As a result native dependencies need to be rebuilt before building the Java project.

4.0.0

  • Support for Protocol 5.
  • Added support for initializing smart contracts.
  • Added support for Update Contract.
  • Added support for Deploy Module transaction.
  • Fix a bug where pending changes for delegators were not visible via getAccountInfo.
  • Removed BlocksAtHeightRequest.newRelative(long height, ProtocolVersion protocolVersion, boolean restrictedToGenesisIndex) as it was only a valid call on mainnet as all protocols exists there. However this may not be true on e.g. testnet. Note. BlocksAtHeightRequest.newRelative(long height, int genesisIndex, boolean restrictedToGenesisIndex) still exists for the purpose of getting blocks at a relative height.
  • Fix a bug where a RejectReason for setting delegation target to a non baker was not correctly parsed.
  • Fix a bug where updateTimeParameters was not correctly parsed into the TransactionContents enum.
  • Fix a bug where updateCooldownParameters was not correctly parsed into the TransactionContents enum.
  • Fix a bug where mintDistributionCPV1 was not correctly parsed into the enqueued chain update.
  • Fix a bug where timeParametersCPV1 was not correctly parsed into the enqueued chain update
  • Fix a bug where cooldownParametersCPV1 was not correctly parsed into the enqueued chain update.
  • Fix a bug where mintPerPayday was not properly parsed.
  • Fix a bug where updateRootKeys was not properly parsed.

3.1.0

  • Fixed bug in UpdateEnqueuedResult which parsed effectiveTime in wrong.
  • Added support for Uptime query.
  • Added support for Account Transaction Register Data.
  • Added support for query PeerTotalSent
  • Added support for query PeerList
  • Added support for query PeerStats
  • Added support for query PeerVersion
  • Added support for query GetTransactionStatusInBlock
  • Added support for query GetAccountNonFinalizedTransactions
  • Added support for query PeerConnect
  • Added support for query GetBakerList
  • Added support for query GetPoolStatus
  • Added support for query PeerTotalReceived
  • Added support for query GetModuleSource
  • Added support for query GetModuleList
  • Added support for query GetBirkParameters
  • Added support for query NodeInfo
  • Added support for query Shutdown
  • Added support for query GetAncestors
  • Added support for query JoinNetwork
  • Added support for query LeaveNetwork
  • Added support for query GetRewardStatus
  • Added support for query GetInstanceInfo
  • Added support for query GetInstances
  • Added support for query GetAccountList
  • Added support for query GetBannedPeers
  • Added support for query GetBranches
  • Added support for query GetIdentityProviders
  • Added support for query GetAnonymityRevokers
  • Added support for query BanNode
  • Added support for query UnBanNode
  • Added support for query StartBaker
  • Added support for query StopBaker

3.0.0

  • Stronger typing for various places in the API.
  • Renamed GTUAmount to CCDAmount
  • New CredentialRegistrationId type.
  • BlockSummary API now reflects the underlying types better.
  • getAccountInfo can now be queried either via AccountAddress, AccountIndex or CredentialRegistrationId via AccountRequest.

2.4.0

  • Support for getCryptographicParameters

2.3.0

  • Expose more types related to TransactionSummary

2.2.0

  • Support for sending raw transactions.

2.1.0

  • CredentialRegistrationID type introduced and AccountAddress can be derived from it.

2.0.0

  • Support for configuring TLS.

1.7.0

  • Allow consumers to provide extra HTTP headers for the gRPC connection.

1.6.1

  • Fix a bug which caused the Client to use a global absolute timeout from when it was initialized.

1.6.0

  • AccountTransaction now exposes a getType function which returns the type of the underlying Payload.

1.5.0

  • Exposed more of the transactions in the API.

1.4.0

  • Fix parsing bug for AccountInfo where scheduled releases was not included.
  • Transaction Status is now public.
  • BlockItem is now public.

1.3.0

  • Support for transaction deserialization.
  • Support for getBlockInfo.

1.2.0

  • Support for getBlocksAtHeight

1.1.0

  • Support for account alias.