Skip to content
This repository has been archived by the owner on Jul 23, 2024. It is now read-only.

Releases: klaytn/caver-js

Release v1.3.0-rc.3

11 Dec 01:00
407cd38
Compare
Choose a tag to compare
Release v1.3.0-rc.3 Pre-release
Pre-release

v1.3.0-rc.3 Release Notes

New features

  • Introduced new util function in caver-js
        * caver.utils.decompressPublicKey

Release v1.3.0-rc.2

09 Dec 02:31
e7708c9
Compare
Choose a tag to compare
Release v1.3.0-rc.2 Pre-release
Pre-release

v1.3.0-rc.2 Release Notes

Fixed

  • Fixed test code bug to reset variable before calling test function

Release v1.3.0-rc.1

09 Dec 01:59
9a4189f
Compare
Choose a tag to compare
Release v1.3.0-rc.1 Pre-release
Pre-release

v1.3.0-rc.1 Release Notes

Fixed

  • Fixed to return null when fail to find transaction receipt

Improvements

  • Changed underscore library to lodash
  • Changed to use ‘pending’ block tag when set nonce automatically in Accounts package

Release v1.2.1

07 Nov 07:31
513293c
Compare
Choose a tag to compare

v1.2.1 Release Notes

Fixed

  • Added 'semver' dependency
  • Fixed duplicate rejection bug with caver.klay.sendTransaction

Improvements

  • Added lower bound check of private key in caver.utils.isValidPrivateKey

Release v1.2.1-rc.1

06 Nov 06:39
67885de
Compare
Choose a tag to compare
Release v1.2.1-rc.1 Pre-release
Pre-release

v1.2.1-rc.1 Release Notes

Fixed

  • Added 'semver' dependency
  • Fixed duplicate rejection with caver.klay.sendTransaction

Improvements

  • Added lower bound check of private key in caver.utils.isValidPrivateKey

Release v1.2.0

21 Oct 08:22
cc42ffe
Compare
Choose a tag to compare

v1.2.0 Release Note

Highlights: Klaytn account key types are supported since [email protected].

Klaytn supports various key types such as multisig and role-baed keys for an account. Those key types are now supported in caver-js as well. For more information about key types, refer to https://docs.klaytn.com/klaytn/design/accounts#account-key.

Breaking Change

  • privateKey of an Account object cannot be modified since v1.2.0.
    If you update account.privateKey directly using account.privateKey = ‘prvKey’, please use account.accountKey = caver.klay.accounts.createAccountKey(‘prvKey’) instead.

New features

  • Introduced new classes for various account key types:
    • Account
    • AccountForUpdate
    • AccountKeyPublic
    • AccountKeyMultiSig
    • AccountKeyRoleBased
  • Introduced a new field ‘key’ in the transaction object.
    In order to update an account, the key to be used for updating must be set correctly in the field defined for each key type. By introducing a key field into the transaction object for account update, you can set an instance of AccountForUpdate in the key field that contains the information to be updated.
  • Introduced new functions in the Accounts package:
    • caver.klay.accounts.createWithAccountKey
    • caver.klay.accounts.createWithAccountKeyPublic
    • caver.klay.accounts.createWithAccountKeyMultiSig
    • caver.klay.accounts.createWithAccountKeyRoleBased
    • caver.klay.accounts.createAccountForUpdate
    • caver.klay.accounts.createAccountForUpdateWithPublicKey
    • caver.klay.accounts.createAccountForUpdateWithLegacyKey
    • caver.klay.accounts.createAccountForUpdateWithFailKey
    • caver.klay.accounts.createAccountKey
    • caver.klay.accounts.createAccountKeyPublic
    • caver.klay.accounts.createAccountKeyMultiSig
    • caver.klay.accounts.createAccountKeyRoleBased
    • caver.klay.accounts.accountKeyToPublicKey
    • caver.klay.accounts.updateAccountKey
    • caver.klay.accounts.isDecoupled
    • caver.klay.accounts.getLegacyAccount
    • caver.klay.accounts.feePayerSignTransaction
    • caver.klay.accounts.getRawTransactionWithSignatures
    • caver.klay.accounts.combineSignatures
  • The following APIs are extended to support newly introduced classes:
    • add, updatePrivateKey and remove functions in caver.klay.accounts.wallet are extended to handle the new classes.
    • caver.klay.accounts.encrypt and caver.klay.accounts.decrypt functions are extended with new format of keystore v4, to handle the new classes (AccountKeyPublic, AccountKeyMultiSig, AccountKeyRoleBased).
  • Introduced new util functions:
    • caver.utils.isTxHash
    • caver.utils.isTxHashStrict
    • caver.utils.isValidPublicKey
    • caver.utils.isValidRole
    • caver.utils.isEmptySig

Fixed

  • Fixed setProvider to handle parameters.
  • Fixed currentProvider to set properly with setProvider function.
  • Fixed callback function in caver.klay.accounts.signTransaction to call once.

