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.
- A bug where optional fields for
NodeUpdateTransaction
were being set as default values.
- New api for creating client with mirror network -
forMirrorNetwork
- Do not shut down externally provided executor
- Fix
IllegalStateException
when specific node id is not present in address book
- Update protobufs from
hedera-services
client.setNetworkFromAddressBook
updates the address book by default
addBytes4
andaddBytes4Array
methods forContractFunctionParameters
- Support ports that are not well known for use with port forwarding
setFileId
resetscontractId
, and similarly, whensetContractId
resetsfileId
- Android runtime errors for API levels 26-33.
- The ability to create multiple Clients using shared
ExecutorService
closeChannels
method toClient
to close the channels without closing the executor- New method to update security parameters when updating the addressbook
- handling of
BUSY
status code
TokenAirdropTransaction
,TokenClaimAirdropTransaction
,TokenCancelAirdropTransaction
(HIP-904)
- handling of
FEE_SCHEDULE_FILE_PART_UPLOADED
status code
NodeCreateTransaction
,NodeUpdateTransaction
,NodeDeleteTransaction
(part of HIP-869)
- updated examples
- updated
bouncycastle
dependency - updated
protoc
dependency - other various codebase chores
- Token Reject functionality (part of HIP-904)
- Token Reject functionality (part of HIP-904)
toStandardECDSAsecp256k1PrivateKeyCustomDerivationPath
function toMnemonic
fromBytes
function toKey
- build scripts rework
- handling of
PLATFORM_NOT_ACTIVE
status code when callinggetReceipt()
orgetRecord()
- build scripts fix
- paths in examples/README.md
toStandardECDSAsecp256k1PrivateKeyCustomDerivationPath
function toMnemonic
fromBytes
function toKey
- build scripts rework
- handling of
PLATFORM_NOT_ACTIVE
status code when callinggetReceipt()
orgetRecord()
- possibility to change or remove existing keys from a token (HIP-540)
AccountBalanceQuery
,AccountInfoQuery
, andContractInfoQuery
get all the data from consensus nodes again
- add
decimal
field toTokenRelationship
class
AccountBalanceQuery
,AccountInfoQuery
, andContractInfoQuery
get part of the data from the Mirror Node REST API (HIP-367)- improved documentation in repository
- updated protobufs
- undeprecate
AccountBalance.tokens
,AccountBalance.tokenDecimals
,AccountInfo.tokenRelationships
,ContractInfo.tokenRelationships
TokenRelationship.symbol
, useTokenInfo.symbol
insteadAccountId.populateAccountNumAsync
, useAccountId.populateAccountNum
insteadAccountId.populateAccountEvmAddressAsync
, useAccountId.populateAccountEvmAddress
insteadContractId.populateContractNumAsync
, useContractId.populateContractNum
instead
- METADATA key and possibility to update NFT metadata (HIP-657)
- Fungible Token Metadata Field (HIP-646)
- NFT Collection Token Metadata Field (HIP-765)
- a method to calculate the recoveryId for ECDSA signatures
- improved documentation in repository
- updated protobufs
- METADATA key and possibility to update NFT metadata (HIP-657)
- Fungible Token Metadata Field (HIP-646)
- NFT Collection Token Metadata Field (HIP-765)
- improved documentation in repository
- updated protobufs
- possibility to optionally send transaction data without required transaction fields (HIP-745)
signerNonce
field toContractFunctionResult
(HIP-844)
- removed
streamsupport
dependency
Transaction.fromBytes()
andTransaction.getSignatures()
throw an exception for transactions signed using an ECDSA key- spurious
INVALID_TRANSACTION_START
inTransactionId.generate()
populateAccountEvmAddress
andpopulateAccountEvmAddressAsync
toAccountId
- duplicate transaction IDs at high TPS (>25K)
- android compatibility issues
- GRPC configurations
addBoolArray
function toContractFunctionParameters
java.lang.VerifyError
exception in examples
- updated addressbooks
- improved timeout handling
- Timeout for TransactionResponse.getReceipt not working well
contractNonces
toContractFunctionResult
- Support for ECDSA keys generated by OpenSSL
- Custom logger used in
Client
andExecutable
- ThreeTen dependency
- Jabel dependency
- future-converter-java8-guava dependency
- sdk-jdk7 artifact
- Minimum Java version to 17
- Minimum supported Android version to 8
- The
transactionId
nanoseconds are now left padded with 0s for 9 chars - Importing and exporting ECDSA keys to DER format is now compatible with OpenSSL
- Alias support in
AccountCreateTransaction
CreateAccountWithAliasExample
CreateAccountWithAliasAndReceiverSignatureRequiredExample
- Remove the insecure port of mirror nodes
- Documentation for all API classes, methods and fields
- Delegate spender functionality to
AccountAllowanceApproveTransaction
- Some failing integration tests
TransactionRecord.evmAddress
PublicKeyECDSA.toEvmAddress()
AccountId.fromEvmAddress()
AccountId.fromString()
now supports EVM addressTransferTransaction.addHbarTransfer()
now supports EVM addressAutoCreateAccountTransferTransactionExample
TransferUsingEvmAddressExample
AccountCreationWaysExample
TRANSACTION_HAS_UNKNOWN_FIELDS
andACCOUNT_IS_IMMUTABLE
inStatus
toStandard[Ed25519|ECDSAsecp256k1]PrivateKey()
toMnemonic
fromSeed[ED25519|ECDSAsecp256k1]()
toPrivateKey
[PrivateKeyED25519|PrivateKeyECDSA].fromSeed()
Bip32Utils
class
- Misleading logging when an unhealthy node is hit
- Default mirror node for mainnet is now
mainnet-public.mirrornode.hedera.com:443
instead ofmainnet-public.mirrornode.hedera.com:5600
- Default mirror node for testnet is now
testnet.mirrornode.hedera.com:443
instead ofhcs.testnet.mirrornode.hedera.com:5600
- Default mirror node for previewnet is now
previewnet.mirrornode.hedera.com:443
instead ofhcs.previewnet.mirrornode.hedera.com:5600
- ECDSA secp256k1 keys now support derivation
Mnemonic.toPrivateKey()
useMnemonic.toStandard[Ed25519|ECDSAsecp256k1]PrivateKey
insteadPrivateKey.fromMnemonic()
useMnemonic.toStandard[Ed25519|ECDSAsecp256k1]PrivateKey
instead
freezeWith()
andsign()
toContractCreateFlow
Executable.execute(Client client, Duration timeout)
now sets gRPC deadline to the underlying gRPC request- Transaction sometimes being reported as duplicate when submitting large number of transactions
RejectedExecutionException
under heavy loadnodes
not clearing when reusing transaction- BIP-39 - unicode mnemonic passphrases are normalized to NFKD
- Renamed allowanceSpenderAccountId to spenderId in TokenNftInfo
Client.close()
now tracks and automatically unsubscribes from Mirror Node Topic Queries
ContractHelper
now supportsbytecode
property in compiled contract JSON.ZeroTokenOperationsExample
TransactionResponse.[get|set]ValidateStatus()
TransactionReceipt.validateStatus()
TransactionRecord.validateReceiptStatus()
TransactionReceipt.transactionId
TopicUpdateTransaction.[get|set]ExpirationTime()
CustomFee.[set|get]AllCollectorsAreExempt()
ExemptCustomFeesExample
AccountCreateWithHtsExample
- Execute with a timeout can ignore timeout and block indefinitely in CI tests
- The Android example can now be run with the local SDK version
AccountCreateTransaction.[set|get]alias[Key|EvmAddress]()
ContractCreateFlow.[set|get]MaxChunks()
Status.[to|from]ResponseCode()
ContractCreateFlow.[set|get]AutoRenewAccountId()
- Client now automatically updates the network via a mirror node query at regular intervals. You can set/get the interval with
Client.[set|get]NetworkUpdatePeriod()
- Client can now be set from a
NodeAddressBook
withClient.setNetworkFromAddressBook()
Client.setMirrorTransportSecurity()
Client.mirrorIsTransportSecurity()
SolidityPrecompileExample
- Improved PEM file support via
PrivateKey.fromPem()
AccountId
s withaliasEvmAddress
now serialize/deserialize correctly.TokenCreateTransaction
's default fee is now 40 Hbar.validateChecksum()
,toStringWithChecksum()
,hashCode()
,equals()
, andcompareTo()
now function correctly forAccountId
s withaliasEvmAddress
es.- Changed the default transaction fee for
AccountCreateTransaction
to 5 Hbar. PrivateKey.is[ED25519|ECDSA]()
is now correct for ED25519 private keys.- Default mirror node for mainnet is now
mainnet-public.mirrornode.hedera.com:443
instead ofhcs.mainnet.mirrornode.hedera.com:5600
- Thread leak in
Client
Client.setTransportSecurity()
now updates mirror network
ContractUpdateTransaction.clearStaked[Account|Node]Id()
[Contract|Account]CreateTransaction.[set|get]ProxyAccountId()
with no replacementContractCreateFlow.[set|get]ProxyAccountId()
with no replacement
ContractCreateFlow.setMaxAutomaticTokenAssociations()
ContractFunctionResult.senderAccountId
now serializes correctlyCustomRoyaltyFee
now clones andtoString()
s correctlyScheduleCreateTransaction.expirationTime
now deserializes correctlyScheduleInfo
now deserializes correctly- Made
StakingInfo.[to|from]Bytes()
public TransactionReceipt.topicRunningHash
nowtoString()
s correctlyTransactionRecord.[prngBytes|prngNumber|tokenNftTransfers]
now serializes/deserializes correctly[Account|Contract]UpdateTransaction.getDeclineStakingReward()
now returns@Nullable Boolean
instead ofboolean
, and no longer throws aNullPointerException
Client.setNodeMaxBackoff()
- Undeprecate
*ContractId.fromSolidityAddress()
TokenNftInfo.allowanceSpenderAccountId
AccountBalance.[tokens|tokenDecimals]
use a mirror node query insteadAccountInfo.tokenRelationships
use a mirror node query insteadContractInfo.tokenRelationships
use a mirror node query instead
TokenNftInfo.[to|from]Bytes()
PrngThansaction
TransactionRecord.prngBytes
TransactionRecord.prngNumber
ContractFunctionResult.stateChanges
- Use mirror node for contract traceability insteadContractStateChanges
StorageChange
ContractCreateTransaction.autoRenewAccountId
ContractUpdateTransaction.autoRenewAccountId
HbarUnit.getSymbol()
SemanticVersion.toString()
Executable.setRequestListener()
Executable.setResponseListener()
PrivateKey.fromString()
should support0x
prefixManagedNodeAddress.equals()
should compare ports
ScheduleInfo.waitForExpiry
ScheduleInfo.ledgerId
"
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
- Protobuf requests and responses will be logged in hex
- There should be three artifacts now,
sdk-jdk7
,sdk
, andsdk-full
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
- add missing javadoc to the sdk files
TransactionResponse.scheduledTransactionId
with no replacement.
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
CustomRoyaltyFee.getFallbackFee()
TransactionResponse.get[Receipt|Record]Query()
AccountAllowanceAdjustTransaction
with no replacement.AccountAllowanceDeleteTransaction
ContractFunctionResult.[gas|hbarAmount|contractFunctionParametersBytes]
TransactionRecord.[hbar|token|tokenNft]AllowanceAdjustments
.AccountInfo.[hbar|token|tokenNft]Allowances
.AccountAllowanceExample
- License Headers
AccountAllowanceDeleteTransaction
ContractFunctionResult.[gas|hbarAmount|contractFunctionParametersBytes]
AccountAllowanceExample
- License Headers
AccountAllowanceAdjustTransaction.revokeTokenNftAllowance()
with no replacement.
AccountInfoFlow
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
ContractFunctionParameters
integers with different bit widths.
Transaction.fromBytes()
now verifies that transaction bodies in transaction list match.
AccountInfoFlow
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
ContractFunctionParameters
integers with different bit widths. CreateTopicExample
GetAccountInfoExample
MultiSigOfflineExample
ScheduledTransactionMultiSigThresholdExample
ScheduleIdenticalTransactionExample
SignTransactionExample
Transaction.fromBytes()
now verifies that transaction bodies in transaction list match.ConstructClientExample
CreateSimpleContractExample
CreateStatefulContractExample
DeleteAccountExample
AccountAllowanceApproveTransaction.approve[Hbar|Token|TokenNft]Allowance()
AccountAllowanceApproveTransaction.get[Hbar|Token|TokenNft]Approvals()
AccountAllowanceAdjustTransaction.[grant|revoke][Hbar|Token|TokenNft]Allowance()
AccountAllowanceAdjustTransaction.[grant|revoke]TokenNftAllowanceAllSerials()
TransactionRecord.[hbar|token|tokenNft]AllowanceAdjustments
TransferTransaction.addApproved[Hbar|Token|Nft]Transfer()
AccountAllowanceApproveTransaction.get[Hbar|Token|TokenNft]Allowances()
, useget*Approvals()
instead.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.
ContractCreateFlow
to simplify contract creation.PrivateKey.isED25519()
PrivateKey.isECDSA()
PrivateKeyED25519.isED25519()
PrivateKeyED25519.isECDSA()
PrivateKeyECDSA.isED25519()
PrivateKeyECDSA.isECDSA()
PublicKey.isED25519()
PublicKey.isECDSA()
PublicKeyED25519.isED25519()
PublicKeyED25519.isECDSA()
PublicKeyECDSA.isED25519()
PublicKeyECDSA.isECDSA()
- Regenerated AccountIDTest.snap
AddressBookQuery
- Checksums. As a consequence, all previously generated checksums for
testnet
orpreviewnet
will now be regarded as incorrect. Please generate new checksums for testnet and previewnet where necessary.
AccountUpdateTransaction.[set|get]AliasKey()
with no replacement.AccountAllowance[Adjust|Approve]Transaction.add*AllowanceWithOwner()
- Checksums. As a consequence, all previously generated checksums for
testnet
orpreviewnet
will now be regarded as incorrect. Please generate new checksums for testnet and previewnet where necessary.
AccountUpdateTransaction.[set|get]AliasKey()
with no replacement.
ContractCreateFlow
to simplify contract creation.PrivateKey.isED25519()
PrivateKey.isECDSA()
PrivateKeyED25519.isED25519()
PrivateKeyED25519.isECDSA()
PrivateKeyECDSA.isED25519()
PrivateKeyECDSA.isECDSA()
PublicKey.isED25519()
PublicKey.isECDSA()
PublicKeyED25519.isED25519()
PublicKeyED25519.isECDSA()
PublicKeyECDSA.isED25519()
PublicKeyECDSA.isECDSA()
- Regenerated AccountIDTest.snap
AccountAllowance[Adjust|Approve]Transaction.add*AllowanceWithOwner()
AddressBookQuery
AccountUpdateTransaction.[set|get]AliasKey()
with no replacement.
owner
field to*Allowance
classes.Executable.[set|get]GrpcDeadline()
AccountAllowanceAdjustTransaction
now deserializes correctly withTransaction.fromBytes()
owner
field to*Allowance
classes.Executable.[set|get]GrpcDeadline()
AccountAllowanceAdjustTransaction
now deserializes correctly withTransaction.fromBytes()
- CREATE2 Solidity addresses can now be represented by a
ContractId
withevmAddress
set. ContractId.fromEvmAddress()
ContractFunctionResult.stateChanges
ContractFunctionResult.evmAddress
ContractStateChange
StorageChange
- New response codes.
ChunkedTransaction.[set|get]ChunkSize()
, and changed default chunk size forFileAppendTransaction
to 2048.
TransactionId.setRegenerateTransactionId()
Transaction.execute(client, timeout)
ContractId.fromSolidityAddress()
, useContractId.fromEvmAddress()
instead.
- CREATE2 Solidity addresses can now be represented by a
ContractId
withevmAddress
set. ContractId.fromEvmAddress()
ContractFunctionResult.stateChanges
ContractFunctionResult.evmAddress
ContractStateChange
StorageChange
- New response codes.
ChunkedTransaction.[set|get]ChunkSize()
, and changed default chunk size forFileAppendTransaction
to 2048.AccountAllowance[Adjust|Approve]Transaction
AccountInfo.[hbar|token|tokenNft]Allowances
[Hbar|Token|TokenNft]Allowance
[Hbar|Token|TokenNft]Allowance
TransferTransaction.set[Hbar|Token|TokenNft]TransferApproval()
TransactionId.setRegenerateTransactionId()
Transaction.execute(client, timeout)
ContractId.fromSolidityAddress()
, useContractId.fromEvmAddress()
instead.
- Support for regenerating transaction IDs on demand if a request
responsed with
TRANSACITON_EXPIRED
- Support for regenerating transaction IDs on demand if a request
responds with
TRANSACTION_EXPIRED
LedgerId
Client.[set|get]LedgerId()
TransferTransaction.addTokenTransferWithDecimals()
,TransferTransaction.getTokenIdDecimals()
.ledgerId
fields inAccountInfo
,ContractInfo
,FileInfo
,ScheduleInfo
,TokenInfo
,TokenNftInfo
, andTopicInfo
UNEXPECTED_TOKEN_DECIMALS
response code.PublicKey.verifyTransaction()
should use the correct protobuf field per key typeAccountId.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]()
DelegateContractId
to easily distingish between having aContractId
andDelegateContractId
for a key
NetworkName
,Client.[set|get]NetworkName()
, userLedgerId
andClient.[set|get]LedgerId()
instead.PrivateKey.generate()
, usePrivateKey.generate[ED25519|ECDSA]()
instead.
LedgerId
Client.[set|get]LedgerId()
TransferTransaction.addTokenTransferWithDecimals()
,TransferTransaction.getTokenIdDecimals()
.ledgerId
fields inAccountInfo
,ContractInfo
,FileInfo
,ScheduleInfo
,TokenInfo
,TokenNftInfo
, andTopicInfo
UNEXPECTED_TOKEN_DECIMALS
response code.
NetworkName
,Client.[set|get]NetworkName()
, userLedgerId
andClient.[set|get]LedgerId()
instead.
PublicKey.verifyTransaction()
should use the correct protobuf field per key type
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.
- Support for adding multiple addresses for the same node to the network.
*Id
objects are now comparable.- Adds
createdContractIds
toContractFunctionResult
- Makes
AccountBalance.[to|from]Bytes()
public. - New smart contract response codes
- New smart contract response codes
- Implement gRPC connecting timeouts to prevent
TRANSACTION_EXPIRED
from occurring due to nodes not responding ManagedNodeAddress
will no longer used named regex groups
- Deprecated
ContractCallQuery.[set|get]MaxResultSize()
with no replacement. - Deprecated
ContractUpdateTransaction.[set|get]BytecodeFileId()
with no replacement.
- Deprecated
ContractCallQuery.[set|get]MaxResultSize()
with no replacement. - Deprecated
ContractUpdateTransaction.[set|get]BytecodeFileId()
with no replacement.
- Support for toggling TLS for both mirror network and services network
FreezeType
FreezeTransaction.[get|set]FreezeType()
FreezeTransaction.[get|set]FileId()
FreezeTransaction.[get|set]FileHash()
FreezeTransaction.[get|set]UpdateFileId()
, use.[get|set]FileId()
instead.FreezeTransaction.[get|set]UpdateFileHash()
, use.[get|set]FileHash()
instead.
- Make
TokenPauseTransaction
andTokenUnpauseTransaction
constructors public
TokenPauseTransaction
TokenUnpauseTransaction
TokenPauseStatus
pauseKey
field inTokenUpdateTransaction
andTokenCreateTransaction
pauseKey
andpauseStatus
fields inTokenInfo
(TokenInfoQuery
)
- Added keep alive timeout of 10 seconds to all gRPC connections
Client.setTransportSecurity()
- Enable/Disable TLS for any node
- Updated
*.[execute|getReceipt|getRecord]()
methods to not use the asynchronous version underneath
Transaction[Receipt|Record]Query
will no longer error whenTransactionReceipt.status
is notSUCCESS
. Only*.get[Receipt|Record]()
should error whenTransactionReceipt.status
is notSUCCESS
.
NftId.[to|from]string()
now uses format1.2.3/4
instead of1.2.3@4
TokenNftInfoQuery.setNftId()
- Support for automatic token associations
TransactionRecord.automaticTokenAssociations
AccountInfo.maxAutomaticTokenAssociations
AccountCreateTransaction.maxAutomaticTokenAssociations
AccountUpdateTransaction.maxAutomaticTokenAssociations
TokenRelationship.automaticAssociation
TokenAssociation
networkName
as a supported config file options
NftId.[to|from]string()
now uses format1.2.3/4
instead of1.2.3@4
TokenNftInfoQuery.setNftId()
- Support for automatic token associations
TransactionRecord.automaticTokenAssociations
AccountInfo.maxAutomaticTokenAssociations
AccountCreateTransaction.maxAutomaticTokenAssociations
AccountUpdateTransaction.maxAutomaticTokenAssociations
TokenRelationship.automaticAssociation
TokenAssociation
TokenNftInfoQuery.byNftId()
- UseTokenNftInfoQuery.setNftId()
insteadTokenNftInfoQuery.byAccountId()
with no replacementTokenNftInfoQuery.byTokenId()
with no replacementTokenNftInfoQuery.[set|get]Start()
with no replacementTokenNftInfoQuery.[set|get]End()
with no replacementClient.networkName
can now be specified via config file
Account[Create|Update]Transaction.[get|set]MaxAutomaticTokenAssociations
TokenAssociation
andTransactionRecord.automaticTokenAssociations
AccountInfo.maxAutomaticTokenAssociations
TokenRelationship.automaticAssociation
TokenNftInfoQuery.setNftId()
- New status codes
TokenNftInfoQuery.[by|get]AccountId()
with no replacementTokenNftInfoQuery.[by|get]TokenId()
with no replacementTokenNftInfoQuery.[set|get]Start()
with no replacementTokenNftInfoQuery.[set|get]End()
with no replacementTokenNftInfoQuery.byNftId()
use.setNftId()
instead
- TLS connector failing when the networks address book did not have cert hashes
- Support for TLS connections with Hedera Services nodes when network addresses end in
50212
or443
- Added
FeeAssessmentMethod
. - Added
[get|set]AssessmentMethod()
toCustomFractionalFee
- Added
CustomRoyaltyFee
- Added
payerAccountIdList
toAssessedCustomFee
- Added fields to
FreezeTransaction
- Added
[min|max]Backoff
toClient
andExecutable
- Bugs in [to|from]Bytes() in
TopicUpdateTransaction
andTokenUpdateTransaction
- Deprecated
Client.setMax[TransactionFee|QueryPayment]()
, addedClient.setDefaultMax[TransactionFee|QueryPayment]()
andClient.getDefaultMax[TransactionFee|QueryPayment]()
ChunkedTransaction.getAllSignatures()
Transaction.getSignatures()
incorrectly building signature listTopicMessageQuery
pending messages being discarded on retryChunkedTransaction.getAllTransactionHashesPerNode()
incorrectly building signature mapScheduleInfo.getScheduledTransaction()
still not setting max fee appropriately
*.setSerials()
will now clone list passed in to prevent changes
Client.getRequestTimeout()
Client.pingAsync()
andClient.pingAllAsync()
useful for validating all nodes within the network before executing any real requestClient.[set|get]MaxAttempts()
default max attempts for all transactionsClient.[set|get]MaxNodeAttempts()
set max attempts to retry a node which returns bad gRPC status such asUNAVAILBLE
Client.[set|get]NodeWaitTime()
change the default delay before attempting a node again which has returned a bad gRPC statusClient.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
Client.[set|get]NetworkName()
declare which network this client is connected to, for purposes of checksum validation.CustomFixedFee.[set|get]HbarAmount()
makes this fixed fee an Hbar fee of the specified amountCustomFixedFee.setDenominatingTokenToSameToken()
this fixed fee will be charged in the same token.
*Id.validate()
use*Id.validateChecksum()
instead
ScheduleInfo.getTransaction()
incorrectly setting max transaction fee to 2 Hbars
PrivateKey.legacyDerive()
should behave the same as other SDKs
*.addCustomFee()
use*.setCustomFees()
instead
TokenUpdateTransaction.clearAutoRenewAccountId()
- Scheduled
TransferTransaction
- 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
- Sign on demand functionality which should improve performance slightly
AccountBalance.tokenDecimals
incorrectly usingLong
as the key in the map instead ofTokenId
. Since this was a major bug makingtokenDecimals
completely unusable, the change has been made directly ontokenDecimals
instead of deprecating and adding another field.
- Support for entity ID checksums which are validated whenever a request begins execution. This includes the IDs within the request, the account ID within the transaction ID, and query responses will contain entity IDs with a checksum for the network the query was executed on.
- Node validation before execution
- Null checks for most parameters to catch stray
NullPointerException
's
RequestType
missingUNCHECKED_SUBMIT
fortoString()
andvalueOf()
methods.FeeSchedules
incorrectly serializing nulls causingNullPointerException
-
Add
FeeSchedule
type to allow a structured parse of file0.0.111
-
Support for setting
maxBackoff
,maxAttempts
,retryHandler
, andcompletionHandler
inTopicMessageQuery
-
Default logging behavior to
TopicMessageQuery
if an error handler or completion handler was not set -
(Internal) CI is run significantly more often, and against previewnet and the master branch of hedera-services.
-
Expose
tokenDecimals
fromAccountBalance
-
TopicMessageQuery
retry handling; this should retry on more gRPC errors -
TopicMessageQuery
max retry timeout; before this would could wait up to 4m with no feedback -
Client
should be more thread safe
- Support
memo
for Tokens, Accounts, and Files.
- Scheduled transaction support:
ScheduleCreateTransaction
,ScheduleDeleteTransaction
, andScheduleSignTransaction
- HMAC Calculation Does Not Include IV [NCC-E001154-010]
- Non-Constant Time Lookup of Mnemonic Words [NCC-E001154-009]
- Decreased
CHUNK_SIZE
4096->1024 and increased default max chunks 10->20 - Remove use of
computeIfAbsent
andputIfAbsent
from JDK7 builds
new TransactionId(AccountId, Instant)
- UseTransactionId.withValidStart()
instead.
TransferTransaction.addTokenTransfer()
was correctly adding tokens- HMAC Calculation Does Not Include IV [NCC-E001154-010]
- Non-Constant Time Lookup of Mnemonic Words [NCC-E001154-009]
- Decreased
CHUNK_SIZE
4096->1024 and increased default max chunks 10->20 - Renamed
ScheduleInfo.getTransaction()
->ScheduleInfo.getScheduledTransaction()
- Remove use of
computeIfAbsent
andputIfAbsent
from JDK7 builds
- Scheduled transactions should use new HAPI protobufs
ReceiptPrecheckException
should be thrown when the erroring status was in theTransactionReceipt
- Removed
nonce
fromTransactionId
Transaction[Receipt|Record]Query
should not error for statusIDENTICAL_SCHEDULE_ALREADY_CREATED
because the other fields on the receipt are present with that status.ScheduleMultiSigExample
should use updated scheduled transaction API
ScheduleCreateTransaction.addScheduledSignature()
ScheduleCreateTransaction.getScheduledSignatures()
ScheduleSignTransaction.addScheduledSignature()
ScheduleSignTransaction.getScheduledSignatures()
- Support for old
proto.Transaction
raw bytes inTransaction.fromBytes()
TransactionRecord.scheduleRef
- Reference to the scheduled transactionTransactionReceipt.scheduledTransactionId
ScheduleInfo.scheduledTransactionId
- Feature to copy
TransactionId
of a transaction being scheduled to the parentScheduleCreateTransaction
if one is set.
TransactionId.toBytes()
should supportnonce
if setTransactionId.fromBytes()
should supportnonce
if set
- Support
memo
for Tokens, Accounts, and Files. TransactionId.fromString()
should support nonce and scheduled.
TransactionId.toString()
will append?scheduled
for scheduled transaction IDs, and transaction IDs created from nonce will print in hex.
- Support for scheduled and nonce in
TransactionId
TransactionId.withNonce()
- Supports creating transaction ID with random bytes.TransactionId.[set|get]Scheduled()
- Supports scheduled transaction IDs.
TransactionId.withValidStart()
ScheduleCreateTransaction.setTransaction()
andTransaction.schedule()
not correctly setting existing signatures.
new TransactionId(AccountId, Instant)
- UseTransactionId.withValidStart()
instead.
Schedule[Create|Sign]Transaction.addScheduleSignature()
didn't save added signatures correctly.
- 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
- 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. - Rename
HederaPreCheckStatusException
toPrecheckStatusException
and deprecateHederaPreCheckStatusException
- Rename
HederaReceipStatusException
toReceipStatusException
and deprecateHederaReceipStatusException
long getAutoRenewPeriod()
->Duration getAutoRenewPeriod()
setAutoRenewPeriod(long)
->setAutoRenewPeriod(Duration)
long getExpirationTime()
->Instant getExpirationTime()
setExpirationTime(long)
->setExpirationTime(Instant)
long getAutoRenewPeriod()
->Duration getAutoRenewPeriod()
setAutoRenewPeriod(long)
->setAutoRenewPeriod(Duration)
long getExpirationTime()
->Instant getExpirationTime()
setExpirationTime(long)
->setExpirationTime(Instant)
AccountId treasury()
->AccountId treasuryAccountId()
long autoRenewPeriod()
->Duration autoRenewPeriod()
long expirationTime()
->Instant expirationTime()
- No longer support the use of
long
forHbar
parameters. Meaning you can no longer doAccountCreateTransaction().setInitialBalance(5)
and instead mustAccountCreateTransaction().setInitialBalance(new Hbar(5))
. This of course applies to more than justsetInitialBalance()
. - Any method that used to require a
PublicKey
will now requireKey
.AccountCreateTransaction.setKey(PublicKey)
is nowAccountCreateTransaction.setKey(Key)
as an example.
- All
Id
types (Account
,File
,Contract
,Topic
, andTransactionId
)- Support
fromBytes()
andtoBytes()
- No longer have the
toProto()
method.
- Support
- The use of
Duration
in the SDK will be eitherjava.time.Duration
ororg.threeten.bp.Duration
depending on which JDK and platform you're developing on. - The use of
Instant
in the SDK will be eitherjava.time.Instant
ororg.threeten.bp.Instant
depending on which JDK and platform you're developing on. - All transactions and queries will now attempt to execute on more than one node.
- More
getCostAsync
andexecuteAsync
variantsvoid executeAsync(Client)
Future executeAsync(Client, BiConsumer<O, T>)
void executeAsync(Client, Duration timeout, BiConsumer<O, T>)
void getCostAsync(Client)
Future getCostAsync(Client, BiConsumer<O, T>)
void getCostAsync(Client, Duration timeout, BiConsumer<O, T>)
- Building different types from a protobuf type is no longer supported. Use
fromBytes
instead. getSignatureCase()
is no longer accessible- Field which were
byte[]
are nowByteString
to prevent extra copy operation. This includes the response type ofFileContentsQuery
ConsensusSubmitMessageTransaction
->MessageSubmitTransaction
ConsensusTopicCreateTransaction
->TopicCreateTransaction
ConsensusTopicDeleteTransaction
->TopicDeleteTransaction
ConsensusTopicUpdateTransaction
->TopicUpdateTransaction
ConsensusTopicId
->TopicId
Ed25519PublicKey
->PublicKey
Ed25519PrivateKey
->PrivateKey
HederaNetworkException
MnemonicValidationResult
HederaConstants
ThresholdKey
useKeyList.withThreshold()
instead.
- LiveHash: Support for Hedera LiveHashes
- Key: A common base for the signing authority or key entities in Hedera may have.
Client()
->Client.forNetwork()
Client.fromFile()
->Client.fromJsonFile()
Client.replaceNodes()
->Client.setNetwork()
sign()
no longer requires offset or length parameters
writePem()
verify()
verifies the message was signed by public key
as()
->to()
asTinybar()
->toTinybars()
fromTinybar()
->fromTinybars()
negated()
getValue()
Hbar(BigDecimal, HbarUnit)
Hbar.from(long)
Hbar.from(BigDecimal)
Hbar.of()
KeyList.withThreshold()
size()
isEmpty()
contains()
containsAll()
iterator()
toArray()
remove()
removeAll()
retainAll()
clear()
toString()
Mnemonic(List<? extends CharSequence>)
->Mnemonic.fromWords() throws BadMnemonicException
ContractId(long)
toKeyProto()
implements PublicKey
meaning it can no longer be used in place of a Key
FileId(long)
fromSolidityAddress()
toSolidityAddress()
TransactionId.withValidStart()
TransactionId.generate()
Transaction.hash()
Transaction.signWithOperator()
getReceipt()
getRecord()
toProto()
setPaymentTransaction()
List<LiveHash> liveHashes
setDeleteAccountId()
->setAccountId()
- Removed
addKey()
, usesetKeys(Key...)
instead.
- Removed
addKey()
, usesetKeys(Key...)
instead.
-
Support for loading Ed25519 keys from encrypted PEM files (generated from OpenSSL).
-
Add a method to validate a mnemonic word list for accurate entry.
- Fixed
TransactionReceiptQuery
not waiting for consensus some times.
- Add additional error classes to allow more introspection on errors:
HederaPrecheckStatusException
- Thrown when the transaction fails at the node (the precheck)HederaReceiptStatusException
- Thrown when the receipt is checked and has a failing status. The error object contains the full receipt.HederaRecordStatusException
- Thrown when the record is checked and it has a failing status. The error object contains the full record.
-
Add missing
setTransferAccountId
andsetTransferContractId
methods toContractDeleteTransaction
-
Override
executeAsync
to sign by the operator (if not already)
- Deprecate
toSolidityAddress
andfromSolidityAddress
onFileId
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
Removed all deprecated APIs from v1.0.0.
-
Instead of returning
ResponseCodeEnum
from the generated protos, return a newStatus
type that wraps that and provides some Java conveniences. -
Rename
HederaException
toHederaStatusException
-
Rename
QueryBuilder.MaxPaymentExceededException
toMaxQueryPaymentExceededException
-
Change
AccountBalanceQuery
to returnHbar
(instead ofLong
) -
Change
ContractGetBytecodeQuery
to returnbyte[]
(instead of the internal proto type) -
Remove
GetBySolidityIdQuery
. Instead, you should useAccountId.toSolidityAddress
. -
Change
ContractRecordsQuery
to returnTransactionRecord[]
All changes are not immediately breaking as the previous method still should exist and be working. The previous methods are flagged as deprecated and will be removed upon v1.0
.
-
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.8.x and below
AccountId newAccountId = new AccountCreateTransaction(hederaClient) .setKey(newKey.getPublicKey()) .setInitialBalance(1000) .executeForReceipt() // TransactionReceipt .getAccountId();
v0.9.x
AccountId newAccountId = new AccountCreateTransaction() .setKey(newKey.getPublicKey()) .setInitialBalance(1000) .execute(hederaClient) // TranactionId .getReceipt(hederaClient) // TransactionReceipt .getAccountId();
-
TransactionReceipt
,AccountInfo
,TransactionRecord
, etc. now expose public final fields instead of getters (where possible and it makes sense). -
Rename
getCallResult
andgetCreateResult
togetContractExecuteResult
andgetContractCreateResult
for consistency -
TransactionBuilder.setMemo
is renamed toTransactionBuilder.setTransactionMemo
to avoid confusion as there are 2 other kinds of memos on transactions -
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)
-
TransactionId.getReceipt
-
TransactionId.getRecord
-
FileId.ADDRESS_BOOK
,FileId.FEE_SCHEDULE
,FileId.EXCHANGE_RATES
-
Experimental support for the Hedera Consensus Service (HCS). HCS is not yet generally available but if you have access the SDK can work with the current iteration of it. Due to its experimental nature, a system property must be set before use.
System.setPropery("com.hedera.hashgraph.sdk.experimental", "true")
-
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)
-
FileCreateTransaction
sets a default expiration time; fixesAUTORENEW_DURATION_NOT_IN_RANGE
. -
BUSY
is now internally retried in all cases. -
The maximum query payment is now defaulted to 1 Hbar. By default, just before a query is executed we ask Hedera how much the query will cost and if it costs under the defined maximum, an exact payment is sent.
Transaction
andQuery
types related to claims
Fixes compatibility with Android.
- The
Key
interface has been renamed toPublicKey
- You are now required to depend on the gRPC transport dependency for your specific environment
<!-- SELECT ONE: -->
<!-- netty transport (for server or desktop applications) -->
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-netty-shaded</artifactId>
<version>1.24.0</version>
</dependency>
<!-- netty transport, unshaded (if you have a matching Netty dependency already) -->
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-netty</artifactId>
<version>1.24.0</version>
</dependency>
<!-- okhttp transport (for lighter-weight applications or Android) -->
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-okhttp</artifactId>
<version>1.24.0</version>
</dependency>
// SELECT ONE:
// netty transport (for high throughput applications)
implementation 'io.grpc:grpc-netty-shaded:1.24.0'
// netty transport, unshaded (if you have a matching Netty dependency already)
implementation 'io.grpc:grpc-netty:1.24.0'
// okhttp transport (for lighter-weight applications or Android)
implementation 'io.grpc:grpc-okhttp:1.24.0'