Skip to content

Commit

Permalink
release: SDK beta version v2.43.0-beta.1 (#2201)
Browse files Browse the repository at this point in the history
* chore: formatting

Signed-off-by: svetoslav-nikol0v <[email protected]>

* update: new proto beta version

Signed-off-by: svetoslav-nikol0v <[email protected]>

* feature: add missing request type

Signed-off-by: svetoslav-nikol0v <[email protected]>

* feature: add new statuses

Signed-off-by: svetoslav-nikol0v <[email protected]>

* fix: NftId protobuf changes

Signed-off-by: svetoslav-nikol0v <[email protected]>

* update: new sdk version

Signed-off-by: svetoslav-nikol0v <[email protected]>

* update: changelog

Signed-off-by: svetoslav-nikol0v <[email protected]>

* update: add section to README file how to start the tests

Signed-off-by: svetoslav-nikol0v <[email protected]>

* update: update the REALEASE file

Signed-off-by: svetoslav-nikol0v <[email protected]>

* chore: update changelog file

Signed-off-by: svetoslav-nikol0v <[email protected]>

---------

Signed-off-by: svetoslav-nikol0v <[email protected]>
  • Loading branch information
svetoslav-nikol0v authored Mar 14, 2024
1 parent 6b985e6 commit 7682060
Show file tree
Hide file tree
Showing 10 changed files with 103 additions and 26 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,17 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## v2.43.0-beta.1

## What's Changed

* fix: do not instantiate logger inside a method by @leninmehedy in https://github.com/hashgraph/hedera-sdk-js/pull/2195
* release: proto beta version 2.14.0-beta.5 by @svetoslav-nikol0v in https://github.com/hashgraph/hedera-sdk-js/pull/2196
* fix: hbar presentation after serialization/deserialization by @svetoslav-nikol0v in https://github.com/hashgraph/hedera-sdk-js/pull/2189
* fix: inability to create and execute freeze transaction by @svetoslav-nikol0v in https://github.com/hashgraph/hedera-sdk-js/pull/2171
* update: update steps for release process in REALEASE.md file by @svetoslav-nikol0v in https://github.com/hashgraph/hedera-sdk-js/pull/2201
* update: add section in README.md file on how to start the tests by @svetoslav-nikol0v in https://github.com/hashgraph/hedera-sdk-js/pull/2201

## v2.42.0

## What's Changed
Expand Down
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,21 @@ The Hedera JavaScript SDK does not currently support the following:

* React Native Bare



## Usage

See [examples](./examples).

Every example can be executed using the following command from the root directory: `node examples/[name-of-example].js`

## Start tests

* To start the integration tests follow the next steps:
- Run the [local node](https://github.com/hashgraph/hedera-local-node)
- Run `task test:intergration:node`
- Stop the [local node](https://github.com/hashgraph/hedera-local-node)
* To start unit tests follow the next steps:
- Run `task test:unit` (Note: the local node should not be running)

## Contributing to this Project

We welcome participation from all developers!
Expand Down
29 changes: 16 additions & 13 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
## Release process of JS SDK

- **Run** the [local node](https://github.com/hashgraph/hedera-local-node)
- Run `task test:integration:node`
- **Stop** the local node
- Run `task test:unit:node`
- Run `task test:publish` (if the local node is not stopped, those tests will fail)
- Run `pnpm publish` (Be careful, you need to update `package.json` version as well as `subpackage` versions if needed!)
- Create a PR to merge release/vX.Y.Z to DEVELOP and then to MAIN
- Go to the [SDK PAGE](https://github.com/hashgraph/hedera-sdk-js/releases) and press the “Draft a new release” button
- Create a new tag from the branch that you are releasing (release/vX.Y.Z) with the same version of the branch
- Generate the release notes automatically.
- Copy the latest changes from the release notes to the CHANGELOG.md
- Push with the message: the release version
- Publish Release
- **Create** a new release branch following the naming convention for:
- stable release - `release/v*.*.*`
- beta release - `release/v*.*.*-beta.*`
- **Run** the [local node](https://github.com/hashgraph/hedera-local-node)
- **Run** `task test:integration:node`
- **Stop** the [local node](https://github.com/hashgraph/hedera-local-node)
- **Run** `task test:release` (Note: the local node should not be running)
- **Update** the SDK version in `package.json` file
- **Update** the CHANGELOG file
- **Create** a new tag from the branch that you are releasing (release/vX.Y.Z) with the same version of the branch as running following command for:
- stable release - `git tag -a "v*.*.*" -m "[message]"`
- bet release - `git tag -a "v*.*.*-beta.*" -m "[message]"`
- **Run** the following command for:
- stable release - `git push origin v*.*.*`
- beta release - `git push origin v*.*.*-beta.*`
- **Monitor** the [status](https://github.com/hashgraph/hedera-sdk-js/actions/workflows/publish_release.yaml) of this CI pipeline
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hashgraph/sdk",
"version": "2.42.0",
"version": "2.43.0-beta.1",
"description": "Hedera™ Hashgraph SDK",
"types": "./lib/index.d.ts",
"main": "./lib/index.cjs",
Expand Down Expand Up @@ -58,7 +58,7 @@
"@ethersproject/rlp": "^5.7.0",
"@grpc/grpc-js": "1.8.2",
"@hashgraph/cryptography": "1.4.8-beta.5",
"@hashgraph/proto": "2.14.0-beta.4",
"@hashgraph/proto": "2.14.0-beta.5",
"axios": "^1.6.4",
"bignumber.js": "^9.1.1",
"bn.js": "^5.1.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/proto/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,4 @@
"typescript": "^5.1.6",
"protobufjs-cli": "^1.0.2"
}
}
}
8 changes: 4 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions src/RequestType.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,10 @@ export default class RequestType {
return "NodeStakeUpdate";
case RequestType.Prng:
return "UtilPrng";
case RequestType.TransactionGetFastRecord:
return "TransactionGetFastRecord";
case RequestType.TokenUpdateNfts:
return "TokenUpdateNfts";
default:
return `UNKNOWN (${this._code})`;
}
Expand Down Expand Up @@ -345,6 +349,10 @@ export default class RequestType {
return RequestType.NodeStakeUpdate;
case 86:
return RequestType.Prng;
case 87:
return RequestType.TransactionGetFastRecord;
case 88:
return RequestType.TokenUpdateNfts;
}

throw new Error(
Expand Down Expand Up @@ -722,3 +730,13 @@ RequestType.NodeStakeUpdate = new RequestType(85);
* Generates a pseudorandom number.
*/
RequestType.Prng = new RequestType(86);

/**
* Get a record for a transaction (lasts 180 seconds)
*/
RequestType.TransactionGetFastRecord = new RequestType(87);

/**
* Update the metadata of one or more NFT's of a specific token type.
*/
RequestType.TokenUpdateNfts = new RequestType(88);
36 changes: 36 additions & 0 deletions src/Status.js
Original file line number Diff line number Diff line change
Expand Up @@ -623,6 +623,14 @@ export default class Status {
return "ACCOUNT_IS_IMMUTABLE";
case Status.AliasAlreadyAssigned:
return "ALIAS_ALREADY_ASSIGNED";
case Status.InvalidMetadataKey:
return "INVALID_METADATA_KEY";
case Status.TokenHasNoMetadataKey:
return "TOKEN_HAS_NO_METADATA_KEY";
case Status.MissingTokenMetadata:
return "MISSING_TOKEN_METADATA";
case Status.MissingSerialNumbers:
return "MISSING_SERIAL_NUMBERS";
default:
return `UNKNOWN (${this._code})`;
}
Expand Down Expand Up @@ -1217,6 +1225,14 @@ export default class Status {
return Status.AccountIsImmutable;
case 332:
return Status.AliasAlreadyAssigned;
case 333:
return Status.InvalidMetadataKey;
case 334:
return Status.TokenHasNoMetadataKey;
case 335:
return Status.MissingTokenMetadata;
case 336:
return Status.MissingSerialNumbers;
default:
throw new Error(
`(BUG) Status.fromCode() does not handle code: ${code}`,
Expand Down Expand Up @@ -2728,3 +2744,23 @@ Status.AccountIsImmutable = new Status(331);
* An alias that is assigned to an account or contract cannot be assigned to another account or contract.
*/
Status.AliasAlreadyAssigned = new Status(332);

/**
* A provided metadata key was invalid. Verification includes, for example, checking the size of Ed25519 and ECDSA(secp256k1) public keys.
*/
Status.InvalidMetadataKey = new Status(333);

/**
* Metadata key is not set on token
*/
Status.TokenHasNoMetadataKey = new Status(334);

/**
* Token Metadata is not provided
*/
Status.MissingTokenMetadata = new Status(335);

/**
* NFT serial numbers are missing in the TokenUpdateNftsTransactionBody
*/
Status.MissingSerialNumbers = new Status(336);
4 changes: 2 additions & 2 deletions src/token/NftId.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export default class NftId {
static _fromProtobuf(id) {
return new NftId(
TokenId._fromProtobuf(
/** @type {HashgraphProto.proto.ITokenID} */ (id.tokenID),
/** @type {HashgraphProto.proto.ITokenID} */ (id.token_ID),
),
id.serialNumber != null ? id.serialNumber : Long.ZERO,
);
Expand All @@ -90,7 +90,7 @@ export default class NftId {
*/
_toProtobuf() {
return {
tokenID: this.tokenId._toProtobuf(),
token_ID: this.tokenId._toProtobuf(),
serialNumber: Long.fromValue(
this.serial !== undefined ? this.serial : 0,
),
Expand Down
4 changes: 2 additions & 2 deletions test/unit/Transaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,15 +205,15 @@ describe("Transaction", function () {

describe("balance must be the same before and after serialization/deserialization", function () {
// Declare float number
const FLOAT_NUMBER = 8.02341424
const FLOAT_NUMBER = 8.02341424;

// Declare integer number from float number
const INTEGER_NUMBER = Math.floor(FLOAT_NUMBER);

// Declare diffrent number types
const NUMBERS = {
INTEGER: INTEGER_NUMBER,
FLOAT: FLOAT_NUMBER
FLOAT: FLOAT_NUMBER,
};
const NUMBER_TYPES = Object.keys(NUMBERS);

Expand Down

0 comments on commit 7682060

Please sign in to comment.