Skip to content

Latest commit

 

History

History
657 lines (364 loc) · 16 KB

CHANGELOG.md

File metadata and controls

657 lines (364 loc) · 16 KB

Changelog

All notable changes to casper-js-sdk.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

[2.15.6] - 2024-04-18

Fixed

  • Backfilled missing variants of TransformValue type (AddInt32|AddUInt64|AddUInt128|AddUInt256|WriteEraInfo|WriteBid|WriteWithdraw|Failure|WriteUnbonding)
  • Backfilled operations field in Effect type
  • Exported all types in services/types module so that they can be used by end users

[2.15.5] - 2024-04-18

Fixed

  • invalid seed usage in the HDKey (#410)

[2.15.4] - 2024-02-12

Fixed

2.15.3 - 2023-10-16

Fixed

  • Replace legacy sendAsync with request (#373)

[2.15.2] - 2023-8-4

Fixed

  • Reintroduced getStateRootHash fix as its not specific for casper-node 1.5 (#339)

[2.15.1] - 2023-8-4

Fixed

  • Reverted broken 1.4.x compatibility. The version compatible with protocol version 1.5.x will be released as a separate one. (#351)

[2.15.0] - 2023-8-3

Added

  • checkApproval optional parameter (false by default) to the deploy method of CasperServiceByJsonRPC class. (#348)

Fixed

  • Fixed JSON RPC request issues with 1.5 node. (#339,#344)

Changed

  • waitForDeploy method of CasperServiceByJsonRPC class now supports deploy hash in string

2.14.0 - 2023-7-11

Fixed

  • StoredValue TypedJSON serialization issue. (#312)

Added

  • Added BaseSigner class for further wallet & signer integrations, support CasperWallet. (#300)

  • Support node URL without /rpc like casper-client does. (#298)

  • Added to field to the TransferJson. (#312)

2.13.3

Fixed

  • Fixed to support 64 bytes Ed25519 private key generated using v2.10

2.13.2

Fixed

  • Fix for wrong signatures being generated for SECP256K1 keys - it was missing der: false setting in a function call

2.13.1

Added

  • New method makeDeployWithAutoTimestamp that fetches timestamp and then uses it to create deploy header. Recommended to use it in browsers env.

2.13.0

Added

  • Added getEraSummary
  • Added getEraSummaryByBlockHeight
  • Added Ed25519 HD Wallet support
  • Added timeout param to all CasperServiceByJsonRPC methods
  • Deterministic Asymmetric keys can be generated by using HD Wallet following BIP-0032

Changed

  • Switched from tweetnacl-ts and eccrypto to noble libraries

2.12.1

Fixed

  • Fix in CI job that broke README.md attached to NPM Package and tgz archive to the release
  • Fix links to the examples in docs

2.12.0

Added

  • HTTPS Event stream without breaking browsers support
  • New docs generator
  • Add missing types for ExecutionResult
  • Added missing CLType Any
  • Added tests in browser env
  • Added source maps to build version

Changed

  • Move generated docs to github pages

2.11.1

Removed

  • Support for HTTPS/HTTP2 EventStream - as it caused problems in browser environment

2.11.0

Added

  • Support for checksumed mixed-case publickeys
  • Support for HTTPS EventStream
  • Extended test cases for CasperServiceByJsonRPC

Changed

  • CLPublicKey.toHex() now by default returns checksummed value. You can use it in legacy mode by calling it CLPublicKey.toHex(false) that way
  • CLPublicKey.fromHex() now can get two arguments. The first one is string containing hex encoded public key, and the second one is a boolean value that indicates if you want to run checksum validation. When true is passed it will throw an error. Otherwise it will log warn to the console. We added this because we want to support users who store the non-checksumed publickeys and need time to adapt
  • AccountHash now can be serialized to bytes (it's an alias)
  • Some internal optimalization (in matchByteParserByCLType)

Fixed

  • Issues with parsing broken deploys

2.10.2

Fixed

  • Updated ts-results dependency of our own fork to fix some compiling issues

2.10.1

Fixed

  • Updated exports so more conversion fuctions are now public
  • Added typings to JsonExecutableDeployItem
  • Fixed how the EventStream URL is build
  • Replaced ts-results dependency for our own fork because of the conflicting config

2.10.0

Added

  • Added signatures verification in validateDeploy method.
  • Added queryBalance (will be supported in casper-node 1.5 - RPC name query_balance) method in CasperServiceByJsonRPC.
  • Added speculativeDeploy (will be supported in casper-node 1.5 - RPC name speculative_exec) method in CasperServiceByJsonRPC.
  • Better documented RPC methods .
  • Added csprToMotes - motes/cspr converter in Conversions.
  • Extended PublicKey class API with two new methods, allowing to get publicKey tag type or its corresponding signature algo type.

Fixed

  • getStateRootHash (RPC name chain_get_state_root_hash) can now correctly support block_hash argument.

2.9.1

Fixed

  • Got rid of unnecessary instanceof.
  • Reverted StoredValue and added { rawData: boolean } to getDictionaryItemByName and getDictionaryItemByURef.

2.9.0

Added

  • Now all stored value contains raw JSON from RPC under raw key.
  • New method getValidatorsInfoByBlockHeight added.

Changed

  • targetPublicKeyHex is now optional in Signer class.

2.8.0

Added

  • Added support to CLPublicKey passed as argument to CLKey (it gets serialized to account-hash when serializing).
  • New Contracts class that basically acts as contract client (possible to install WASM, call an entrypoint, query state or dictionary).
  • Added getDictionaryItemByName that uses state_get_dictionary_item with dictionary_name and dictionary_item_key
  • Added sign and send method on Deploy class.

2.7.9

Fixed

  • Fixed problems with CLResult when it got created using different version of ts-results.

2.7.8

Fixed

  • Fixed problems with deserialization Tuples containing CLType which includes length parameter (eg. CLByteArray).

2.7.7

Changed

  • Version 2.0 is now @latest.
  • README updated.

2.7.6

Fixed

  • Fixes wrong logic in newTransferWithOptionalTransferId() method.

2.7.5

Fixed

  • Fixes problems with Lists containing multiple Keys containing Hash or ByteArray.
  • Fixes problem with ByteArray with size different than 32 bytes.

2.7.4

Fixed

  • Fixes problems with getBlockInfo and mixed case block hashes.

2.7.3

Added

  • Added types missing in OpenRPC library

2.7.2

Fixed

  • Fix for bundling all of the existing types defined in the library.

2.7.1

Fixed

  • Added support for mixed case hex representation of public keys introduced in casper-node 1.4.2.

2.7.0

Changed

  • Now target in transfer is represented by PublicKey instead of account-hash.

2.6.2

Added

  • Now minimal bundle without any polyfills included is a part of distribution package.

2.6.1

Fixed

  • Added workaround for historical deploys with invalid serialized 0.

2.6.0

Added

  • Added CasperProvider

2.5.2

Fixed

  • Problem when serializing U128, U256 ad U512 toBytes.

2.5.1

Fixed

  • Added stronger validation to PublicKey.fromHex method
  • Fix for deploy's execution_result type signatures
  • Fix instanceof problem in CLValueParser which caused problems when two different versions of SDK was used in one project
  • Signer methods fixes

2.5.0

Added

  • signMessage - added method to sign arbitrary string message
  • verifyMessageSignature - added method to verify signature of arbitrary string message

2.4.1

Fixed

  • EventStream - fixed problems with multiple data chunks parsing

2.4.0

Added

  • DeployWatcher added

2.3.0

Added

  • state_get_dictionary_item with URef support in getDictionaryItemByURef implemented

2.2.3

Fixed

  • StoredValue parsing access param hotfixed

2.2.2

Fixed

  • CLMap fix for empty maps from bytes
  • CLMap replaced problematic Map implementation

2.2.1

Fixed

  • EventStream now properly handle invalid JSONs

2.2.0

Added

  • EventStream added

2.1.0

Fixed

  • state-get-item due to RPC changes
  • CLList as empty list initialization from JSON

Added

  • getBlockTransfers, getEraInfoBySwitchBlock, getEraInfoBySwitchBlockHeight methods to CasperServiceByJsonRPC

2.0.1

Changed

  • DeployUtil.deployFromJson returns now Result<Deploy, Error> instead of Deploy | undefined. Error has a message inside.

2.0.0

Changed

  • Caution! This release contains rewritten CLValue from scratch, there are some breaking changes so consider it before upgrading.
  • Removed CLTypedAndToBytesHelper to have consistent way of creating new CLValues by using new CLBool(true) or CLValueBuilder.bool(true)
  • Removed CLTypeHelper have consistent way of creating new CLValues by using new CLBoolType() or CLTypeBuilder.bool()
  • CLValue static methods now are moved to CLValueBuilder eg. CLValueBuilder.u512
  • Every class inheriting from CLValue is now named with CL prefix, bigger naming changes:
    • StringValue -> CLString
    • KeyValue -> CLKey
    • MapValue -> CLMap
    • Option -> CLOption
  • There are API changes in CLResult
const myTypesComplex = {
  ok: new CLListType(new CLListType(new CLU8Type())),
  err: new CLOptionType(new CLListType(new CLListType(new CLU8Type())))
};

const myOkComplexRes = new CLResult( Ok(new CLList([new CLList([new CLU8(5), new CLU8(10), new CLU8(15)])])), myTypesComplex );
  • There are API changes in CLOption - now it requires Some or None wrappers as argument (from ts-result library).
  • Now all the serialization methods are not connected to CLValue anymore - toJSON, fromJSON, toBytes, fromBytes needs to be called with CLValueParsers eg. CLValueParser.toJSON(CLValueBuilder.string("ABC"))
  • Renamed methods in CLPublicKey:
    • toAccountHex -> toHex - old name led to misunderstandings as in fact this is hex representation of public-key prefixed with key-type.
    • added method toAccountHashStr - this methods returns string containing account hash in hex form prefixed with account-hash-.

1.4.4

Changed

  • Experimental release with @next tag.

1.4.3

Changed

  • Changed repo name and npm package name from casper-client-sdk to casper-js-sdk.

1.4.2

Added

  • newTransferWithoutObligatoryId renamed to newTransferWithOptionalTransferId

1.4.1

Added

  • newTransferWithoutObligatoryId restores the function that gives abilitity to send transfer without providing id.

1.4.0

Changed

  • Signer.sign now requires deploy in JSON format, public-key hex of a sender and public-key hex of a target.

1.3.4

Added

  • Signer.getVersion returns running version of Signer.

1.3.3

Fixed

  • Keys.SECP256K1.new() and other SECP256K1 releated methods now can work in a browser environment.

1.3.2

Added

  • DeployUtil.deployToBytes(deploy) returns an Uint8Array, which is a byte representation of a deploy.

1.3.1

Changed

  • Added newTransferToUniqAddress and UniqAddress.
  • Fix in newTransfer - id now can be 0

1.3.0

Changed

  • Removed EventStore from codebase.
  • CasperClient.getDeployByHashFromRPC is now CasperClient.getDeploy.
  • Fixed problems with deployFromJson caused by missing support for deserialization TTL values other than ms.

1.2.0

Changed

1.1.0

Changed

  • transfer-id is required parameter in DeployUtils.newTransfer.

1.0.44

Added

  • Support disconnectFromSite method from the Signer.

1.0.43

Fixed

  • Missign interface for getActivePublicKey method from the Signer.

1.0.42

Added

  • Support getActivePublicKey method from the Signer.

1.0.41

Added

  • DeployUtils.deployFromJson verifies Deploy's hash and bodyHash. If not matching return undefined, so the interface doesn't change.

1.0.40

Changed

  • New url for docs.

1.0.39

Fixed

  • Reverted usage of TextEncoder to support Node.js versions < 11.

1.0.38

Fixed

  • Problem with U32 deserialization (and all values that uses Buffer polyfill).

1.0.37

Changed

  • Changed the default Deploy's ttl from 1h to 30min.

1.0.36

Fixed

  • Fixed Delegator interface shape

1.0.35

Changed

  • Validate the size of the Deploy. Now CasperServiceByJsonRPC.deploy throws an error if the size of the deploy is larger then 1 megabyte.`

1.0.34

Fixed

  • Problems with Buffer polyfill not working in browser

1.0.32

Added

  • CasperServiceByJsonRPC.getBlockInfoByHeight(height)

Fixed

  • CasperServiceByJsonRPC.getBlockInfo(hash) to return requested block, not the last one.

1.0.25

Added

  • Added UMD bundle into npm package.

1.0.24

Added

  • Adds protocol_version to the JsonHeader.

Fixed

  • Fixes ValidatorInfoResult for casper-node ^0.9.0 (creates AuctionState interface).

1.0.23

Changed

  • Removes use of Buffer in parseKeyPair() and instead creates new Uint8Array concatenating public and private keys for use as secret key in Ed25519 key pair.

1.0.22

Fixed

  • Parsing ExecutableDeployItem's StoredContractByHash from JSON to the ExecutableDeployItem object.

1.0.21

Added

  • CasperClient.getDeployByHashFromRPC allows for getting Deploy instance from the Node's RPC.

Fixed

  • Secp keys generator returns Uint8Array instead of Buffer.

Changed

  • CLValue.publicKey accepts PublicKey object.

1.0.20

Fixed

  • Deserialize Deploy.hash to Uint8Array instead of Buffer.

1.0.19

Added

  • CLValue.isList and CLValue.asList.

Fixed

  • BytesArrayValue's fromBytes.

1.0.18

Added

  • Partial support for the Contract object under StoredValue.

Fixed

  • Deploy's body hash derivation.

1.0.17

Added

  • Added DeployUtils.addArgToDeploy(deploy: Deploy, name: string, value: CLValue) to be able to modify Deploy's session arguments. It creates a new deploy instance. Can not be used on signed deploys.

Changed

  • Default gasPrice changed from 10 to 1.
  • Casper balances checks return BigNumber now.

1.0.15

Added

  • Started using CHANGELOG.md.

Changed

  • Changed CLValue's value to value() and remainder to remainder().