AccountId
is composed of a <shardNum>.<realmNum>.<accountNum> (eg. 0.0.10).shardNum
) represents the shard number (shardId
). It will default to 0 today, as Hedera only performs in one shard.realmNum
) represents the realm number (realmId
). It will default to 0 today, as realms are not yet supported.accountNum
) represents the account number (accountId
)AccountId
. When an AccountId
is specified, be sure all three values are included.new AccountId(<shardNum>,<realmNum>,<accountNum>)
AccountId
with 0 for shardNum
and realmNum
(e.g., 0.0.<accountNum>
)AccountId.fromString(<account>)
AccountId
from a string formatted as <shardNum>.<realmNum>.<accountNum>AccountId.fromSolidityAddress(<address>)
AccountId
from a solidity address in string formatAccountId.fromBytes(bytes)
AccountId
from bytesAccountId.toSolidityAddress()
AccountID
AccountId.toString()
AccountID
from stringAccountId.aliasKey
AccountID
AccountId.aliasEvmAddress
AccountID
AccountId.toBytes()
AccountID
from bytesFileId
is composed of a <shardNum>.<realmNum>.<fileNum> (eg. 0.0.15).shardId
). It will default to 0 today, as Hedera only performs in one shard.realmId
). It will default to 0 today, as realms are not yet supported.FileId
is requested, be sure all three values are included.new FileId(<shardNum>,<realmNum>,<fileNum>)
FileId
with 0 for shardNum
and realmNum
(e.g., 0.0.<fileNum>
)FileId.fromString()
FileId
from a string formatted asFileId.fromSolidityAddress()
FileId
from a solidity address in string formatFileId.ADDRESS_BOOK
FileId.EXCHANGE_RATES
FileId.FEE_SCHEDULE
ContractId
is composed of a <shardNum>.<realmNum>.<contractNum> (eg. 0.0.20).shardId
). It will default to 0 today, as Hedera only performs in one shard.realmId
). It will default to 0 today, as realms are not yet supported.ContractId
. When an ContractId
is requested, be sure all three values are included. ContractId's are automatically assigned when you create a new smart contract.new ContractId(<shardNum>,<realmNum>,<contractNum>)
ContractId
with 0 for shardNum
and realmNum
(e.g., 0.0.<contractNum>
)ContractId.fromString(<account>)
ContractId
from a string formatted asContractId.fromSolidityAddress(<address>)
ContractId
from a solidity address in string format [deprecated use ContractId.fromEvmAddres()]
ContractId.fromEvmAddress(<shard>, <realm>, <evmAddress>)
ContractId
from evm addresstopicId
is composed of a <shardNum>.<realmNum>.<topicNum> (eg. 0.0.100).shardId
). It will default to 0 today, as Hedera only performs in one shard.realmId
). It will default to 0 today, as realms are not yet supported.topicId
)new ConsensusTopicId(<shardNum>,<realmNum>,<topicNum>)
TopicId
with 0
for shardNum
and realmNum
(e.g., 0.0.<topicNum>
)fromString(<topic>)
ConsensusTopicId.toString()