Skip to content

Releases: Concordium/concordium-node-sdk-js

node-sdk v8.0.0

27 Jun 13:50
aa05be9

Choose a tag to compare

Breaking changes

  • Proper Errors are thrown when execution fails for any WASM entrypoint, and error messages have been improved.
  • 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 to ChainParameters
    • BlockInfo changed to BlockInfoV0 | BlockInfoV1
    • ConsensusStatus changed to ConsensusStatusV0 | ConsensusStatusV1
    • ElectionInfo changed to ElectionInfoV0 | ElectionInfoV1

Fixed

  • 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).

Added

  • 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 and tokenAddressToBase58 to CIS2

Changed

  • Function uleb128Decode now parses correctly and throws an error if the given input contains more than a single ULEB128 encoded number.
  • 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

web-sdk v4.0.1

25 May 13:28
f413f64

Choose a tag to compare

Fixed

  • Cost calculation for deployModule transaction.

web-sdk v4.0.0

16 May 15:29
246b544

Choose a tag to compare

Breaking changes

  • Updated blockInfo so that the bakerId field is optional, since it will be undefined for genesis blocks.
  • waitForTransactionFinalization now returns a BlockItemSummaryInBlock
  • Added missing version return type in getModuleSchema. It now returns an object containing the schema source and version.

Added

  • 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 derivation.

node-sdk v7.0.0

16 May 15:31
246b544

Choose a tag to compare

Breaking changes

  • Updated blockInfo so that the bakerId field is optional, since it will be undefined for genesis blocks.
  • waitForTransactionFinalization now returns a BlockItemSummaryInBlock
  • Added missing version return type in getModuleSchema. It now returns an object containing the schema source and version.

Added

  • 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 derivation.

web-sdk v3.5.0

03 May 12:48
b824687

Choose a tag to compare

  • Utility functions uleb128Decode and uleb128Encode 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.
  • Build function buildAccountSigner for creating AccountSigner objects from genesis format, wallet export format, and a simple representation of credentials with keys.

node-sdk v6.4.0

03 May 12:48
b824687

Choose a tag to compare

  • Utility functions uleb128Decode and uleb128Encode 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.
  • Build function buildAccountSigner for creating AccountSigner objects from genesis format, wallet export format, and a simple representation of credentials with keys.
  • generateBakerKeys function now also returns the private baker keys.

web-sdk v3.4.2

21 Apr 13:40
a52f1ad

Choose a tag to compare

generateBakerKeys function now also returns the private baker keys.

web-sdk v3.4.1

31 Mar 13:27
1030ceb

Choose a tag to compare

Fix the gRPCv2 client's helper function waitForFinalization, so it doesn't use setImmediate, which is not supported in the browser.

web-sdk v3.4.0

23 Mar 10:38
eeefb91

Choose a tag to compare

  • Added a general function for deserializing smart contract values deserializeTypeValue.
  • signMessage and verifyMessageSignature can now handle the message being a buffer/Uint8Array instead of only a utf8 string.
  • Updated dependencies to fix incorrect serialization of negative numbers for smart contract values.
  • 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.

node-sdk v6.3.0

23 Mar 10:35
eeefb91

Choose a tag to compare

  • Added a general function for deserializing smart contract values deserializeTypeValue.
  • signMessage and verifyMessageSignature can now handle the message being a buffer/Uint8Array instead of only a utf8 string.
  • Updated dependencies to fix incorrect serialization of negative numbers for smart contract values.
  • 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.