Skip to content

Releases: Concordium/concordium-node-sdk-js

node-sdk v9.4.0

19 Oct 08:00
Compare
Choose a tag to compare

Added

  • sendUpdateInstruction to the gRPC Client.
  • healthCheck to the gRPC Client.
  • Functions calculateModuleReference for getting the module reference and parseModuleInterface for getting the interface from the source of a smart contract module.
  • Smart contract related types ContractName, EntrypointName and helper functions isInitName, isReceiveName, getContractNameFromInit and getNamesFromReceive.

Fixed

  • Added missing fields to getBlockChainParameters response. (rootKeys, level1Keys, level2Keys)
  • Use of bigint exponentiation causing issues in web.

web-sdk v6.3.0

19 Oct 07:57
c89ac23
Compare
Choose a tag to compare

Added

  • sendRawAccountTransaction to the gRPC Client.

Changed

  • Stopped using replaceDateWithTimeStampAttribute and reviveDateFromTimeStampAttribute for serializing and parsing verifiable presentation.
  • AttributeType no longer contains Date, but now instead has TimestampAttribute. The statement builders have their types extended to keep allowing for both Date and TimestampAttribute.

web-sdk v6.2.1

04 Sep 07:37
Compare
Choose a tag to compare

Added

  • CIS4Contract class for seamlessly interacting with contracts adhering to the CIS4 standard.
  • Validation of type values when verifying statements.
  • Exposed replaceDateWithTimeStampAttribute and reviveDateFromTimeStampAttribute.

Added a functions that handle conversions between CCD and micro CCD. The CCD amounts are handled as Big's:

  • toMicroCcd returns the amount of micro CCD as a Big.
  • toCcd: returns the amount of CCD as a Big.
  • fromCcd: constructs a CcdAmount from an amount of CCD passed as a Big
  • ccdToMicroCcd: Converts CCD to micro CCD, both as Big's
  • microCcdToCcd: Converts micro CCD to CCD, both as Big's
  • The CcdAmount class constructor now also accepts a BigSource letting users create them from Big's and strings

All function parameters now also accepts strings, these strings can use comma as a decimal seperator.

  • Web3StatementBuilder function.
  • getVerifiablePresentation function.
  • Various helper methods for web3Id statements and verifiable presentations.

Fixed

  • Missing buffer import causing issues in web.
  • Aligned credential schema types with the tested types in the browser wallet.
  • addMinimumAge now creates the precise age statement instead of one day off.
  • verifyWeb3IdCredentialSignature now supports dates/timestamp attributes.
  • canProveAtomicStatement now supports timestamp attributes, handles undefined attribute value correctly and handles strings correctly for range statements.
  • The max smart contract parameter length was changed to 65535 bytes in protocol version 5 and onwards.
  • Functions which checks the parameter length will now reflect that.

node-sdk v9.3.0

19 Oct 07:59
c89ac23
Compare
Choose a tag to compare

Added

  • sendRawAccountTransaction to the gRPC Client.

Changed

  • Stopped using replaceDateWithTimeStampAttribute and reviveDateFromTimeStampAttribute for serializing and parsing verifiable presentation.
  • AttributeType no longer contains Date, but now instead has TimestampAttribute. The statement builders have their types extended to keep allowing for both Date and TimestampAttribute.

node-sdk v9.2.0

04 Sep 07:39
Compare
Choose a tag to compare

Added

  • CIS4Contract class for seamlessly interacting with contracts adhering to the CIS4 standard.
  • Validation of type values when verifying statements.
  • Exposed replaceDateWithTimeStampAttribute and reviveDateFromTimeStampAttribute.

Added a functions that handle conversions between CCD and micro CCD. The CCD amounts are handled as Big's:

  • toMicroCcd returns the amount of micro CCD as a Big.
  • toCcd: returns the amount of CCD as a Big.
  • fromCcd: constructs a CcdAmount from an amount of CCD passed as a Big
  • ccdToMicroCcd: Converts CCD to micro CCD, both as Big's
  • microCcdToCcd: Converts micro CCD to CCD, both as Big's
  • The CcdAmount class constructor now also accepts a BigSource letting users create them from Big's and strings

All function parameters now also accepts strings, these strings can use comma as a decimal seperator.

  • Web3StatementBuilder function.
  • getVerifiablePresentation function.
  • Various helper methods for web3Id statements and verifiable presentations.

Fixed

  • Missing buffer import causing issues in web.
  • Aligned credential schema types with the tested types in the browser wallet.
  • addMinimumAge now creates the precise age statement instead of one day off.
  • verifyWeb3IdCredentialSignature now supports dates/timestamp attributes.
  • canProveAtomicStatement now supports timestamp attributes, handles undefined attribute value correctly and handles strings correctly for range statements.
  • The max smart contract parameter length was changed to 65535 bytes in protocol version 5 and onwards.
  • Functions which checks the parameter length will now reflect that.

web-sdk v6.0.0

06 Jul 15:01
68ea0b6
Compare
Choose a tag to compare

Breaking changes

  • Renamed AccountTransactionType.TransferWithScheduleWithMemo to AccountTransactionType.TransferWithScheduleAndMemo.

Added

  • getTransactionKindString function.
  • displayTypeSchemaTemplate function.

node-sdk v9.0.0

06 Jul 14:59
68ea0b6
Compare
Choose a tag to compare

Breaking changes

  • Renamed AccountTransactionType.TransferWithScheduleWithMemo to AccountTransactionType.TransferWithScheduleAndMemo.

Added

  • getTransactionKindString function.
  • displayTypeSchemaTemplate function.

web-sdk v5.0.0

27 Jun 13:49
aa05be9
Compare
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

node-sdk v8.0.0

27 Jun 13:50
aa05be9
Compare
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
Compare
Choose a tag to compare

Fixed

  • Cost calculation for deployModule transaction.