Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: hiero-ledger/hiero-sdk-js
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.44.0
Choose a base ref
...
head repository: hiero-ledger/hiero-sdk-js
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v2.45.0
Choose a head ref
  • 6 commits
  • 53 files changed
  • 4 contributors

Commits on Apr 24, 2024

  1. fix: solve backward compatibility issues between the SDK and hedera-s…

    …ervices v0.49 (modularized code) (#2240)
    
    * fix: integration tests
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * chore: formatting
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * fix: duplicate transactions
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update: integration tests
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update: integration tests
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update: github workflow
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update: github workflow (alpha.12)
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update: github workflow (alpha.11)
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update: increase the query payment for contract queries
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update: github workflow (alpha.12)
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update: increase the balance
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update: unit test
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update: tests
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * chore: formatting
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * chore: formatting
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update: github workflow
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update: github workflow (alpha.12)
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update: test again....
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * chore: remove log 
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update: github workflow (0.49.0-alpha.3)
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update: github workflow (0.48)
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update: integration tests
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * chore: adjustments
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * chore: network tag
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * chore: network tag
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * chore: test
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update: tests
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * fix: integration tests
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update: network tag(0.49.0-alpha.5)
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update: network tag 0.49.1
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * chore: typo
    
    Co-authored-by: Alexander Gadzhalov <alexander.gadzhalov@limechain.tech>
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    ---------
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    Co-authored-by: Alexander Gadzhalov <alexander.gadzhalov@limechain.tech>
    svetoslav-nikol0v and agadzhalov authored Apr 24, 2024
    Copy the full SHA
    473d67c View commit details
  2. feature: update metadata field of fungible and non-fungible tokens, a…

    …nd dynamic NFTs (#2210)
    
    * feature: mutable metadata fields for dynamic NFTs
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update: TokenCreateTransaction class and related intergration test
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update: TokenUpdateTransaction class and integration test
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update: TokenInfo class and integration test
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * chore: formatting
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * chore: formatting
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update: example
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update: integration tests
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update: update examples
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update: adding all integration tests
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update: add tests for fungible token
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update: integration tests
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update: unit tests
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * chore: proto version
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update: examples for fungible token
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update: integration tests
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * chore: network tag
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * chore: formatting
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update: examples
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update: integration tests
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * chore: network tag
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * chore: network tag
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update: examples
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * chore: test change
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * chore: update network tag 0.49.0-alpha.5
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update: protobufs
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update: proto package version
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update: examples
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * chore: formatting
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update: codeowners
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    ---------
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    svetoslav-nikol0v authored Apr 24, 2024
    Copy the full SHA
    5fffabe View commit details

Commits on Apr 29, 2024

  1. release: v2.45.0-beta.1 (#2270)

    * update: changelog
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update: proto package version
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update: sdk version
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * chore: fix local builds
    
    Signed-off-by: Nathan Klick <nathan@swirldslabs.com>
    
    * chore: remove unnecessary deps install
    
    Signed-off-by: Nathan Klick <nathan@swirldslabs.com>
    
    * chore: ensure deps are properly setup
    
    Signed-off-by: Nathan Klick <nathan@swirldslabs.com>
    
    * chore: suppress outputs of pnpm link
    
    Signed-off-by: Nathan Klick <nathan@swirldslabs.com>
    
    * chore: adjustments
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * chore: remove log
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * chore: remove log
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update: integration tests
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update: integration test
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update: taskfile
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update: test
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * chore: remove .only
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update: build workflow
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * revert
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update: exit when the unit tests complete
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update: add log
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update: build workflow by adding an additional step before building the cryptography package
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * revert to initial state
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * fix
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * add install command
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * remove build proto command
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * revert the build workflow
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update taskfile
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * add build cryptography command
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update: task file
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update taskfile
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * remove cryptograpgy build
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update task file
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update task file
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update workflow
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update files
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * add a log
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * build: attempt to resolve test issues
    
    Signed-off-by: Nathan Klick <nathan@swirldslabs.com>
    
    * ci: update task and pnpm versions
    
    Signed-off-by: Nathan Klick <nathan@swirldslabs.com>
    
    * build: added logging output
    
    Signed-off-by: Nathan Klick <nathan@swirldslabs.com>
    
    * build: run with scissors
    
    Signed-off-by: Nathan Klick <nathan@swirldslabs.com>
    
    * update: address books
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update: Status and RequestType
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * chore: formatting
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * chore: remove log
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * chore: remove log
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * chore: remove unnecessary command
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    ---------
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    Signed-off-by: Nathan Klick <nathan@swirldslabs.com>
    Co-authored-by: Nathan Klick <nathan@swirldslabs.com>
    svetoslav-nikol0v and nathanklick authored Apr 29, 2024
    Copy the full SHA
    5f5c1b4 View commit details
  2. update: release wrkflow (#2273)

    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    svetoslav-nikol0v authored Apr 29, 2024
    Copy the full SHA
    c49352a View commit details

Commits on Apr 30, 2024

  1. fix: typo on PrivateKey.fromBytes warning (#2264)

    Signed-off-by: Ricardo Seromenho <ricardo.seromenho@gmail.com>
    seromenho authored Apr 30, 2024
    Copy the full SHA
    7b38c8a View commit details

Commits on May 15, 2024

  1. release: v2.45.0 (#2288)

    * update: changelog
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update: version
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update: network tag
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update: request type and status classes
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * update: integration test
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    * chore: formatting
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    
    ---------
    
    Signed-off-by: svetoslav-nikol0v <svetoslav.nikolov@limechain.tech>
    svetoslav-nikol0v authored May 15, 2024
    Copy the full SHA
    985f844 View commit details
Showing with 2,377 additions and 406 deletions.
  1. +1 −1 .github/CODEOWNERS
  2. +5 −5 .github/workflows/build.yml
  3. +2 −2 .github/workflows/common_js.yml
  4. +2 −2 .github/workflows/pages.yml
  5. +13 −9 .github/workflows/publish_release.yaml
  6. +3 −3 .github/workflows/react_native.yml
  7. +14 −0 CHANGELOG.md
  8. +20 −24 Taskfile.yml
  9. +0 −1 examples/hts-nftP1-fee-create-mint-burn-associate-transfer.js
  10. +104 −0 examples/update-fungible-token-metadata-with-admin-key.js
  11. +104 −0 examples/update-fungible-token-metadata-with-metadata-key.js
  12. +178 −0 examples/update-nfts-metadata-of-non-fungible-token.js
  13. +4 −4 package.json
  14. +2 −1 packages/cryptography/Taskfile.yml
  15. +1 −1 packages/cryptography/src/PrivateKey.js
  16. +1 −1 packages/proto/Taskfile.yml
  17. +1 −1 packages/proto/package.json
  18. +36 −0 src/RequestType.js
  19. +91 −0 src/Status.js
  20. +1 −1 src/client/addressbooks/mainnet.js
  21. +1 −1 src/client/addressbooks/previewnet.js
  22. +1 −1 src/client/addressbooks/testnet.js
  23. +1 −0 src/exports.js
  24. +17 −25 src/query/Query.js
  25. +69 −0 src/token/TokenCreateTransaction.js
  26. +26 −1 src/token/TokenInfo.js
  27. +237 −0 src/token/TokenNftsUpdateTransaction.js
  28. +78 −0 src/token/TokenUpdateTransaction.js
  29. +2 −2 src/token/TokenWipeTransaction.js
  30. +4 −6 test/integration/AccountCreateIntegrationTest.js
  31. +3 −8 test/integration/AccountDeleteIntegrationTest.js
  32. +4 −8 test/integration/AccountUpdateIntegrationTest.js
  33. +52 −78 test/integration/ContractCallIntegrationTest.js
  34. +0 −73 test/integration/ContractCreateIntegrationTest.js
  35. +70 −0 test/integration/ContractDeleteIntegrationTest.js
  36. +96 −80 test/integration/ContractFunctionParametersIntegrationTest.js
  37. +1 −3 test/integration/FileContentsIntegrationTest.js
  38. +5 −8 test/integration/FileCreateIntegrationTest.js
  39. +0 −10 test/integration/FreezeTransactionIntegrationTest.js
  40. +3 −4 test/integration/NftAllowancesIntegrationTest.js
  41. +16 −5 test/integration/SystemIntegrationTest.js
  42. +3 −4 test/integration/TokenAllowancesIntegrationTest.js
  43. +2 −2 test/integration/TokenCreateIntegrationTest.js
  44. +4 −0 test/integration/TokenInfoIntegrationTest.js
  45. +367 −0 test/integration/TokenNftsUpdateTransactionIntegrationTest.js
  46. +695 −19 test/integration/TokenUpdateIntegrationTest.js
  47. +8 −6 test/integration/TokenWipeIntegrationTest.js
  48. +2 −0 test/integration/TopicInfoIntegrationTest.js
  49. +1 −0 test/integration/TransactionReceiptIntegrationTest.js
  50. +4 −4 test/unit/AccountInfoMocking.js
  51. +0 −2 test/unit/EcdsaPrivateKey.js
  52. +10 −0 test/unit/TokenCreateTransaction.js
  53. +12 −0 test/unit/TokenUpdateTransaction.js
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Default code owners for entire repository
* @SimiHunjan @ochikov @petreze
* @SimiHunjan @ochikov @petreze @svetoslav-nikol0v @agadzhalov
10 changes: 5 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -36,12 +36,12 @@ jobs:
- name: Install Task
uses: arduino/setup-task@b91d5d2c96a56797b48ac1e0e89220bf64044611 # v2.0.0
with:
version: 3.7.0
version: 3.35.1

- name: Install PNPM
uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3.0.0
with:
version: 8.10.0
version: 8.15.4

- name: Setup Node
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
@@ -68,7 +68,7 @@ jobs:
- name: Install Task
uses: arduino/setup-task@b91d5d2c96a56797b48ac1e0e89220bf64044611 # v2.0.0
with:
version: 3.7.0
version: 3.35.1

- name: "Create env file"
run: |
@@ -81,7 +81,7 @@ jobs:
- name: Install PNPM
uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3.0.0
with:
version: 8.10.0
version: 8.15.4

- name: Setup Node
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
@@ -102,7 +102,7 @@ jobs:
id: start-local-node
if: ${{ steps.build-sdk.conclusion == 'success' && !cancelled() && always() }}
run: |
npx @hashgraph/hedera-local start -d --network-tag=0.48.0 --balance=100000
npx @hashgraph/hedera-local start -d --network-tag=0.49.7 --balance=100000
# Wait for the network to fully start
sleep 30
4 changes: 2 additions & 2 deletions .github/workflows/common_js.yml
Original file line number Diff line number Diff line change
@@ -35,12 +35,12 @@ jobs:
- name: Install Task
uses: arduino/setup-task@b91d5d2c96a56797b48ac1e0e89220bf64044611 # v2.0.0
with:
version: 3.7.0
version: 3.35.1

- name: Install PNPM
uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3.0.0
with:
version: 8.10.0
version: 8.15.4

- name: Setup Node
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
4 changes: 2 additions & 2 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -25,7 +25,7 @@ jobs:
- name: Install Task
uses: arduino/setup-task@b91d5d2c96a56797b48ac1e0e89220bf64044611 # v2.0.0
with:
version: 3.7.0
version: 3.35.1

- name: Setup Node
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
@@ -35,7 +35,7 @@ jobs:
- name: Install PNPM
uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3.0.0
with:
version: 8.10.0
version: 8.15.4

- name: Build @hashgraph/sdk
run: task build
22 changes: 13 additions & 9 deletions .github/workflows/publish_release.yaml
Original file line number Diff line number Diff line change
@@ -128,20 +128,20 @@ jobs:
- name: Install Task
uses: arduino/setup-task@b91d5d2c96a56797b48ac1e0e89220bf64044611 # v2.0.0
with:
version: 3.7.0
version: 3.35.1

- name: Install PNPM
uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3.0.0
with:
version: 8.10.0
version: 8.15.4

- name: Setup Node
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: 18

- name: Compile Code
run: task build
run: task -v build

publish-release:
name: Publish Release
@@ -158,12 +158,12 @@ jobs:
- name: Install Task
uses: arduino/setup-task@b91d5d2c96a56797b48ac1e0e89220bf64044611 # v2.0.0
with:
version: 3.7.0
version: 3.35.1

- name: Install PNPM
uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3.0.0
with:
version: 8.10.0
version: 8.15.4

- name: Setup Node
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
@@ -172,7 +172,7 @@ jobs:
cache: pnpm

- name: Install NPM Dependencies
run: task install
run: task -v install

- name: Install Playwright Dependencies
run: sudo npx playwright install-deps
@@ -219,19 +219,23 @@ jobs:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
working-directory: packages/proto
if: ${{ steps.proto.outputs.publish-required == 'true' && !cancelled() && !failure() }}
run: task publish -- ${{ steps.publish.outputs.args }}
run: |
echo '//registry.npmjs.org/:_authToken=${NPM_TOKEN}' >>".npmrc"
task -v publish -- ${{ steps.publish.outputs.args }}
- name: Publish Cryptography Release
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
working-directory: packages/cryptography
if: ${{ steps.cryptography.outputs.publish-required == 'true' && !cancelled() && !failure() }}
run: task publish -- ${{ steps.publish.outputs.args }}
run: |
echo '//registry.npmjs.org/:_authToken=${NPM_TOKEN}' >>".npmrc"
task -v publish -- ${{ steps.publish.outputs.args }}
- name: Publish SDK Release
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: task publish -- ${{ steps.publish.outputs.args }}
run: task -v publish -- ${{ steps.publish.outputs.args }}

- name: Generate Github Release
uses: ncipollo/release-action@2c591bcc8ecdcd2db72b97d6147f871fcd833ba5 # v1.14.0
6 changes: 3 additions & 3 deletions .github/workflows/react_native.yml
Original file line number Diff line number Diff line change
@@ -33,7 +33,7 @@ jobs:
- name: Install Task
uses: arduino/setup-task@b91d5d2c96a56797b48ac1e0e89220bf64044611 # v2.0.0
with:
version: 3.7.0
version: 3.35.1

- name: Setup Node
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
@@ -43,7 +43,7 @@ jobs:
- name: Install PNPM
uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3.0.0
with:
version: 8.10.0
version: 8.15.4

- name: Install Yarn
run: npm install -g yarn
@@ -99,7 +99,7 @@ jobs:
- name: Install PNPM
uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3.0.0
with:
version: 8.10.0
version: 8.15.4

- name: Install Yarn
run: npm install -g yarn
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -5,6 +5,20 @@ 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.45.0

## What's Changed

* fix: solve backward compatibility issues between the SDK and hedera-services v0.49 (modularized code) by @svetoslav-nikol0v in https://github.com/hashgraph/hedera-sdk-js/pull/2240
* feature: update metadata field of fungible and non-fungible tokens, and dynamic NFTs (HIP-646, HIP-765 and HIP-657) by @svetoslav-nikol0v in https://github.com/hashgraph/hedera-sdk-js/pull/2210

## v2.45.0-beta.1

## What's Changed

* fix: solve backward compatibility issues between the SDK and hedera-services v0.49 (modularized code) by @svetoslav-nikol0v in https://github.com/hashgraph/hedera-sdk-js/pull/2240
* feature: update metadata field of fungible and non-fungible tokens, and dynamic NFTs (HIP-646, HIP-765 and HIP-657) by @svetoslav-nikol0v in https://github.com/hashgraph/hedera-sdk-js/pull/2210

## v2.44.0

## What's Changed
44 changes: 20 additions & 24 deletions Taskfile.yml
Original file line number Diff line number Diff line change
@@ -42,38 +42,28 @@ tasks:
--validation.invalidLink
--entryPoints src/index.js src/browser.js src/native.js

"install:deps":
run: once
"yalc:install":
cmds:
- pnpm i --dev > /dev/null
- npm install -g yalc > /dev/null

"install:cryptography:local":
"yalc:add":
cmds:
- task: "install:deps"
- task: "cryptography:build"
- npx yalc add @hashgraph/cryptography > /dev/null
status:
- ./check_yalc_dep.sh @hashgraph/cryptography

"install:proto:local":
cmds:
- task: "install:deps"
- task: "proto:build"
- npx yalc add @hashgraph/proto > /dev/null
status:
- ./check_yalc_dep.sh @hashgraph/proto
- npx yalc add @hashgraph/cryptography > /dev/null

"build:proto":
"yalc:remove":
cmds:
- task: "proto:build"
- npx yalc remove @hashgraph/proto > /dev/null
- npx yalc remove @hashgraph/cryptography > /dev/null

install:
deps:
- "build:proto"
- "install:cryptography:local"
- "install:proto:local"
- "yalc:install"
- "proto:build"
- "cryptography:build"
cmds:
- pnpm i > /dev/null
- task: "yalc:add"
- pnpm i --no-frozen-lockfile > /dev/null

build:
cmds:
@@ -142,7 +132,7 @@ tasks:

"test:unit:node":
cmds:
- npx mocha --inline-diffs -r @babel/register -r chai/register-expect.js "test/unit/*.js" {{.CLI_ARGS}}
- npx mocha --inline-diffs --exit -r @babel/register -r chai/register-expect.js "test/unit/*.js" {{.CLI_ARGS}}

"test:unit:codecov":
cmds:
@@ -187,8 +177,14 @@ tasks:
- task: build

publish:
deps:
- "test:release"
cmds:
- task: "yalc:remove"
- task: "publish:release"

"publish:release":
preconditions:
- "! grep '\".*\": \"\\(link\\|file\\):.*\"' package.json > /dev/null"
cmds:
- task: "test:release"
- pnpm publish {{.CLI_ARGS}}
Original file line number Diff line number Diff line change
@@ -77,7 +77,6 @@ async function main() {
.setCustomFees([nftCustomFee])
.setAdminKey(adminKey)
.setSupplyKey(supplyKey)
// .setPauseKey(pauseKey)
.setFreezeKey(freezeKey)
.setWipeKey(wipeKey)
.freezeWith(client)
104 changes: 104 additions & 0 deletions examples/update-fungible-token-metadata-with-admin-key.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
import {
TokenCreateTransaction,
TokenInfoQuery,
TokenType,
PrivateKey,
Client,
AccountId,
TokenUpdateTransaction,
} from "@hashgraph/sdk";
import dotenv from "dotenv";

dotenv.config();

/**
* @summary E2E-HIP-646 https://hips.hedera.com/hip/hip-646
* @description Update fungible token metadata with admin key
*/
async function main() {
if (
!process.env.OPERATOR_KEY ||
!process.env.OPERATOR_ID ||
!process.env.HEDERA_NETWORK
) {
throw new Error("Please set required keys in .env file.");
}

const operatorId = AccountId.fromString(process.env.OPERATOR_ID);
const operatorKey = PrivateKey.fromStringDer(process.env.OPERATOR_KEY);
const network = process.env.HEDERA_NETWORK;
const client = Client.forName(network).setOperator(operatorId, operatorKey);

// Generate a admin key
const adminKey = PrivateKey.generateED25519();
// Initial metadata
const metadata = new Uint8Array([1]);
// New metadata
const newMetadata = new Uint8Array([1, 2]);

let tokenInfo;

try {
// Create a non fungible token
let createTokenTx = new TokenCreateTransaction()
.setTokenName("Test")
.setTokenSymbol("T")
.setMetadata(metadata)
.setTokenType(TokenType.FungibleCommon) // The same flow can be executed with a TokenType.NON_FUNGIBLE_UNIQUE (i.e. HIP-765)
.setDecimals(3)
.setInitialSupply(10000)
.setTreasuryAccountId(operatorId)
.setAdminKey(adminKey)
.freezeWith(client);

// Sign and execute create token transaction
const tokenCreateTxResponse = await (
await createTokenTx.sign(adminKey)
).execute(client);

// Get receipt for create token transaction
const tokenCreateTxReceipt =
await tokenCreateTxResponse.getReceipt(client);
console.log(
`Status of token create transction: ${tokenCreateTxReceipt.status.toString()}`,
);

// Get token id
const tokenId = tokenCreateTxReceipt.tokenId;
console.log(`Token id: ${tokenId.toString()}`);

// Get token info
tokenInfo = await new TokenInfoQuery()
.setTokenId(tokenId)
.execute(client);
console.log(`Token metadata:`, tokenInfo.metadata);

const tokenUpdateTx = new TokenUpdateTransaction()
.setTokenId(tokenId)
.setMetadata(newMetadata)
.freezeWith(client);

// Sign transactions with admin key and execute it
const tokenUpdateTxResponse = await (
await tokenUpdateTx.sign(adminKey)
).execute(client);

// Get receipt for token update transaction
const tokenUpdateTxReceipt =
await tokenUpdateTxResponse.getReceipt(client);
console.log(
`Status of token update transction: ${tokenUpdateTxReceipt.status.toString()}`,
);

tokenInfo = await new TokenInfoQuery()
.setTokenId(tokenId)
.execute(client);
console.log(`Token updated metadata:`, tokenInfo.metadata);
} catch (error) {
console.log(error);
}

client.close();
}

void main();
Loading