All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- GRPC improvements by @petreze in hashgraph#1656
- Update the addressbook on SDK build by @petreze in hashgraph#1658
- GRPC improvements by @petreze in hashgraph#1656
- Fix conditions in getNode by @petreze in hashgraph#1654
- Fix conditions in getNode by @petreze in hashgraph#1654
- Added record for failed transaction by @ochikov in hashgraph#1643
- Fix encode/decode scheduled transactions by @ochikov in hashgraph#1638
- Fix/issue with encode decode by @ochikov in hashgraph#1647
- fix exact version of grpc library by @ochikov in hashgraph#1652
- Fix/remove ping all by @ochikov in hashgraph#1650
- Fix: decrement unhealthy nodes count on readmit time expiry by @petreze in hashgraph#1613
- Fix: unhealthy nodes by @petreze in hashgraph#1611
- Add logger and transaction stats inside the SDK by @petreze in hashgraph#1607
- Fix: decrement unhealthy nodes count on readmit time expiry by @petreze in hashgraph#1613
- Fix: unhealthy nodes by @petreze in hashgraph#1611
- Add logger and transaction stats inside the SDK by @petreze in hashgraph#1607
- Create example of deploy contract with value by @petreze in hashgraph#1604
- Unhealthy node info by @petreze in hashgraph#1605
- Fix: encoding decoding function params by @ochikov in hashgraph#1608
- Fix: list is locked when trying to get the hash before signing the transaction by @petreze in hashgraph#1576
- Add zero padding for nanos by @petreze in hashgraph#1573
- Аdd export for EntityIdHelper by @ochikov in hashgraph#1574
- Add contractId as possible input for AccountAllowancesApproveTransaction by @ochikov in hashgraph#1575
- Add assessment method support for custom fractional fees by @petreze in hashgraph#1600
- Fix: list is locked when trying to get the hash before signing the transaction by @petreze in hashgraph#1576
- Add zero padding for nanos by @petreze in hashgraph#1573
- Аdd export for EntityIdHelper by @ochikov in hashgraph#1574
- Add contractId as possible input for AccountAllowancesApproveTransaction by @ochikov in hashgraph#1575
- Fix: remove the insecure port of mirror nodes by @dikel in hashgraph#1535
- Fix: mnemonic refactoring by @petreze in hashgraph#1550
- Change dependabot interval to monthly by @ochikov in hashgraph#1547
- Create example for getting all chunked messages statuses by @ochikov in hashgraph#1536
- Fix: spelling of
HARDENED
exported constant by @bguiz in hashgraph#1561 - Feature add alias support in AccountCreateTX by @petreze in hashgraph#1563
- Add exports for types by @ochikov in hashgraph#1566
- Fix: remove the insecure port of mirror nodes by @dikel in hashgraph#1535
- Fix: mnemonic refactoring by @petreze in hashgraph#1550
- Change dependabot interval to monthly by @ochikov in hashgraph#1547
- Create example for getting all chunked messages statuses by @ochikov in hashgraph#1536
- Expose some PublicKey methods by @petreze in hashgraph#1521
- Fix operator and operator account id override in beforeExecute by @dikel in hashgraph#1531
- fix contract create flow with external signer by @ochikov in hashgraph#1533
- Fix examples build warnings by @petreze in hashgraph#1475
- Refactor variables by @petreze in hashgraph#1481
- Fix/loop nodes accounts by @ochikov in hashgraph#1493
- Fix/get cost query by @ochikov in hashgraph#1496
- Create github workflow for updating the docs by @ochikov in hashgraph#1516
- Feature nft allowance tests by @petreze in hashgraph#1468
- Release/hip 583 by @petreze in hashgraph#1472
- Add new status codes by @petreze in hashgraph#1400
- chore(deps-dev): bump typescript from 4.9.4 to 4.9.5 in /examples/react-native-example by @dependabot in hashgraph#1438
- chore(deps): bump react-native from 0.71.1 to 0.71.2 in /examples/react-native-example by @dependabot in hashgraph#1437
- chore(deps): bump react-native-web from 0.18.10 to 0.18.12 in /examples/react-native-example by @dependabot in hashgraph#1436
- chore(deps): bump ua-parser-js from 0.7.31 to 0.7.33 in /examples/react-native-example by @dependabot in hashgraph#1435
- chore(deps): bump decode-uri-component from 0.2.0 to 0.2.2 in /examples/react-native-example by @dependabot in hashgraph#1434
- Fix _maxAutomaticTokenAssociations in contract create and contract up… by @ochikov in hashgraph#1444
- Feature/extend ethereumflow by @ochikov in hashgraph#1447
- Fix/timeout issue by @ochikov in #1414
- Updated Protobuf statuses
- fix ping to throw by @ochikov in #1426
- Bump up dependencies by @ochikov in #1402
- Removed unnecessary check by @petreze in #1429
- Fix inaccurate cost calculation by @petreze in #1430
- Fix/update mirror endpoints #1448
- Add delete nft allowances and add delegate spender functionality by @petreze in hashgraph#1452
Full Changelog: https://github.com/hashgraph/hedera-sdk-js/compare/v2.19.2...v2.20.0
- Return dependabot dependency checker by @petreze in hashgraph#1361
- Release/cryptography v1.4.2 by @ochikov in hashgraph#1366
- Fix web proxy by @petreze in hashgraph#1395
- Fix
PublicKey.fromString(newAccountPublicKey.toStringDer());
- KeyList now handles single key properly as first parameter by @petreze in hashgraph#1348
- Fix typo in deprecation suggestion by @ochikov in hashgraph#1352
- Update contribution guide by @ochikov in hashgraph#1353
- Add max execution time setter for NodeChannel GRPC by @ochikov in hashgraph#1354
- Update the addressbook update to be 24 hours by @ochikov in hashgraph#1359
- Update the Mainnet mirror node and add integration test by @ochikov in hashgraph#1327
- Bug/1326 mirror network update by @ochikov in hashgraph#1328
- Added getters and deprecated old ones by @ochikov in hashgraph#1329
- Integration test workflow by @ochikov in hashgraph#1330
- Added proxies for different networks by @petreze in hashgraph#1331
- Аdded NFKD normalization for mnemonic passphrase by @petreze in hashgraph#1335
- Change param of getNftInfo from allowanceSpenderAccountId to spenderId by @ochikov in hashgraph#1337
- Fix for optional param of transaction range by @ochikov in hashgraph#1339
- Fix some of the Github workflows by @ochikov in hashgraph#1311
- Bug/unhealthy node by @ochikov in hashgraph#1321
- Throw timeout error and do not make the node unhealthy by @ochikov in hashgraph#1298
- Refactor the HIP to point to testnet by @ochikov in hashgraph#1303
- Fix for fromBytes to return the range in PrngTransaction by @ochikov in hashgraph#1302
- Fix HIP-573 example by @petreze in hashgraph#1300
- Example/hip 573 by @petreze in hashgraph#1292
- Example/hip 564 by @ochikov in hashgraph#1285
- Example/hip 542 by @petreze in hashgraph#1293
- bug: fix and improve taskfiles workflow by @petreze in hashgraph#1283
- Fix the task test:release command by @ochikov in hashgraph#1296
- Fix the offset for uint24 & int24 datatypes in contract functions params by @ochikov in hashgraph#1295
CustomFee.allCollectorsAreExempt
PrecheckStatusError.contractFunctionResult
TransactionReceiptQuery.[set|get]ValidateStatus()
TransactionRecrodQuery.[set|get]ValidateReceiptStatus()
WebClient
andNativeClient
do not schedule network updates
TransactionId.getReceipt()
TransactionId.getRecord()
AccountCreateTransaction.[set|get]Alias[Key|EvmAddress]()
ContractCreateFlow.[set|get]MaxChunks()
- Support for automatically updating networks
Client.[set|get]NetworkUpdatePeriod()
Client
constructor supportsscheduleNetworkUpdate
to disable auto updates- Support for
local-node
as one of the networks
ContractCreateFlow.executeWithSigner()
PublicKey.fromString()
for ECDSA keysWebChannel
not checking headers before decoding body
TransferTransaction
incorrectly merging FT and NFT tranfersContractCreateFlow.execute()
not using keys provided in.sign()
PublicKey.equals()
Mnemonic.to[Ed25519|Ecdsa]PrivateKey()
Mnemonic.toPrivateKey()
- UseMnemonic.to[Ed25519|Ecdsa]PrivateKey()
- #1188 - Undeprecate
*ContractId.fromSolidityAddress()
Query.queryPayment
,Query.maxQueryPayment
, andClient.maxQueryPayment
interactions- Remove making empty requests to
grpc.myhbarwallet.com
to calculate time drift
- Expose setters/getters for
Cache
to allow users to set their own calculated values
TokenUpdateTransaction.pauseKey
not being serialized into protobuf
TokenNftInfo.allowanceSpenderAccountId
ContractCreateFlow.sign[With]()
FileAppendTransaction
chunk size should default to 4096ContractFunctionResult.gas
can be-1
whennull
in protobufs: #1208FileAppendTransaction.setTransactionId()
not locking the transaction ID listTopicMessageSubmitTransaction.setTransactionId()
not locking the transaction ID list
AccountBalance.tokens
- Use the mirror node API https://docs.hedera.com/guides/docs/mirror-node-api/rest-api#api-v1-accounts insteadAccountBalance.tokenDecimals
- Use same API as above
PrngThansaction
TransactionRecord.prngBytes
TransactionRecord.prngNumber
ContractFunctionResult.stateChanges
- Use mirror node for contract traceability insteadContractStateChanges
StorageChange
ContractCreateTransaction.autoRenewAccountId
ContractUpdateTransaction.autoRenewAccountId
PrngThansaction
TransactionRecord.prngBytes
TransactionRecord.prngNumber
EthereumFlow
contract creation should hex encode bytes
- Time syncing should not continue if
response.headers.date
is NaN - Time drift should use a POST request with content type set correctly
- Transaction ID generation should no longer fail in browsers
- Time syncing should not continue if
response.headers.date
is NaN
- Time drift should use a POST request with content type set correctly
- Time drift should use a HEAD request to avoid issues with content type
- Implement
AccountAllowanceApproveTransaction.tokenNftApprovals
- Implement
AccountAllowanceDeleteTransaction.tokenNftAllowanceDeletions
TokenNftAllowance
to/from protobuf should not assumespenderAccountId
is set- Time drift sync should use myhbarwallet to prevent CORS issues
- Syncing time drift should use https://google.com
StakingInfo
AccountCreateTransaction.stakedAccountId
AccountCreateTransaction.stakedNodeId
AccountCreateTransaction.declineStakingReward
ContractCreateTransaction.stakedAccountId
ContractCreateTransaction.stakedNodeId
ContractCreateTransaction.declineStakingReward
AccountUpdateTransaction.stakedAccountId
AccountUpdateTransaction.stakedNodeId
AccountUpdateTransaction.declineStakingReward
ContractUpdateTransaction.stakedAccountId
ContractUpdateTransaction.stakedNodeId
ContractUpdateTransaction.declineStakingReward
TransactionRecord.paidStakingRewards
ScheduleCreateTransaction.expirationTime
ScheduleCreateTransaction.waitForExpiry
- Variants to
FeeDataType
TopicMessage.initialTransactionId
TransactionRecord.[to|from]Bytes()
should round trip correclty
StakingInfo
AccountCreateTransaction.stakedAccountId
AccountCreateTransaction.stakedNodeId
AccountCreateTransaction.declineStakingReward
ContractCreateTransaction.stakedAccountId
ContractCreateTransaction.stakedNodeId
ContractCreateTransaction.declineStakingReward
AccountUpdateTransaction.stakedAccountId
AccountUpdateTransaction.stakedNodeId
AccountUpdateTransaction.declineStakingReward
ContractUpdateTransaction.stakedAccountId
ContractUpdateTransaction.stakedNodeId
ContractUpdateTransaction.declineStakingReward
TransactionRecord.paidStakingRewards
ScheduleCreateTransaction.expirationTime
ScheduleCreateTransaction.waitForExpiry
EthereumFlow
EthereumTransactionData
EthereumTransactionDataLegacy
EthereumTransactionDataEip1559
Signer.getAccountKey()
- Signature providers should be implementing this method, but it was added in a none-breaking change way so old signer provider implementations won't break when updating to the latest JS SDK versionContractCreateFlow.executeWithSigner()
- Execute a flow using a signerAccountInfoFlow.verify[Signature|Transaction]WithSigner()
- Execute a flow using a signer- A third party time source will be used for transaction ID generation when possible.
EthereumTransaction.[set|get]CallData()
- UseEthereumTransaction.[set|get]CallDataFileId()
insteadEthereumTransaction.[set|get]MaxGasAllowance()
- UseEthereumTransaction.[set|get]MaxGasAllowanceHbar()
instead
- Exported
RequestType
RequestType
missing codes
- Exported
FeeComponents
- Exported
FeeData
- Exported
FeeDataType
- Exported
FeeSchedule
- Exported
FeeSchedules
- Exported
TransactionFeeSchedule
AccountId.aliasEvmAddress
ContractCreateTransaction.[get|set]MaxAutomaticTokenAssociations()
ContractCreateTransaction.[get|set]Bytecode()
ContractUpdateTransaction.[get|set]MaxAutomaticTokenAssociations()
ContractCreateFlow.[get|set]MaxAutomaticTokenAssociations()
AccountInfo.ethereumNonce
ContractCallResult.senderAccountId
ContractCallQuery.[get|set]SenderAccountId()
TransactionRecord.ethereumHash
EthereumTransaction
TransactionResponse.get[Receipt|Record]Query()
[Wallet|Signer|Provider].sendRequest()
->[Wallet|Signer|Provider].call()
[Wallet|Signer].[sign|populate|check]Transaction()
are now generic over the parameterWallet.checkTransaction
should not error if theTransaction.transactionId
isnull
- More status codes to
Status
- Bumped
@u2u/proto
version to correctly support account allowances TransactionId.transactionId
accessor should not error if there is no transaction ID set and instead should return a nullableTransactionId
ContractFunctionParameters.addBytes()
where the byte length is a factor of 32 and greater than 32[Web|Native]Channel
should correctly propagate the error fromfetch()
ContractEvmTransaction
- More status codes to
Status
[Wallet|Signer|Provider].sendRequest()
->[Wallet|Signer|Provider].call()
[Wallet|Signer].[sign|populate|check]Transaction()
are now generic over the parameterWallet.checkTransaction
should not error if theTransaction.transactionId
isnull
- Bumped
@u2u/proto
version to correctly support account allowances TransactionId.transactionId
accessor should not error if there is no transaction ID set and instead should return a nullableTransactionId
ContractFunctionParameters.addBytes()
where the byte length is a factor of 32 and greater than 32[Web|Native]Channel
should correctly propagate the error fromfetch()
AccountId.clone()
should clone thealiasKey
ContractFunctionResult.[gas|amount|functionParameters]
AccountAllowanceDeleteTransaction
Wallet.createRandom[ED25519|ECDSA]()
WebChannel
andNativeChannel
usingHashgraphProto.proto
instead ofproto
in the URLTransactionReceiptQuery
's error should contain the transaction set on the request instead of the payment transaction IDQuery.maxQueryPayment
should be used beforeClient.maxQueryPayment
- request timeout check being reversed
- Updated
Signer
andProvider
to be interfaces instead of classes
AccountAllowanceAdjustTransaction
LocalWallet
- UseWallet
instead
TopicUpdateTransaction
should be able to call [get|set]ExpirationTime().Status
should contain a return code for 314.
ContractFunctionResult.[gas|amount|functionParameters]
AccountAllowanceDeleteTransaction
- Only check for logging environment variables inside
index.js
- Update
Exectuable
,Query
, andCostQuery
to correctly setnodeAccountIds
- Make suer
Query
saves the operator from the client to be used when building new payment transactions
AccountInfoFlow.verify[Signature|Transaction]()
Client.[set|get]NodeMinReadmitPeriod()
- Support for using any node from the entire network upon execution if node account IDs have no been locked for the request.
- Support for all integer widths for
ContractFunction[Result|Selector|Params]
AccountAllowanceApproveTransaction.approve[Hbar|Token|TokenNft]Allowance()
AccountAllowanceAdjustTransaction.[grant|revoke][Hbar|Token|TokenNft]Allowance()
AccountAllowanceAdjustTransaction.[grant|revoke]TokenNftAllowanceAllSerials()
TransactionRecord.[hbar|token|tokenNft]AllowanceAdjustments
TransferTransaction.addApproved[Hbar|Token|Nft]Transfer()
AccountAllowanceApproveTransaction.add[Hbar|Token|TokenNft]Allowance[WithOwner]()
, useapprove*Allowance()
instead.AccountAllowanceAdjustTransaction.add[Hbar|Token|TokenNft]Allowance[WithOwner]()
, use[grant|revoke]*Allowance()
instead.TransferTransaction.set[Hbar|Token|Nft]TransferApproval()
, useaddApproved*Transfer()
instead.
- Network behavior to follow a more standard approach (remove the sorting we used to do).
- Ledger ID checksums
Transaction.fromBytes()
should validate all the transaction bodies are the sameExchangeRate._[from|to]Protobuf()
should correctly decodeexpirationTime
- Mark
expo
as a optional peer dependency SubscriptionHandle
should be exportedTransferTransaction
transfers merging
- Scheduled transactions should use the default transaction fee if a fee was not explicitly set
TransactionRecord.[hbar|token|tokenNft]AllowanceAdjustments
TransferTransaction.addApproved[Hbar|Token|Nft]Transfer()
AccountAllowanceApproveTransaction.approve[Hbar|Token|TokenNft]Allowance()
AccountAllowanceAdjustTransaction.[grant|revoke][Hbar|Token|TokenNft]Allowance()
AccountAllowanceAdjustTransaction.[grant|revoke]TokenNftAllowanceAllSerials()
AccountInfoFlow.verify[Signature|Transaction]()
Client.[set|get]NodeMinReadmitPeriod()
- Support for using any node from the entire network upon execution if node account IDs have no been locked for the request.
- Support for all integer widths for
ContractFunction[Result|Selector|Params]
AccountAllowanceApproveTransaction.approve[Hbar|Token|TokenNft]Allowance()
AccountAllowanceAdjustTransaction.[grant|revoke][Hbar|Token|TokenNft]Allowance()
AccountAllowanceAdjustTransaction.[grant|revoke]TokenNftAllowanceAllSerials()
TransactionRecord.[hbar|token|tokenNft]AllowanceAdjustments
TransferTransaction.addApproved[Hbar|Token|Nft]Transfer()
- Ledger ID checksums
Transaction.fromBytes()
should validate all the transaction bodies are the same
AccountAllowanceApproveTransaction.add[Hbar|Token|TokenNft]Allowance[WithOwner]()
, useapprove*Allowance()
instead.AccountAllowanceAdjustTransaction.add[Hbar|Token|TokenNft]Allowance[WithOwner]()
, use[grant|revoke]*Allowance()
instead.TransferTransaction.set[Hbar|Token|Nft]TransferApproval()
, useaddApproved*Transfer()
instead.
- Network behavior to follow a more standard approach (remove the sorting we used to do).
- Ledger ID checksums
Transaction.fromBytes()
should validate all the transaction bodies are the sameExchangeRate._[from|to]Protobuf()
should correctly decodeexpirationTime
- Mark
expo
as a optional peer dependency
LocalWallet
LocalProvider
Provider
Signer
Wallet
SignerSignature
- Verbose logging using
js-logger
Client.setRequestTimeout()
- TLS for mirror nodes
- Transactions should have an appropriate default (copied from Java SDK)
- Min/max backoff for nodes should start at 8s to 60s
- The current backoff for nodes should be used when sorting inside of network meaning nodes with a smaller current backoff will be prioritized
- Chunked transactions (
FileAppendTransaction
andTopicMessageSubmitTransaction
) should use the correct transation ID per transaction - Transaction removing signatures when calling
Transaction.[toBytes|getTransactionHash]()
LocalWallet
LocalProvider
Provider
Signer
Wallet
SignerSignature
- Verbose logging using
js-logger
Client.setRequestTimeout()
- TLS for mirror nodes
- Transactions should have an appropriate default (copied from Java SDK)
- Min/max backoff for nodes should start at 8s to 60s
- The current backoff for nodes should be used when sorting inside of network meaning nodes with a smaller current backoff will be prioritized
- Chunked transactions (
FileAppendTransaction
andTopicMessageSubmitTransaction
) should use the correct transation ID per transaction - Transaction removing signatures when calling
Transaction.[toBytes|getTransactionHash]()
NativeClient
IPs should have a port
AddressBookQuery
- Status codes
*[Transaction|Query].setGrpcDeadline()
*Allowance.ownerAccountId
- Mirror network incorrectly using
433
for TLS instead of443
TransactionReceipt
protobuf encodingContractId.fromString()
AddressBookQuery
- Status codes
*[Transaction|Query].setGrpcDeadline()
*Allowance.ownerAccountId
- Mirror network incorrectly using
433
for TLS instead of443
TransactionReceipt
protobuf encodingContractId.fromString()
AddressBookQuery
- Status codes
*[Transaction|Query].setGrpcDeadline()
*Allowance.ownerAccountId
- Mirror network incorrectly using
433
for TLS instead of443
TransactionReceipt
protobuf encodingContractId.fromString()
ContractId.fromEvmAddress()
ContractFunctionResult.stateChanges
ContractFunctionResult.evmAddress
ContractStateChange
StorageChange
[FileAppend|TopicMessageSubmit]Transaction.[set|get]ChunkSize()
, and changed default chunk size forFileAppendTransaction
to 2048.AccountAllowance[Adjust|Approve]Transaction
TransactionRecord.tokenTransfersList
ContractId.fromEvmAddress()
ContractFunctionResult.stateChanges
ContractFunctionResult.evmAddress
ContractStateChange
StorageChange
[FileAppend|TopicMessageSubmit]Transaction.[set|get]ChunkSize()
, and changed default chunk size forFileAppendTransaction
to 2048.AccountAllowance[Adjust|Approve]Transaction
TransactionRecord.tokenTransfersList
AccountAllowance[Adjust|Approve]Transaction
AccountInfo.[hbar|token|tokenNft]Allowances
[Hbar|Token|TokenNft]Allowance
[Hbar|Token|TokenNft]Allowance
TransferTransaction.set[Hbar|Token|TokenNft]TransferApproval()
- Support for regenerating transaction IDs on demand if a request
responses with
TRANSACITON_EXPIRED
Transaction.sign()
should correctly save public keys and signers when sign on demand is disabledWebClient
failing to be constructed because its network was missing ports
Transaction.sign()
should correctly save public keys and signers when sign on demand is disabledWebClient
failing to be constructed because its network was missing ports
WebClient
failing to be constructed because its network was missing ports
- Support for regenerating transaction IDs on demand if a request
responses with
TRANSACITON_EXPIRED
[Private|Public]Key.toAccountId()
TokenUpdateTransaction.[get|set]PauseKey()
TokenUpdateTransaction.setSupplyKey()
- Updated
Status
with new response codes AccountId.aliasKey
, includingAccountId.[to|from]String()
support.[PublicKey|PrivateKey].toAccountId()
.aliasKey
fields inTransactionRecord
andAccountInfo
.nonce
field inTransactionId
, includingTransactionId.[set|get]Nonce()
children
fields inTransactionRecord
andTransactionReceipt
duplicates
field inTransactionReceipt
[TransactionReceiptQuery|TransactionRecordQuery].[set|get]IncludeChildren()
TransactionReceiptQuery.[set|get]IncludeDuplicates()
- New response codes.
- Support for ECDSA SecP256K1 keys.
PrivateKey.generate[ED25519|ECDSA]()
[Private|Public]Key.from[Bytes|String][DER|ED25519|ECDSA]()
[Private|Public]Key.to[Bytes|String][Raw|DER]()
- Requests should retry on
INTERNAL
consistently - Signing data which contains bytes larger than a value of 127
[Private|Public]Key.fromBytesEcdsa()
checking for the wrong bytes length
TokenUpdateTransaction.setsupplyKey()
- usesetSupplyKey()
insteadPrivateKey.generate()
, usePrivateKey.generate[ED25519|ECDSA]()
instead.
- Signing data which contains bytes larger than a value of 127
[Private|Public]Key.fromBytesEcdsa()
checking for the wrong bytes length
TokenUpdateTransaction.[get|set]PauseKey()
TokenUpdateTransaction.setSupplyKey()
- Updated
Status
with new response codes
TokenUpdateTransaction.setsupplyKey()
- usesetSupplyKey()
instead
[Private|Public]Key.toAccountId()
AccountId.aliasKey
, includingAccountId.[to|from]String()
support.[PublicKey|PrivateKey].toAccountId()
.aliasKey
fields inTransactionRecord
andAccountInfo
.nonce
field inTransactionId
, includingTransactionId.[set|get]Nonce()
children
fields inTransactionRecord
andTransactionReceipt
duplicates
field inTransactionReceipt
[TransactionReceiptQuery|TransactionRecordQuery].[set|get]IncludeChildren()
TransactionReceiptQuery.[set|get]IncludeDuplicates()
- New response codes.
- Support for ECDSA SecP256K1 keys.
PrivateKey.generate[ED25519|ECDSA]()
[Private|Public]Key.from[Bytes|String][DER|ED25519|ECDSA]()
[Private|Public]Key.to[Bytes|String][Raw|DER]()
PrivateKey.generate()
, usePrivateKey.generate[ED25519|ECDSA]()
instead.
- Requests should retry on
INTERNAL
consistently
- Support for multiple IPs per node
- New smart contract response codes
TransferTransaction
should deterministically order transfers before submitting transaction
- New smart contract response codes
WebClient
should be able to construct an emptyMirrorNetwork
- Bad imports while using Common JS
ContractUpdateTransaction.[set|get]ByteCodeFileId()
ContractCallQuery.[set|get]MaxResultSize()
- Bad imports while using Common JS
ContractUpdateTransaction.[set|get]ByteCodeFileId()
ContractCallQuery.[set|get]MaxResultSize()
- Bad imports while using Common JS
- TLS support
Client.[get|set]TransportSecurity()
- Enable/Disable TLS*Id.toSolidityAddress()
- Support for
number
in allContractFunctionParam.add[Uint|Int]*()
methods
*Id.fromSolidityAddress()
FreezeType
FreezeTransaction.[get|set]FreezeType()
FreezeTransaction.[get|set]FileId()
FreezeTransaction.[get|set]FileHash()
FreezeTransaction.[get|set]UpdateFileId()
, use.[get|set]FileId()
instead.
- gRPC client not timing out on unresponsive connections
- Support for HIP-24 (token pausing)
TokenInfo.pauseKey
TokenInfo.pauseStatus
TokenCreateTransaction.pauseKey
TokenUpdateTransaction.pauseKey
TokenPauseTransaction
TokenUnpauseTransaction
- UTF8 encoding and ecoding in React Native
- Support for automatic token associations
TransactionRecord.automaticTokenAssociations
AccountInfo.maxAutomaticTokenAssociations
AccountCreateTransaction.maxAutomaticTokenAssociations
AccountUpdateTransaction.maxAutomaticTokenAssociations
TokenRelationship.automaticAssociation
TokenAssociation
TransferTransaction.addHbarTransfer()
was not combining transfers
- Support for automatic token associations
TransactionRecord.automaticTokenAssociations
AccountInfo.maxAutomaticTokenAssociations
AccountCreateTransaction.maxAutomaticTokenAssociations
AccountUpdateTransaction.maxAutomaticTokenAssociations
TokenRelationship.automaticAssociation
TokenAssociation
TokenNftInfo.toString()
- Stringifies the JSON representation of the currentTokenNftInfo
TokenNftInfo.toJson()
- JSON representation of the currentTokenNftInfo
Timestamp.toString()
- displays as<seconds>.<nanos>
. UseTimestamp.toDate()
to print differently
TokenNftInfoQuery.[set|get]AccountId()
with no replacementTokenNftInfoQuery.[set|get]TokenId()
with no replacementTokenNftInfoQuery.[set|get]Start()
with no replacementTokenNftInfoQuery.[set|get]End()
with no replacementTokenMintTransaction.[add|set]Metadata()
support for string metadata
- Support for
CustomRoyaltyFees
- Updated
Status
with new response codes - Implemented
Client.[set|get]NetworkName()
Client.pingAll()
- pings all network nodesClient.[set|get]NodeWaitTime()
- minimum delay for nodes that are nto respondingClient.[set|get]MaxAttempts()
- max number of attempts for each requestClient.[set|get]MaxNodesPerTransaction()
- number of node account IDs to use per requestCustomFixedFee.[set|get]HbarAmount()
- helper method to set bothdenominatingTokenId
andamount
when fee is anHbar
amountCustomFixedFee.setDenominatingTokenToSameToken()
- helper method to setdenominatingTokenId
to0.0.0
which is not obvious
Client.ping()
will no longer throw an error
*[Transaction|Query].[set|get]MaxRetries()
- Use*[Transaction|Query].[set|get]MaxAttempts()
instead
PrivateKey.signTransaction()
andPublicKey.verifyTransaction()
should correctly freeze an unfrozen transaction
- Updated
Status
with new response codes - Support for
Hbar.[from|to]String()
to be reversible Client.setAutoValidateChecksums()
set whether checksums on ids will be automatically validated upon attempting to execute a transaction or query. Disabled by default. Check status withClient.isAutoValidateChecksumsEnabled()
*Id.toString()
no longer stringifies with checksums. Use*Id.getChecksum()
to get the checksum that was parsed, or use*Id.toStringWithChecksum(client)
to stringify with the correct checksum for that ID on the client's network.*Id.validateChecksum()
to validate a checksum. Throws newBadEntityIdException
- Free queries should not longer attempt to sign payment transactions
- All enitty IDs within response should no longer contain a checskum.
Use
*Id.toStringWithChecksum(Client)
to stringify with a checksum ReceiptStatusError
should contain a properly filled outTransactionReceipt
*Id.validate()
use*Id.validateChecksum()
instead
- Updated
Status
andFeeDataType
with new codes
TokenCreateTransaction.[get|set]FeeScheduleKey()
- Support for parsing file 0.0.111 using
FeeSchedules
TokenMintTransaction.[to|from]Bytes()
incorrectly parsing the transaction body
TokenCreateTransaction.addCustomFee()
- useTokenCreateTransaction.setCustomFees()
instead
- Support for NFTS
- Creating NFT tokens
- Minting NFTs
- Burning NFTs
- Transfering NFTs
- Wiping NFTs
- Query NFT information
- Support for Custom Fees on tokens:
- Setting custom fees on a token
- Updating custom fees on an existing token
- Loading keystore should no longer error when
CipherAlgorithm
doesn't match case PrivateKey.legacyDerive()
should now be consistent with the v1.4.6 JS SDK
Hbar.fromTinybar()
supportsBigNumber
Hbar.toString()
supportsU2UUnit
- Implemented to and from bytes for
TopicInfo
andTokenInfo
- Support for
sign-on-demand
- This is disabled by default to you'll need to enable it using
Client.setSignOnDemand(true)
- If
sign-on-demand
is enabled you'll need to useasync
versions of these methods:*Transaction.toBytes()
->*Transaction.toBytesAsync()
*Transaction.getSignatures()
->*Transaction.getSignaturesAsync()
*Transaction.getTransactionHash()
->*Transaction.getTransactionHashAsync()
- This is disabled by default to you'll need to enable it using
- All requests now retry on gRPC status
INTERNAL
if error returned containsRST_STREAM
- Added support for TLS on mirror node connections
- Implemented
*Id.clone()
(this is used internally to fix some issues that only surface in React Native) - Implement
Timestamp.plusNanos()
- Added support for entity ID checksums. The network will be extracted from the checksum of the entity ID and validated on each request to make sure a request is not happening on one network while an entity ID references another network. Entity IDs with a network will print with a checksum while entity IDs without a checksum will not print the checksum part.
TopicMessageQuery.startTime
not updating start time by one nanosecond causing a message to appear twice if the connection resetTopicMessageQuery
should log retriesTransactionReceipt
error handling; this should now throw an error contain the receipt
TopicMessageQuery.maxBackoff
was not being used at allTopicMessageQuery.limit
was being incorrectly update with fullTopicMessages
rather than per chunkTopicMessageQuery.startTime
was not being updated each time a message was receivedTopicMessageQuery.completionHandler
was be called at incorrect times
- Exposed
AccountBalance.tokenDecimals
- Support for
string
parameters inHbar.fromTinybars()
Hbar.toBigNumber()
which is a simple wrapper aroundHbar.to(U2UUnit.Hbar)
AccountBalance.toJSON()
- Support for
maxBackoff
,maxAttempts
,retryHandler
, andcompletionHandler
inTopicMessageQuery
- Default logging behavior to
TopicMessageQuery
if an error handler or completion handler was not set
TopicMessageQuery
retry handling; this should retry on more gRPC errorsTopicMessageQuery
max retry timeout; before this would could wait up to 4m with no feedback- Missing
@readonly
tag onTokenInfo.tokenMemo
Keystore
failing to recognize keystores generated by v1 SDKs- Errors caused by the use
?.
and??
within a node 12 context TopicMessageQuery
PrivateKey.legacyDerive()
- Derive private key using legacy derivationsHbar.fromTinybars()
supportsstring
parameterHbar.toBigNumber()
aliasesHbar.to(U2UUnit.Hbar)
AccountBalance.tokenDecimals
- Represents the decimals on a tokenAccountBalance.toString()
should print aJSON.stringified()
outputAccountBalance.toJSON()
Mnemonic.toLegacyPrivateKey()
no longer automaticaly derivesPrivateKey
, instead produces rootPrivateKey
UsePrivateKey.legacyDerive()
to derive the properPrivateKey
manually- Removed the use of
@u2u/protobufjs
in favor ofprotobufjs
The reason@u2u/protobufjs
even exists is becauseprotobufjs
containseval
which fails CSP in browser. However, while running integration tests throughvite
andmocha
it seems theeval
was never hit. - Moved from
yarn
topnpm
because of performance issues withyarn
- Scheduled transaction support:
ScheduleCreateTransaction
,ScheduleDeleteTransaction
, andScheduleSignTransaction
- React Native support
- Support for raw
proto.Transaction
bytes inTransaction.fromBytes()
- This means v1 SDK's
Transaction.toBytes()
will now be supported in v2Transaction.fromBytes()
However,Transaction.toBytes()
andTransaction.getTransactionHas()
in v2 will produce different results in the v1 SDK's.
- This means v1 SDK's
- addSignature() Behavior Differs Between Implementations [NCC-E001154-005]
- Decreased
CHUNK_SIZE
4096->1024 and increased default max chunks 10->20 - Export
StatusError
,PrecheckStatusError
,ReceiptStatusError
, andBadKeyError
KeyList.toString()
AccountBalance.toString()
new TransactionId(AccountId, Instant)
- UseTransactionId.withValidStart()
instead.
- addSignature() Behavior Differs Between Implementations [NCC-E001154-005]
- Decreased
CHUNK_SIZE
4096->1024 and increased default max chunks 10->20 - Renamed
ScheduleInfo.getTransaction()
->ScheduleInfo.getScheduledTransaction()
- React Native support
- Scheduled transactions should use new HAPI protobufs
- Removed
nonce
fromTransactionId
schedule-multi-sig-transaction
example to use new scheduled transaction API
ScheduleCreateTransaction.addScheduledSignature()
ScheduleCreateTransaction.scheduledSignatures()
ScheduleSignTransaction.addScheduledSignature()
ScheduleSignTransaction.scheduledSignatures()
- Support for raw
proto.Transaction
bytes inTransaction.fromBytes()
- This means v1 SDK's
Transaction.toBytes()
will now be supported in v2Transaction.fromBytes()
However,Transaction.toBytes()
andTransaction.getTransactionHas()
in v2 will produce different results in the v1 SDK's.
- This means v1 SDK's
- Export
StatusError
,PrecheckStatusError
,ReceiptStatusError
, andBadKeyError
- A few examples that did not work with
CONFIG_FILE
environment variable
- Support for setting signatures on the underlying scheduled transaction
TransactionReceipt.scheduledTransactionId
ScheduleInfo.scheduledTransactionId
TransactionRecord.scheduleRef
- Support for scheduled and nonce in
TransactionId
TransactionId.withNonce()
- Supports creating transaction ID with random bytes.TransactionId.[set|get]Scheduled()
- Supports scheduled transaction IDs.
memo
fields for both create and update transactions and info queriesAccount[Create|Update]Transaction.[set|get]AccountMemo()
File[Create|Update]Transaction.[set|get]AccountMemo()
Token[Create|Update]Transaction.[set|get]AccountMemo()
AccountInfoQuery.accountMemo
FileInfoQuery.fileMemo
TokenInfoQuery.tokenMemo
ScheduleInfo.*ID
field names should useId
Ex.ScheduleInfo.creatorAccountID
->ScheduleInfo.creatorAccountId
- Renamed
ScheduleInfo.memo
->ScheduleInfo.scheduleMemo
- Chunked transactions should not support scheduling if the data provided is too large
TopicMessageSubmitTransaction
FileAppendTransaction
- Support for scheduled transactions.
ScheduleCreateTransaction
- Create a new scheduled transactionScheduleSignTransaction
- Sign an existing scheduled transaction on the networkScheduleDeleteTransaction
- Delete a scheduled transactionScheduleInfoQuery
- Query the info includingbodyBytes
of a scheduled transactionScheduleId
KeyList.toString()
AccountBalance.toString()
new TransactionId(AccountId, Instant)
- UseTransactionId.withValidStart()
instead.
- Implement
Client.forName()
to support construction of client from network name. - Implement
PrivateKey.verifyTransaction()
to allow a user to verify a transaction was signed with a partiular key.
* All queries and transactions support setting fields in the constructor using
an object, e.g. `new AccountBalanceQuery({ accountId: "0.0.3" })`, or
`new AccountCreateTransaction({ key: client.operatorPublicKey, initialBalance: 10 })`.
* Almost all instances of `BigNumber` have been replaced with `Long`
-
Ed25519PrivateKey.fromMnemonic
regressed in v1.1.8 and was not working in the browser. -
Use detached signatures when signing the transaction. This should allow for much larger transactions to be submitted.
Ed25519PrivateKey.fromKeystore
regressed in v1.1.9 and was not working in the browser
-
Client.ping(id: AccountIdLike)
Pings a node by account ID. -
Ed25519PrivateKey.fromMnemonic
works with legacy 22-word phrases.
Client.getAccountBalance()
to match the Java SDK. UseAccountBalanceQuery
directly instead.
-
Allow BigNumber or String to be used as Tinybar where Tinybar was accepted
-
Add support for decoding
Ed25519PrivateKey
from a PEM file usingEd25519PrivateKey.fromPem()
-
Add support for passing no argument to
ContractFunctionResult.get*()
methods. -
Add
MnemonicValidationResult
which is the response type forMnemonic.validte()
-
Add public method
Mnemonic.validate(): MnemonicValidationResult
which validates if the mnemonic came from the same wordlist, in the right order, and without misspellings. -
Add
BadPemFileError
which is thrown when decoding a pem file fails.
-
Fixes
AddBytes32Array
-
Fixes
Hbar.isNegative()
failing withundefined
. -
Fixes
CryptoTransferTransaction.addTransfer()
not supportingBigNumber
ornumber
as arguments. -
Fixes
ConsensusTopicInfoQuery.setTopicId()
not supportingConsensusTopicIdLike
.
-
Deprecates
Client.maxTransactionFee
andClient.maxQueryPayment
getters. -
Deprecates
ConsensusTopicCreateTransaction.setAutoRenewAccount()
was simply renamed toConsensusTopicCreateTransaction.setAutoRenewAccountId()
. -
Deprecates
ConsensusTopicCreateTransaction.setExpirationTime()
with no replacement. -
Deprecates
ConsensusTopicCreateTransaction.setValidStart()
with no replacement. -
Deprecates
ConsensusTopicUpdateTransaction.setAutoRenewAccount()
with no replacement.
-
TransactionRecord.getContractCallResult
andTransactionRecord.getContractExecuteResult
were swapped internally and neither worked before. -
Export
ConsensusMessageSubmitTransaction
.
- Do not provide (and sign) a payment transaction for
AccountBalanceQuery
. It is not required.
-
Add
TransactionBuilder.getCost()
to return a very close estimate of the transaction fee (within 1%). -
Add additional error classes to allow more introspection on errors:
HederaPrecheckStatusError
- Thrown when the transaction fails at the node (the precheck)HederaReceiptStatusError
- Thrown when the receipt is checked and has a failing status. The error object contains the full receipt.HederaRecordStatusError
- Thrown when the record is checked and it has a failing status. The error object contains the full record.
-
console.log(obj)
now prints out nice debug information for several types in the SDK including receipts
-
Add
TransactionReceipt.getConsensusTopicId()
. -
Add
TransactionReceipt.getConsensusTopicRunningHash()
. -
Add
TransactionReceipt.getConsensusTopicSequenceNumber()
. -
Adds support for addresses with a leading
0x
prefix withContractFunctionParams.addAddress()
.
-
Deprecates
Client.putNode()
. UseClient.replaceNodes()
instead. -
Depreactes
Transaction.getReceipt()
andTransaction.getRecord()
. UseTransactionId.getReceipt()
orTransactionId.getRecord()
instead. Theexecute
method onTransaction
returns aTransactionId
. -
Deprecates
ConsensusSubmitMessageTransaction
. This was renamed toConsensusMessageSubmitTransaction
to match the Java SDK.
RECEIPT_NOT_FOUND
is properly considered and internally retried withinTransactionReceiptQuery
- Contract parameter encoding with BigNumbers
Add support for Hedera Consensus Service (HCS).
-
Add
ConsensusTopicCreateTransaction
,ConsensusTopicUpdateTransaction
,ConsensusTopicDeleteTransaction
, andConsensusMessageSubmitTransaction
transactions -
Add
ConsensusTopicInfoQuery
query (returnsConsensusTopicInfo
) -
Add
MirrorClient
andMirrorConsensusTopicQuery
which can be used to listen for HCS messages from a mirror node.
Minor version bumps may add deprecations as we improve parity between SDKs or fix reported issues. Do not worry about upgrading in a timely manner. All v1+ APIs will be continuously supported.
-
Deprecated
SystemDelete#setId
; replaced withSystemDelete#setFileId
orSystemDelete#setContractId
-
Deprecated
SystemUndelete#setId
; replaced withSystemUndelete#setFileId
orSystemUndelete#setContractId
-
Deprecated
Hbar.of(val)
; replaced withnew Hbar(val)
-
Deprecated
FreezeTransaction#setStartTime(Date)
; replaced withFreezeTransaction#setStartTime(hour: number, minute: number)
-
Deprecated
FreezeTransaction#setEndTime(Date)
; replaced withFreezeTransaction#setEndTime(hour: number, minute: number)
-
All previous exception types are no longer thrown. Instead there are a set of new exception types to match the Java SDK.
HederaError
becomesHederaStatusError
ValidationError
becomesLocalValidationError
TinybarValueError
becomesHbarRangeError
MaxPaymentExceededError
becomesMaxQueryPaymentExceededError
BadKeyError
is a new exception type when attempting to parse or otherwise use a key that doesn't look like a key
- Allow passing a string for a private key in
Client.setOperator
- Correct list of testnet node addresses
No significant changes since v1.0.0-beta.5
- Fix
getCost
for entity Info queries where the entity was deleted
-
Add support for unsigned integers (incl. Arrays) for contract encoding and decoding
-
Add
AccountUpdateTransaction.setReceiverSignatureRequired
-
Add
AccountUpdateTransaction.setProxyAccountId
- Rename
ContractExecuteTransaction.setAmount()
toContractExecuteTransaction.setPayableAmount()
-
Client.forTestnet
makes a new client configured to talk to TestNet (use.setOperator
to set an operater) -
Client.forMainnet
makes a new client configured to talk to Mainnet (use.setOperator
to set an operater)
-
Renamed
TransactionReceipt.accountId
,TransactionReceipt.contractId
,TransactionReceipt.fileId
, andTransactionReceipt.contractId
toTransactionReceipt.getAccountId()
, etc. to add an explicit illegal state check as these fields are mutually exclusive -
Renamed
TransactionRecord.contractCallResult
toTransactionRecord.getContractExecuteResult()
-
Renamed
TransactionRecord.contractCreateResult
toTransactionRecord.getContractCreateResult()
TransactionBuilder.setMemo
is renamed toTransactionBuilder.setTransactionMemo
to avoid confusion as there are 2 other kinds of memos on transactions
- Fix usage on Node versions less than 12.x
-
CallParams
is removed in favor ofContractFunctionParams
and closely mirrors type names from solidityaddInt32
addInt256Array
addString
- etc.
-
ContractFunctionResult
now closely mirrors the solidity type namesgetInt32
- etc.
-
setFunctionParams(params)
onContractCallQuery
andContractExecuteTransaction
is nowsetFunction(name, params)
-
ContractLogInfo.topicList
->ContractLogInfo.topics
-
FileInfo.deleted
->FileInfo.isDeleted
-
FileContentsQuery.execute
now directly returnsUint8Array
-
ContractRecordsQuery.execute
now directly returnsTransactionRecord[]
-
AccountAmount.amount
(String
) ->AccountAmount.amount
(Hbar
) -
TransactionReceipt
receiverSigRequired
->isReceiverSignatureRequired
autoRenewPeriodSeconds
->autoRenewPeriod
-
Remove incorrect local validation for FileCreateTransaction and FileUpdateTransaction
-
Any
key
fields on response types (e.g.,AccountInfo
) are nowPublicKey
and can be any of the applicable key types -
Fix transaction back-off when BUSY is returned
-
Default autoRenewPeriod on ContractCreate appropriately
-
Client constructor takes the network as
{ network: ... }
instead of{ nodes: ... }
-
Transactions and queries do not take
Client
in the constructor; instead,Client
is passed toexecute
. -
Removed
Transaction.executeForReceipt
andTransaction.executeForRecord
These methods have been identified as harmful as they hide too much. If one fails, you do not know if the transaction failed to execute; or, the receipt/record could not be retrieved. In a mission-critical application, that is, of course, an important distinction.
Now there is only
Transaction.execute
which returns aTransactionId
. If you don't care about waiting for consensus or retrieving a receipt/record in your application, you're done. Otherwise you can now use anyTransactionId
and ask for the receipt/record (with a stepped retry interval until consensus) withTransactionId.getReceipt
andTransactionId.getRecord
.v0.7.x and below
let newAccountId = new AccountCreateTransaction(hederaClient) .setKey(newKey.publicKey) .setInitialBalance(1000) .executeForReceipt().accountId; // TransactionReceipt
v0.8.x and above
let newAccountId = new AccountCreateTransaction() .setKey(newKey.publicKey) .setInitialBalance(1000) .execute(hederaClient) // TranactionId .getReceipt(hederaClient).accountId; // TransactionReceipt
-
Rename
setPaymentDefault
tosetPaymentAmount
-
All transaction and query types that were in the Java SDK but not yet in the JS SDK (GetBySolidityIdQuery, AccountStakersQuery, etc.)
-
TransactionId.getReceipt
-
TransactionId.getRecord
-
Transaction.toString
. This will dump the transaction (incl. the body) to a stringified JSON object representation of the transaction. Useful for debugging. -
A default of 1 Hbar is now set for both maximum transaction fees and maximum query payments.
-
Smart Contract type encoding and decoding to match Java.
-
To/From string methods on AccountId, FileId, etc.
-
Internal retry handling for Transactions and Queries (incl. BUSY)
Transaction
andQuery
types related to claims