Skip to content

Commit

Permalink
Update changelog, setSignature method
Browse files Browse the repository at this point in the history
  • Loading branch information
alexmyshchyshyn committed Nov 12, 2024
1 parent 2e2d666 commit 392c072
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 13 deletions.
24 changes: 14 additions & 10 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,23 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
### Removed
-->

## 5.0.0
## [5.0.0-rc1] - 2024-11-12

### Added

- **Caution!** This release contains rewritten classes/CLValue/CLType from scratch, there are some breaking changes so consider it before upgrading.

### 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`
- We’ve entirely rewritten the casper-js-sdk from the ground up to provide a more efficient, flexible, and developer-friendly experience. This major release includes significant changes to the SDK’s architecture, type system, and API methods, introducing new types and RPC capabilities to support the latest Casper blockchain features.
- Updated Type System:

- Refined and expanded CLType and CLValue implementations for stronger type-checking and better type safety.
- Introduced new types to support complex data structures and improved encoding/decoding of values for compatibility with the latest Casper updates.

- Enhanced RPC Methods:
- New RPC methods provide richer interaction capabilities, supporting advanced transactions, streamlined data retrieval, and improved error handling.
- Added support for more granular transaction controls, allowing for better customizations of gas fees, transaction targets, and entry points.

## [2.15.6] - 2024-04-18

Expand Down
1 change: 1 addition & 0 deletions src/types/Deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ export class Deploy {
/**
* Sets already generated signature
*
* @param deploy the Deploy instance
* @param signature the Ed25519 or Secp256K1 signature
* @param publicKey the public key used to generate the signature
*/
Expand Down
11 changes: 8 additions & 3 deletions src/types/Transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -265,14 +265,19 @@ export class TransactionV1 {
/**
* Sets already generated signature
*
* @param transaction the TransactionV1 instance
* @param signature the Ed25519 or Secp256K1 signature
* @param publicKey the public key used to generate the signature
*/
public async setSignature(
static setSignature(
transaction: TransactionV1,
signature: Uint8Array,
publicKey: PublicKey
): Promise<void> {
this.approvals.push(new Approval(publicKey, new HexBytes(signature)));
): TransactionV1 {
const hex = new HexBytes(signature);
transaction.approvals.push(new Approval(publicKey, hex));

return transaction;
}

static newTransactionV1(
Expand Down

0 comments on commit 392c072

Please sign in to comment.