- Renamed
AccountTransactionType.TransferWithScheduleWithMemo
toAccountTransactionType.TransferWithScheduleAndMemo
.
- Bumped @concordium/rust-bindings to 1.1.0 (adds
display_type_schema_template
function)
getTransactionKindString
function.displayTypeSchemaTemplate
function.
- Bumped @concordium/rust-bindings to 1.0.0. (Throws proper
Error
s when execution fails for any WASM entrypoint, with improved error messages) - Updated
types.ts
to conform to updated GRPC API, which includes adding more variants to existing types (all new variants take effect from protocol version 6):ChainParametersV2
added toChainParameters
BlockInfo
changed toBlockInfoV0 | BlockInfoV1
ConsensusStatus
changed toConsensusStatusV0 | ConsensusStatusV1
ElectionInfo
changed toElectionInfoV0 | ElectionInfoV1
- Cost calculation for
deployModule
transaction. - Fixed a bug where protocol version was different (i.e. 1 less than what it should be) when using the gRPCv2 API (compared to what is returned by the gRPCv1 API).
- Function
uleb128Decode
now parses correctly and throws an error if the given input contains more than a single ULEB128 encoded number.
- A
parseWallet
function to parse wallet export files - Helper functions to determine version of versioned types mentioned in "Breaking Changes" have been added.
- Support for new chain update types.
- Function
uleb128DecodeWithIndex
that can also parse more than a single ULEB128 bigint - Added
tokenAddressFromBase58
andtokenAddressToBase58
to CIS2
- The following functions now all have an additional parameter controlling whether errors are in a verbose format or not:
deserializeContractState
deserializeReceiveReturnValue
deserializeReceiveError
deserializeInitError
deserializeTypeValue
serializeInitContractParameters
serializeUpdateContractParameters
serializeTypeValue
- Cost calculation for
deployModule
transaction.
- Updated
blockInfo
so that thebakerId
field is optional, since it will be undefined for genesis blocks. waitForTransactionFinalization
now returns aBlockItemSummaryInBlock
- Added missing version return type in
getModuleSchema
. It now returns an object containing the schema source and version.
- Helpers for calculating energy cost for a transaction and microCCD cost from energy cost:
getEnergyCost
getExchangeRate
convertEnergyToMicroCcd
- Utility functions for extracting information from
BlockItemSummary
:isInitContractSummary
isUpdateContractSummary
isTransferLikeSummary
isRejectTransaction
isSuccessTransaction
getTransactionRejectReason
getReceiverAccount
affectedContracts
affectedAccounts
- Utility functions for extracting information from
BlockSpecialEvent
:specialEventAffectedAccounts
- Helper methods on
GRPCClient
for chain traversal:getFinalizedBlocksFrom
findEarliestFinalized
findInstanceCreation
findFirstFinalizedBlockNoLaterThan
- Extended HdWallet with support for verifiable credential key deriviation.
- Bumped @concordium/rust-bindings to 0.12.0. (Adds key derivation for verifiable credentials)
- Utility functions
uleb128Decode
anduleb128Encode
functions for decoding and encoding as unsigned leb128 respectively. CIS2Contract
class for interacting with smart contracts adhering to the CIS-2 standard.cis0Supports
function for checking standard support in smart contracts.- Made the
streamToList
function public. - Made the
unwrap
function public. - Added
wasmToSchema
utility function. - Added
getEmbeddedSchema
to client. - Exposed
RpcError
type and created helperisRpcError
. - Build function
buildAccountSigner
for creatingAccountSigner
objects from genesis format, wallet export format, and a simple representation of credentials with keys.
- Fixed bug where
AccountCreationSummary
type did not have fields:index
,energyCost
,hash
generateBakerKeys
now also returns the private baker keys.
- Replace use of
setImmediate
withsetTimeout
since the former is not supported in browsers.
- General function for deserializing smart contract values
deserializeTypeValue
.
- Bumped @concordium/rust-bindings to 0.11.0. (Includes a fix to serialization of negative numbers for smart contract values)
signMessage
andverifyMessageSignature
can now handle the message being a buffer/Uint8Array instead of only a utf8 string.
serializeTypeValue
now reports an error when called with invalid data, such as a receive function with missing schema, or a schema that cannot be parsed.
-
Added a client for version 2 of the Concordium gRPC API to communicate with a Concordium node.
- including helper function
waitForTransactionFinalization
that returns a promise that resolves when the transaction finalizes.
- including helper function
-
Serialization:
serializeAccountTransactionPayload
serializeCredentialDeploymentPayload
-
Credential deployment helpers:
createCredentialTransaction
createCredentialTransactionNoSeed
signCredentialTransaction
-
Function to generate baker keys:
generateBakerKeys
.
getInitContractParameterSchema
,getUpdateContractParameterSchema
,serializeInitContractParameters
andserializeUpdateContractParameters
now report an error when called with invalid data, such as a receive function with missing schema, or a schema that cannot be parsed.
- The JSON-RPC client has been deprecated in favor of the new gRPC v2 client.
- Various types and helper functions used by the JSON-RPC client (and the v1 gRPC client) have also been deprecated.
serializeTypeValue
that allows smart contract types to be serialized using the specific schema, instead of only by providing the entire module's schema.getInitContractParameterSchema
Given a buffer containing the schema for a module, extract the schema for a given contract's init function's parameters.getReceiveContractParameterSchema
Given a buffer containing the schema for a module, extract the schema for a given contract's receive methods' parameters.
IdStatementBuilder
class to help build id statements.verifyIdStatement
function to verify that a statement is well-formed and complies with rules for id statements.getIdProof
function to prove a statement holds for the given identity/account.- Enums for sex and idDocType values.
- Change AccountTransactionType names/string values to align with those in Concordium base.
- Change some field names in UpdateConcractPayload, InitContractPayload and DeployModule to align with those in Concordium base.
- Rename GtuAmount class to CcdAmount. And change the microGtuAmount field to microCcdAmount.
- Add custom toJSON methods for the classes CcdAmount, AccountAddress, ModuleReference, CredentialRegistrationId, DataBlob and TransactionExpiry, in order to match the serialisation of their equivalents in Concordium base.
- The ability to deserialize error values of receive and init functions using
deserializeReceiveError()
anddeserializeInitError()
respectfully. - Refactored the
upserializeUpdateContractParameters()
andserializeInitContractParameters()
to call into rust functions.
- The ability to deserialize the return values of receive functions using
deserializeReceiveReturnValue()
.
- Additional arguments to the JSON-RPC HttpProvider, to enable is to receive and forward cookies.
- getAccountInfo no longer relies on instanceof to determine the type of input.
getCredentialId
to the HdWallet.
- Updated the signature of helper functions for accounts to sign messages. (and changed the prepend)
- ConcordiumHdWallet methods now take the identity provider index as arguments.
- Bumped @concordium/rust-bindings to 0.4.0.
- Added missing
accountAddress
field toAccountInfo
types.
- Support for new V2 schemas which can specify error types.
- SchemaVersion, Module, and schema types are now 0-indexed instead of 1-indexed. This means that the schemas used for V0 contracts are now version 0, and so is the associated types. And the first schema version for V1 contracts are now version 1.
createIdentityRequest
, to create identity requests.createCredentialV1
, to create credentials using a seedPhrase.createIdentityRecoveryRequest
, to create identity recovery requests.- Added
sendCredentialDeployment
to send credentials created fromcreateCredentialV1
to the chain. getSignedCredentialDeploymentTransactionHash
to get the transaction hash of credentials created fromcreateCredentialV1
.- Added
ConfigureBaker
toAccountTransactionType
enum. - Added
ConcordiumHdWallet
with functions to get keys and randomness from a seed phrase.
deserializeTransaction
no longer throws an error on expired transactions.
deserializeTransaction
is now exported from index.
deserializeTransaction
function to deserialize transaction created byserializeAccountTransactionForSubmission
andserializeCredentialDeploymentTransactionForSubmission
. (Currently SimpleTransfer, SimpleTransferWithMemo and RegisterData are the only supported account transactions kinds)
- Add support for getAccountInfo, InvokeContract, getCryptographicParameters and getModuleSource with JSON-RPC
- Fixed contract schema serialization for ByteList
- Support deserializing new schema types: ULeb128, ILeb128, ByteArray and ByteList.
- Support deserializing schemas with versioning information.
- The function for deserializing a module schema
deserialModuleFromBuffer
now have the schema version as an optional argument. The function will try to extract the version from the buffer. When a version is provided it falls back to this, otherwise it throws an error.
- @noble/ed25519 and cross-fetch moved from devDependencies to dependencies.
- Support deserializing version 2 schemas.
- Support serializing parameters for contracts using version 2 schemas.
- Support for deploying versioned smart contract modules, which is the format used in cargo-concordium v2+. (This is done by not supplying the version field in the payload)
serializeInitContractParameters
andserializeUpdateContractParameters
each have an additional parameter, which denotes the version of the schema provided. For existing users that are using V0 contracts, that parameter should beSchemaVersion.V1
.- Deserialization of schemas have been changed: types and functions have been renamed and
deserialModuleFromBuffer
have an additional parameter.
- Fixed JSON-RPC client crash on empty response when calling getInstanceInfo. (And update the format of the arguments for the server)
- Fixed issue by bumping rust bindings version
- Initial release