Improvements

  • Modified decodeTransaction logic to handle multiple signatures.
  • Made privateKey as a optional parameter in caver.klay.accounts.signTransaction.
  • Allowed a custom client configuration with WS connection.
  • Updated signTransaction in caver.klay.accounts to accept an RLP encoded transaction as a parameter.
  • Updated signTransaction in caver.klay.accounts to append signatures or feePayerSignatures to the existing signatures or feePayerSignatures.
  • caver.klay.sendSignedTransaction now accepts an object as a parameter. The object should include at least one of RLP encoded transaction string or signatures/feePayerSignatures. You can pass the returning object from signTransaction, feePayerSignTransaction, getRawTransactionWithSignatures or combineSignatures.

Release v1.2.0-rc.5

21 Oct 05:23
7b21d3f
Compare
Choose a tag to compare
Release v1.2.0-rc.5 Pre-release
Pre-release

v1.2.0-rc.5 Release Notes

Fixes

  • Renamed ‘keyRing’ in keystore file to ‘keyring’

Release v1.2.0-rc.4

21 Oct 01:23
3971ce9
Compare
Choose a tag to compare
Release v1.2.0-rc.4 Pre-release
Pre-release

v1.2.0-rc.4 Release Note

Breaking Change

In the new Account class, privateKey is changed as a read-only property. Account class is a data structure used inside the caver.klay.accounts package and is independent of the Klaytn network. privateKey is now a read-only property that references the defaultKey of the accountKey in the Account, so if you directly update the property, it will return an error. To change the privateKey you need to update the accountKey in your Account. Since privateKey only represents the default key, it is recommended to use transactionKey, updateKey, and feePayerKey rather than privateKey when you sign or send a transaction.

New features

  • Introduced new classes in caver-js
    • Account
    • AccountForUpdate
    • AccountKeyPublic
    • AccountKeyMultiSig
    • AccountKeyRoleBased
  • Introduced new Accounts package functions for newly introduced classes
    • caver.klay.accounts.createWithAccountKey
    • caver.klay.accounts.createWithAccountKeyPublic
    • caver.klay.accounts.createWithAccountKeyMultiSig
    • caver.klay.accounts.createWithAccountKeyRoleBased
    • caver.klay.accounts.createAccountForUpdate
    • caver.klay.accounts.createAccountForUpdateWithPublicKey
    • caver.klay.accounts.createAccountForUpdateWithLegacyKey
    • caver.klay.accounts.createAccountForUpdateWithFailKey
    • caver.klay.accounts.createAccountKey
    • caver.klay.accounts.createAccountKeyPublic
    • caver.klay.accounts.createAccountKeyMultiSig
    • caver.klay.accounts.createAccountKeyRoleBased
    • caver.klay.accounts.accountKeyToPublicKey
    • caver.klay.accounts.updateAccountKey
  • The following APIs are extended to support newly introduced classes
    • add, updatePrivateKey and remove functions in caver.klay.accounts.wallet are extended to handle the new classes.
    • caver.klay.accounts.encrypt and caver.klay.accounts.decrypt functions are extended with new format of keystore v4, to handle the new classes (AccountKeyPublic, AccountKeyMultiSig, AccountKeyRoleBased).
  • Introduced new functions in Accounts package
    • caver.klay.accounts.feePayerSignTransaction
    • caver.klay.accounts.getRawTransactionWithSignatures
    • caver.klay.accounts.combineSignatures
  • Introduced a new field ‘key’ in the transaction object used for account update. In order to update an account, the key to be used for updating must be set correctly in the field defined for each key type. By introducing a key field into the transaction object for account update, you can set an instance of AccountForUpdate in the key field that contains the information to be updated.
  • Introduced new util functions
    • caver.utils.isValidPublicKey
    • caver.utils.isValidRole
    • caver.utils.isEmptySig

Improvements

  • Allowed a custom client configuration with WS connection
  • Updated signTransaction in caver.klay.accounts to accept an RLP encoded transaction as a parameter
  • Updated signTransaction in caver.klay.accounts to append signatures or feePayerSignatures to the existing signatures or feePayerSignatures
  • caver.klay.sendSignedTransaction now accepts an object as a parameter. The object should include at least one of RLP encoded transaction string or signatures/feePayerSignatures. You can pass the returning object from signTransaction, feePayerSignTransaction, getRawTransactionWithSignatures or combineSignatures.

Release v1.2.0-rc.3

23 Sep 07:31
bf0f04e
Compare
Choose a tag to compare
Release v1.2.0-rc.3 Pre-release
Pre-release

v1.2.0-rc.3 Release Notes

Improvements

  • Replaced deprecated new Buffer to Buffer.from
  • Renamed of return field of decodeTransaction(signature -> signatures / feePayerSignature -> feePayerSignatures)
  • Made privateKey as a optional parameter in signTransaction
  • Added signatures or feePayerSignatures field to result object of signTransaction

Release v1.2.0-rc.2

19 Sep 08:12
98065ad
Compare
Choose a tag to compare
Release v1.2.0-rc.2 Pre-release
Pre-release

v1.2.0-rc.2 Release Notes

Fixes

  • Refined error handling logic in caver.klay.accounts.signTrasnaction

Improvements

  • Changed function name from determineAddress to _determineAddress