diff --git a/.circleci/config.yml b/.circleci/config.yml index 9348941c..1ff941b8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -30,7 +30,7 @@ jobs: # fallback to using the latest cache if no exact match is found - v1-dependencies- - - run: mvn dependency:go-offline + - run: gradle build - save_cache: paths: diff --git a/.gitignore b/.gitignore index 36211a54..603415d3 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,11 @@ javadoc/ /build/ .gradle -.idea \ No newline at end of file +.idea +/src/main/proto/ +/checkouts/ +/checkouts/hedera-protobufs/ +/checkouts/hedera-protobufs/.gradle/file-system.probe +/checkouts/hedera-protobufs/mirror/.gradle/file-system.probe +/checkouts/hedera-protobufs/services/.gradle/file-system.probe +/checkouts/hedera-protobufs/streams/.gradle/file-system.probe diff --git a/README.md b/README.md index c980d274..812d6649 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,15 @@ # Hedera Hashgraph Protocol Buffer API Message Definitions -The Hedera Hashgraph API is implemented with protocol buffers, Google's language-neutral, platform-neutral, extensible mechanism for serializing structured data. This repository contains the current version of the files used to define the API. +The Hedera Hashgraph API is implemented with protocol buffers, Google's language-neutral, platform-neutral, extensible mechanism for serializing structured data. This repository is responsable for building the Java libraries for the Hedera HAPI protobufs. The source proto files are in https://github.com/hashgraph/hedera-protobufs , this repo just pulls a copy of the source from there and build Java Libraries. -## Documentation +## Configure build in gradle.properties + - `version` is the version for the built artifacts + - `hapiBranchOrTag` is the **branch** or **tag** version of HAPI repo, who's source you would like to use in the build. -The protobuf files themselves contain detailed comments which help understand not only the message itself but also some of the features and capabilities of the Hedera Hashgraph network. +## Build -The `/docs` folder of this project contains automatically generated documents in html and markdown format to help navigate through the message definitions. - -[NestedDoc.html](https://github.com/hashgraph/hedera-protobuf/blob/master/docs/NestedDoc.html) - nested HTML document to help navigate messages that contain other message definitions (large document that takes a while to open) -[NotNestedDoc.html](https://github.com/hashgraph/hedera-protobuf/blob/master/docs/NotNestedDoc.html) - flat HTML document -[NotNestedDoc.md](https://github.com/hashgraph/hedera-protobuf/blob/master/docs/NotNestedDoc.md) - flat markdown document - -__Note__: the HAPI.html document is a large document and may take a few seconds to load in a browser. + - `gradle assemble` will build the new jars + - `gradle publishToMavanLocal` will build and publish into your local maven repo ## Additional resources @@ -21,27 +18,3 @@ If you are unfamiliar with protocol buffers (or need a refresher), you may consu - Protocol Buffers : https://developers.google.com/protocol-buffers/ - gRPC : https://grpc.io -## Deploy to Maven - -*You will need the appropriate credentials to do so* - -- Update the version number in the `pom.xml` (ensure pom.xml has x.x.x-SNAPSHOT for version) -- Build the project with `mvn clean install` -- Re-generate the documentation - -```shell -cd docgenerator -java -jar proto2html.jar "HAPI Documentation" ../src/main/proto/ ../docs -``` - -```shell -cd .. -``` - -Commit all changes to github - -`mvn release:clean release:prepare` (you will be prompted to confirm version numbers, etc...) - -`mvn release:perform` - -navigate to Nexus Repository Manager https://oss.sonatype.org/index.html#stagingRepositories and release the newly created repository. diff --git a/build.gradle.kts b/build.gradle.kts index b83b96f1..210cf5ad 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -32,16 +32,37 @@ java { withSourcesJar() } +tasks.clean { + doFirst { + delete("${rootDir}/src/main/proto") + } +} + +sourceSets { + main { + proto { + srcDir("checkouts/hedera-protobufs/streams") + srcDir("checkouts/hedera-protobufs/services") + srcDir("checkouts/hedera-protobufs/mirror") + exclude { file: FileTreeElement -> + return@exclude file.file.endsWith("mirror/consensus_service.proto") + } + } + } +} + protobuf { + protoc{ + artifact = "com.google.protobuf:protoc:3.21.0" + } + plugins { create("grpc").artifact = "io.grpc:protoc-gen-grpc-java:1.50.2" } generateProtoTasks { all().forEach { task: GenerateProtoTask -> -// task.builtins["java"].options.add("lite") task.plugins.create("grpc") -// task.plugins.create("grpc").options.add("lite") } } } diff --git a/docgenerator/proto2html.jar b/docgenerator/proto2html.jar deleted file mode 100644 index d613fc38..00000000 Binary files a/docgenerator/proto2html.jar and /dev/null differ diff --git a/docgenerator/proto2html.templ b/docgenerator/proto2html.templ deleted file mode 100644 index 03e4c56c..00000000 --- a/docgenerator/proto2html.templ +++ /dev/null @@ -1,208 +0,0 @@ - - - - - ---TITLE--- - - - - - - - - - diff --git a/docs/NestedDoc.html b/docs/NestedDoc.html deleted file mode 100644 index 7d73fe03..00000000 --- a/docs/NestedDoc.html +++ /dev/null @@ -1,116726 +0,0 @@ - HAPI Documentation

Table of Contents

-

-

- -
-

-
\ No newline at end of file diff --git a/docs/NotNestedDoc.html b/docs/NotNestedDoc.html deleted file mode 100644 index d7725552..00000000 --- a/docs/NotNestedDoc.html +++ /dev/null @@ -1,7720 +0,0 @@ - HAPI Documentation

Table of Contents

-

-

- -
-

-
\ No newline at end of file diff --git a/docs/NotNestedDoc.md b/docs/NotNestedDoc.md deleted file mode 100644 index ea92398a..00000000 --- a/docs/NotNestedDoc.md +++ /dev/null @@ -1,2923 +0,0 @@ -# HAPI Documentation - - -## Table of Contents - - -- [BasicTypes.proto](#BasicTypes.proto) - - [AccountAmount](#AccountAmount) - - [AccountID](#AccountID) - - [ContractID](#ContractID) - - [CurrentAndNextFeeSchedule](#CurrentAndNextFeeSchedule) - - [FeeComponents](#FeeComponents) - - [FeeData](#FeeData) - - [FeeSchedule](#FeeSchedule) - - [FileID](#FileID) - - [HederaFunctionality](#HederaFunctionality) (Enum) - - [Key](#Key) - - [KeyList](#KeyList) - - [NodeAddress](#NodeAddress) - - [NodeAddressBook](#NodeAddressBook) - - [RealmID](#RealmID) - - [SemanticVersion](#SemanticVersion) - - [ServicesConfigurationList](#ServicesConfigurationList) - - [Setting](#Setting) - - [ShardID](#ShardID) - - [Signature](#Signature) - - [SignatureList](#SignatureList) - - [SignatureMap](#SignatureMap) - - [SignaturePair](#SignaturePair) - - [ThresholdKey](#ThresholdKey) - - [ThresholdSignature](#ThresholdSignature) - - [TokenFreezeStatus](#TokenFreezeStatus) (Enum) - - [TokenID](#TokenID) - - [TokenKycStatus](#TokenKycStatus) (Enum) - - [TokenTransferList](#TokenTransferList) - - [TopicID](#TopicID) - - [TransactionFeeSchedule](#TransactionFeeSchedule) - - [TransactionID](#TransactionID) - -- [ConsensusCreateTopic.proto](#ConsensusCreateTopic.proto) - - [ConsensusCreateTopicTransactionBody](#ConsensusCreateTopicTransactionBody) - -- [ConsensusDeleteTopic.proto](#ConsensusDeleteTopic.proto) - - [ConsensusDeleteTopicTransactionBody](#ConsensusDeleteTopicTransactionBody) - -- [ConsensusGetTopicInfo.proto](#ConsensusGetTopicInfo.proto) - - [ConsensusGetTopicInfoQuery](#ConsensusGetTopicInfoQuery) - - [ConsensusGetTopicInfoResponse](#ConsensusGetTopicInfoResponse) - -- [ConsensusService.proto](#ConsensusService.proto) - - [ConsensusService](#ConsensusService) (Service) - -- [ConsensusSubmitMessage.proto](#ConsensusSubmitMessage.proto) - - [ConsensusMessageChunkInfo](#ConsensusMessageChunkInfo) - - [ConsensusSubmitMessageTransactionBody](#ConsensusSubmitMessageTransactionBody) - -- [ConsensusTopicInfo.proto](#ConsensusTopicInfo.proto) - - [ConsensusTopicInfo](#ConsensusTopicInfo) - -- [ConsensusUpdateTopic.proto](#ConsensusUpdateTopic.proto) - - [ConsensusUpdateTopicTransactionBody](#ConsensusUpdateTopicTransactionBody) - -- [ContractCall.proto](#ContractCall.proto) - - [ContractCallTransactionBody](#ContractCallTransactionBody) - -- [ContractCallLocal.proto](#ContractCallLocal.proto) - - [ContractCallLocalQuery](#ContractCallLocalQuery) - - [ContractCallLocalResponse](#ContractCallLocalResponse) - - [ContractFunctionResult](#ContractFunctionResult) - - [ContractLoginfo](#ContractLoginfo) - -- [ContractCreate.proto](#ContractCreate.proto) - - [ContractCreateTransactionBody](#ContractCreateTransactionBody) - -- [ContractDelete.proto](#ContractDelete.proto) - - [ContractDeleteTransactionBody](#ContractDeleteTransactionBody) - -- [ContractGetBytecode.proto](#ContractGetBytecode.proto) - - [ContractGetBytecodeQuery](#ContractGetBytecodeQuery) - - [ContractGetBytecodeResponse](#ContractGetBytecodeResponse) - -- [ContractGetInfo.proto](#ContractGetInfo.proto) - - [ContractGetInfoQuery](#ContractGetInfoQuery) - - [ContractGetInfoResponse](#ContractGetInfoResponse) - - [ContractGetInfoResponse.ContractInfo](#ContractGetInfoResponse.ContractInfo) - -- [ContractGetRecords.proto](#ContractGetRecords.proto) - - [ContractGetRecordsQuery](#ContractGetRecordsQuery) - - [ContractGetRecordsResponse](#ContractGetRecordsResponse) - -- [ContractUpdate.proto](#ContractUpdate.proto) - - [ContractUpdateTransactionBody](#ContractUpdateTransactionBody) - -- [CryptoAddLiveHash.proto](#CryptoAddLiveHash.proto) - - [CryptoAddLiveHashTransactionBody](#CryptoAddLiveHashTransactionBody) - - [LiveHash](#LiveHash) - -- [CryptoCreate.proto](#CryptoCreate.proto) - - [CryptoCreateTransactionBody](#CryptoCreateTransactionBody) - -- [CryptoDelete.proto](#CryptoDelete.proto) - - [CryptoDeleteTransactionBody](#CryptoDeleteTransactionBody) - -- [CryptoDeleteLiveHash.proto](#CryptoDeleteLiveHash.proto) - - [CryptoDeleteLiveHashTransactionBody](#CryptoDeleteLiveHashTransactionBody) - -- [CryptoGetAccountBalance.proto](#CryptoGetAccountBalance.proto) - - [CryptoGetAccountBalanceQuery](#CryptoGetAccountBalanceQuery) - - [CryptoGetAccountBalanceResponse](#CryptoGetAccountBalanceResponse) - - [TokenBalance](#TokenBalance) - - [TokenBalances](#TokenBalances) - -- [CryptoGetAccountRecords.proto](#CryptoGetAccountRecords.proto) - - [CryptoGetAccountRecordsQuery](#CryptoGetAccountRecordsQuery) - - [CryptoGetAccountRecordsResponse](#CryptoGetAccountRecordsResponse) - -- [CryptoGetInfo.proto](#CryptoGetInfo.proto) - - [CryptoGetInfoQuery](#CryptoGetInfoQuery) - - [CryptoGetInfoResponse](#CryptoGetInfoResponse) - - [CryptoGetInfoResponse.AccountInfo](#CryptoGetInfoResponse.AccountInfo) - - [TokenRelationship](#TokenRelationship) - -- [CryptoGetLiveHash.proto](#CryptoGetLiveHash.proto) - - [CryptoGetLiveHashQuery](#CryptoGetLiveHashQuery) - - [CryptoGetLiveHashResponse](#CryptoGetLiveHashResponse) - -- [CryptoGetStakers.proto](#CryptoGetStakers.proto) - - [AllProxyStakers](#AllProxyStakers) - - [CryptoGetStakersQuery](#CryptoGetStakersQuery) - - [CryptoGetStakersResponse](#CryptoGetStakersResponse) - - [ProxyStaker](#ProxyStaker) - -- [CryptoService.proto](#CryptoService.proto) - - [CryptoService](#CryptoService) (Service) - -- [CryptoTransfer.proto](#CryptoTransfer.proto) - - [CryptoTransferTransactionBody](#CryptoTransferTransactionBody) - - [TransferList](#TransferList) - -- [CryptoUpdate.proto](#CryptoUpdate.proto) - - [CryptoUpdateTransactionBody](#CryptoUpdateTransactionBody) - -- [Duration.proto](#Duration.proto) - - [Duration](#Duration) - -- [ExchangeRate.proto](#ExchangeRate.proto) - - [ExchangeRate](#ExchangeRate) - - [ExchangeRateSet](#ExchangeRateSet) - -- [FileAppend.proto](#FileAppend.proto) - - [FileAppendTransactionBody](#FileAppendTransactionBody) - -- [FileCreate.proto](#FileCreate.proto) - - [FileCreateTransactionBody](#FileCreateTransactionBody) - -- [FileDelete.proto](#FileDelete.proto) - - [FileDeleteTransactionBody](#FileDeleteTransactionBody) - -- [FileGetContents.proto](#FileGetContents.proto) - - [FileGetContentsQuery](#FileGetContentsQuery) - - [FileGetContentsResponse](#FileGetContentsResponse) - - [FileGetContentsResponse.FileContents](#FileGetContentsResponse.FileContents) - -- [FileGetInfo.proto](#FileGetInfo.proto) - - [FileGetInfoQuery](#FileGetInfoQuery) - - [FileGetInfoResponse](#FileGetInfoResponse) - - [FileGetInfoResponse.FileInfo](#FileGetInfoResponse.FileInfo) - -- [FileService.proto](#FileService.proto) - - [FileService](#FileService) (Service) - -- [FileUpdate.proto](#FileUpdate.proto) - - [FileUpdateTransactionBody](#FileUpdateTransactionBody) - -- [Freeze.proto](#Freeze.proto) - - [FreezeTransactionBody](#FreezeTransactionBody) - -- [FreezeService.proto](#FreezeService.proto) - - [FreezeService](#FreezeService) (Service) - -- [GetByKey.proto](#GetByKey.proto) - - [EntityID](#EntityID) - - [GetByKeyQuery](#GetByKeyQuery) - - [GetByKeyResponse](#GetByKeyResponse) - -- [GetBySolidityID.proto](#GetBySolidityID.proto) - - [GetBySolidityIDQuery](#GetBySolidityIDQuery) - - [GetBySolidityIDResponse](#GetBySolidityIDResponse) - -- [NetworkGetVersionInfo.proto](#NetworkGetVersionInfo.proto) - - [NetworkGetVersionInfoQuery](#NetworkGetVersionInfoQuery) - - [NetworkGetVersionInfoResponse](#NetworkGetVersionInfoResponse) - -- [NetworkService.proto](#NetworkService.proto) - - [NetworkService](#NetworkService) (Service) - -- [Query.proto](#Query.proto) - - [Query](#Query) - -- [QueryHeader.proto](#QueryHeader.proto) - - [QueryHeader](#QueryHeader) - - [ResponseType](#ResponseType) (Enum) - -- [Response.proto](#Response.proto) - - [Response](#Response) - -- [ResponseCode.proto](#ResponseCode.proto) - - [ResponseCodeEnum](#ResponseCodeEnum) (Enum) - -- [ResponseHeader.proto](#ResponseHeader.proto) - - [ResponseHeader](#ResponseHeader) - -- [SmartContractService.proto](#SmartContractService.proto) - - [SmartContractService](#SmartContractService) (Service) - -- [SystemDelete.proto](#SystemDelete.proto) - - [SystemDeleteTransactionBody](#SystemDeleteTransactionBody) - -- [SystemUndelete.proto](#SystemUndelete.proto) - - [SystemUndeleteTransactionBody](#SystemUndeleteTransactionBody) - -- [Timestamp.proto](#Timestamp.proto) - - [Timestamp](#Timestamp) - - [TimestampSeconds](#TimestampSeconds) - -- [TokenAssociate.proto](#TokenAssociate.proto) - - [TokenAssociateTransactionBody](#TokenAssociateTransactionBody) - -- [TokenBurn.proto](#TokenBurn.proto) - - [TokenBurnTransactionBody](#TokenBurnTransactionBody) - -- [TokenCreate.proto](#TokenCreate.proto) - - [TokenCreateTransactionBody](#TokenCreateTransactionBody) - -- [TokenDelete.proto](#TokenDelete.proto) - - [TokenDeleteTransactionBody](#TokenDeleteTransactionBody) - -- [TokenDissociate.proto](#TokenDissociate.proto) - - [TokenDissociateTransactionBody](#TokenDissociateTransactionBody) - -- [TokenFreezeAccount.proto](#TokenFreezeAccount.proto) - - [TokenFreezeAccountTransactionBody](#TokenFreezeAccountTransactionBody) - -- [TokenGetInfo.proto](#TokenGetInfo.proto) - - [TokenGetInfoQuery](#TokenGetInfoQuery) - - [TokenGetInfoResponse](#TokenGetInfoResponse) - - [TokenInfo](#TokenInfo) - -- [TokenGrantKyc.proto](#TokenGrantKyc.proto) - - [TokenGrantKycTransactionBody](#TokenGrantKycTransactionBody) - -- [TokenMint.proto](#TokenMint.proto) - - [TokenMintTransactionBody](#TokenMintTransactionBody) - -- [TokenRevokeKyc.proto](#TokenRevokeKyc.proto) - - [TokenRevokeKycTransactionBody](#TokenRevokeKycTransactionBody) - -- [TokenService.proto](#TokenService.proto) - - [TokenService](#TokenService) (Service) - -- [TokenTransfer.proto](#TokenTransfer.proto) - - [TokenTransfersTransactionBody](#TokenTransfersTransactionBody) - -- [TokenUnfreezeAccount.proto](#TokenUnfreezeAccount.proto) - - [TokenUnfreezeAccountTransactionBody](#TokenUnfreezeAccountTransactionBody) - -- [TokenUpdate.proto](#TokenUpdate.proto) - - [TokenUpdateTransactionBody](#TokenUpdateTransactionBody) - -- [TokenWipeAccount.proto](#TokenWipeAccount.proto) - - [TokenWipeAccountTransactionBody](#TokenWipeAccountTransactionBody) - -- [Transaction.proto](#Transaction.proto) - - [Transaction](#Transaction) - -- [TransactionBody.proto](#TransactionBody.proto) - - [TransactionBody](#TransactionBody) - -- [TransactionContents.proto](#TransactionContents.proto) - - [SignedTransaction](#SignedTransaction) - -- [TransactionGetFastRecord.proto](#TransactionGetFastRecord.proto) - - [TransactionGetFastRecordQuery](#TransactionGetFastRecordQuery) - - [TransactionGetFastRecordResponse](#TransactionGetFastRecordResponse) - -- [TransactionGetReceipt.proto](#TransactionGetReceipt.proto) - - [TransactionGetReceiptQuery](#TransactionGetReceiptQuery) - - [TransactionGetReceiptResponse](#TransactionGetReceiptResponse) - -- [TransactionGetRecord.proto](#TransactionGetRecord.proto) - - [TransactionGetRecordQuery](#TransactionGetRecordQuery) - - [TransactionGetRecordResponse](#TransactionGetRecordResponse) - -- [TransactionReceipt.proto](#TransactionReceipt.proto) - - [TransactionReceipt](#TransactionReceipt) - -- [TransactionRecord.proto](#TransactionRecord.proto) - - [TransactionRecord](#TransactionRecord) - -- [TransactionResponse.proto](#TransactionResponse.proto) - - [TransactionResponse](#TransactionResponse) - -- [UncheckedSubmit.proto](#UncheckedSubmit.proto) - - [UncheckedSubmitBody](#UncheckedSubmitBody) - - -

Top

- -## BasicTypes.proto - - Each shard has a nonnegative shard number. Each realm within a given shard has a nonnegative realm number (that number might be reused in other shards). And each account, file, and smart contract instance within a given realm has a nonnegative number (which might be reused in other realms). Every account, file, and smart contract instance is within exactly one realm. So a FileID is a triplet of numbers, like 0.1.2 for entity number 2 within realm 1 within shard 0. Each realm maintains a single counter for assigning numbers, so if there is a file with ID 0.1.2, then there won't be an account or smart contract instance with ID 0.1.2. - - - -### AccountAmount - An account, and the amount that it sends or receives during a cryptocurrency or token transfer. - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| accountID | [AccountID](#AccountID) | The Account ID that sends/receives cryptocurrency or tokens | | -| amount | [sint64](#sint64) | The amount of tinybars (for Crypto transfers) or in the lowest denomination (for Token transfers) that the account sends(negative) or receives(positive) | | - - - - -### AccountID - The ID for an a cryptocurrency account - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| shardNum | | The shard number (nonnegative) | | -| realmNum | | The realm number (nonnegative) | | -| accountNum | | A nonnegative account number unique within its realm | | - - - - -### ContractID - The ID for a smart contract instance - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| shardNum | | The shard number (nonnegative) | | -| realmNum | | The realm number (nonnegative) | | -| contractNum | | A nonnegative number unique within its realm | | - - - - -### CurrentAndNextFeeSchedule - This contains two Fee Schedules with expiry timestamp. - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| currentFeeSchedule | [FeeSchedule](#FeeSchedule) | Contains current Fee Schedule | | -| nextFeeSchedule | [FeeSchedule](#FeeSchedule) | Contains next Fee Schedule | | - - - - -### FeeComponents - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| min | | A minimum, the calculated fee must be greater than this value | | -| max | | A maximum, the calculated fee must be less than this value | | -| constant | | A constant contribution to the fee | | -| bpt | | The price of bandwidth consumed by a transaction, measured in bytes | | -| vpt | | The price per signature verification for a transaction | | -| rbh | | The price of RAM consumed by a transaction, measured in byte-hours | | -| sbh | | The price of storage consumed by a transaction, measured in byte-hours | | -| gas | | The price of computation for a smart contract transaction, measured in gas | | -| tv | | The price per hbar transferred for a transfer | | -| bpr | | The price of bandwidth for data retrieved from memory for a response, measured in bytes | | -| sbpr | | The price of bandwidth for data retrieved from disk for a response, measured in bytes | | - - - - -### FeeData - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| nodedata | [FeeComponents](#FeeComponents) | Fee paid to the submitting node | | -| networkdata | [FeeComponents](#FeeComponents) | Fee paid to the network for processing a transaction into consensus | | -| servicedata | [FeeComponents](#FeeComponents) | Fee paid to the network for providing the service associated with the transaction; for instance, storing a file | | - - - - -### FeeSchedule - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| transactionFeeSchedule | [TransactionFeeSchedule](#TransactionFeeSchedule) | List of price coefficients for network resources | | -| expiryTime | [TimestampSeconds](#TimestampSeconds) | FeeSchedule expiry time | | - - - - -### FileID - The ID for a file - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| shardNum | | The shard number (nonnegative) | | -| realmNum | | The realm number (nonnegative) | | -| fileNum | | A nonnegative File number unique within its realm | | - - - - -### HederaFunctionality - - -| Enum Name | Description | -| --------- | ----------- | -| NONE | UNSPECIFIED - Need to keep first value as unspecified because first element is ignored and not parsed (0 is ignored by parser) | -| CryptoTransfer | crypto transfer | -| CryptoUpdate | crypto update account | -| CryptoDelete | crypto delete account | -| CryptoAddLiveHash | Add a livehash to a crypto account | -| CryptoDeleteLiveHash | Delete a livehash from a crypto account | -| ContractCall | Smart Contract Call | -| ContractCreate | Smart Contract Create Contract | -| ContractUpdate | Smart Contract update contract | -| FileCreate | File Operation create file | -| FileAppend | File Operation append file | -| FileUpdate | File Operation update file | -| FileDelete | File Operation delete file | -| CryptoGetAccountBalance | crypto get account balance | -| CryptoGetAccountRecords | crypto get account record | -| CryptoGetInfo | Crypto get info | -| ContractCallLocal | Smart Contract Call | -| ContractGetInfo | Smart Contract get info | -| ContractGetBytecode | Smart Contract, get the byte code | -| GetBySolidityID | Smart Contract, get by solidity ID | -| GetByKey | Smart Contract, get by key | -| CryptoGetLiveHash | Get a live hash from a crypto account | -| CryptoGetStakers | Crypto, get the stakers for the node | -| FileGetContents | File Operations get file contents | -| FileGetInfo | File Operations get the info of the file | -| TransactionGetRecord | Crypto get the transaction records | -| ContractGetRecords | Contract get the transaction records | -| CryptoCreate | crypto create account | -| SystemDelete | system delete file | -| SystemUndelete | system undelete file | -| ContractDelete | delete contract | -| Freeze | freeze | -| CreateTransactionRecord | Create Tx Record | -| CryptoAccountAutoRenew | Crypto Auto Renew | -| ContractAutoRenew | Contract Auto Renew | -| GetVersionInfo | Get Version | -| TransactionGetReceipt | Transaction Get Receipt | -| ConsensusCreateTopic | Create Topic | -| ConsensusUpdateTopic | Update Topic | -| ConsensusDeleteTopic | Delete Topic | -| ConsensusGetTopicInfo | Get Topic information | -| ConsensusSubmitMessage | Submit message to topic | -| UncheckedSubmit | | -| TokenCreate | Create Token | -| TokenTransact | Transfer Tokens | -| TokenGetInfo | Get token information | -| TokenFreezeAccount | Freeze Account | -| TokenUnfreezeAccount | Unfreeze Account | -| TokenGrantKycToAccount | Grant KYC to Account | -| TokenRevokeKycFromAccount | Revoke KYC from Account | -| TokenDelete | Delete Token | -| TokenUpdate | Update Token | -| TokenMint | Mint tokens to treasury | -| TokenBurn | Burn tokens from treasury | -| TokenAccountWipe | Wipe token amount from Account holder | -| TokenAssociateToAccount | Associate tokens to an account | -| TokenDissociateFromAccount | Dissociate tokens from an account | - - - - -### Key - A Key can be a public key from one of the three supported systems (ed25519, RSA-3072, ECDSA with p384). Or, it can be the ID of a smart contract instance, which is authorized to act as if it had a key. If an account has an ed25519 key associated with it, then the corresponding private key must sign any transaction to transfer cryptocurrency out of it. And similarly for RSA and ECDSA.
A Key can be a smart contract ID, which means that smart contract is to authorize operations as if it had signed with a key that it owned. The smart contract doesn't actually have a key, and doesn't actually sign a transaction. But it's as if a virtual transaction were created, and the smart contract signed it with a private key.
A key can be a "threshold key", which means a list of M keys, any N of which must sign in order for the threshold signature to be considered valid. The keys within a threshold signature may themselves be threshold signatures, to allow complex signature requirements.
A Key can be a list of keys. Their use is dependent on context. For example, a Hedera file is created with a list of keys, where all of them must sign a transaction to create or modify the file, but only one of them is needed to sign a transaction to delete the file. So it's a single list that sometimes acts as a 1-of-M threshold key, and sometimes acts as an M-of-M threshold key.
A Key can contain a ThresholdKey or KeyList, which in turn contain a Key, so this mutual recursion would allow nesting arbitrarily deep. A ThresholdKey which contains a list of primitive keys (e.g., ed25519) has 3 levels: ThresholdKey -> KeyList -> Key. A KeyList which contains several primitive keys (e.g., ed25519) has 2 levels: KeyList -> Key. A Key with 2 levels of nested ThresholdKeys has 7 levels: Key -> ThresholdKey -> KeyList -> Key -> ThresholdKey -> KeyList -> Key.
Each Key should not have more than 46 levels, which implies 15 levels of nested ThresholdKeys. - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| key | oneof | | | -| | contractID | [ContractID](#ContractID) | smart contract instance that is authorized as if it had signed with a key | | -| | ed25519 | | ed25519 public key bytes | | -| | RSA_3072 | | RSA-3072 public key bytes | | -| | ECDSA_384 | | ECDSA with the p-384 curve public key bytes | | -| | thresholdKey | [ThresholdKey](#ThresholdKey) | a threshold N followed by a list of M keys, any N of which are required to form a valid signature | | -| | keyList | [KeyList](#KeyList) | A list of Keys of the Key type. | | - - - - -### KeyList - A list of keys - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| keys | [Key](#Key) | list of keys | | - - - - -### NodeAddress - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| ipAddress | | The ip address of the Node with separator & octets | | -| portno | | The port number of the grpc server for the node | | -| memo | | The memo field of the node (usage to store account ID is deprecated) | | -| RSA_PubKey | | The RSA public key of the node | | -| nodeId | | A non-sequential identifier for the node | | -| nodeAccountId | [AccountID](#AccountID) | The account to be paid for queries and transactions sent to this node | | -| nodeCertHash | | A hash of the X509 cert used for gRPC traffic to this node | | - - - - -### NodeAddressBook - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| nodeAddress | [NodeAddress](#NodeAddress) | Contains multiple Node Address for the network | | - - - - -### RealmID - The ID for a realm. Within a given shard, every realm has a unique ID. Each account, file, and contract instance belongs to exactly one realm. - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| shardNum | | The shard number (nonnegative) | | -| realmNum | | The realm number (nonnegative) | | - - - - -### SemanticVersion - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| major | | Increases with incompatible API changes | | -| minor | | Increases with backwards-compatible new functionality | | -| patch | | Increases with backwards-compatible bug fixes | | - - - - -### ServicesConfigurationList - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| nameValue | [Setting](#Setting) | list of name value pairs of the application properties | | - - - - -### Setting - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| name | | name of the property | | -| value | | value of the property | | -| data | | any data associated with property | | - - - - -### ShardID - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| shardNum | | the shard number (nonnegative) | | - - - - -### Signature - A Signature corresponding to a Key. It is a sequence of bytes holding a public key signature from one of the three supported systems (ed25519, RSA-3072, ECDSA with p384). Or, it can be a list of signatures corresponding to a single threshold key. Or, it can be the ID of a smart contract instance, which is authorized to act as if it had a key. If an account has an ed25519 key associated with it, then the corresponding private key must sign any transaction to transfer cryptocurrency out of it. If it has a smart contract ID associated with it, then that smart contract is allowed to transfer cryptocurrency out of it. The smart contract doesn't actually have a key, and doesn't actually sign a transaction. But it's as if a virtual transaction were created, and the smart contract signed it with a private key. A key can also be a "threshold key", which means a list of M keys, any N of which must sign in order for the threshold signature to be considered valid. The keys within a threshold signature may themselves be threshold signatures, to allow complex signature requirements (this nesting is not supported in the currently, but will be supported in a future version of API). If a Signature message is missing the "signature" field, then this is considered to be a null signature. That is useful in cases such as threshold signatures, where some of the signatures can be null.
The definition of Key uses mutual recursion, so it allows nesting that is arbitrarily deep. But the current API only accepts Key messages up to 3 levels deep, such as a list of threshold keys, each of which is a list of primitive keys. Therefore, the matching Signature will have the same limitation. This restriction may be relaxed in future versions of the API, to allow deeper nesting.
This message is deprecated and succeeded by SignaturePair and SignatureMap messages. - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| option | [deprecated=true](#deprecated=true) | | | -| signature | oneof | | | -| | contract | | smart contract virtual signature (always length zero) | | -| | ed25519 | | ed25519 signature bytes | | -| | RSA_3072 | | RSA-3072 signature bytes | | -| | ECDSA_384 | | ECDSA p-384 signature bytes | | -| | thresholdSignature | [ThresholdSignature](#ThresholdSignature) | A list of signatures for a single N-of-M threshold Key. This must be a list of exactly M signatures, at least N of which are non-null. | | -| | signatureList | [SignatureList](#SignatureList) | A list of M signatures, each corresponding to a Key in a KeyList of the same length. | | - - - - -### SignatureList - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| option | [deprecated=true](#deprecated=true) | | | -| sigs | [Signature](#Signature) | each signature corresponds to a Key in the KeyList | | - - - - -### SignatureMap - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| sigPair | [SignaturePair](#SignaturePair) | Each signature pair corresponds to a unique Key required to sign the transaction. | | - - - - -### SignaturePair - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| pubKeyPrefix | | First few bytes of the public key | | -| signature | oneof | | | -| | contract | | smart contract virtual signature (always length zero) | | -| | ed25519 | | ed25519 signature | | -| | RSA_3072 | | RSA-3072 signature | | -| | ECDSA_384 | | ECDSA p-384 signature | | - - - - -### ThresholdKey - A set of public keys that are used together to form a threshold signature. If the threshold is N and there are M keys, then this is an N of M threshold signature. If an account is associated with ThresholdKeys, then a transaction to move cryptocurrency out of it must be signed by a list of M signatures, where at most M-N of them are blank, and the other at least N of them are valid signatures corresponding to at least N of the public keys listed here. - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| threshold | | A valid signature set must have at least this many signatures | | -| keys | [KeyList](#KeyList) | List of all the keys that can sign | | - - - - -### ThresholdSignature - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| option | [deprecated=true](#deprecated=true) | | | -| sigs | [SignatureList](#SignatureList) | for an N-of-M threshold key, this is a list of M signatures, at least N of which must be non-null | | - - - - -### TokenFreezeStatus - Possible Freeze statuses returned on TokenGetInfoQuery or CryptoGetInfoResponse in TokenRelationship - -| Enum Name | Description | -| --------- | ----------- | -| FreezeNotApplicable | | -| Frozen | | -| Unfrozen | | - - - - -### TokenID - Unique identifier for a token - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| shardNum | | A nonnegative shard number | | -| realmNum | | A nonnegative realm number | | -| tokenNum | | A nonnegative token number | | - - - - -### TokenKycStatus - Possible KYC statuses returned on TokenGetInfoQuery or CryptoGetInfoResponse in TokenRelationship - -| Enum Name | Description | -| --------- | ----------- | -| KycNotApplicable | | -| Granted | | -| Revoked | | - - - - -### TokenTransferList - A list of token IDs and amounts representing the transferred out (negative) or into (positive) amounts, represented in the lowest denomination of the token - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| token | [TokenID](#TokenID) | The ID of the token | | -| transfers | [AccountAmount](#AccountAmount) | Multiple list of AccountAmounts, each of which has an account and amount | | - - - - -### TopicID - Unique identifier for a topic (used by the consensus service) - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| shardNum | | The shard number (nonnegative) | | -| realmNum | | The realm number (nonnegative) | | -| topicNum | | Unique topic identifier within a realm (nonnegative). | | - - - - -### TransactionFeeSchedule - The fees for a specific transaction or query based on the fee data. - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| hederaFunctionality | [HederaFunctionality](#HederaFunctionality) | A particular transaction or query | | -| feeData | [FeeData](#FeeData) | Resource price coefficients | | - - - - -### TransactionID - The ID for a transaction. This is used for retrieving receipts and records for a transaction, for appending to a file right after creating it, for instantiating a smart contract with bytecode in a file just created, and internally by the network for detecting when duplicate transactions are submitted. A user might get a transaction processed faster by submitting it to N nodes, each with a different node account, but all with the same TransactionID. Then, the transaction will take effect when the first of all those nodes submits the transaction and it reaches consensus. The other transactions will not take effect. So this could make the transaction take effect faster, if any given node might be slow. However, the full transaction fee is charged for each transaction, so the total fee is N times as much if the transaction is sent to N nodes. - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| transactionValidStart | [Timestamp](#Timestamp) | The transaction is invalid if consensusTimestamp < transactionID.transactionStartValid | | -| accountID | [AccountID](#AccountID) | The Account ID that paid for this transaction | | - - - -

Top

- -## ConsensusCreateTopic.proto - - See [ConsensusService.createTopic()](#proto.ConsensusService) - - - -### ConsensusCreateTopicTransactionBody - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| memo | | Short publicly visible memo about the topic. No guarantee of uniqueness. | | -| adminKey | [Key](#Key) | Access control for updateTopic/deleteTopic.
Anyone can increase the topic's expirationTime via ConsensusService.updateTopic(), regardless of the adminKey.
If no adminKey is specified, updateTopic may only be used to extend the topic's expirationTime, and deleteTopic
is disallowed. | | -| submitKey | [Key](#Key) | Access control for submitMessage.
If unspecified, no access control is performed on ConsensusService.submitMessage (all submissions are allowed). | | -| autoRenewPeriod | [Duration](#Duration) | The initial lifetime of the topic and the amount of time to attempt to extend the topic's lifetime by
automatically at the topic's expirationTime, if the autoRenewAccount is configured (once autoRenew functionality
is supported by HAPI).
Limited to MIN_AUTORENEW_PERIOD and MAX_AUTORENEW_PERIOD value by server-side configuration.
Required. | | -| autoRenewAccount | [AccountID](#AccountID) | Optional account to be used at the topic's expirationTime to extend the life of the topic (once autoRenew
functionality is supported by HAPI).
The topic lifetime will be extended up to a maximum of the autoRenewPeriod or however long the topic
can be extended using all funds on the account (whichever is the smaller duration/amount and if any extension
is possible with the account's funds).
If specified, there must be an adminKey and the autoRenewAccount must sign this transaction. | | - - - -

Top

- -## ConsensusDeleteTopic.proto - - See [ConsensusService.deleteTopic()](#proto.ConsensusService) - - - -### ConsensusDeleteTopicTransactionBody - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| topicID | [TopicID](#TopicID) | Topic identifier. | | - - - -

Top

- -## ConsensusGetTopicInfo.proto - - See [ConsensusService.getTopicInfo()](#proto.ConsensusService) - - - -### ConsensusGetTopicInfoQuery - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| header | [QueryHeader](#QueryHeader) | Standard info sent from client to node, including the signed payment, and what kind of response is requested
(cost, state proof, both, or neither). | | -| topicID | [TopicID](#TopicID) | The Topic for which information is being requested | | - - - - -### ConsensusGetTopicInfoResponse - Retrieve the parameters of and state of a consensus topic. - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| header | [ResponseHeader](#ResponseHeader) | Standard response from node to client, including the requested fields: cost, or state proof, or both, or neither. | | -| topicID | [TopicID](#TopicID) | Topic identifier. | | -| topicInfo | [ConsensusTopicInfo](#ConsensusTopicInfo) | Current state of the topic | | - - - -

Top

- -## ConsensusService.proto - - The Consensus Service provides the ability for Hedera Hashgraph to provide aBFT consensus as to the order and
validity of messages submitted to a topic, as well as a consensus timestamp for those messages.
Automatic renewal can be configured via an autoRenewAccount.
Any time an autoRenewAccount is added to a topic, that createTopic/updateTopic transaction must be signed by
the autoRenewAccount.
The autoRenewPeriod on an account must currently be set a value in createTopic between MIN_AUTORENEW_PERIOD (6999999
seconds) and MAX_AUTORENEW_PERIOD (8000001 seconds). During creation this sets the initial expirationTime of the
topic (see more below).
If no adminKey is on a topic, there may not be an autoRenewAccount on the topic, deleteTopic is not allowed,
and the only change allowed via an updateTopic is to extend the expirationTime.
If an adminKey is on a topic, every updateTopic and deleteTopic transaction must be signed by the adminKey, except
for updateTopics which only extend the topic's expirationTime (no adminKey authorization required).
If an updateTopic modifies the adminKey of a topic, the transaction signatures on the updateTopic must fulfill both
the pre-update and post-update adminKey signature requirements.
Mirrornet ConsensusService may be used to subscribe to changes on the topic, including changes to the topic
definition and the consensus ordering and timestamp of submitted messages.
Until autoRenew functionality is supported by HAPI, the topic will not expire, the autoRenewAccount will not be
charged, and the topic will not automatically be deleted.
Once autoRenew functionality is supported by HAPI:
1. Once the expirationTime is encountered, if an autoRenewAccount is configured on the topic, the account will be
charged automatically at the expirationTime, to extend the expirationTime of the topic up to the topic's
autoRenewPeriod (or as much extension as the account's balance will supply).
2. If the topic expires and is not automatically renewed, the topic will enter the EXPIRED state. All transactions
on the topic will fail with TOPIC_EXPIRED, except an updateTopic() call that modifies only the expirationTime.
getTopicInfo() will succeed. This state will be available for a AUTORENEW_GRACE_PERIOD grace period (7 days).
3. After the grace period, if the topic's expirationTime is not extended, the topic will be automatically
deleted and no transactions or queries on the topic will succeed after that point. - - - -### ConsensusService - - -| RPC | Request | Response | Comments | -| --- | ------- | -------- | -------- | -| createTopic | Transaction | TransactionResponse | Create a topic to be used for consensus.
If an autoRenewAccount is specified, that account must also sign this transaction.
If an adminKey is specified, the adminKey must sign the transaction.
On success, the resulting TransactionReceipt contains the newly created TopicId.
Request is [ConsensusCreateTopicTransactionBody](#proto.ConsensusCreateTopicTransactionBody) | -| updateTopic | Transaction | TransactionResponse | Update a topic.
If there is no adminKey, the only authorized update (available to anyone) is to extend the expirationTime.
Otherwise transaction must be signed by the adminKey.
If an adminKey is updated, the transaction must be signed by the pre-update adminKey and post-update adminKey.
If a new autoRenewAccount is specified (not just being removed), that account must also sign the transaction.
Request is [ConsensusUpdateTopicTransactionBody](#proto.ConsensusUpdateTopicTransactionBody) | -| deleteTopic | Transaction | TransactionResponse | Delete a topic. No more transactions or queries on the topic (via HAPI) will succeed.
If an adminKey is set, this transaction must be signed by that key.
If there is no adminKey, this transaction will fail UNAUTHORIZED.
Request is [ConsensusDeleteTopicTransactionBody](#proto.ConsensusDeleteTopicTransactionBody) | -| getTopicInfo | Query | Response | Retrieve the latest state of a topic. This method is unrestricted and allowed on any topic by any payer account.
Deleted accounts will not be returned.
Request is [ConsensusGetTopicInfoQuery](#proto.ConsensusGetTopicInfoQuery)
Response is [ConsensusGetTopicInfoResponse](#proto.ConsensusGetTopicInfoResponse) | -| submitMessage | Transaction | TransactionResponse | Submit a message for consensus.
Valid and authorized messages on valid topics will be ordered by the consensus service, gossipped to the
mirror net, and published (in order) to all subscribers (from the mirror net) on this topic.
The submitKey (if any) must sign this transaction.
On success, the resulting TransactionReceipt contains the topic's updated topicSequenceNumber and
topicRunningHash.
Request is [ConsensusSubmitMessageTransactionBody](#proto.ConsensusSubmitMessageTransactionBody) | - - - -

Top

- -## ConsensusSubmitMessage.proto - --

Hedera Network Services Protobuf

Copyright (C) 2018 - 2020 Hedera Hashgraph, LLC

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http:www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
‍ - - - -### ConsensusMessageChunkInfo - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| initialTransactionID | [TransactionID](#TransactionID) | TransactionID of the first chunk, gets copied to every subsequent chunk in a fragmented message. | | -| total | | The total number of chunks in the message. | | -| number | | The sequence number (from 1 to total) of the current chunk in the message. | | - - - - -### ConsensusSubmitMessageTransactionBody - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| topicID | [TopicID](#TopicID) | Topic to submit message to. | | -| message | | Message to be submitted. Max size of the Transaction (including signatures) is 6KiB. | | -| chunkInfo | [ConsensusMessageChunkInfo](#ConsensusMessageChunkInfo) | Optional information of the current chunk in a fragmented message. | | - - - -

Top

- -## ConsensusTopicInfo.proto - - Current state of a topic. - - - -### ConsensusTopicInfo - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| memo | | Short publicly visible memo about the topic. No guarantee of uniqueness. | | -| runningHash | | When a topic is created, its running hash is initialized to 48 bytes of binary zeros.
For each submitted message, the topic's running hash is then updated to the output
of a particular SHA-384 digest whose input data include the previous running hash.

See the TransactionReceipt.proto documentation for an exact description of the
data included in the SHA-384 digest used for the update. | | -| sequenceNumber | | Sequence number (starting at 1 for the first submitMessage) of messages on the topic. | | -| expirationTime | [Timestamp](#Timestamp) | Effective consensus timestamp at (and after) which submitMessage calls will no longer succeed on the topic
and the topic will expire and after AUTORENEW_GRACE_PERIOD be automatically deleted. | | -| adminKey | [Key](#Key) | Access control for update/delete of the topic. Null if there is no key. | | -| submitKey | [Key](#Key) | Access control for ConsensusService.submitMessage. Null if there is no key. | | -| autoRenewPeriod | [Duration](#Duration) | | | -| autoRenewAccount | [AccountID](#AccountID) | Null if there is no autoRenewAccount. | | - - - -

Top

- -## ConsensusUpdateTopic.proto - - All fields left null will not be updated.
See [ConsensusService.updateTopic()](#proto.ConsensusService) - - - -### ConsensusUpdateTopicTransactionBody - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| topicID | [TopicID](#TopicID) | | | -| memo | [google.protobuf.StringValue](#google.protobuf.StringValue) | Short publicly visible memo about the topic. No guarantee of uniqueness. Null for "do not update". | | -| expirationTime | [Timestamp](#Timestamp) | Effective consensus timestamp at (and after) which all consensus transactions and queries will fail.
The expirationTime may be no longer than MAX_AUTORENEW_PERIOD (8000001 seconds) from the consensus timestamp of
this transaction.
On topics with no adminKey, extending the expirationTime is the only updateTopic option allowed on the topic.
If unspecified, no change. | | -| adminKey | [Key](#Key) | Access control for update/delete of the topic.
If unspecified, no change.
If empty keyList - the adminKey is cleared. | | -| submitKey | [Key](#Key) | Access control for ConsensusService.submitMessage.
If unspecified, no change.
If empty keyList - the submitKey is cleared. | | -| autoRenewPeriod | [Duration](#Duration) | The amount of time to extend the topic's lifetime automatically at expirationTime if the autoRenewAccount is
configured and has funds (once autoRenew functionality is supported by HAPI).
Limited to between MIN_AUTORENEW_PERIOD (6999999 seconds) and MAX_AUTORENEW_PERIOD (8000001 seconds) by
servers-side configuration (which may change).
If unspecified, no change. | | -| autoRenewAccount | [AccountID](#AccountID) | Optional account to be used at the topic's expirationTime to extend the life of the topic.
Once autoRenew functionality is supported by HAPI, the topic lifetime will be extended up to a maximum of the
autoRenewPeriod or however long the topic can be extended using all funds on the account (whichever is the
smaller duration/amount).
If specified as the default value (0.0.0), the autoRenewAccount will be removed.
If unspecified, no change. | | - - - -

Top

- -## ContractCall.proto - - - -### ContractCallTransactionBody - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| contractID | [ContractID](#ContractID) | the contract instance to call, in the format used in transactions | | -| gas | | the maximum amount of gas to use for the call | | -| amount | | number of tinybars sent (the function must be payable if this is nonzero) | | -| functionParameters | | which function to call, and the parameters to pass to the function | | - - - -

Top

- -## ContractCallLocal.proto - - The log information for an event returned by a smart contract function call. One function call may return several such events. - - - -### ContractCallLocalQuery - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| header | [QueryHeader](#QueryHeader) | standard info sent from client to node, including the signed payment, and what kind of response is requested (cost, state proof, both, or neither). The payment must cover the fees and all of the gas offered. | | -| contractID | [ContractID](#ContractID) | the contract instance to call, in the format used in transactions | | -| gas | | The amount of gas to use for the call; all of the gas offered will be used and charged a corresponding fee | | -| functionParameters | | which function to call, and the parameters to pass to the function | | -| maxResultSize | | max number of bytes that the result might include. The run will fail if it would have returned more than this number of bytes. | | - - - - -### ContractCallLocalResponse - Response when the client sends the node ContractCallLocalQuery - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| header | [ResponseHeader](#ResponseHeader) | standard response from node to client, including the requested fields: cost, or state proof, or both, or neither | | -| functionResult | [ContractFunctionResult](#ContractFunctionResult) | the value returned by the function (if it completed and didn't fail) | | - - - - -### ContractFunctionResult - The result returned by a call to a smart contract function. This is part of the response to a ContractCallLocal query, and is in the record for a ContractCall or ContractCreateInstance transaction. The ContractCreateInstance transaction record has the results of the call to the constructor. - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| contractID | [ContractID](#ContractID) | the smart contract instance whose function was called | | -| contractCallResult | | the result returned by the function | | -| errorMessage | | message In case there was an error during smart contract execution | | -| bloom | | bloom filter for record | | -| gasUsed | | units of gas used to execute contract | | -| logInfo | [ContractLoginfo](#ContractLoginfo) | the log info for events returned by the function | | -| createdContractIDs | [ContractID](#ContractID) | the list of smart contracts that were created by the function call | | - - - - -### ContractLoginfo - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| contractID | [ContractID](#ContractID) | address of a contract that emitted the event | | -| bloom | | bloom filter for a particular log | | -| topic | | topics of a particular event | | -| data | | event data | | - - - -

Top

- -## ContractCreate.proto - - - -### ContractCreateTransactionBody - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| fileID | [FileID](#FileID) | the file containing the smart contract byte code. A copy will be made and held by the contract instance, and have the same expiration time as the instance. The file is referenced one of two ways: | | -| adminKey | [Key](#Key) | the state of the instance and its fields can be modified arbitrarily if this key signs a transaction to modify it. If this is null, then such modifications are not possible, and there is no administrator that can override the normal operation of this smart contract instance. Note that if it is created with no admin keys, then there is no administrator to authorize changing the admin keys, so there can never be any admin keys for that instance. | | -| gas | | gas to run the constructor | | -| initialBalance | | initial number of tinybars to put into the cryptocurrency account associated with and owned by the smart contract | | -| proxyAccountID | [AccountID](#AccountID) | ID of the account to which this account is proxy staked. If proxyAccountID is null, or is an invalid account, or is an account that isn't a node, then this account is automatically proxy staked to a node chosen by the network, but without earning payments. If the proxyAccountID account refuses to accept proxy staking , or if it is not currently running a node, then it will behave as if proxyAccountID was null. | | -| autoRenewPeriod | [Duration](#Duration) | the instance will charge its account every this many seconds to renew for this long | | -| constructorParameters | | parameters to pass to the constructor | | -| shardID | [ShardID](#ShardID) | shard in which to create this | | -| realmID | [RealmID](#RealmID) | realm in which to create this (leave this null to create a new realm) | | -| newRealmAdminKey | [Key](#Key) | if realmID is null, then this the admin key for the new realm that will be created | | -| memo | | the memo that was submitted as part of the contract (max 100 bytes) | | - - - -

Top

- -## ContractDelete.proto - - - -### ContractDeleteTransactionBody - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| contractID | [ContractID](#ContractID) | The id of the contract to be deleted | | -| obtainers | oneof | | | -| | transferAccountID | [AccountID](#AccountID) | The id of an account to receive any remaining hBars from the deleted contract | | -| | transferContractID | [ContractID](#ContractID) | The id of a contract to receive any remaining hBars from the deleted contract | | - - - -

Top

- -## ContractGetBytecode.proto - - Get the bytecode for a smart contract instance - - - -### ContractGetBytecodeQuery - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| header | [QueryHeader](#QueryHeader) | standard info sent from client to node, including the signed payment, and what kind of response is requested (cost, state proof, both, or neither). | | -| contractID | [ContractID](#ContractID) | the contract for which information is requested | | - - - - -### ContractGetBytecodeResponse - Response when the client sends the node ContractGetBytecodeQuery - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| header | [ResponseHeader](#ResponseHeader) | standard response from node to client, including the requested fields: cost, or state proof, or both, or neither | | -| bytecode | | the bytecode | | - - - -

Top

- -## ContractGetInfo.proto - - Get information about a smart contract instance. This includes the account that it uses, the file containing its bytecode, and the time when it will expire. - - - -### ContractGetInfoQuery - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| header | [QueryHeader](#QueryHeader) | standard info sent from client to node, including the signed payment, and what kind of response is requested (cost, state proof, both, or neither). | | -| contractID | [ContractID](#ContractID) | the contract for which information is requested | | - - - - -### ContractGetInfoResponse - Response when the client sends the node ContractGetInfoQuery - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| header | [ResponseHeader](#ResponseHeader) | standard response from node to client, including the requested fields: cost, or state proof, or both, or neither | | -| contractInfo | [ContractGetInfoResponse.ContractInfo](#ContractGetInfoResponse.ContractInfo) | the information about this contract instance (a state proof can be generated for this) | | - - - - -### ContractGetInfoResponse.ContractInfo - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| contractID | [ContractID](#ContractID) | ID of the contract instance, in the format used in transactions | | -| accountID | [AccountID](#AccountID) | ID of the cryptocurrency account owned by the contract instance, in the format used in transactions | | -| contractAccountID | | ID of both the contract instance and the cryptocurrency account owned by the contract instance, in the format used by Solidity | | -| adminKey | [Key](#Key) | the state of the instance and its fields can be modified arbitrarily if this key signs a transaction to modify it. If this is null, then such modifications are not possible, and there is no administrator that can override the normal operation of this smart contract instance. Note that if it is created with no admin keys, then there is no administrator to authorize changing the admin keys, so there can never be any admin keys for that instance. | | -| expirationTime | [Timestamp](#Timestamp) | the current time at which this contract instance (and its account) is set to expire | | -| autoRenewPeriod | [Duration](#Duration) | the expiration time will extend every this many seconds. If there are insufficient funds, then it extends as long as possible. If the account is empty when it expires, then it is deleted. | | -| storage | | number of bytes of storage being used by this instance (which affects the cost to extend the expiration time) | | -| memo | | the memo associated with the contract (max 100 bytes) | | -| balance | | The current balance, in tinybars | | - - - -

Top

- -## ContractGetRecords.proto - - - -### ContractGetRecordsQuery - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| header | [QueryHeader](#QueryHeader) | Standard info sent from client to node, including the signed payment, and what kind of response is requested (cost, state proof, both, or neither). | | -| contractID | [ContractID](#ContractID) | The smart contract instance for which the records should be retrieved | | - - - - -### ContractGetRecordsResponse - Response when the client sends the node ContractGetRecordsQuery - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| header | [ResponseHeader](#ResponseHeader) | Standard response from node to client, including the requested fields: cost, or state proof, or both, or neither | | -| contractID | [ContractID](#ContractID) | The smart contract instance that this record is for | | -| records | [TransactionRecord](#TransactionRecord) | List of records, each with contractCreateResult or contractCallResult as its body | | - - - -

Top

- -## ContractUpdate.proto - - - -### ContractUpdateTransactionBody - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| contractID | [ContractID](#ContractID) | The id of the contract to be updated | | -| expirationTime | [Timestamp](#Timestamp) | The new expiry of the contract, no earlier than the current expiry (resolves to EXPIRATION_REDUCTION_NOT_ALLOWED otherwise) | | -| adminKey | [Key](#Key) | The new key to control updates to the contract | | -| proxyAccountID | [AccountID](#AccountID) | (NOT YET IMPLEMENTED) The new id of the account to which the contract is proxy staked | | -| autoRenewPeriod | [Duration](#Duration) | (NOT YET IMPLEMENTED) The new interval at which the contract will pay to extend its expiry (by the same interval) | | -| fileID | [FileID](#FileID) | The new id of the file asserted to contain the bytecode of the Solidity transaction that created this contract | | -| memo | | The new contract memo, assumed to be Unicode encoded with UTF-8 (at most 100 bytes) | | - - - -

Top

- -## CryptoAddLiveHash.proto - - A hash---presumably of some kind of credential or certificate---along with a list of keys, each of which may be either a primitive or a threshold key. - - - -### CryptoAddLiveHashTransactionBody - At consensus, attaches the given livehash to the given account. - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| liveHash | [LiveHash](#LiveHash) | A hash of some credential or certificate, along with the keys of the entities that asserted it validity | | - - - - -### LiveHash - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| accountId | [AccountID](#AccountID) | The account to which the livehash is attached | | -| hash | | The SHA-384 hash of a credential or certificate | | -| keys | [KeyList](#KeyList) | A list of keys (primitive or threshold), all of which must sign to attach the livehash to an account, and any one of which can later delete it. | | -| duration | [Duration](#Duration) | The duration for which the livehash will remain valid | | - - - -

Top

- -## CryptoCreate.proto - - - -### CryptoCreateTransactionBody - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| key | [Key](#Key) | The key that must sign each transfer out of the account. If receiverSigRequired is true, then it must also sign any transfer into the account. | | -| initialBalance | | The initial number of tinybars to put into the account | | -| proxyAccountID | [AccountID](#AccountID) | ID of the account to which this account is proxy staked. If proxyAccountID is null, or is an invalid account, or is an account that isn't a node, then this account is automatically proxy staked to a node chosen by the network, but without earning payments. If the proxyAccountID account refuses to accept proxy staking , or if it is not currently running a node, then it will behave as if proxyAccountID was null. | | -| sendRecordThreshold | | [Deprecated]. The threshold amount (in tinybars) for which an account record is created for any send/withdraw transaction | | -| receiveRecordThreshold | | [Deprecated]. The threshold amount (in tinybars) for which an account record is created for any receive/deposit transaction | | -| receiverSigRequired | | If true, this account's key must sign any transaction depositing into this account (in addition to all withdrawals) | | -| autoRenewPeriod | [Duration](#Duration) | The account is charged to extend its expiration date every this many seconds. If it doesn't have enough balance, it extends as long as possible. If it is empty when it expires, then it is deleted. | | -| shardID | [ShardID](#ShardID) | The shard in which this account is created | | -| realmID | [RealmID](#RealmID) | The realm in which this account is created (leave this null to create a new realm) | | -| newRealmAdminKey | [Key](#Key) | If realmID is null, then this the admin key for the new realm that will be created | | - - - -

Top

- -## CryptoDelete.proto - - Mark an account as deleted, moving all its current hbars to another account. It will remain in the ledger, marked as deleted, until it expires. Transfers into it a deleted account fail. But a deleted account can still have its expiration extended in the normal way. - - - -### CryptoDeleteTransactionBody - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| transferAccountID | [AccountID](#AccountID) | The account ID which will receive all remaining hbars | | -| deleteAccountID | [AccountID](#AccountID) | The account ID which should be deleted | | - - - -

Top

- -## CryptoDeleteLiveHash.proto - - At consensus, deletes a livehash associated to the given account. The transaction must be signed by either the key of the owning account, or at least one of the keys associated to the livehash. - - - -### CryptoDeleteLiveHashTransactionBody - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| accountOfLiveHash | [AccountID](#AccountID) | The account owning the livehash | | -| liveHashToDelete | | The SHA-384 livehash to delete from the account | | - - - -

Top

- -## CryptoGetAccountBalance.proto - - Get the balance of a cryptocurrency account. This returns only the balance, so it is a smaller - - - -### CryptoGetAccountBalanceQuery - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| header | [QueryHeader](#QueryHeader) | Standard info sent from client to node, including the signed payment, and what kind of response is requested (cost, state proof, both, or neither). | | -| balanceSource | oneof | | | -| | accountID | [AccountID](#AccountID) | The account ID for which information is requested | | -| | contractID | [ContractID](#ContractID) | The account ID for which information is requested | | - - - - -### CryptoGetAccountBalanceResponse - Response when the client sends the node CryptoGetAccountBalanceQuery - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| header | [ResponseHeader](#ResponseHeader) | Standard response from node to client, including the requested fields: cost, or state proof, or both, or neither | | -| accountID | [AccountID](#AccountID) | The account ID that is being described (this is useful with state proofs, for proving to a third party) | | -| balance | | The current balance, in tinybars | | -| tokenBalances | [TokenBalance](#TokenBalance) | The array of tokens that the account possesses | | - - - - -### TokenBalance - Contains information the balance of an Account in regards to the corresponding Token ID - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| tokenId | [TokenID](#TokenID) | The ID of the token | | -| balance | | The current token balance | | - - - - -### TokenBalances - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| tokenBalances | [TokenBalance](#TokenBalance) | | | - - - -

Top

- -## CryptoGetAccountRecords.proto - - Get all the records for an account for any transfers into it and out of it, that were above the threshold, during the last 25 hours. - - - -### CryptoGetAccountRecordsQuery - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| header | [QueryHeader](#QueryHeader) | Standard info sent from client to node, including the signed payment, and what kind of response is requested (cost, state proof, both, or neither). | | -| accountID | [AccountID](#AccountID) | The account ID for which the records should be retrieved | | - - - - -### CryptoGetAccountRecordsResponse - Response when the client sends the node CryptoGetAccountRecordsQuery - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| header | [ResponseHeader](#ResponseHeader) | Standard response from node to client, including the requested fields: cost, or state proof, or both, or neither | | -| accountID | [AccountID](#AccountID) | The account that this record is for | | -| records | [TransactionRecord](#TransactionRecord) | List of records, each with CryptoRecordBody as their body | | - - - -

Top

- -## CryptoGetInfo.proto - - Get all the information about an account, including the balance. This does not get the list of account records. - - - -### CryptoGetInfoQuery - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| header | [QueryHeader](#QueryHeader) | Standard info sent from client to node, including the signed payment, and what kind of response is requested (cost, state proof, both, or neither). | | -| accountID | [AccountID](#AccountID) | The account ID for which information is requested | | - - - - -### CryptoGetInfoResponse - Response when the client sends the node CryptoGetInfoQuery - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| header | [ResponseHeader](#ResponseHeader) | Standard response from node to client, including the requested fields: cost, or state proof, or both, or neither | | -| accountInfo | [CryptoGetInfoResponse.AccountInfo](#CryptoGetInfoResponse.AccountInfo) | Info about the account (a state proof can be generated for this) | | - - - - -### CryptoGetInfoResponse.AccountInfo - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| accountID | [AccountID](#AccountID) | The account ID for which this information applies | | -| contractAccountID | | The Contract Account ID comprising of both the contract instance and the cryptocurrency account owned by the contract instance, in the format used by Solidity | | -| deleted | | If true, then this account has been deleted, it will disappear when it expires, and all transactions for it will fail except the transaction to extend its expiration date | | -| proxyAccountID | [AccountID](#AccountID) | The Account ID of the account to which this is proxy staked. If proxyAccountID is null, or is an invalid account, or is an account that isn't a node, then this account is automatically proxy staked to a node chosen by the network, but without earning payments. If the proxyAccountID account refuses to accept proxy staking , or if it is not currently running a node, then it will behave as if proxyAccountID was null. | | -| proxyReceived | | The total number of tinybars proxy staked to this account | | -| key | [Key](#Key) | The key for the account, which must sign in order to transfer out, or to modify the account in any way other than extending its expiration date. | | -| balance | | The current balance of account in tinybars | | -| generateSendRecordThreshold | | [Deprecated]. The threshold amount, in tinybars, at which a record is created of any transaction that decreases the balance of this account by more than the threshold | | -| generateReceiveRecordThreshold | | [Deprecated]. The threshold amount, in tinybars, at which a record is created of any transaction that increases the balance of this account by more than the threshold | | -| receiverSigRequired | | If true, no transaction can transfer to this account unless signed by this account's key | | -| expirationTime | [Timestamp](#Timestamp) | The TimeStamp time at which this account is set to expire | | -| autoRenewPeriod | [Duration](#Duration) | The duration for expiration time will extend every this many seconds. If there are insufficient funds, then it extends as long as possible. If it is empty when it expires, then it is deleted. | | -| liveHashes | [LiveHash](#LiveHash) | All of the livehashes attached to the account (each of which is a hash along with the keys that authorized it and can delete it) | | -| tokenRelationships | [TokenRelationship](#TokenRelationship) | All tokens related to this account | | - - - - -### TokenRelationship - Token's information related to the given Account - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| tokenId | [TokenID](#TokenID) | The ID of the token | | -| symbol | | The Symbol of the token | | -| balance | | The balance that the Account holds in the smallest denomination | | -| kycStatus | [TokenKycStatus](#TokenKycStatus) | The KYC status of the account (KycNotApplicable, Granted or Revoked). If the token does not have KYC key, KycNotApplicable is returned | | -| freezeStatus | [TokenFreezeStatus](#TokenFreezeStatus) | The Freeze status of the account (FreezeNotApplicable, Frozen or Unfrozen). If the token does not have Freeze key, FreezeNotApplicable is returned | | - - - -

Top

- -## CryptoGetLiveHash.proto - - Requests a livehash associated to an account. - - - -### CryptoGetLiveHashQuery - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| header | [QueryHeader](#QueryHeader) | Standard info sent from client to node, including the signed payment, and what kind of response is requested (cost, state proof, both, or neither). | | -| accountID | [AccountID](#AccountID) | The account to which the livehash is associated | | -| hash | | The SHA-384 data in the livehash | | - - - - -### CryptoGetLiveHashResponse - Returns the full livehash associated to an account, if it is present. Note that the only way to obtain a state proof exhibiting the absence of a livehash from an account is to retrieve a state proof of the entire account with its list of livehashes. - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| header | [ResponseHeader](#ResponseHeader) | Standard response from node to client, including the requested fields: cost, or state proof, or both, or neither | | -| liveHash | [LiveHash](#LiveHash) | The livehash, if present | | - - - -

Top

- -## CryptoGetStakers.proto - - Get all the accounts that are proxy staking to this account. For each of them, give the amount currently staked. This is not yet implemented, but will be in a future version of the API. - - - -### AllProxyStakers - all of the accounts proxy staking to a given account, and the amounts proxy staked - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| accountID | [AccountID](#AccountID) | The Account ID that is being proxy staked to | | -| proxyStaker | [ProxyStaker](#ProxyStaker) | Each of the proxy staking accounts, and the amount they are proxy staking | | - - - - -### CryptoGetStakersQuery - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| header | [QueryHeader](#QueryHeader) | Standard info sent from client to node, including the signed payment, and what kind of response is requested (cost, state proof, both, or neither). | | -| accountID | [AccountID](#AccountID) | The Account ID for which the records should be retrieved | | - - - - -### CryptoGetStakersResponse - Response when the client sends the node CryptoGetStakersQuery - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| header | [ResponseHeader](#ResponseHeader) | Standard response from node to client, including the requested fields: cost, or state proof, or both, or neither | | -| stakers | [AllProxyStakers](#AllProxyStakers) | List of accounts proxy staking to this account, and the amount each is currently proxy staking | | - - - - -### ProxyStaker - information about a single account that is proxy staking - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| accountID | [AccountID](#AccountID) | The Account ID that is proxy staking | | -| amount | | The number of hbars that are currently proxy staked | | - - - -

Top

- -## CryptoService.proto - - - -### CryptoService - - -| RPC | Request | Response | Comments | -| --- | ------- | -------- | -------- | -| createAccount | Transaction | TransactionResponse | Creates a new account by submitting the transaction | -| updateAccount | Transaction | TransactionResponse | Updates an account by submitting the transaction | -| cryptoTransfer | Transaction | TransactionResponse | Initiates a transfer by submitting the transaction | -| cryptoDelete | Transaction | TransactionResponse | Deletes and account by submitting the transaction | -| addLiveHash | Transaction | TransactionResponse | (NOT CURRENTLY SUPPORTED) Adds a livehash | -| deleteLiveHash | Transaction | TransactionResponse | (NOT CURRENTLY SUPPORTED) Deletes a livehash | -| getLiveHash | Query | Response | (NOT CURRENTLY SUPPORTED) Retrieves a livehash for an account | -| getAccountRecords | Query | Response | Retrieves the 25-hour records stored for an account | -| cryptoGetBalance | Query | Response | Retrieves the balance of an account | -| getAccountInfo | Query | Response | Retrieves the metadata of an account | -| getTransactionReceipts | Query | Response | Retrieves the latest receipt for a transaction that is either awaiting consensus, or reached consensus in the last 180 seconds | -| getFastTransactionRecord | Query | Response | (NOT CURRENTLY SUPPORTED) Returns the records of transactions recently funded by an account | -| getTxRecordByTxID | Query | Response | Retrieves the record of a transaction that is either awaiting consensus, or reached consensus in the last 180 seconds | -| getStakersByAccountID | Query | Response | (NOT CURRENTLY SUPPORTED) Retrieves the stakers for a node by account id | - - - -

Top

- -## CryptoTransfer.proto - - A list of accounts and amounts to transfer out of each account (negative) or into it (positive). - - - -### CryptoTransferTransactionBody - Transfer cryptocurrency from some accounts to other accounts. The accounts list can contain up to 10 accounts. The amounts list must be the same length as the accounts list. Each negative amount is withdrawn from the corresponding account (a sender), and each positive one is added to the corresponding account (a receiver). The amounts list must sum to zero. Each amount is a number of tinyBars (there are 100,000,000 tinyBars in one Hbar). - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| transfers | [TransferList](#TransferList) | Accounts and amounts to transfer | | - - - - -### TransferList - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| accountAmounts | [AccountAmount](#AccountAmount) | Multiple list of AccountAmount pairs, each of which has an account and an amount to transfer into it (positive) or out of it (negative) | | - - - -

Top

- -## CryptoUpdate.proto - - - -### CryptoUpdateTransactionBody - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| accountIDToUpdate | [AccountID](#AccountID) | The account ID which is being updated in this transaction | | -| key | [Key](#Key) | The new key | | -| proxyAccountID | [AccountID](#AccountID) | ID of the account to which this account is proxy staked. If proxyAccountID is null, or is an invalid account, or is an account that isn't a node, then this account is automatically proxy staked to a node chosen by the network, but without earning payments. If the proxyAccountID account refuses to accept proxy staking , or if it is not currently running a node, then it will behave as if proxyAccountID was null. | | -| proxyFraction | | [Deprecated]. Payments earned from proxy staking are shared between the node and this account, with proxyFraction / 10000 going to this account | | -| sendRecordThresholdField | oneof | | | -| | sendRecordThreshold | | [Deprecated]. The new threshold amount (in tinybars) for which an account record is created for any send/withdraw transaction | | -| | sendRecordThresholdWrapper | [google.protobuf.UInt64Value](#google.protobuf.UInt64Value) | [Deprecated]. The new threshold amount (in tinybars) for which an account record is created for any send/withdraw transaction | | -| receiveRecordThresholdField | oneof | | | -| | receiveRecordThreshold | | [Deprecated]. The new threshold amount (in tinybars) for which an account record is created for any receive/deposit transaction. | | -| | receiveRecordThresholdWrapper | [google.protobuf.UInt64Value](#google.protobuf.UInt64Value) | [Deprecated]. The new threshold amount (in tinybars) for which an account record is created for any receive/deposit transaction. | | -| autoRenewPeriod | [Duration](#Duration) | The duration in which it will automatically extend the expiration period. If it doesn't have enough balance, it extends as long as possible. If it is empty when it expires, then it is deleted. | | -| expirationTime | [Timestamp](#Timestamp) | The new expiration time to extend to (ignored if equal to or before the current one) | | -| receiverSigRequiredField | oneof | | | -| | receiverSigRequired | | [Deprecated] Do NOT use this field to set a false value because the server cannot distinguish from the default value. Use receiverSigRequiredWrapper field for this purpose. | | -| | receiverSigRequiredWrapper | [google.protobuf.BoolValue](#google.protobuf.BoolValue) | If true, this account's key must sign any transaction depositing into this account (in addition to all withdrawals) | | - - - -

Top

- -## Duration.proto - - A length of time in seconds. - - - -### Duration - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| seconds | | The number of seconds | | - - - -

Top

- -## ExchangeRate.proto - - - -### ExchangeRate - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| hbarEquiv | | Denominator in calculation of exchange rate between hbar and cents | | -| centEquiv | | Numerator in calculation of exchange rate between hbar and cents | | -| expirationTime | [TimestampSeconds](#TimestampSeconds) | Expiration time in seconds for this exchange rate | | - - - - -### ExchangeRateSet - Two sets of exchange rates - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| currentRate | [ExchangeRate](#ExchangeRate) | Current exchange rate | | -| nextRate | [ExchangeRate](#ExchangeRate) | Next exchange rate which will take effect when current rate expires | | - - - -

Top

- -## FileAppend.proto - - - -### FileAppendTransactionBody - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| fileID | [FileID](#FileID) | The file to which the bytes will be appended | | -| contents | | The bytes that will be appended to the end of the specified file | | - - - -

Top

- -## FileCreate.proto - - Create a new file, containing the given contents. - - - -### FileCreateTransactionBody - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| expirationTime | [Timestamp](#Timestamp) | The time at which this file should expire (unless FileUpdateTransaction is used before then to extend its life) | | -| keys | [KeyList](#KeyList) | All these keys must sign to create or modify the file. Any one of them can sign to delete the file. | | -| contents | | The bytes that are the contents of the file | | -| shardID | [ShardID](#ShardID) | Shard in which this file is created | | -| realmID | [RealmID](#RealmID) | The Realm in which to the file is created (leave this null to create a new realm) | | -| newRealmAdminKey | [Key](#Key) | If realmID is null, then this the admin key for the new realm that will be created | | - - - -

Top

- -## FileDelete.proto - - Delete the given file. After deletion, it will be marked as deleted and will have no contents. But information about it will continue to exist until it expires. A list of keys was given when the file was created. All the keys on that list must sign transactions to create or modify the file, but any single one of them can be used to delete the file. Each "key" on that list may itself be a threshold key containing other keys (including other threshold keys). - - - -### FileDeleteTransactionBody - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| fileID | [FileID](#FileID) | The file to delete. It will be marked as deleted until it expires. Then it will disappear. | | - - - -

Top

- -## FileGetContents.proto - - Get the contents of a file. The content field is empty (no bytes) if the file is empty. - - - -### FileGetContentsQuery - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| header | [QueryHeader](#QueryHeader) | Standard info sent from client to node, including the signed payment, and what kind of response is requested (cost, state proof, both, or neither). | | -| fileID | [FileID](#FileID) | The file ID of the file whose contents are requested | | - - - - -### FileGetContentsResponse - Response when the client sends the node FileGetContentsQuery - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| header | [ResponseHeader](#ResponseHeader) | Standard response from node to client, including the requested fields: cost, or state proof, or both, or neither | | -| fileContents | [FileGetContentsResponse.FileContents](#FileGetContentsResponse.FileContents) | the file ID and contents (a state proof can be generated for this) | | - - - - -### FileGetContentsResponse.FileContents - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| fileID | [FileID](#FileID) | The file ID of the file whose contents are being returned | | -| contents | | The bytes contained in the file | | - - - -

Top

- -## FileGetInfo.proto - - Get all of the information about a file, except for its contents. When a file expires, it no longer exists, and there will be no info about it, and the fileInfo field will be blank. If a transaction or smart contract deletes the file, but it has not yet expired, then the fileInfo field will be non-empty, the deleted field will be true, its size will be 0, and its contents will be empty. - - - -### FileGetInfoQuery - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| header | [QueryHeader](#QueryHeader) | Standard info sent from client to node, including the signed payment, and what kind of response is requested (cost, state proof, both, or neither). | | -| fileID | [FileID](#FileID) | The file ID of the file for which information is requested | | - - - - -### FileGetInfoResponse - Response when the client sends the node FileGetInfoQuery - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| header | [ResponseHeader](#ResponseHeader) | Standard response from node to client, including the requested fields: cost, or state proof, or both, or neither | | -| fileInfo | [FileGetInfoResponse.FileInfo](#FileGetInfoResponse.FileInfo) | The information about the file | | - - - - -### FileGetInfoResponse.FileInfo - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| fileID | [FileID](#FileID) | The file ID of the file for which information is requested | | -| size | | Number of bytes in contents | | -| expirationTime | [Timestamp](#Timestamp) | The current time at which this account is set to expire | | -| deleted | | True if deleted but not yet expired | | -| keys | [KeyList](#KeyList) | One of these keys must sign in order to modify or delete the file | | - - - -

Top

- -## FileService.proto - - - -### FileService - - -| RPC | Request | Response | Comments | -| --- | ------- | -------- | -------- | -| createFile | Transaction | TransactionResponse | Creates a file | -| updateFile | Transaction | TransactionResponse | Updates a file | -| deleteFile | Transaction | TransactionResponse | Deletes a file | -| appendContent | Transaction | TransactionResponse | Appends to a file | -| getFileContent | Query | Response | Retrieves the file contents | -| getFileInfo | Query | Response | Retrieves the file information | -| systemDelete | Transaction | TransactionResponse | Deletes a file if the submitting account has network admin privileges | -| systemUndelete | Transaction | TransactionResponse | Undeletes a file if the submitting account has network admin privileges | - - - -

Top

- -## FileUpdate.proto - - - -### FileUpdateTransactionBody - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| fileID | [FileID](#FileID) | The ID of the file to update | | -| expirationTime | [Timestamp](#Timestamp) | The new expiry time (ignored if not later than the current expiry) | | -| keys | [KeyList](#KeyList) | The new list of keys that can modify or delete the file | | -| contents | | The new contents that should overwrite the file's current contents | | - - - -

Top

- -## Freeze.proto - - Set the freezing period in which the platform will stop creating events and accepting transactions. This is used before safely shut down the platform for maintenance. - - - -### FreezeTransactionBody - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| startHour | | The start hour (in UTC time), a value between 0 and 23 | | -| startMin | | The start minute (in UTC time), a value between 0 and 59 | | -| endHour | | The end hour (in UTC time), a value between 0 and 23 | | -| endMin | | The end minute (in UTC time), a value between 0 and 59 | | -| updateFile | [FileID](#FileID) | The ID of the file needs to be updated during a freeze transaction | | - - - -

Top

- -## FreezeService.proto - - The request and responses for freeze service. - - - -### FreezeService - - -| RPC | Request | Response | Comments | -| --- | ------- | -------- | -------- | -| freeze | Transaction | TransactionResponse | Freezes the nodes by submitting the transaction. The grpc server returns the TransactionResponse | - - - -

Top

- -## GetByKey.proto - - Get all accounts, claims, files, and smart contract instances whose associated keys include the given Key. The given Key must not be a contractID or a ThresholdKey. This is not yet implemented in the API, but will be in the future. - - - -### EntityID - the ID for a single entity (account, livehash, file, or smart contract instance) - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| entity | oneof | | | -| | accountID | [AccountID](#AccountID) | The Account ID for the cryptocurrency account | | -| | liveHash | [LiveHash](#LiveHash) | A uniquely identifying livehash of an acount | | -| | fileID | [FileID](#FileID) | The file ID of the file | | -| | contractID | [ContractID](#ContractID) | The smart contract ID that identifies instance | | - - - - -### GetByKeyQuery - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| header | [QueryHeader](#QueryHeader) | Standard info sent from client to node, including the signed payment, and what kind of response is requested (cost, state proof, both, or neither). | | -| key | [Key](#Key) | The key to search for. It must not contain a contractID nor a ThresholdSignature. | | - - - - -### GetByKeyResponse - Response when the client sends the node GetByKeyQuery - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| header | [ResponseHeader](#ResponseHeader) | Standard response from node to client, including the requested fields: cost, or state proof, or both, or neither | | -| entities | [EntityID](#EntityID) | The list of entities that include this public key in their associated Key list | | - - - -

Top

- -## GetBySolidityID.proto - - Get the IDs in the format used by transactions, given the ID in the format used by Solidity. If the Solidity ID is for a smart contract instance, then both the ContractID and associated AccountID will be returned. - - - -### GetBySolidityIDQuery - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| header | [QueryHeader](#QueryHeader) | Standard info sent from client to node, including the signed payment, and what kind of response is requested (cost, state proof, both, or neither). | | -| solidityID | | The ID in the format used by Solidity | | - - - - -### GetBySolidityIDResponse - Response when the client sends the node GetBySolidityIDQuery - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| header | [ResponseHeader](#ResponseHeader) | Standard response from node to client, including the requested fields: cost, or state proof, or both, or neither | | -| accountID | [AccountID](#AccountID) | The Account ID for the cryptocurrency account | | -| fileID | [FileID](#FileID) | The file Id for the file | | -| contractID | [ContractID](#ContractID) | A smart contract ID for the instance (if this is included, then the associated accountID will also be included) | | - - - -

Top

- -## NetworkGetVersionInfo.proto - - Get the deployed versions of Hedera Services and the HAPI proto in semantic version format - - - -### NetworkGetVersionInfoQuery - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| header | [QueryHeader](#QueryHeader) | Standard info sent from client to node, including the signed payment, and what kind of response is requested (cost, state proof, both, or neither). | | - - - - -### NetworkGetVersionInfoResponse - Response when the client sends the node NetworkGetVersionInfoQuery - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| header | [ResponseHeader](#ResponseHeader) | Standard response from node to client, including the requested fields: cost, or state proof, or both, or neither | | -| hapiProtoVersion | [SemanticVersion](#SemanticVersion) | | | -| hederaServicesVersion | [SemanticVersion](#SemanticVersion) | | | - - - -

Top

- -## NetworkService.proto - - The requests and responses for different network services. - - - -### NetworkService - - -| RPC | Request | Response | Comments | -| --- | ------- | -------- | -------- | -| getVersionInfo | Query | Response | Retrieves the active versions of Hedera Services and HAPI proto | -| uncheckedSubmit | Transaction | TransactionResponse | | - - - -

Top

- -## Query.proto - - A single query, which is sent from the client to a node. This includes all possible queries. Each Query should not have more than 50 levels. - - - -### Query - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| query | oneof | | | -| | getByKey | [GetByKeyQuery](#GetByKeyQuery) | Get all entities associated with a given key | | -| | getBySolidityID | [GetBySolidityIDQuery](#GetBySolidityIDQuery) | Get the IDs in the format used in transactions, given the format used in Solidity | | -| | contractCallLocal | [ContractCallLocalQuery](#ContractCallLocalQuery) | Call a function of a smart contract instance | | -| | contractGetInfo | [ContractGetInfoQuery](#ContractGetInfoQuery) | Get information about a smart contract instance | | -| | contractGetBytecode | [ContractGetBytecodeQuery](#ContractGetBytecodeQuery) | Get bytecode used by a smart contract instance | | -| | ContractGetRecords | [ContractGetRecordsQuery](#ContractGetRecordsQuery) | Get Records of the contract instance | | -| | cryptogetAccountBalance | [CryptoGetAccountBalanceQuery](#CryptoGetAccountBalanceQuery) | Get the current balance in a cryptocurrency account | | -| | cryptoGetAccountRecords | [CryptoGetAccountRecordsQuery](#CryptoGetAccountRecordsQuery) | Get all the records that currently exist for transactions involving an account | | -| | cryptoGetInfo | [CryptoGetInfoQuery](#CryptoGetInfoQuery) | Get all information about an account | | -| | cryptoGetLiveHash | [CryptoGetLiveHashQuery](#CryptoGetLiveHashQuery) | Get a single livehash from a single account, if present | | -| | cryptoGetProxyStakers | [CryptoGetStakersQuery](#CryptoGetStakersQuery) | Get all the accounts that proxy stake to a given account, and how much they proxy stake (not yet implemented in the current API) | | -| | fileGetContents | [FileGetContentsQuery](#FileGetContentsQuery) | Get the contents of a file (the bytes stored in it) | | -| | fileGetInfo | [FileGetInfoQuery](#FileGetInfoQuery) | Get information about a file, such as its expiration date | | -| | transactionGetReceipt | [TransactionGetReceiptQuery](#TransactionGetReceiptQuery) | Get a receipt for a transaction (lasts 180 seconds) | | -| | transactionGetRecord | [TransactionGetRecordQuery](#TransactionGetRecordQuery) | Get a record for a transaction | | -| | transactionGetFastRecord | [TransactionGetFastRecordQuery](#TransactionGetFastRecordQuery) | Get a record for a transaction (lasts 180 seconds) | | -| | consensusGetTopicInfo | [ConsensusGetTopicInfoQuery](#ConsensusGetTopicInfoQuery) | Get the parameters of and state of a consensus topic. | | -| | networkGetVersionInfo | [NetworkGetVersionInfoQuery](#NetworkGetVersionInfoQuery) | | | -| | tokenGetInfo | [TokenGetInfoQuery](#TokenGetInfoQuery) | Get all information about a token | | - - - -

Top

- -## QueryHeader.proto - - - -### QueryHeader - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| payment | [Transaction](#Transaction) | A signed CryptoTransferTransaction to pay the node a fee for handling this query | | -| responseType | [ResponseType](#ResponseType) | The requested response, asking for cost, state proof, both, or neither | | - - - - -### ResponseType - - -| Enum Name | Description | -| --------- | ----------- | -| ANSWER_ONLY | Response returns answer | -| ANSWER_STATE_PROOF | (NOT YET SUPPORTED) Response returns both answer and state proof | -| COST_ANSWER | Response returns the cost of answer | -| COST_ANSWER_STATE_PROOF | (NOT YET SUPPORTED) Response returns the total cost of answer and state proof | - - - -

Top

- -## Response.proto - - A single response, which is returned from the node to the client, after the client sent the node a query. This includes all responses. - - - -### Response - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| response | oneof | | | -| | getByKey | [GetByKeyResponse](#GetByKeyResponse) | Get all entities associated with a given key | | -| | getBySolidityID | [GetBySolidityIDResponse](#GetBySolidityIDResponse) | Get the IDs in the format used in transactions, given the format used in Solidity | | -| | contractCallLocal | [ContractCallLocalResponse](#ContractCallLocalResponse) | Response to call a function of a smart contract instance | | -| | contractGetBytecodeResponse | [ContractGetBytecodeResponse](#ContractGetBytecodeResponse) | Get the bytecode for a smart contract instance | | -| | contractGetInfo | [ContractGetInfoResponse](#ContractGetInfoResponse) | Get information about a smart contract instance | | -| | contractGetRecordsResponse | [ContractGetRecordsResponse](#ContractGetRecordsResponse) | Get all existing records for a smart contract instance | | -| | cryptogetAccountBalance | [CryptoGetAccountBalanceResponse](#CryptoGetAccountBalanceResponse) | Get the current balance in a cryptocurrency account | | -| | cryptoGetAccountRecords | [CryptoGetAccountRecordsResponse](#CryptoGetAccountRecordsResponse) | Get all the records that currently exist for transactions involving an account | | -| | cryptoGetInfo | [CryptoGetInfoResponse](#CryptoGetInfoResponse) | Get all information about an account | | -| | cryptoGetLiveHash | [CryptoGetLiveHashResponse](#CryptoGetLiveHashResponse) | Contains a livehash associated to an account | | -| | cryptoGetProxyStakers | [CryptoGetStakersResponse](#CryptoGetStakersResponse) | Get all the accounts that proxy stake to a given account, and how much they proxy stake | | -| | fileGetContents | [FileGetContentsResponse](#FileGetContentsResponse) | Get the contents of a file (the bytes stored in it) | | -| | fileGetInfo | [FileGetInfoResponse](#FileGetInfoResponse) | Get information about a file, such as its expiration date | | -| | transactionGetReceipt | [TransactionGetReceiptResponse](#TransactionGetReceiptResponse) | Get a receipt for a transaction | | -| | transactionGetRecord | [TransactionGetRecordResponse](#TransactionGetRecordResponse) | Get a record for a transaction | | -| | transactionGetFastRecord | [TransactionGetFastRecordResponse](#TransactionGetFastRecordResponse) | Get a record for a transaction (lasts 180 seconds) | | -| | consensusGetTopicInfo | [ConsensusGetTopicInfoResponse](#ConsensusGetTopicInfoResponse) | Parameters of and state of a consensus topic.. | | -| | networkGetVersionInfo | [NetworkGetVersionInfoResponse](#NetworkGetVersionInfoResponse) | Semantic versions of Hedera Services and HAPI proto | | -| | tokenGetInfo | [TokenGetInfoResponse](#TokenGetInfoResponse) | Get all information about a token | | - - - -

Top

- -## ResponseCode.proto - --

Hedera Network Services Protobuf

Copyright (C) 2018 - 2020 Hedera Hashgraph, LLC

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http:www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
‍ - - - -### ResponseCodeEnum - - -| Enum Name | Description | -| --------- | ----------- | -| OK | The transaction passed the precheck validations. | -| INVALID_TRANSACTION | For any error not handled by specific error codes listed below. | -| PAYER_ACCOUNT_NOT_FOUND | Payer account does not exist. | -| INVALID_NODE_ACCOUNT | Node Account provided does not match the node account of the node the transaction was submitted to. | -| TRANSACTION_EXPIRED | Pre-Check error when TransactionValidStart + transactionValidDuration is less than current consensus time. | -| INVALID_TRANSACTION_START | Transaction start time is greater than current consensus time | -| INVALID_TRANSACTION_DURATION | valid transaction duration is a positive non zero number that does not exceed 120 seconds | -| INVALID_SIGNATURE | The transaction signature is not valid | -| MEMO_TOO_LONG | Transaction memo size exceeded 100 bytes | -| INSUFFICIENT_TX_FEE | The fee provided in the transaction is insufficient for this type of transaction | -| INSUFFICIENT_PAYER_BALANCE | The payer account has insufficient cryptocurrency to pay the transaction fee | -| DUPLICATE_TRANSACTION | This transaction ID is a duplicate of one that was submitted to this node or reached consensus in the last 180 seconds (receipt period) | -| BUSY | If API is throttled out | -| NOT_SUPPORTED | The API is not currently supported | -| INVALID_FILE_ID | The file id is invalid or does not exist | -| INVALID_ACCOUNT_ID | The account id is invalid or does not exist | -| INVALID_CONTRACT_ID | The contract id is invalid or does not exist | -| INVALID_TRANSACTION_ID | Transaction id is not valid | -| RECEIPT_NOT_FOUND | Receipt for given transaction id does not exist | -| RECORD_NOT_FOUND | Record for given transaction id does not exist | -| INVALID_SOLIDITY_ID | The solidity id is invalid or entity with this solidity id does not exist | -| UNKNOWN | The responding node has submitted the transaction to the network. Its final status is still unknown. | -| SUCCESS | The transaction succeeded | -| FAIL_INVALID | There was a system error and the transaction failed because of invalid request parameters. | -| FAIL_FEE | There was a system error while performing fee calculation, reserved for future. | -| FAIL_BALANCE | There was a system error while performing balance checks, reserved for future. | -| KEY_REQUIRED | Key not provided in the transaction body | -| BAD_ENCODING | Unsupported algorithm/encoding used for keys in the transaction | -| INSUFFICIENT_ACCOUNT_BALANCE | When the account balance is not sufficient for the transfer | -| INVALID_SOLIDITY_ADDRESS | During an update transaction when the system is not able to find the Users Solidity address | -| INSUFFICIENT_GAS | Not enough gas was supplied to execute transaction | -| CONTRACT_SIZE_LIMIT_EXCEEDED | contract byte code size is over the limit | -| LOCAL_CALL_MODIFICATION_EXCEPTION | local execution (query) is requested for a function which changes state | -| CONTRACT_REVERT_EXECUTED | Contract REVERT OPCODE executed | -| CONTRACT_EXECUTION_EXCEPTION | For any contract execution related error not handled by specific error codes listed above. | -| INVALID_RECEIVING_NODE_ACCOUNT | In Query validation, account with +ve(amount) value should be Receiving node account, the receiver account should be only one account in the list | -| MISSING_QUERY_HEADER | Header is missing in Query request | -| ACCOUNT_UPDATE_FAILED | The update of the account failed | -| INVALID_KEY_ENCODING | Provided key encoding was not supported by the system | -| NULL_SOLIDITY_ADDRESS | null solidity address | -| CONTRACT_UPDATE_FAILED | update of the contract failed | -| INVALID_QUERY_HEADER | the query header is invalid | -| INVALID_FEE_SUBMITTED | Invalid fee submitted | -| INVALID_PAYER_SIGNATURE | Payer signature is invalid | -| KEY_NOT_PROVIDED | The keys were not provided in the request. | -| INVALID_EXPIRATION_TIME | Expiration time provided in the transaction was invalid. | -| NO_WACL_KEY | WriteAccess Control Keys are not provided for the file | -| FILE_CONTENT_EMPTY | The contents of file are provided as empty. | -| INVALID_ACCOUNT_AMOUNTS | The crypto transfer credit and debit do not sum equal to 0 | -| EMPTY_TRANSACTION_BODY | Transaction body provided is empty | -| INVALID_TRANSACTION_BODY | Invalid transaction body provided | -| INVALID_SIGNATURE_TYPE_MISMATCHING_KEY | the type of key (base ed25519 key, KeyList, or ThresholdKey) does not match the type of signature (base ed25519 signature, SignatureList, or ThresholdKeySignature) | -| INVALID_SIGNATURE_COUNT_MISMATCHING_KEY | the number of key (KeyList, or ThresholdKey) does not match that of signature (SignatureList, or ThresholdKeySignature). e.g. if a keyList has 3 base keys, then the corresponding signatureList should also have 3 base signatures. | -| EMPTY_LIVE_HASH_BODY | the livehash body is empty | -| EMPTY_LIVE_HASH | the livehash data is missing | -| EMPTY_LIVE_HASH_KEYS | the keys for a livehash are missing | -| INVALID_LIVE_HASH_SIZE | the livehash data is not the output of a SHA-384 digest | -| EMPTY_QUERY_BODY | the query body is empty | -| EMPTY_LIVE_HASH_QUERY | the crypto livehash query is empty | -| LIVE_HASH_NOT_FOUND | the livehash is not present | -| ACCOUNT_ID_DOES_NOT_EXIST | the account id passed has not yet been created. | -| LIVE_HASH_ALREADY_EXISTS | the livehash already exists for a given account | -| INVALID_FILE_WACL | File WACL keys are invalid | -| SERIALIZATION_FAILED | Serialization failure | -| TRANSACTION_OVERSIZE | The size of the Transaction is greater than transactionMaxBytes | -| TRANSACTION_TOO_MANY_LAYERS | The Transaction has more than 50 levels | -| CONTRACT_DELETED | Contract is marked as deleted | -| PLATFORM_NOT_ACTIVE | the platform node is either disconnected or lagging behind. | -| KEY_PREFIX_MISMATCH | one public key matches more than one prefixes on the signature map | -| PLATFORM_TRANSACTION_NOT_CREATED | transaction not created by platform due to large backlog | -| INVALID_RENEWAL_PERIOD | auto renewal period is not a positive number of seconds | -| INVALID_PAYER_ACCOUNT_ID | the response code when a smart contract id is passed for a crypto API request | -| ACCOUNT_DELETED | the account has been marked as deleted | -| FILE_DELETED | the file has been marked as deleted | -| ACCOUNT_REPEATED_IN_ACCOUNT_AMOUNTS | same accounts repeated in the transfer account list | -| SETTING_NEGATIVE_ACCOUNT_BALANCE | attempting to set negative balance value for crypto account | -| OBTAINER_REQUIRED | when deleting smart contract that has crypto balance either transfer account or transfer smart contract is required | -| OBTAINER_SAME_CONTRACT_ID | when deleting smart contract that has crypto balance you can not use the same contract id as transferContractId as the one being deleted | -| OBTAINER_DOES_NOT_EXIST | transferAccountId or transferContractId specified for contract delete does not exist | -| MODIFYING_IMMUTABLE_CONTRACT | attempting to modify (update or delete a immutable smart contract, i.e. one created without a admin key) | -| FILE_SYSTEM_EXCEPTION | Unexpected exception thrown by file system functions | -| AUTORENEW_DURATION_NOT_IN_RANGE | the duration is not a subset of [MINIMUM_AUTORENEW_DURATION,MAXIMUM_AUTORENEW_DURATION] | -| ERROR_DECODING_BYTESTRING | Decoding the smart contract binary to a byte array failed. Check that the input is a valid hex string. | -| CONTRACT_FILE_EMPTY | File to create a smart contract was of length zero | -| CONTRACT_BYTECODE_EMPTY | Bytecode for smart contract is of length zero | -| INVALID_INITIAL_BALANCE | Attempt to set negative initial balance | -| INVALID_RECEIVE_RECORD_THRESHOLD | [Deprecated]. attempt to set negative receive record threshold | -| INVALID_SEND_RECORD_THRESHOLD | [Deprecated]. attempt to set negative send record threshold | -| ACCOUNT_IS_NOT_GENESIS_ACCOUNT | Special Account Operations should be performed by only Genesis account, return this code if it is not Genesis Account | -| PAYER_ACCOUNT_UNAUTHORIZED | The fee payer account doesn't have permission to submit such Transaction | -| INVALID_FREEZE_TRANSACTION_BODY | FreezeTransactionBody is invalid | -| FREEZE_TRANSACTION_BODY_NOT_FOUND | FreezeTransactionBody does not exist | -| TRANSFER_LIST_SIZE_LIMIT_EXCEEDED | Exceeded the number of accounts (both from and to) allowed for crypto transfer list | -| RESULT_SIZE_LIMIT_EXCEEDED | Smart contract result size greater than specified maxResultSize | -| NOT_SPECIAL_ACCOUNT | The payer account is not a special account(account 0.0.55) | -| CONTRACT_NEGATIVE_GAS | Negative gas was offered in smart contract call | -| CONTRACT_NEGATIVE_VALUE | Negative value / initial balance was specified in a smart contract call / create | -| INVALID_FEE_FILE | Failed to update fee file | -| INVALID_EXCHANGE_RATE_FILE | Failed to update exchange rate file | -| INSUFFICIENT_LOCAL_CALL_GAS | Payment tendered for contract local call cannot cover both the fee and the gas | -| ENTITY_NOT_ALLOWED_TO_DELETE | Entities with Entity ID below 1000 are not allowed to be deleted | -| AUTHORIZATION_FAILED | Violating one of these rules: 1) treasury account can update all entities below 0.0.1000, 2) account 0.0.50 can update all entities from 0.0.51 - 0.0.80, 3) Network Function Master Account A/c 0.0.50 - Update all Network Function accounts & perform all the Network Functions listed below, 4) Network Function Accounts: i) A/c 0.0.55 - Update Address Book files (0.0.101/102), ii) A/c 0.0.56 - Update Fee schedule (0.0.111), iii) A/c 0.0.57 - Update Exchange Rate (0.0.112). | -| FILE_UPLOADED_PROTO_INVALID | Fee Schedule Proto uploaded but not valid (append or update is required) | -| FILE_UPLOADED_PROTO_NOT_SAVED_TO_DISK | Fee Schedule Proto uploaded but not valid (append or update is required) | -| FEE_SCHEDULE_FILE_PART_UPLOADED | Fee Schedule Proto File Part uploaded | -| EXCHANGE_RATE_CHANGE_LIMIT_EXCEEDED | The change on Exchange Rate exceeds Exchange_Rate_Allowed_Percentage | -| MAX_CONTRACT_STORAGE_EXCEEDED | Contract permanent storage exceeded the currently allowable limit | -| TRANSFER_ACCOUNT_SAME_AS_DELETE_ACCOUNT | Transfer Account should not be same as Account to be deleted | -| TOTAL_LEDGER_BALANCE_INVALID | | -| EXPIRATION_REDUCTION_NOT_ALLOWED | The expiration date/time on a smart contract may not be reduced | -| MAX_GAS_LIMIT_EXCEEDED | Gas exceeded currently allowable gas limit per transaction | -| MAX_FILE_SIZE_EXCEEDED | File size exceeded the currently allowable limit | -| INVALID_TOPIC_ID | The Topic ID specified is not in the system. | -| INVALID_ADMIN_KEY | | -| INVALID_SUBMIT_KEY | | -| UNAUTHORIZED | An attempted operation was not authorized (ie - a deleteTopic for a topic with no adminKey). | -| INVALID_TOPIC_MESSAGE | A ConsensusService message is empty. | -| INVALID_AUTORENEW_ACCOUNT | The autoRenewAccount specified is not a valid, active account. | -| AUTORENEW_ACCOUNT_NOT_ALLOWED | An adminKey was not specified on the topic, so there must not be an autoRenewAccount. | -| TOPIC_EXPIRED | The topic has expired, was not automatically renewed, and is in a 7 day grace period before the topic will be
deleted unrecoverably. This error response code will not be returned until autoRenew functionality is supported
by HAPI. | -| INVALID_CHUNK_NUMBER | chunk number must be from 1 to total (chunks) inclusive. | -| INVALID_CHUNK_TRANSACTION_ID | For every chunk, the payer account that is part of initialTransactionID must match the Payer Account of this transaction. The entire initialTransactionID should match the transactionID of the first chunk, but this is not checked or enforced by Hedera except when the chunk number is 1. | -| ACCOUNT_FROZEN_FOR_TOKEN | Account is frozen and cannot transact with the token | -| TOKENS_PER_ACCOUNT_LIMIT_EXCEEDED | Maximum number of token relations for agiven account is exceeded | -| INVALID_TOKEN_ID | The token is invalid or does not exist | -| INVALID_TOKEN_DECIMALS | Invalid token decimals | -| INVALID_TOKEN_INITIAL_SUPPLY | Invalid token initial supply | -| INVALID_TREASURY_ACCOUNT_FOR_TOKEN | Treasury Account does not exist or is deleted | -| INVALID_TOKEN_SYMBOL | Token Symbol is not UTF-8 capitalized alphabetical string | -| TOKEN_HAS_NO_FREEZE_KEY | Freeze key is not set on token | -| TRANSFERS_NOT_ZERO_SUM_FOR_TOKEN | Amounts in transfer list are not net zero | -| MISSING_TOKEN_SYMBOL | Token Symbol is not provided | -| TOKEN_SYMBOL_TOO_LONG | Token Symbol is too long | -| ACCOUNT_KYC_NOT_GRANTED_FOR_TOKEN | KYC must be granted and account does not have KYC granted | -| TOKEN_HAS_NO_KYC_KEY | KYC key is not set on token | -| INSUFFICIENT_TOKEN_BALANCE | Token balance is not sufficient for the transaction | -| TOKEN_WAS_DELETED | Token transactions cannot be executed on deleted token | -| TOKEN_HAS_NO_SUPPLY_KEY | Supply key is not set on token | -| TOKEN_HAS_NO_WIPE_KEY | Wipe key is not set on token | -| INVALID_TOKEN_MINT_AMOUNT | | -| INVALID_TOKEN_BURN_AMOUNT | | -| TOKEN_NOT_ASSOCIATED_TO_ACCOUNT | | -| CANNOT_WIPE_TOKEN_TREASURY_ACCOUNT | Cannot execute wipe operation on treasury account | -| INVALID_KYC_KEY | | -| INVALID_WIPE_KEY | | -| INVALID_FREEZE_KEY | | -| INVALID_SUPPLY_KEY | | -| MISSING_TOKEN_NAME | Token Name is not provided | -| TOKEN_NAME_TOO_LONG | Token Name is too long | -| INVALID_WIPING_AMOUNT | The provided wipe amount must not be negative, zero or bigger than the token holder balance | -| TOKEN_IS_IMMUTABLE | Token does not have Admin key set, thus update/delete transactions cannot be performed | -| TOKEN_ALREADY_ASSOCIATED_TO_ACCOUNT | An associateToken operation specified a token already associated to the account | -| TRANSACTION_REQUIRES_ZERO_TOKEN_BALANCES | An attempted operation is invalid until all token balances for the target account are zero | -| ACCOUNT_IS_TREASURY | An attempted operation is invalid because the account is a treasury | - - - -

Top

- -## ResponseHeader.proto - - Every query receives a response containing the QueryResponseHeader. Either or both of the cost and stateProof fields may be blank, if the responseType didn't ask for the cost or stateProof. - - - -### ResponseHeader - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| nodeTransactionPrecheckCode | [ResponseCodeEnum](#ResponseCodeEnum) | Result of fee transaction precheck, saying it passed, or why it failed | | -| responseType | [ResponseType](#ResponseType) | The requested response is repeated back here, for convenience | | -| cost | | The fee that would be charged to get the requested information (if a cost was requested). Note: This cost only includes the query fee and does not include the transfer fee(which is required to execute the transfer transaction to debit the payer account and credit the node account with query fee) | | -| stateProof | | The state proof for this information (if a state proof was requested, and is available) | | - - - -

Top

- -## SmartContractService.proto - - - -### SmartContractService - - -| RPC | Request | Response | Comments | -| --- | ------- | -------- | -------- | -| createContract | Transaction | TransactionResponse | Creates a contract | -| updateContract | Transaction | TransactionResponse | Updates a contract with the content | -| contractCallMethod | Transaction | TransactionResponse | Calls a contract | -| getContractInfo | Query | Response | Retrieves the contract information | -| contractCallLocalMethod | Query | Response | Calls a smart contract to be run on a single node | -| ContractGetBytecode | Query | Response | Retrieves the byte code of a contract | -| getBySolidityID | Query | Response | Retrieves a contract by its Solidity address | -| getTxRecordByContractID | Query | Response | Retrieves the 25-hour records stored for a contract | -| deleteContract | Transaction | TransactionResponse | Deletes a contract instance and transfers any remaining hbars to a specified receiver | -| systemDelete | Transaction | TransactionResponse | Deletes a contract if the submitting account has network admin privileges | -| systemUndelete | Transaction | TransactionResponse | Undeletes a contract if the submitting account has network admin privileges | - - - -

Top

- -## SystemDelete.proto - - - -### SystemDeleteTransactionBody - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| id | oneof | | | -| | fileID | [FileID](#FileID) | The file ID of the file to delete, in the format used in transactions | | -| | contractID | [ContractID](#ContractID) | The contract ID instance to delete, in the format used in transactions | | -| expirationTime | [TimestampSeconds](#TimestampSeconds) | The timestamp in seconds at which the "deleted" file should truly be permanently deleted | | - - - -

Top

- -## SystemUndelete.proto - - - -### SystemUndeleteTransactionBody - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| id | oneof | | | -| | fileID | [FileID](#FileID) | The file ID to undelete, in the format used in transactions | | -| | contractID | [ContractID](#ContractID) | The contract ID instance to undelete, in the format used in transactions | | - - - -

Top

- -## Timestamp.proto - - An exact date and time. This is the same data structure as the protobuf Timestamp.proto (see the comments in https:github.com/google/protobuf/blob/master/src/google/protobuf/timestamp.proto) - - - -### Timestamp - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| seconds | | Number of complete seconds since the start of the epoch | | -| nanos | | Number of nanoseconds since the start of the last second | | - - - - -### TimestampSeconds - An exact date and time, with a resolution of one second (no nanoseconds). - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| seconds | | Number of complete seconds since the start of the epoch | | - - - -

Top

- -## TokenAssociate.proto - - Associates the provided account with the provided tokens. Must be signed by the provided Account's key. - - - -### TokenAssociateTransactionBody - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| account | [AccountID](#AccountID) | The account to be associated with the provided tokens | | -| tokens | [TokenID](#TokenID) | The tokens to be associated with the provided account | | - - - -

Top

- -## TokenBurn.proto - - - -### TokenBurnTransactionBody - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| token | [TokenID](#TokenID) | The token for which to burn tokens. If token does not exist, transaction results in INVALID_TOKEN_ID | | -| amount | | The amount to burn from the Treasury Account. Amount must be a positive non-zero number, not bigger than the token balance of the treasury account (0; balance], represented in the lowest denomination. | | - - - -

Top

- -## TokenCreate.proto - - - -### TokenCreateTransactionBody - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| name | | The publicly visible name of the token, specified as a string of only ASCII characters | | -| symbol | | The publicly visible token symbol. It is UTF-8 capitalized alphabetical string identifying the token | | -| decimals | | The number of decimal places a token is divisible by. This field can never be changed! | | -| initialSupply | | Specifies the initial supply of tokens to be put in circulation. The initial supply is sent to the Treasury Account. The supply is in the lowest denomination possible. | | -| treasury | [AccountID](#AccountID) | The account which will act as a treasury for the token. This account will receive the specified initial supply | | -| adminKey | [Key](#Key) | The key which can perform update/delete operations on the token. If empty, the token can be perceived as immutable (not being able to be updated/deleted) | | -| kycKey | [Key](#Key) | The key which can grant or revoke KYC of an account for the token's transactions. If empty, KYC is not required, and KYC grant or revoke operations are not possible. | | -| freezeKey | [Key](#Key) | The key which can sign to freeze or unfreeze an account for token transactions. If empty, freezing is not possible | | -| wipeKey | [Key](#Key) | The key which can wipe the token balance of an account. If empty, wipe is not possible | | -| supplyKey | [Key](#Key) | The key which can change the supply of a token. The key is used to sign Token Mint/Burn operations | | -| freezeDefault | | The default Freeze status (frozen or unfrozen) of Hedera accounts relative to this token. If true, an account must be unfrozen before it can receive the token | | -| expiry | | The epoch second at which the token should expire; if an auto-renew account and period are specified, this is coerced to the current epoch second plus the autoRenewPeriod | | -| autoRenewAccount | [AccountID](#AccountID) | An account which will be automatically charged to renew the token's expiration, at autoRenewPeriod interval | | -| autoRenewPeriod | | The interval at which the auto-renew account will be charged to extend the token's expiry | | - - - -

Top

- -## TokenDelete.proto - - - -### TokenDeleteTransactionBody - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| token | [TokenID](#TokenID) | The token to be deleted. If invalid token is specified, transaction will result in INVALID_TOKEN_ID | | - - - -

Top

- -## TokenDissociate.proto - - Dissociates the provided account with the provided tokens. Must be signed by the provided Account's key. - - - -### TokenDissociateTransactionBody - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| account | [AccountID](#AccountID) | The account to be dissociated with the provided tokens | | -| tokens | [TokenID](#TokenID) | The tokens to be dissociated with the provided account | | - - - -

Top

- -## TokenFreezeAccount.proto - - Freezes transfers of the specified token for the account. Must be signed by the Token's freezeKey. - - - -### TokenFreezeAccountTransactionBody - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| token | [TokenID](#TokenID) | The token for which this account will be frozen. If token does not exist, transaction results in INVALID_TOKEN_ID | | -| account | [AccountID](#AccountID) | The account to be frozen | | - - - -

Top

- -## TokenGetInfo.proto - - Gets information about Token instance - - - -### TokenGetInfoQuery - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| header | [QueryHeader](#QueryHeader) | Standard info sent from client to node, including the signed payment, and what kind of response is requested (cost, state proof, both, or neither) | | -| token | [TokenID](#TokenID) | The token for which information is requested. If invalid token is provided, INVALID_TOKEN_ID response is returned. | | - - - - -### TokenGetInfoResponse - Response when the client sends the node TokenGetInfoQuery - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| header | [ResponseHeader](#ResponseHeader) | Standard response from node to client, including the requested fields: cost, or state proof, or both, or neither | | -| tokenInfo | [TokenInfo](#TokenInfo) | The information requested about this token instance | | - - - - -### TokenInfo - The metadata about a Token instance - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| tokenId | [TokenID](#TokenID) | ID of the token instance | | -| name | | The name of the token. It is a string of ASCII only characters | | -| symbol | | The symbol of the token. It is a UTF-8 capitalized alphabetical string | | -| decimals | | The number of decimal places a token is divisible by | | -| totalSupply | | The total supply of tokens that are currently in circulation | | -| treasury | [AccountID](#AccountID) | The ID of the account which is set as Treasury | | -| adminKey | [Key](#Key) | The key which can perform update/delete operations on the token. If empty, the token can be perceived as immutable (not being able to be updated/deleted) | | -| kycKey | [Key](#Key) | The key which can grant or revoke KYC of an account for the token's transactions. If empty, KYC is not required, and KYC grant or revoke operations are not possible. | | -| freezeKey | [Key](#Key) | The key which can freeze or unfreeze an account for token transactions. If empty, freezing is not possible | | -| wipeKey | [Key](#Key) | The key which can wipe token balance of an account. If empty, wipe is not possible | | -| supplyKey | [Key](#Key) | The key which can change the supply of a token. The key is used to sign Token Mint/Burn operations | | -| defaultFreezeStatus | [TokenFreezeStatus](#TokenFreezeStatus) | The default Freeze status (not applicable, frozen or unfrozen) of Hedera accounts relative to this token. FreezeNotApplicable is returned if Token Freeze Key is empty. Frozen is returned if Token Freeze Key is set and defaultFreeze is set to true. Unfrozen is returned if Token Freeze Key is set and defaultFreeze is set to false | | -| defaultKycStatus | [TokenKycStatus](#TokenKycStatus) | The default KYC status (KycNotApplicable or Revoked) of Hedera accounts relative to this token. KycNotApplicable is returned if KYC key is not set, otherwise Revoked | | -| isDeleted | | Specifies whether the token was deleted or not | | -| autoRenewAccount | [AccountID](#AccountID) | An account which will be automatically charged to renew the token's expiration, at autoRenewPeriod interval | | -| autoRenewPeriod | | The interval at which the auto-renew account will be charged to extend the token's expiry | | -| expiry | | The epoch second at which the token will expire; if an auto-renew account and period are specified, this is coerced to the current epoch second plus the autoRenewPeriod | | - - - -

Top

- -## TokenGrantKyc.proto - - Grants KYC to the account for the given token. Must be signed by the Token's kycKey. - - - -### TokenGrantKycTransactionBody - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| token | [TokenID](#TokenID) | The token for which this account will be granted KYC. If token does not exist, transaction results in INVALID_TOKEN_ID | | -| account | [AccountID](#AccountID) | The account to be KYCed | | - - - -

Top

- -## TokenMint.proto - - - -### TokenMintTransactionBody - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| token | [TokenID](#TokenID) | The token for which to mint tokens. If token does not exist, transaction results in INVALID_TOKEN_ID | | -| amount | | The amount to mint to the Treasury Account. Amount must be a positive non-zero number represented in the lowest denomination of the token. The new supply must be lower than 2^63. | | - - - -

Top

- -## TokenRevokeKyc.proto - - Revokes KYC to the account for the given token. Must be signed by the Token's kycKey. - - - -### TokenRevokeKycTransactionBody - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| token | [TokenID](#TokenID) | The token for which this account will get his KYC revoked. If token does not exist, transaction results in INVALID_TOKEN_ID | | -| account | [AccountID](#AccountID) | The account to be KYC Revoked | | - - - -

Top

- -## TokenService.proto - - Transactions and queries for the Token Service - - - -### TokenService - - -| RPC | Request | Response | Comments | -| --- | ------- | -------- | -------- | -| createToken | Transaction | TransactionResponse | Creates a new Token by submitting the transaction | -| updateToken | Transaction | TransactionResponse | Updates the account by submitting the transaction | -| mintToken | Transaction | TransactionResponse | Mints an amount of the token to the defined treasury account | -| burnToken | Transaction | TransactionResponse | Burns an amount of the token from the defined treasury account | -| deleteToken | Transaction | TransactionResponse | (NOT CURRENTLY SUPPORTED) Deletes a Token | -| wipeTokenAccount | Transaction | TransactionResponse | Wipes the provided amount of tokens from the specified Account ID | -| freezeTokenAccount | Transaction | TransactionResponse | Freezes the transfer of tokens to or from the specified Account ID | -| unfreezeTokenAccount | Transaction | TransactionResponse | Unfreezes the transfer of tokens to or from the specified Account ID | -| grantKycToTokenAccount | Transaction | TransactionResponse | Flags the provided Account ID as having gone through KYC | -| revokeKycFromTokenAccount | Transaction | TransactionResponse | Removes the KYC flag of the provided Account ID | -| transferTokens | Transaction | TransactionResponse | Initiates a Token transfer by submitting the transaction | -| associateTokens | Transaction | TransactionResponse | Associates tokens to an account | -| dissociateTokens | Transaction | TransactionResponse | Dissociates tokens from an account | -| getTokenInfo | Query | Response | Retrieves the metadata of a token | - - - -

Top

- -## TokenTransfer.proto - - Transfer tokens from some accounts to other accounts. Each negative amount is withdrawn from the corresponding account (a sender), and each positive one is added to the corresponding account (a receiver). All amounts must have sum of zero. - - - -### TokenTransfersTransactionBody - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| tokenTransfers | [TokenTransferList](#TokenTransferList) | | | - - - -

Top

- -## TokenUnfreezeAccount.proto - - Unfreezes transfers of the specified token for the account. Must be signed by the Token's freezeKey. - - - -### TokenUnfreezeAccountTransactionBody - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| token | [TokenID](#TokenID) | The token for which this account will be unfrozen. If token does not exist, transaction results in INVALID_TOKEN_ID | | -| account | [AccountID](#AccountID) | The account to be unfrozen | | - - - -

Top

- -## TokenUpdate.proto - - Updates an already created Token. - - - -### TokenUpdateTransactionBody - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| token | [TokenID](#TokenID) | The Token to be updated | | -| symbol | | The new Symbol of the Token. Must be UTF-8 capitalized alphabetical string identifying the token. | | -| name | | The new Name of the Token. Must be a string of ASCII characters. | | -| treasury | [AccountID](#AccountID) | The new Treasury account of the Token. If the provided treasury account is not existing or deleted, the response will be INVALID_TREASURY_ACCOUNT_FOR_TOKEN. If successful, the Token balance held in the previous Treasury Account is transferred to the new one. | | -| adminKey | [Key](#Key) | The new Admin key of the Token. If Token is immutable, transaction will resolve to TOKEN_IS_IMMUTABlE. | | -| kycKey | [Key](#Key) | The new KYC key of the Token. If Token does not have currently a KYC key, transaction will resolve to TOKEN_HAS_NO_KYC_KEY. | | -| freezeKey | [Key](#Key) | The new Freeze key of the Token. If the Token does not have currently a Freeze key, transaction will resolve to TOKEN_HAS_NO_FREEZE_KEY. | | -| wipeKey | [Key](#Key) | The new Wipe key of the Token. If the Token does not have currently a Wipe key, transaction will resolve to TOKEN_HAS_NO_WIPE_KEY. | | -| supplyKey | [Key](#Key) | The new Supply key of the Token. If the Token does not have currently a Supply key, transaction will resolve to TOKEN_HAS_NO_SUPPLY_KEY. | | -| autoRenewAccount | [AccountID](#AccountID) | The new account which will be automatically charged to renew the token's expiration, at autoRenewPeriod interval. | | -| autoRenewPeriod | | The new interval at which the auto-renew account will be charged to extend the token's expiry. | | -| expiry | | The new expiry time of the token. Expiry can be updated even if admin key is not set. If the provided expiry is earlier than the current token expiry, transaction wil resolve to INVALID_EXPIRATION_TIME | | - - - -

Top

- -## TokenWipeAccount.proto - - Wipes the provided amount of tokens from the specified Account. Must be signed by the Token's Wipe key. - - - -### TokenWipeAccountTransactionBody - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| token | [TokenID](#TokenID) | The token for which the account will be wiped. If token does not exist, transaction results in INVALID_TOKEN_ID | | -| account | [AccountID](#AccountID) | The account to be wiped | | -| amount | | The amount of tokens to wipe from the specified account. Amount must be a positive non-zero number in the lowest denomination possible, not bigger than the token balance of the account (0; balance] | | - - - -

Top

- -## Transaction.proto - - A single signed transaction, including all its signatures. The SignatureList will have a Signature for each Key in the transaction, either explicit or implicit, in the order that they appear in the transaction. For example, a CryptoTransfer will first have a Signature corresponding to the Key for the paying account, followed by a Signature corresponding to the Key for each account that is sending or receiving cryptocurrency in the transfer. Each Transaction should not have more than 50 levels.
The SignatureList field is deprecated and succeeded by SignatureMap. - - - -### Transaction - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| signedTransactionBytes | | SignedTransaction serialized into bytes | | -| bodyBytes | | TransactionBody serialized into bytes, which needs to be signed | | -| sigMap | [SignatureMap](#SignatureMap) | The signatures on the body with the new format, to authorize the transaction | | - - - -

Top

- -## TransactionBody.proto - - A single transaction. All transaction types are possible here. - - - -### TransactionBody - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| transactionID | [TransactionID](#TransactionID) | The ID for this transaction, which includes the payer's account (the account paying the transaction fee). If two transactions have the same transactionID, they won't both have an effect | | -| nodeAccountID | [AccountID](#AccountID) | The account of the node that submits the client's transaction to the network | | -| transactionFee | | The maximum transaction fee the client is willing to pay | | -| transactionValidDuration | [Duration](#Duration) | The transaction is invalid if consensusTimestamp > transactionID.transactionValidStart + transactionValidDuration | | -| generateRecord | | Should a record of this transaction be generated? (A receipt is always generated, but the record is optional) | | -| memo | | Any notes or descriptions that should be put into the record (max length 100) | | -| data | oneof | | | -| | contractCall | [ContractCallTransactionBody](#ContractCallTransactionBody) | Calls a function of a contract instance | | -| | contractCreateInstance | [ContractCreateTransactionBody](#ContractCreateTransactionBody) | Creates a contract instance | | -| | contractUpdateInstance | [ContractUpdateTransactionBody](#ContractUpdateTransactionBody) | Updates a contract | | -| | contractDeleteInstance | [ContractDeleteTransactionBody](#ContractDeleteTransactionBody) | Delete contract and transfer remaining balance into specified account | | -| | cryptoAddLiveHash | [CryptoAddLiveHashTransactionBody](#CryptoAddLiveHashTransactionBody) | Attach a new livehash to an account | | -| | cryptoCreateAccount | [CryptoCreateTransactionBody](#CryptoCreateTransactionBody) | Create a new cryptocurrency account | | -| | cryptoDelete | [CryptoDeleteTransactionBody](#CryptoDeleteTransactionBody) | Delete a cryptocurrency account (mark as deleted, and transfer hbars out) | | -| | cryptoDeleteLiveHash | [CryptoDeleteLiveHashTransactionBody](#CryptoDeleteLiveHashTransactionBody) | Remove a livehash from an account | | -| | cryptoTransfer | [CryptoTransferTransactionBody](#CryptoTransferTransactionBody) | Transfer amount between accounts | | -| | cryptoUpdateAccount | [CryptoUpdateTransactionBody](#CryptoUpdateTransactionBody) | Modify information such as the expiration date for an account | | -| | fileAppend | [FileAppendTransactionBody](#FileAppendTransactionBody) | Add bytes to the end of the contents of a file | | -| | fileCreate | [FileCreateTransactionBody](#FileCreateTransactionBody) | Create a new file | | -| | fileDelete | [FileDeleteTransactionBody](#FileDeleteTransactionBody) | Delete a file (remove contents and mark as deleted until it expires) | | -| | fileUpdate | [FileUpdateTransactionBody](#FileUpdateTransactionBody) | Modify information such as the expiration date for a file | | -| | systemDelete | [SystemDeleteTransactionBody](#SystemDeleteTransactionBody) | Hedera administrative deletion of a file or smart contract | | -| | systemUndelete | [SystemUndeleteTransactionBody](#SystemUndeleteTransactionBody) | To undelete an entity deleted by SystemDelete | | -| | freeze | [FreezeTransactionBody](#FreezeTransactionBody) | Freeze the nodes | | -| | consensusCreateTopic | [ConsensusCreateTopicTransactionBody](#ConsensusCreateTopicTransactionBody) | Creates a topic | | -| | consensusUpdateTopic | [ConsensusUpdateTopicTransactionBody](#ConsensusUpdateTopicTransactionBody) | Updates a topic | | -| | consensusDeleteTopic | [ConsensusDeleteTopicTransactionBody](#ConsensusDeleteTopicTransactionBody) | Deletes a topic | | -| | consensusSubmitMessage | [ConsensusSubmitMessageTransactionBody](#ConsensusSubmitMessageTransactionBody) | Submits message to a topic | | -| | uncheckedSubmit | [UncheckedSubmitBody](#UncheckedSubmitBody) | | | -| | tokenCreation | [TokenCreateTransactionBody](#TokenCreateTransactionBody) | Creates a token instance | | -| | tokenTransfers | [TokenTransfersTransactionBody](#TokenTransfersTransactionBody) | Transfers tokens between accounts | | -| | tokenFreeze | [TokenFreezeAccountTransactionBody](#TokenFreezeAccountTransactionBody) | Freezes account not to be able to transact with a token | | -| | tokenUnfreeze | [TokenUnfreezeAccountTransactionBody](#TokenUnfreezeAccountTransactionBody) | Unfreezes account for a token | | -| | tokenGrantKyc | [TokenGrantKycTransactionBody](#TokenGrantKycTransactionBody) | Grants KYC to an account for a token | | -| | tokenRevokeKyc | [TokenRevokeKycTransactionBody](#TokenRevokeKycTransactionBody) | Revokes KYC of an account for a token | | -| | tokenDeletion | [TokenDeleteTransactionBody](#TokenDeleteTransactionBody) | Deletes a token instance | | -| | tokenUpdate | [TokenUpdateTransactionBody](#TokenUpdateTransactionBody) | Updates a token instance | | -| | tokenMint | [TokenMintTransactionBody](#TokenMintTransactionBody) | Mints new tokens to a token's treasury account | | -| | tokenBurn | [TokenBurnTransactionBody](#TokenBurnTransactionBody) | Burns tokens from a token's treasury account | | -| | tokenWipe | [TokenWipeAccountTransactionBody](#TokenWipeAccountTransactionBody) | Wipes amount of tokens from an account | | -| | tokenAssociate | [TokenAssociateTransactionBody](#TokenAssociateTransactionBody) | Associate tokens to an account | | -| | tokenDissociate | [TokenDissociateTransactionBody](#TokenDissociateTransactionBody) | Dissociate tokens from an account | | - - - -

Top

- -## TransactionContents.proto - --

Hedera Network Services Protobuf

Copyright (C) 2018 - 2020 Hedera Hashgraph, LLC

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http:www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
‍ - - - -### SignedTransaction - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| bodyBytes | | TransactionBody serialized into bytes, which needs to be signed | | -| sigMap | [SignatureMap](#SignatureMap) | The signatures on the body with the new format, to authorize the transaction | | - - - -

Top

- -## TransactionGetFastRecord.proto - - Get the tx record of a transaction, given its transaction ID. Once a transaction reaches consensus, then information about whether it succeeded or failed will be available until the end of the receipt period. Before and after the receipt period, and for a transaction that was never submitted, the receipt is unknown. This query is free (the payment field is left empty). - - - -### TransactionGetFastRecordQuery - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| header | [QueryHeader](#QueryHeader) | Standard info sent from client to node, including the signed payment, and what kind of response is requested (cost, state proof, both, or neither). | | -| transactionID | [TransactionID](#TransactionID) | The ID of the transaction for which the record is requested. | | - - - - -### TransactionGetFastRecordResponse - Response when the client sends the node TransactionGetFastRecordQuery. If it created a new entity (account, file, or smart contract instance) then one of the three ID fields will be filled in with the ID of the new entity. Sometimes a single transaction will create more than one new entity, such as when a new contract instance is created, and this also creates the new account that it owned by that instance. - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| header | [ResponseHeader](#ResponseHeader) | Standard response from node to client, including the requested fields: cost, or state proof, or both, or neither | | -| transactionRecord | [TransactionRecord](#TransactionRecord) | The requested transaction records | | - - - -

Top

- -## TransactionGetReceipt.proto - - Get the receipt of a transaction, given its transaction ID. Once a transaction reaches consensus, then information about whether it succeeded or failed will be available until the end of the receipt period. Before and after the receipt period, and for a transaction that was never submitted, the receipt is unknown. This query is free (the payment field is left empty). No State proof is available for this response - - - -### TransactionGetReceiptQuery - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| header | [QueryHeader](#QueryHeader) | Standard info sent from client to node, including the signed payment, and what kind of response is requested (cost, state proof, both, or neither). | | -| transactionID | [TransactionID](#TransactionID) | The ID of the transaction for which the receipt is requested. | | -| includeDuplicates | | Whether receipts of processing duplicate transactions should be returned along with the receipt of processing the first consensus transaction with the given id whose status was neither INVALID_NODE_ACCOUNT nor INVALID_PAYER_SIGNATURE; or, if no such receipt exists, the receipt of processing the first transaction to reach consensus with the given transaction id.. | | - - - - -### TransactionGetReceiptResponse - Response when the client sends the node TransactionGetReceiptQuery. If it created a new entity (account, file, or smart contract instance) then one of the three ID fields will be filled in with the ID of the new entity. Sometimes a single transaction will create more than one new entity, such as when a new contract instance is created, and this also creates the new account that it owned by that instance. No State proof is available for this response - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| header | [ResponseHeader](#ResponseHeader) | Standard response from node to client, including the requested fields: cost, or state proof, or both, or neither | | -| receipt | [TransactionReceipt](#TransactionReceipt) | Either the receipt of processing the first consensus transaction with the given id whose status was neither INVALID_NODE_ACCOUNT nor INVALID_PAYER_SIGNATURE; or, if no such receipt exists, the receipt of processing the first transaction to reach consensus with the given transaction id. | | -| duplicateTransactionReceipts | [TransactionReceipt](#TransactionReceipt) | The receipts of processing all consensus transaction with the same id as the distinguished receipt above, in chronological order. | | - - - -

Top

- -## TransactionGetRecord.proto - - Get the record for a transaction. If the transaction requested a record, then the record lasts for one hour, and a state proof is available for it. If the transaction created an account, file, or smart contract instance, then the record will contain the ID for what it created. If the transaction called a smart contract function, then the record contains the result of that call. If the transaction was a cryptocurrency transfer, then the record includes the TransferList which gives the details of that transfer. If the transaction didn't return anything that should be in the record, then the results field will be set to nothing. - - - -### TransactionGetRecordQuery - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| header | [QueryHeader](#QueryHeader) | Standard info sent from client to node, including the signed payment, and what kind of response is requested (cost, state proof, both, or neither). | | -| transactionID | [TransactionID](#TransactionID) | The ID of the transaction for which the record is requested. | | -| includeDuplicates | | Whether records of processing duplicate transactions should be returned along with the record of processing the first consensus transaction with the given id whose status was neither INVALID_NODE_ACCOUNT nor INVALID_PAYER_SIGNATURE; or, if no such record exists, the record of processing the first transaction to reach consensus with the given transaction id.. | | - - - - -### TransactionGetRecordResponse - Response when the client sends the node TransactionGetRecordQuery - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| header | [ResponseHeader](#ResponseHeader) | Standard response from node to client, including the requested fields: cost, or state proof, or both, or neither. | | -| transactionRecord | [TransactionRecord](#TransactionRecord) | Either the record of processing the first consensus transaction with the given id whose status was neither INVALID_NODE_ACCOUNT nor INVALID_PAYER_SIGNATURE; or, if no such record exists, the record of processing the first transaction to reach consensus with the given transaction id. | | -| duplicateTransactionRecords | [TransactionRecord](#TransactionRecord) | The records of processing all consensus transaction with the same id as the distinguished record above, in chronological order. | | - - - -

Top

- -## TransactionReceipt.proto - - - -### TransactionReceipt - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| status | [ResponseCodeEnum](#ResponseCodeEnum) | The consensus status of the transaction; is UNKNOWN if consensus has not been reached, or if the
associated transaction did not have a valid payer signature | | -| accountID | [AccountID](#AccountID) | In the receipt of a CryptoCreate, the id of the newly created account | | -| fileID | [FileID](#FileID) | In the receipt of a FileCreate, the id of the newly created file | | -| contractID | [ContractID](#ContractID) | In the receipt of a ContractCreate, the id of the newly created contract | | -| exchangeRate | [ExchangeRateSet](#ExchangeRateSet) | The exchange rates in effect when the transaction reached consensus | | -| topicID | [TopicID](#TopicID) | In the receipt of a ConsensusCreateTopic, the id of the newly created topic. | | -| topicSequenceNumber | | In the receipt of a ConsensusSubmitMessage, the new sequence number of the topic that received the message | | -| topicRunningHash | | In the receipt of a ConsensusSubmitMessage, the new running hash of the topic that received the message.
This 48-byte field is the output of a particular SHA-384 digest whose input data are determined by the
value of the topicRunningHashVersion below. The bytes of each uint64 or uint32 are to be in Big-Endian
format.

IF the topicRunningHashVersion is '0' or '1', then the input data to the SHA-384 digest are, in order:
---
1. The previous running hash of the topic (48 bytes)
2. The topic's shard (8 bytes)
3. The topic's realm (8 bytes)
4. The topic's number (8 bytes)
5. The number of seconds since the epoch before the ConsensusSubmitMessage reached consensus (8 bytes)
6. The number of nanoseconds since 5. before the ConsensusSubmitMessage reached consensus (4 bytes)
7. The topicSequenceNumber from above (8 bytes)
8. The message bytes from the ConsensusSubmitMessage (variable).

IF the topicRunningHashVersion is '2', then the input data to the SHA-384 digest are, in order:
---
1. The previous running hash of the topic (48 bytes)
2. The topicRunningHashVersion below (8 bytes)
3. The topic's shard (8 bytes)
4. The topic's realm (8 bytes)
5. The topic's number (8 bytes)
6. The number of seconds since the epoch before the ConsensusSubmitMessage reached consensus (8 bytes)
7. The number of nanoseconds since 6. before the ConsensusSubmitMessage reached consensus (4 bytes)
8. The topicSequenceNumber from above (8 bytes)
9. The output of the SHA-384 digest of the message bytes from the consensusSubmitMessage (48 bytes)

Otherwise, IF the topicRunningHashVersion is '3', then the input data to the SHA-384 digest are, in order:
---
1. The previous running hash of the topic (48 bytes)
2. The topicRunningHashVersion below (8 bytes)
3. The payer account's shard (8 bytes)
4. The payer account's realm (8 bytes)
5. The payer account's number (8 bytes)
6. The topic's shard (8 bytes)
7. The topic's realm (8 bytes)
8. The topic's number (8 bytes)
9. The number of seconds since the epoch before the ConsensusSubmitMessage reached consensus (8 bytes)
10. The number of nanoseconds since 9. before the ConsensusSubmitMessage reached consensus (4 bytes)
11. The topicSequenceNumber from above (8 bytes)
12. The output of the SHA-384 digest of the message bytes from the consensusSubmitMessage (48 bytes) | | -| topicRunningHashVersion | | In the receipt of a ConsensusSubmitMessage, the version of the SHA-384 digest used to update the running hash. | | -| tokenId | [TokenID](#TokenID) | In the receipt of a CreateToken, the id of the newly created token | | - - - -

Top

- -## TransactionRecord.proto - - Response when the client sends the node TransactionGetRecordResponse - - - -### TransactionRecord - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| receipt | [TransactionReceipt](#TransactionReceipt) | The status (reach consensus, or failed, or is unknown) and the ID of any new account/file/instance created. | | -| transactionHash | | The hash of the Transaction that executed (not the hash of any Transaction that failed for having a duplicate TransactionID) | | -| consensusTimestamp | [Timestamp](#Timestamp) | The consensus timestamp (or null if didn't reach consensus yet) | | -| transactionID | [TransactionID](#TransactionID) | The ID of the transaction this record represents | | -| memo | | The memo that was submitted as part of the transaction (max 100 bytes) | | -| transactionFee | | The actual transaction fee charged, not the original transactionFee value from TransactionBody | | -| body | oneof | | | -| | contractCallResult | [ContractFunctionResult](#ContractFunctionResult) | Record of the value returned by the smart contract function (if it completed and didn't fail) from ContractCallTransaction | | -| | contractCreateResult | [ContractFunctionResult](#ContractFunctionResult) | Record of the value returned by the smart contract constructor (if it completed and didn't fail) from ContractCreateTransaction | | -| transferList | [TransferList](#TransferList) | All hbar transfers as a result of this transaction, such as fees, or transfers performed by the transaction, or by a smart contract it calls, or by the creation of threshold records that it triggers. | | -| tokenTransferLists | [TokenTransferList](#TokenTransferList) | All Token transfers as a result of this transaction | | - - - -

Top

- -## TransactionResponse.proto - - When the client sends the node a transaction of any kind, the node replies with this, which simply says that the transaction passed the precheck (so the node will submit it to the network) or it failed (so it won't). If the fee offered was insufficient, this will also contain the amount of the required fee. To learn the consensus result, the client should later obtain a receipt (free), or can buy a more detailed record (not free). - - - -### TransactionResponse - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| nodeTransactionPrecheckCode | [ResponseCodeEnum](#ResponseCodeEnum) | The response code that indicates the current status of the transaction. | | -| cost | | If the response code was INSUFFICIENT_TX_FEE, the actual transaction fee that would be required to execute the transaction. | | - - - -

Top

- -## UncheckedSubmit.proto - - - -### UncheckedSubmitBody - - -| Field | Type | Description | | -| ----- | ---- | ----------- | - | -| transactionBytes | | The serialized bytes of the Transaction to be submitted without prechecks | | - diff --git a/gradle.properties b/gradle.properties index fe21eacc..a5f5e05f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1 +1,5 @@ -version = "0.13.0-alpha.4-SNAPSHOT" \ No newline at end of file +# The version for the built artifact +version=0.13.0-alpha.4-SNAPSHOT +# You can choose the HAPI branch or tag for the https://github.com/hashgraph/hedera-protobufs repo that you would like +# to use the protobuf source code from during this build. +hapiBranchOrTag=v0.31.0 \ No newline at end of file diff --git a/settings.gradle.kts b/settings.gradle.kts index b59e2fc1..1172b67d 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1 +1,31 @@ +import me.champeau.gradle.igp.gitRepositories + rootProject.name = "hedera-protobuf-java-api" + +// Add local maven build directory to plugin repos +pluginManagement { + repositories { + gradlePluginPortal() + mavenCentral() + } +} + +// The "gradle.properties" file is not loaded before the "settings.gradle.kts" is processed. +// So manually load "hapiBranchOrTag" +val gradleProperties = java.util.Properties() +gradleProperties.load(file("gradle.properties").inputStream()) +val hapiBranchOrTag: String = gradleProperties.getProperty("hapiBranchOrTag") +println("hapiBranchOrTag = [$hapiBranchOrTag]") + +// Use GIT plugin to clone HAPI protobuf files +// See documentation https://melix.github.io/includegit-gradle-plugin/latest/index.html +plugins { + id("me.champeau.includegit") version "0.1.5" +} +gitRepositories { + include("hedera-protobufs") { + autoInclude.set(false) + uri.set("https://github.com/hashgraph/hedera-protobufs.git") + tag.set(hapiBranchOrTag) + } +} diff --git a/src/main/proto/AccountBalanceFile.proto b/src/main/proto/AccountBalanceFile.proto deleted file mode 100644 index ca29dee7..00000000 --- a/src/main/proto/AccountBalanceFile.proto +++ /dev/null @@ -1,47 +0,0 @@ -syntax = "proto3"; - -package proto; - -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ‍ - */ - -option java_package = "com.hedera.services.stream.proto"; -option java_multiple_files = true; - -import "BasicTypes.proto"; -import "Timestamp.proto"; - -message TokenUnitBalance { - TokenID tokenId = 1; // A unique token id - uint64 balance = 2; // A number of transferable units of the identified token -} - -/* Includes all currency balances (both hbar and token) of a single account in the ledger. */ -message SingleAccountBalances { - AccountID accountID = 1; // The account - uint64 hbarBalance = 2; // The account's hbar balance - repeated TokenUnitBalance tokenUnitBalances = 3; // The list of the account's token balances -} - -/* Includes all currency balances (both hbar and token) of all accounts in the ledger. */ -message AllAccountBalances { - Timestamp consensusTimestamp = 1; // An instant in consensus time - repeated SingleAccountBalances allAccounts = 2; // The list of account balances for all accounts, after handling all transactions with consensus timestamp up to and including the above instant -} diff --git a/src/main/proto/BasicTypes.proto b/src/main/proto/BasicTypes.proto deleted file mode 100644 index e2dd6cd1..00000000 --- a/src/main/proto/BasicTypes.proto +++ /dev/null @@ -1,420 +0,0 @@ -syntax = "proto3"; - -package proto; - -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ‍ - */ - -import "Timestamp.proto"; - -option java_package = "com.hederahashgraph.api.proto.java"; -option java_multiple_files = true; - -/* Each shard has a nonnegative shard number. Each realm within a given shard has a nonnegative realm number (that number might be reused in other shards). And each account, file, and smart contract instance within a given realm has a nonnegative number (which might be reused in other realms). Every account, file, and smart contract instance is within exactly one realm. So a FileID is a triplet of numbers, like 0.1.2 for entity number 2 within realm 1 within shard 0. Each realm maintains a single counter for assigning numbers, so if there is a file with ID 0.1.2, then there won't be an account or smart contract instance with ID 0.1.2. - - Everything is partitioned into realms so that each Solidity smart contract can access everything in just a single realm, locking all those entities while it's running, but other smart contracts could potentially run in other realms in parallel. So realms allow Solidity to be parallelized somewhat, even though the language itself assumes everything is serial. */ -message ShardID { - int64 shardNum = 1; //the shard number (nonnegative) -} - -/* The ID for a realm. Within a given shard, every realm has a unique ID. Each account, file, and contract instance belongs to exactly one realm. */ -message RealmID { - int64 shardNum = 1; //The shard number (nonnegative) - int64 realmNum = 2; //The realm number (nonnegative) -} - -/* The ID for an a cryptocurrency account */ -message AccountID { - int64 shardNum = 1; //The shard number (nonnegative) - int64 realmNum = 2; //The realm number (nonnegative) - int64 accountNum = 3; //A nonnegative account number unique within its realm -} - -/* The ID for a file */ -message FileID { - int64 shardNum = 1; //The shard number (nonnegative) - int64 realmNum = 2; //The realm number (nonnegative) - int64 fileNum = 3; //A nonnegative File number unique within its realm -} - -/* The ID for a smart contract instance */ -message ContractID { - int64 shardNum = 1; //The shard number (nonnegative) - int64 realmNum = 2; //The realm number (nonnegative) - int64 contractNum = 3; //A nonnegative number unique within its realm -} - -/* -The ID for a transaction. This is used for retrieving receipts and records for a transaction, for appending to a file right after creating it, for instantiating a smart contract with bytecode in a file just created, and internally by the network for detecting when duplicate transactions are submitted. A user might get a transaction processed faster by submitting it to N nodes, each with a different node account, but all with the same TransactionID. Then, the transaction will take effect when the first of all those nodes submits the transaction and it reaches consensus. The other transactions will not take effect. So this could make the transaction take effect faster, if any given node might be slow. However, the full transaction fee is charged for each transaction, so the total fee is N times as much if the transaction is sent to N nodes. -Applicable to Scheduled Transactions: -- The ID of a Scheduled Transaction has transactionValidStart and accountIDs inherited from the ScheduleCreate transaction that created it. That is to say that they are equal -- The scheduled property is true for Scheduled Transactions -- transactionValidStart, accountID and scheduled properties should be omitted -*/ -message TransactionID { - Timestamp transactionValidStart = 1; // The transaction is invalid if consensusTimestamp < transactionID.transactionStartValid - AccountID accountID = 2; // The Account ID that paid for this transaction - bool scheduled = 3; // Whether the Transaction is of type Scheduled or no -} - -/* An account, and the amount that it sends or receives during a cryptocurrency or token transfer. */ -message AccountAmount { - AccountID accountID = 1; // The Account ID that sends/receives cryptocurrency or tokens - sint64 amount = 2; // The amount of tinybars (for Crypto transfers) or in the lowest denomination (for Token transfers) that the account sends(negative) or receives(positive) -} - -/* A list of accounts and amounts to transfer out of each account (negative) or into it (positive). */ -message TransferList { - repeated AccountAmount accountAmounts = 1; // Multiple list of AccountAmount pairs, each of which has an account and an amount to transfer into it (positive) or out of it (negative) -} - -/* A list of token IDs and amounts representing the transferred out (negative) or into (positive) amounts, represented in the lowest denomination of the token */ -message TokenTransferList { - TokenID token = 1; // The ID of the token - repeated AccountAmount transfers = 2; // Multiple list of AccountAmounts, each of which has an account and amount -} - -/* Unique identifier for a topic (used by the consensus service) */ -message TopicID { - int64 shardNum = 1; // The shard number (nonnegative) - int64 realmNum = 2; // The realm number (nonnegative) - int64 topicNum = 3; // Unique topic identifier within a realm (nonnegative). -} - -/* Unique identifier for a token */ -message TokenID { - int64 shardNum = 1; // A nonnegative shard number - int64 realmNum = 2; // A nonnegative realm number - int64 tokenNum = 3; // A nonnegative token number -} - -/* Unique identifier for a Schedule */ -message ScheduleID { - int64 shardNum = 1; // A nonnegative shard number - int64 realmNum = 2; // A nonnegative realm number - int64 scheduleNum = 3; // A nonnegative schedule number -} - -/* Possible Freeze statuses returned on TokenGetInfoQuery or CryptoGetInfoResponse in TokenRelationship */ -enum TokenFreezeStatus { - FreezeNotApplicable = 0; - Frozen = 1; - Unfrozen = 2; -} - -/* Possible KYC statuses returned on TokenGetInfoQuery or CryptoGetInfoResponse in TokenRelationship */ -enum TokenKycStatus { - KycNotApplicable = 0; - Granted = 1; - Revoked = 2; -} - -/* A Key can be a public key from one of the three supported systems (ed25519, RSA-3072, ECDSA with p384). Or, it can be the ID of a smart contract instance, which is authorized to act as if it had a key. If an account has an ed25519 key associated with it, then the corresponding private key must sign any transaction to transfer cryptocurrency out of it. And similarly for RSA and ECDSA. - * - * A Key can be a smart contract ID, which means that smart contract is to authorize operations as if it had signed with a key that it owned. The smart contract doesn't actually have a key, and doesn't actually sign a transaction. But it's as if a virtual transaction were created, and the smart contract signed it with a private key. - * - * A key can be a "threshold key", which means a list of M keys, any N of which must sign in order for the threshold signature to be considered valid. The keys within a threshold signature may themselves be threshold signatures, to allow complex signature requirements. - * - * A Key can be a list of keys. Their use is dependent on context. For example, a Hedera file is created with a list of keys, where all of them must sign a transaction to create or modify the file, but only one of them is needed to sign a transaction to delete the file. So it's a single list that sometimes acts as a 1-of-M threshold key, and sometimes acts as an M-of-M threshold key. - * - * A Key can contain a ThresholdKey or KeyList, which in turn contain a Key, so this mutual recursion would allow nesting arbitrarily deep. A ThresholdKey which contains a list of primitive keys (e.g., ed25519) has 3 levels: ThresholdKey -> KeyList -> Key. A KeyList which contains several primitive keys (e.g., ed25519) has 2 levels: KeyList -> Key. A Key with 2 levels of nested ThresholdKeys has 7 levels: Key -> ThresholdKey -> KeyList -> Key -> ThresholdKey -> KeyList -> Key. - * - * Each Key should not have more than 46 levels, which implies 15 levels of nested ThresholdKeys. Only ed25519 primitive keys are currently supported. - */ -message Key { - oneof key { - ContractID contractID = 1; // smart contract instance that is authorized as if it had signed with a key - bytes ed25519 = 2; // ed25519 public key bytes - bytes RSA_3072 = 3; // RSA-3072 public key bytes - bytes ECDSA_384 = 4; // ECDSA with the p-384 curve public key bytes - ThresholdKey thresholdKey = 5; // a threshold N followed by a list of M keys, any N of which are required to form a valid signature - KeyList keyList = 6; // A list of Keys of the Key type. - } -} - -/* A set of public keys that are used together to form a threshold signature. If the threshold is N and there are M keys, then this is an N of M threshold signature. If an account is associated with ThresholdKeys, then a transaction to move cryptocurrency out of it must be signed by a list of M signatures, where at most M-N of them are blank, and the other at least N of them are valid signatures corresponding to at least N of the public keys listed here. */ -message ThresholdKey { - uint32 threshold = 1; // A valid signature set must have at least this many signatures - KeyList keys = 2; // List of all the keys that can sign -} - -/* A list of keys */ -message KeyList { - repeated Key keys = 1; // list of keys -} - -/* A Signature corresponding to a Key. It is a sequence of bytes holding a public key signature from one of the three supported systems (ed25519, RSA-3072, ECDSA with p384). Or, it can be a list of signatures corresponding to a single threshold key. Or, it can be the ID of a smart contract instance, which is authorized to act as if it had a key. If an account has an ed25519 key associated with it, then the corresponding private key must sign any transaction to transfer cryptocurrency out of it. If it has a smart contract ID associated with it, then that smart contract is allowed to transfer cryptocurrency out of it. The smart contract doesn't actually have a key, and doesn't actually sign a transaction. But it's as if a virtual transaction were created, and the smart contract signed it with a private key. A key can also be a "threshold key", which means a list of M keys, any N of which must sign in order for the threshold signature to be considered valid. The keys within a threshold signature may themselves be threshold signatures, to allow complex signature requirements (this nesting is not supported in the currently, but will be supported in a future version of API). If a Signature message is missing the "signature" field, then this is considered to be a null signature. That is useful in cases such as threshold signatures, where some of the signatures can be null. - * The definition of Key uses mutual recursion, so it allows nesting that is arbitrarily deep. But the current API only accepts Key messages up to 3 levels deep, such as a list of threshold keys, each of which is a list of primitive keys. Therefore, the matching Signature will have the same limitation. This restriction may be relaxed in future versions of the API, to allow deeper nesting. - * This message is deprecated and succeeded by SignaturePair and SignatureMap messages. - */ -message Signature { - option deprecated = true; - oneof signature { - bytes contract = 1; // smart contract virtual signature (always length zero) - bytes ed25519 = 2; // ed25519 signature bytes - bytes RSA_3072 = 3; //RSA-3072 signature bytes - bytes ECDSA_384 = 4; //ECDSA p-384 signature bytes - ThresholdSignature thresholdSignature = 5; // A list of signatures for a single N-of-M threshold Key. This must be a list of exactly M signatures, at least N of which are non-null. - SignatureList signatureList = 6; // A list of M signatures, each corresponding to a Key in a KeyList of the same length. - } -} - -/* -A signature corresponding to a ThresholdKey. For an N-of-M threshold key, this is a list of M signatures, at least N of which must be non-null. -This message is deprecated and succeeded by SignaturePair and SignatureMap messages. -*/ -message ThresholdSignature { - option deprecated = true; - SignatureList sigs = 2; // for an N-of-M threshold key, this is a list of M signatures, at least N of which must be non-null -} - -/* -The signatures corresponding to a KeyList of the same length. -This message is deprecated and succeeded by SignaturePair and SignatureMap messages. -*/ -message SignatureList { - option deprecated = true; - repeated Signature sigs = 2; // each signature corresponds to a Key in the KeyList -} - -/* -The client may use any number of bytes from 0 to the whole length of the public key for pubKeyPrefix. -If 0 bytes is used, then it is assumed that only one public key is used to sign. Only ed25519 -keys and hence signatures are currently supported. */ -message SignaturePair { - bytes pubKeyPrefix = 1; // First few bytes of the public key - oneof signature { - bytes contract = 2; // smart contract virtual signature (always length zero) - bytes ed25519 = 3; // ed25519 signature - bytes RSA_3072 = 4; //RSA-3072 signature - bytes ECDSA_384 = 5; //ECDSA p-384 signature - } -} - -/* -A set of signatures corresponding to every unique public key used to sign a given transaction. If one public key matches more than one prefixes on the signature map, the transaction containing the map will fail immediately with the response code KEY_PREFIX_MISMATCH. -*/ -message SignatureMap { - repeated SignaturePair sigPair = 1; // Each signature pair corresponds to a unique Key required to sign the transaction. -} - -/* -The transactions and queries supported by Hedera Hashgraph. -*/ -enum HederaFunctionality { - NONE = 0; // UNSPECIFIED - Need to keep first value as unspecified because first element is ignored and not parsed (0 is ignored by parser) - CryptoTransfer = 1; // crypto transfer - CryptoUpdate = 2; // crypto update account - CryptoDelete = 3; // crypto delete account - // Add a livehash to a crypto account - CryptoAddLiveHash = 4; - // Delete a livehash from a crypto account - CryptoDeleteLiveHash = 5; - ContractCall = 6; // Smart Contract Call - ContractCreate = 7; // Smart Contract Create Contract - ContractUpdate = 8; // Smart Contract update contract - FileCreate = 9; // File Operation create file - FileAppend = 10; // File Operation append file - FileUpdate = 11; // File Operation update file - FileDelete = 12; // File Operation delete file - CryptoGetAccountBalance = 13; // crypto get account balance - CryptoGetAccountRecords = 14; // crypto get account record - CryptoGetInfo = 15; // Crypto get info - ContractCallLocal = 16; // Smart Contract Call - ContractGetInfo = 17; // Smart Contract get info - ContractGetBytecode = 18; // Smart Contract, get the byte code - GetBySolidityID = 19; // Smart Contract, get by solidity ID - GetByKey = 20; // Smart Contract, get by key - // Get a live hash from a crypto account - CryptoGetLiveHash = 21; - CryptoGetStakers = 22; // Crypto, get the stakers for the node - FileGetContents = 23; // File Operations get file contents - FileGetInfo = 24; // File Operations get the info of the file - TransactionGetRecord = 25; // Crypto get the transaction records - ContractGetRecords = 26; // Contract get the transaction records - CryptoCreate = 27; // crypto create account - SystemDelete = 28; // system delete file - SystemUndelete = 29; // system undelete file - ContractDelete = 30; // delete contract - Freeze = 31; // freeze - CreateTransactionRecord = 32; // Create Tx Record - CryptoAccountAutoRenew = 33; // Crypto Auto Renew - ContractAutoRenew = 34; // Contract Auto Renew - GetVersionInfo = 35; //Get Version - TransactionGetReceipt = 36; // Transaction Get Receipt - ConsensusCreateTopic = 50; // Create Topic - ConsensusUpdateTopic = 51; // Update Topic - ConsensusDeleteTopic = 52; // Delete Topic - ConsensusGetTopicInfo = 53; // Get Topic information - ConsensusSubmitMessage = 54; // Submit message to topic - UncheckedSubmit = 55; - TokenCreate = 56; // Create Token - TokenGetInfo = 58; // Get Token information - TokenFreezeAccount = 59; // Freeze Account - TokenUnfreezeAccount = 60; // Unfreeze Account - TokenGrantKycToAccount = 61; // Grant KYC to Account - TokenRevokeKycFromAccount = 62; // Revoke KYC from Account - TokenDelete = 63; // Delete Token - TokenUpdate = 64; // Update Token - TokenMint = 65; // Mint tokens to treasury - TokenBurn = 66; // Burn tokens from treasury - TokenAccountWipe = 67; // Wipe token amount from Account holder - TokenAssociateToAccount = 68; // Associate tokens to an account - TokenDissociateFromAccount = 69; // Dissociate tokens from an account - ScheduleCreate = 70; // Create Scheduled Transaction - ScheduleDelete = 71; // Delete Scheduled Transaction - ScheduleSign = 72; // Sign Scheduled Transaction - ScheduleGetInfo = 73; // Get Scheduled Transaction Information -} - -/* -A set of prices the nodes use in determining transaction and query fees, and constants involved in fee calculations. -Nodes multiply the amount of resources consumed by a transaction or query by the corresponding price to calculate the -appropriate fee. Units are one-thousandth of a tinyCent.*/ -message FeeComponents { - int64 min = 1; // A minimum, the calculated fee must be greater than this value - int64 max = 2; // A maximum, the calculated fee must be less than this value - int64 constant = 3; // A constant contribution to the fee - int64 bpt = 4; // The price of bandwidth consumed by a transaction, measured in bytes - int64 vpt = 5; // The price per signature verification for a transaction - int64 rbh = 6; // The price of RAM consumed by a transaction, measured in byte-hours - int64 sbh = 7; // The price of storage consumed by a transaction, measured in byte-hours - int64 gas = 8; // The price of computation for a smart contract transaction, measured in gas - int64 tv = 9; // The price per hbar transferred for a transfer - int64 bpr = 10; // The price of bandwidth for data retrieved from memory for a response, measured in bytes - int64 sbpr = 11; // The price of bandwidth for data retrieved from disk for a response, measured in bytes -} - -/* The fees for a specific transaction or query based on the fee data. */ -message TransactionFeeSchedule { - // A particular transaction or query - HederaFunctionality hederaFunctionality = 1; - // Resource price coefficients - FeeData feeData = 2; -} - -/* -The total fee charged for a transaction. It is composed of three components – a node fee that compensates the specific node that submitted the transaction, a network fee that compensates the network for assigning the transaction a consensus timestamp, and a service fee that compensates the network for the ongoing maintenance of the consequences of the transaction. -*/ -message FeeData { - // Fee paid to the submitting node - FeeComponents nodedata = 1; - // Fee paid to the network for processing a transaction into consensus - FeeComponents networkdata = 2; - // Fee paid to the network for providing the service associated with the transaction; for instance, storing a file - FeeComponents servicedata = 3; -} - -/* -A list of resource prices fee for different transactions and queries and the time period at which this fee schedule will expire. Nodes use the prices to determine the fees for all transactions based on how much of those resources each transaction uses. -*/ -message FeeSchedule { - // List of price coefficients for network resources - repeated TransactionFeeSchedule transactionFeeSchedule = 1; - // FeeSchedule expiry time - TimestampSeconds expiryTime = 2; -} - -/* This contains two Fee Schedules with expiry timestamp. */ -message CurrentAndNextFeeSchedule { - FeeSchedule currentFeeSchedule = 1; // Contains current Fee Schedule - FeeSchedule nextFeeSchedule = 2; // Contains next Fee Schedule -} - -/* -Contains the IP address and the port representing a service endpoint of a Node in a network. Used to reach the Hedera API and submit transactions to the network. -*/ -message ServiceEndpoint { - bytes ipAddressV4 = 1; // The 32-bit IPv4 address of the node encoded in left to right order (e.g. 127.0.0.1 has 127 as its first byte) - int32 port = 2; // The port of the node -} - -/* -The data about a node, including its service endpoints and the Hedera account to be paid for services -provided by the node (that is, queries answered and transactions submitted.) - -If the serviceEndpoint list is not set, or empty, then the endpoint given by the (deprecated) -ipAddress and portno fields should be used. - -All fields are populated in the 0.0.102 address book file while only fields that start with # are populated in the 0.0.101 address book file. -*/ -message NodeAddress { - bytes ipAddress = 1 [deprecated=true]; // The IP address of the Node with separator & octets encoded in UTF-8. Usage is deprecated, ServiceEndpoint is preferred to retrieve a node's list of IP addresses and ports - int32 portno = 2 [deprecated=true]; // The port number of the grpc server for the node. Usage is deprecated, ServiceEndpoint is preferred to retrieve a node's list of IP addresses and ports - bytes memo = 3 [deprecated=true]; // Usage is deprecated, nodeAccountId is preferred to retrieve a node's account ID - string RSA_PubKey = 4; // The node's hex-encoded X509 RSA public key - int64 nodeId = 5; // # A non-sequential identifier for the node - AccountID nodeAccountId = 6; // # The account to be paid for queries and transactions sent to this node - bytes nodeCertHash = 7; // # The hex-encoded SHA-384 hash of the X509 cert used to encrypt gRPC traffic to the node - repeated ServiceEndpoint serviceEndpoint = 8; // # A node's service IP addresses and ports - string description = 9; // A description of the node, with UTF-8 encoding up to 100 bytes - int64 stake = 10; // The amount of tinybars staked to the node -} - -/* -A list of nodes and their metadata that contains all details of the nodes for the network. - -Used to parse the contents of system files 0.0.101 and 0.0.102. -*/ -message NodeAddressBook { - repeated NodeAddress nodeAddress = 1; // Metadata of all nodes in the network -} - -message SemanticVersion { - int32 major = 1; // Increases with incompatible API changes - int32 minor = 2; // Increases with backwards-compatible new functionality - int32 patch = 3; // Increases with backwards-compatible bug fixes -} - -message Setting { - string name = 1; // name of the property - string value = 2; // value of the property - bytes data = 3; // any data associated with property -} - -message ServicesConfigurationList { - repeated Setting nameValue = 1; // list of name value pairs of the application properties -} - -/* Token's information related to the given Account */ -message TokenRelationship { - TokenID tokenId = 1; // The ID of the token - string symbol = 2; // The Symbol of the token - uint64 balance = 3; // The balance that the Account holds in the smallest denomination - TokenKycStatus kycStatus = 4; // The KYC status of the account (KycNotApplicable, Granted or Revoked). If the token does not have KYC key, KycNotApplicable is returned - TokenFreezeStatus freezeStatus = 5; // The Freeze status of the account (FreezeNotApplicable, Frozen or Unfrozen). If the token does not have Freeze key, FreezeNotApplicable is returned - uint32 decimals = 6; // Tokens divide into 10decimals pieces -} - -/* A number of transferable units of a certain token. - -The transferable unit of a token is its smallest denomination, as given by the token's decimals property---each minted token contains 10decimals transferable units. For example, we could think of the cent as the transferable unit of the US dollar (decimals=2); and the tinybar as the transferable unit of hbar (decimals=8). - -Transferable units are not directly comparable across different tokens. */ -message TokenBalance { - TokenID tokenId = 1; // A unique token id - uint64 balance = 2; // A number of transferable units of the identified token - uint32 decimals = 3; // Tokens divide into 10decimals pieces -} - -/* A sequence of token balances */ -message TokenBalances { - repeated TokenBalance tokenBalances = 1; -} diff --git a/src/main/proto/ConsensusCreateTopic.proto b/src/main/proto/ConsensusCreateTopic.proto deleted file mode 100644 index 23cba5b9..00000000 --- a/src/main/proto/ConsensusCreateTopic.proto +++ /dev/null @@ -1,59 +0,0 @@ -syntax = "proto3"; - -package proto; - -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ‍ - */ - -option java_package = "com.hederahashgraph.api.proto.java"; -option java_multiple_files = true; - -import "BasicTypes.proto"; -import "Duration.proto"; - -// See [ConsensusService.createTopic()](#proto.ConsensusService) -message ConsensusCreateTopicTransactionBody { - string memo = 1; // Short publicly visible memo about the topic. No guarantee of uniqueness. - - // Access control for updateTopic/deleteTopic. - // Anyone can increase the topic's expirationTime via ConsensusService.updateTopic(), regardless of the adminKey. - // If no adminKey is specified, updateTopic may only be used to extend the topic's expirationTime, and deleteTopic - // is disallowed. - Key adminKey = 2; - - // Access control for submitMessage. - // If unspecified, no access control is performed on ConsensusService.submitMessage (all submissions are allowed). - Key submitKey = 3; - - // The initial lifetime of the topic and the amount of time to attempt to extend the topic's lifetime by - // automatically at the topic's expirationTime, if the autoRenewAccount is configured (once autoRenew functionality - // is supported by HAPI). - // Limited to MIN_AUTORENEW_PERIOD and MAX_AUTORENEW_PERIOD value by server-side configuration. - // Required. - Duration autoRenewPeriod = 6; - - // Optional account to be used at the topic's expirationTime to extend the life of the topic (once autoRenew - // functionality is supported by HAPI). - // The topic lifetime will be extended up to a maximum of the autoRenewPeriod or however long the topic - // can be extended using all funds on the account (whichever is the smaller duration/amount and if any extension - // is possible with the account's funds). - // If specified, there must be an adminKey and the autoRenewAccount must sign this transaction. - AccountID autoRenewAccount = 7; -} diff --git a/src/main/proto/ConsensusDeleteTopic.proto b/src/main/proto/ConsensusDeleteTopic.proto deleted file mode 100644 index 643960ec..00000000 --- a/src/main/proto/ConsensusDeleteTopic.proto +++ /dev/null @@ -1,33 +0,0 @@ -syntax = "proto3"; - -package proto; - -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ‍ - */ - -option java_package = "com.hederahashgraph.api.proto.java"; -option java_multiple_files = true; - -import "BasicTypes.proto"; - -// See [ConsensusService.deleteTopic()](#proto.ConsensusService) -message ConsensusDeleteTopicTransactionBody { - TopicID topicID = 1; // Topic identifier. -} diff --git a/src/main/proto/ConsensusGetTopicInfo.proto b/src/main/proto/ConsensusGetTopicInfo.proto deleted file mode 100644 index ae7b7b37..00000000 --- a/src/main/proto/ConsensusGetTopicInfo.proto +++ /dev/null @@ -1,51 +0,0 @@ -syntax = "proto3"; - -package proto; - -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ‍ - */ - -option java_package = "com.hederahashgraph.api.proto.java"; -option java_multiple_files = true; - -import "BasicTypes.proto"; -import "QueryHeader.proto"; -import "ResponseHeader.proto"; -import "ConsensusTopicInfo.proto"; - -// See [ConsensusService.getTopicInfo()](#proto.ConsensusService) -message ConsensusGetTopicInfoQuery { - // Standard info sent from client to node, including the signed payment, and what kind of response is requested - // (cost, state proof, both, or neither). - QueryHeader header = 1; - - // The Topic for which information is being requested - TopicID topicID = 2; -} - -// Retrieve the parameters of and state of a consensus topic. -message ConsensusGetTopicInfoResponse { - // Standard response from node to client, including the requested fields: cost, or state proof, or both, or neither. - ResponseHeader header = 1; - - TopicID topicID = 2; // Topic identifier. - - ConsensusTopicInfo topicInfo = 5; // Current state of the topic -} diff --git a/src/main/proto/ConsensusService.proto b/src/main/proto/ConsensusService.proto deleted file mode 100644 index 97bc29db..00000000 --- a/src/main/proto/ConsensusService.proto +++ /dev/null @@ -1,112 +0,0 @@ -syntax = "proto3"; - -package proto; - -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ‍ - */ - -option java_package = "com.hederahashgraph.service.proto.java"; - -import "Query.proto"; -import "Response.proto"; -import "TransactionResponse.proto"; -import "Transaction.proto"; - -/* The Consensus Service provides the ability for Hedera Hashgraph to provide aBFT consensus as to the order and - * validity of messages submitted to a *topic*, as well as a *consensus timestamp* for those messages. - * - * Automatic renewal can be configured via an autoRenewAccount. - * Any time an autoRenewAccount is added to a topic, that createTopic/updateTopic transaction must be signed by - * the autoRenewAccount. - * - * The autoRenewPeriod on an account must currently be set a value in createTopic between MIN_AUTORENEW_PERIOD (6999999 - * seconds) and MAX_AUTORENEW_PERIOD (8000001 seconds). During creation this sets the initial expirationTime of the - * topic (see more below). - * - * If no adminKey is on a topic, there may not be an autoRenewAccount on the topic, deleteTopic is not allowed, - * and the only change allowed via an updateTopic is to extend the expirationTime. - * - * If an adminKey is on a topic, every updateTopic and deleteTopic transaction must be signed by the adminKey, except - * for updateTopics which only extend the topic's expirationTime (no adminKey authorization required). - * - * If an updateTopic modifies the adminKey of a topic, the transaction signatures on the updateTopic must fulfill both - * the pre-update and post-update adminKey signature requirements. - * - * Mirrornet ConsensusService may be used to subscribe to changes on the topic, including changes to the topic - * definition and the consensus ordering and timestamp of submitted messages. - * - * Until autoRenew functionality is supported by HAPI, the topic will not expire, the autoRenewAccount will not be - * charged, and the topic will not automatically be deleted. - * - * Once autoRenew functionality is supported by HAPI: - * - * 1. Once the expirationTime is encountered, if an autoRenewAccount is configured on the topic, the account will be - * charged automatically at the expirationTime, to extend the expirationTime of the topic up to the topic's - * autoRenewPeriod (or as much extension as the account's balance will supply). - * - * 2. If the topic expires and is not automatically renewed, the topic will enter the EXPIRED state. All transactions - * on the topic will fail with TOPIC_EXPIRED, except an updateTopic() call that modifies only the expirationTime. - * getTopicInfo() will succeed. This state will be available for a AUTORENEW_GRACE_PERIOD grace period (7 days). - * - * 3. After the grace period, if the topic's expirationTime is not extended, the topic will be automatically - * deleted and no transactions or queries on the topic will succeed after that point. - */ -service ConsensusService { - /* Create a topic to be used for consensus. - * If an autoRenewAccount is specified, that account must also sign this transaction. - * If an adminKey is specified, the adminKey must sign the transaction. - * On success, the resulting TransactionReceipt contains the newly created TopicId. - * Request is [ConsensusCreateTopicTransactionBody](#proto.ConsensusCreateTopicTransactionBody) - */ - rpc createTopic (Transaction) returns (TransactionResponse); - - /* Update a topic. - * If there is no adminKey, the only authorized update (available to anyone) is to extend the expirationTime. - * Otherwise transaction must be signed by the adminKey. - * If an adminKey is updated, the transaction must be signed by the pre-update adminKey and post-update adminKey. - * If a new autoRenewAccount is specified (not just being removed), that account must also sign the transaction. - * Request is [ConsensusUpdateTopicTransactionBody](#proto.ConsensusUpdateTopicTransactionBody) - */ - rpc updateTopic (Transaction) returns (TransactionResponse); - - /* Delete a topic. No more transactions or queries on the topic (via HAPI) will succeed. - * If an adminKey is set, this transaction must be signed by that key. - * If there is no adminKey, this transaction will fail UNAUTHORIZED. - * Request is [ConsensusDeleteTopicTransactionBody](#proto.ConsensusDeleteTopicTransactionBody) - */ - rpc deleteTopic (Transaction) returns (TransactionResponse); - - /* Retrieve the latest state of a topic. This method is unrestricted and allowed on any topic by any payer account. - * Deleted accounts will not be returned. - * Request is [ConsensusGetTopicInfoQuery](#proto.ConsensusGetTopicInfoQuery) - * Response is [ConsensusGetTopicInfoResponse](#proto.ConsensusGetTopicInfoResponse) - */ - rpc getTopicInfo (Query) returns (Response); - - /* Submit a message for consensus. - * Valid and authorized messages on valid topics will be ordered by the consensus service, gossipped to the - * mirror net, and published (in order) to all subscribers (from the mirror net) on this topic. - * The submitKey (if any) must sign this transaction. - * On success, the resulting TransactionReceipt contains the topic's updated topicSequenceNumber and - * topicRunningHash. - * Request is [ConsensusSubmitMessageTransactionBody](#proto.ConsensusSubmitMessageTransactionBody) - */ - rpc submitMessage (Transaction) returns (TransactionResponse); -} diff --git a/src/main/proto/ConsensusSubmitMessage.proto b/src/main/proto/ConsensusSubmitMessage.proto deleted file mode 100644 index 068ae322..00000000 --- a/src/main/proto/ConsensusSubmitMessage.proto +++ /dev/null @@ -1,40 +0,0 @@ -syntax = "proto3"; - -package proto; - -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ‍ - */ - -option java_package = "com.hederahashgraph.api.proto.java"; -option java_multiple_files = true; - -import "BasicTypes.proto"; - -message ConsensusMessageChunkInfo { - TransactionID initialTransactionID = 1; // TransactionID of the first chunk, gets copied to every subsequent chunk in a fragmented message. - int32 total = 2; // The total number of chunks in the message. - int32 number = 3; // The sequence number (from 1 to total) of the current chunk in the message. -} - -message ConsensusSubmitMessageTransactionBody { - TopicID topicID = 1; // Topic to submit message to. - bytes message = 2; // Message to be submitted. Max size of the Transaction (including signatures) is 6KiB. - ConsensusMessageChunkInfo chunkInfo = 3; // Optional information of the current chunk in a fragmented message. -} diff --git a/src/main/proto/ConsensusTopicInfo.proto b/src/main/proto/ConsensusTopicInfo.proto deleted file mode 100644 index cb9030e1..00000000 --- a/src/main/proto/ConsensusTopicInfo.proto +++ /dev/null @@ -1,56 +0,0 @@ -syntax = "proto3"; - -package proto; - -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ‍ - */ - -option java_package = "com.hederahashgraph.api.proto.java"; -option java_multiple_files = true; - -import "BasicTypes.proto"; -import "Duration.proto"; -import "Timestamp.proto"; - -// Current state of a topic. -message ConsensusTopicInfo { - string memo = 1; // The memo associated with the topic (UTF-8 encoding max 100 bytes) - - // When a topic is created, its running hash is initialized to 48 bytes of binary zeros. - // For each submitted message, the topic's running hash is then updated to the output - // of a particular SHA-384 digest whose input data include the previous running hash. - // - // See the TransactionReceipt.proto documentation for an exact description of the - // data included in the SHA-384 digest used for the update. - bytes runningHash = 2; - - // Sequence number (starting at 1 for the first submitMessage) of messages on the topic. - uint64 sequenceNumber = 3; - - // Effective consensus timestamp at (and after) which submitMessage calls will no longer succeed on the topic - // and the topic will expire and after AUTORENEW_GRACE_PERIOD be automatically deleted. - Timestamp expirationTime = 4; - - Key adminKey = 5; // Access control for update/delete of the topic. Null if there is no key. - Key submitKey = 6; // Access control for ConsensusService.submitMessage. Null if there is no key. - - Duration autoRenewPeriod = 7; // If an auto-renew account is specified, when the topic expires, its lifetime will be extended by up to this duration (depending on the solvency of the auto-renew account). If the auto-renew account has no funds at all, the topic will be deleted instead. - AccountID autoRenewAccount = 8; // The account, if any, to charge for automatic renewal of the topic's lifetime upon expiry. -} diff --git a/src/main/proto/ConsensusUpdateTopic.proto b/src/main/proto/ConsensusUpdateTopic.proto deleted file mode 100644 index f2e1138e..00000000 --- a/src/main/proto/ConsensusUpdateTopic.proto +++ /dev/null @@ -1,71 +0,0 @@ -syntax = "proto3"; - -package proto; - -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ‍ - */ - -option java_package = "com.hederahashgraph.api.proto.java"; -option java_multiple_files = true; - -import "google/protobuf/wrappers.proto"; -import "BasicTypes.proto"; -import "Duration.proto"; -import "Timestamp.proto"; - -// All fields left null will not be updated. -// See [ConsensusService.updateTopic()](#proto.ConsensusService) -message ConsensusUpdateTopicTransactionBody { - TopicID topicID = 1; - - google.protobuf.StringValue memo = 2; // If set, the new memo to be associated with the topic (UTF-8 encoding max 100 bytes) - - // Effective consensus timestamp at (and after) which all consensus transactions and queries will fail. - // The expirationTime may be no longer than MAX_AUTORENEW_PERIOD (8000001 seconds) from the consensus timestamp of - // this transaction. - // On topics with no adminKey, extending the expirationTime is the only updateTopic option allowed on the topic. - // If unspecified, no change. - Timestamp expirationTime = 4; - - // Access control for update/delete of the topic. - // If unspecified, no change. - // If empty keyList - the adminKey is cleared. - Key adminKey = 6; - - // Access control for ConsensusService.submitMessage. - // If unspecified, no change. - // If empty keyList - the submitKey is cleared. - Key submitKey = 7; - - // The amount of time to extend the topic's lifetime automatically at expirationTime if the autoRenewAccount is - // configured and has funds (once autoRenew functionality is supported by HAPI). - // Limited to between MIN_AUTORENEW_PERIOD (6999999 seconds) and MAX_AUTORENEW_PERIOD (8000001 seconds) by - // servers-side configuration (which may change). - // If unspecified, no change. - Duration autoRenewPeriod = 8; - - // Optional account to be used at the topic's expirationTime to extend the life of the topic. - // Once autoRenew functionality is supported by HAPI, the topic lifetime will be extended up to a maximum of the - // autoRenewPeriod or however long the topic can be extended using all funds on the account (whichever is the - // smaller duration/amount). - // If specified as the default value (0.0.0), the autoRenewAccount will be removed. - // If unspecified, no change. - AccountID autoRenewAccount = 9; -} diff --git a/src/main/proto/ContractCall.proto b/src/main/proto/ContractCall.proto deleted file mode 100644 index 67e0bb91..00000000 --- a/src/main/proto/ContractCall.proto +++ /dev/null @@ -1,44 +0,0 @@ -syntax = "proto3"; - -package proto; - -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ‍ - */ - -option java_package = "com.hederahashgraph.api.proto.java"; -option java_multiple_files = true; - -import "BasicTypes.proto"; -/* -Call a function of the given smart contract instance, giving it functionParameters as its inputs. -The call can use at maximum the given amount of gas – the paying account will not be charged for any unspent gas. - -If this function results in data being stored, an amount of gas is calculated that reflects this storage burden. - -The amount of gas used, as well as other attributes of the transaction, e.g. size, number of signatures to be verified, -determine the fee for the transaction – which is charged to the paying account. -*/ - -message ContractCallTransactionBody { - ContractID contractID = 1; // the contract instance to call, in the format used in transactions - int64 gas = 2; // the maximum amount of gas to use for the call - int64 amount = 3; // number of tinybars sent (the function must be payable if this is nonzero) - bytes functionParameters = 4; // which function to call, and the parameters to pass to the function -} diff --git a/src/main/proto/ContractCallLocal.proto b/src/main/proto/ContractCallLocal.proto deleted file mode 100644 index cfb63c5a..00000000 --- a/src/main/proto/ContractCallLocal.proto +++ /dev/null @@ -1,74 +0,0 @@ -syntax = "proto3"; - -package proto; - -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ‍ - */ - -option java_package = "com.hederahashgraph.api.proto.java"; -option java_multiple_files = true; - -import "BasicTypes.proto"; -import "QueryHeader.proto"; -import "ResponseHeader.proto"; - -/* The log information for an event returned by a smart contract function call. One function call may return several such events. */ -message ContractLoginfo { - ContractID contractID = 1; // address of a contract that emitted the event - bytes bloom = 2; // bloom filter for a particular log - repeated bytes topic = 3; // topics of a particular event - bytes data = 4; // event data -} - -/* The result returned by a call to a smart contract function. This is part of the response to a ContractCallLocal query, and is in the record for a ContractCall or ContractCreateInstance transaction. The ContractCreateInstance transaction record has the results of the call to the constructor. */ -message ContractFunctionResult { - ContractID contractID = 1; // the smart contract instance whose function was called - bytes contractCallResult = 2; // the result returned by the function - string errorMessage = 3; // message In case there was an error during smart contract execution - bytes bloom = 4; // bloom filter for record - uint64 gasUsed = 5; // units of gas used to execute contract - repeated ContractLoginfo logInfo = 6; // the log info for events returned by the function - repeated ContractID createdContractIDs = 7; // the list of smart contracts that were created by the function call -} - -/* -Call a function of the given smart contract instance, giving it functionParameters as its inputs. -This is performed locally on the particular node that the client is communicating with. -It cannot change the state of the contract instance (and so, cannot spend anything from the instance's cryptocurrency account). -It will not have a consensus timestamp. It cannot generate a record or a receipt. The response will contain the output -returned by the function call. This is useful for calling getter functions, which purely read the state and don't change it. -It is faster and cheaper than a normal call, because it is purely local to a single node. - -Unlike a ContractCall transaction, the node will consume the entire amount of provided gas in determining -the fee for this query. -*/ -message ContractCallLocalQuery { - QueryHeader header = 1; // standard info sent from client to node, including the signed payment, and what kind of response is requested (cost, state proof, both, or neither). The payment must cover the fees and all of the gas offered. - ContractID contractID = 2; // the contract instance to call, in the format used in transactions - int64 gas = 3; // The amount of gas to use for the call; all of the gas offered will be used and charged a corresponding fee - bytes functionParameters = 4; // which function to call, and the parameters to pass to the function - int64 maxResultSize = 5; // max number of bytes that the result might include. The run will fail if it would have returned more than this number of bytes. -} - -/* Response when the client sends the node ContractCallLocalQuery */ -message ContractCallLocalResponse { - ResponseHeader header = 1; //standard response from node to client, including the requested fields: cost, or state proof, or both, or neither - ContractFunctionResult functionResult = 2; // the value returned by the function (if it completed and didn't fail) -} diff --git a/src/main/proto/ContractCreate.proto b/src/main/proto/ContractCreate.proto deleted file mode 100644 index 2b51c07b..00000000 --- a/src/main/proto/ContractCreate.proto +++ /dev/null @@ -1,61 +0,0 @@ -syntax = "proto3"; - -package proto; - -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ‍ - */ - -option java_package = "com.hederahashgraph.api.proto.java"; -option java_multiple_files = true; -import "BasicTypes.proto"; -import "Duration.proto"; -/* -Start a new smart contract instance. After the instance is created, the ContractID for it is in the receipt, and can be -retrieved by the Record or with a GetByKey query. The instance will run the bytecode stored in a previously created -file, referenced either by FileID or by the transaction ID of the transaction that created the file - - -The constructor will be executed using the given amount of gas, and any unspent gas will be refunded to the paying account. Constructor inputs come from the given constructorParameters. - * - * The instance will exist for autoRenewPeriod seconds. When that is reached, it will renew itself for another autoRenewPeriod seconds by charging its associated cryptocurrency account (which it creates here). If it has insufficient cryptocurrency to extend that long, it will extend as long as it can. If its balance is zero, the instance will be deleted. - * - * A smart contract instance normally enforces rules, so "the code is law". For example, an ERC-20 contract prevents a transfer from being undone without a signature by the recipient of the transfer. This is always enforced if the contract instance was created with the adminKeys being null. But for some uses, it might be desirable to create something like an ERC-20 contract that has a specific group of trusted individuals who can act as a "supreme court" with the ability to override the normal operation, when a sufficient number of them agree to do so. If adminKeys is not null, then they can sign a transaction that can change the state of the smart contract in arbitrary ways, such as to reverse a transaction that violates some standard of behavior that is not covered by the code itself. The admin keys can also be used to change the autoRenewPeriod, and change the adminKeys field itself. The API currently does not implement this ability. But it does allow the adminKeys field to be set and queried, and will in the future implement such admin abilities for any instance that has a non-null adminKeys. - * - * If this constructor stores information, it is charged gas to store it. There is a fee in hbars to maintain that storage until the expiration time, and that fee is added as part of the transaction fee. - * - * An entity (account, file, or smart contract instance) must be created in a particular realm. If the realmID is left null, then a new realm will be created with the given admin key. If a new realm has a null adminKey, then anyone can create/modify/delete entities in that realm. But if an admin key is given, then any transaction to create/modify/delete an entity in that realm must be signed by that key, though anyone can still call functions on smart contract instances that exist in that realm. A realm ceases to exist when everything within it has expired and no longer exists. - * - * The current API ignores shardID, realmID, and newRealmAdminKey, and creates everything in shard 0 and realm 0, with a null key. Future versions of the API will support multiple realms and multiple shards. - * - * The optional memo field can contain a string whose length is up to 100 bytes. That is the size after Unicode NFD then UTF-8 conversion. This field can be used to describe the smart contract. It could also be used for other purposes. One recommended purpose is to hold a hexadecimal string that is the SHA-384 hash of a PDF file containing a human-readable legal contract. Then, if the admin keys are the public keys of human arbitrators, they can use that legal document to guide their decisions during a binding arbitration tribunal, convened to consider any changes to the smart contract in the future. The memo field can only be changed using the admin keys. If there are no admin keys, then it cannot be changed after the smart contract is created. - */ -message ContractCreateTransactionBody { - FileID fileID = 1; // the file containing the smart contract byte code. A copy will be made and held by the contract instance, and have the same expiration time as the instance. The file is referenced one of two ways: - Key adminKey = 3; // the state of the instance and its fields can be modified arbitrarily if this key signs a transaction to modify it. If this is null, then such modifications are not possible, and there is no administrator that can override the normal operation of this smart contract instance. Note that if it is created with no admin keys, then there is no administrator to authorize changing the admin keys, so there can never be any admin keys for that instance. - int64 gas = 4; // gas to run the constructor - int64 initialBalance = 5; // initial number of tinybars to put into the cryptocurrency account associated with and owned by the smart contract - AccountID proxyAccountID = 6; // ID of the account to which this account is proxy staked. If proxyAccountID is null, or is an invalid account, or is an account that isn't a node, then this account is automatically proxy staked to a node chosen by the network, but without earning payments. If the proxyAccountID account refuses to accept proxy staking , or if it is not currently running a node, then it will behave as if proxyAccountID was null. - Duration autoRenewPeriod = 8; // the instance will charge its account every this many seconds to renew for this long - bytes constructorParameters = 9; // parameters to pass to the constructor - ShardID shardID = 10; // shard in which to create this - RealmID realmID = 11; // realm in which to create this (leave this null to create a new realm) - Key newRealmAdminKey = 12; // if realmID is null, then this the admin key for the new realm that will be created - string memo = 13; // the memo that was submitted as part of the contract (max 100 bytes) -} diff --git a/src/main/proto/ContractDelete.proto b/src/main/proto/ContractDelete.proto deleted file mode 100644 index 0146e924..00000000 --- a/src/main/proto/ContractDelete.proto +++ /dev/null @@ -1,46 +0,0 @@ -syntax = "proto3"; - -package proto; - -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ‍ - */ -option java_package = "com.hederahashgraph.api.proto.java"; -option java_multiple_files = true; - -import "BasicTypes.proto"; - -/* -At consensus, marks a contract as deleted and transfers its remaining hBars, if any, to a designated receiver. After a contract is deleted, it can no longer be called. - -If the target contract is immutable (that is, was created without an admin key), then this transaction resolves to MODIFYING_IMMUTABLE_CONTRACT. - ---- Signing Requirements --- -1. The admin key of the target contract must sign. -2. If the transfer account or contract has receiverSigRequired, its associated key must also sign. */ -message ContractDeleteTransactionBody { - // The id of the contract to be deleted - ContractID contractID = 1; - oneof obtainers { - // The id of an account to receive any remaining hBars from the deleted contract - AccountID transferAccountID = 2; - // The id of a contract to receive any remaining hBars from the deleted contract - ContractID transferContractID = 3; - } -} diff --git a/src/main/proto/ContractGetBytecode.proto b/src/main/proto/ContractGetBytecode.proto deleted file mode 100644 index 7a3e42b8..00000000 --- a/src/main/proto/ContractGetBytecode.proto +++ /dev/null @@ -1,43 +0,0 @@ -syntax = "proto3"; - -package proto; - -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ‍ - */ - -option java_package = "com.hederahashgraph.api.proto.java"; -option java_multiple_files = true; - -import "BasicTypes.proto"; -import "QueryHeader.proto"; -import "ResponseHeader.proto"; - -/* Get the bytecode for a smart contract instance */ -message ContractGetBytecodeQuery { - QueryHeader header = 1; // standard info sent from client to node, including the signed payment, and what kind of response is requested (cost, state proof, both, or neither). - ContractID contractID = 2; // the contract for which information is requested -} - -/* Response when the client sends the node ContractGetBytecodeQuery */ -message ContractGetBytecodeResponse { - ResponseHeader header = 1; //standard response from node to client, including the requested fields: cost, or state proof, or both, or neither - bytes bytecode = 6; // the bytecode -} - diff --git a/src/main/proto/ContractGetInfo.proto b/src/main/proto/ContractGetInfo.proto deleted file mode 100644 index 23215e70..00000000 --- a/src/main/proto/ContractGetInfo.proto +++ /dev/null @@ -1,58 +0,0 @@ -syntax = "proto3"; - -package proto; - -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ‍ - */ - -option java_package = "com.hederahashgraph.api.proto.java"; -option java_multiple_files = true; - -import "Timestamp.proto"; -import "Duration.proto"; -import "BasicTypes.proto"; -import "QueryHeader.proto"; -import "ResponseHeader.proto"; - -/* Get information about a smart contract instance. This includes the account that it uses, the file containing its bytecode, and the time when it will expire. */ -message ContractGetInfoQuery { - QueryHeader header = 1; // standard info sent from client to node, including the signed payment, and what kind of response is requested (cost, state proof, both, or neither). - ContractID contractID = 2; // the contract for which information is requested -} - -/* Response when the client sends the node ContractGetInfoQuery */ -message ContractGetInfoResponse { - ResponseHeader header = 1; //standard response from node to client, including the requested fields: cost, or state proof, or both, or neither - message ContractInfo { - ContractID contractID = 1; // ID of the contract instance, in the format used in transactions - AccountID accountID = 2; // ID of the cryptocurrency account owned by the contract instance, in the format used in transactions - string contractAccountID = 3; // ID of both the contract instance and the cryptocurrency account owned by the contract instance, in the format used by Solidity - Key adminKey = 4; // the state of the instance and its fields can be modified arbitrarily if this key signs a transaction to modify it. If this is null, then such modifications are not possible, and there is no administrator that can override the normal operation of this smart contract instance. Note that if it is created with no admin keys, then there is no administrator to authorize changing the admin keys, so there can never be any admin keys for that instance. */ - Timestamp expirationTime = 5; // the current time at which this contract instance (and its account) is set to expire - Duration autoRenewPeriod = 6; // the expiration time will extend every this many seconds. If there are insufficient funds, then it extends as long as possible. If the account is empty when it expires, then it is deleted. - int64 storage = 7; // number of bytes of storage being used by this instance (which affects the cost to extend the expiration time) - string memo = 8; // the memo associated with the contract (max 100 bytes) - uint64 balance = 9; // The current balance, in tinybars - bool deleted = 10; // Whether the contract has been deleted - repeated TokenRelationship tokenRelationships = 11; // The tokens associated to the contract - } - ContractInfo contractInfo = 2; // the information about this contract instance (a state proof can be generated for this) -} - diff --git a/src/main/proto/ContractGetRecords.proto b/src/main/proto/ContractGetRecords.proto deleted file mode 100644 index 9f36b1ba..00000000 --- a/src/main/proto/ContractGetRecords.proto +++ /dev/null @@ -1,46 +0,0 @@ -syntax = "proto3"; - -package proto; - -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ‍ - */ - -option java_package = "com.hederahashgraph.api.proto.java"; -option java_multiple_files = true; - -import "BasicTypes.proto"; -import "TransactionRecord.proto"; -import "QueryHeader.proto"; -import "ResponseHeader.proto"; - -// Before v0.9.0, requested records of all transactions against the given contract in the last 25 hours. -message ContractGetRecordsQuery { - option deprecated = true; - QueryHeader header = 1; // Standard info sent from client to node, including the signed payment, and what kind of response is requested (cost, state proof, both, or neither). - ContractID contractID = 2; // The smart contract instance for which the records should be retrieved -} - -// Before v0.9.0, returned records of all transactions against the given contract in the last 25 hours. -message ContractGetRecordsResponse { - option deprecated = true; - ResponseHeader header = 1; //Standard response from node to client, including the requested fields: cost, or state proof, or both, or neither - ContractID contractID = 2; // The smart contract instance that this record is for - repeated TransactionRecord records = 3; // List of records, each with contractCreateResult or contractCallResult as its body -} diff --git a/src/main/proto/ContractUpdate.proto b/src/main/proto/ContractUpdate.proto deleted file mode 100644 index 1e3da371..00000000 --- a/src/main/proto/ContractUpdate.proto +++ /dev/null @@ -1,61 +0,0 @@ -syntax = "proto3"; - -package proto; - -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ‍ - */ - -option java_package = "com.hederahashgraph.api.proto.java"; -option java_multiple_files = true; - -import "BasicTypes.proto"; -import "Duration.proto"; -import "Timestamp.proto"; -import "google/protobuf/wrappers.proto"; - -/* -At consensus, updates the fields of a smart contract to the given values. - -If no value is given for a field, that field is left unchanged on the contract. For an immutable smart contract (that is, a contract created without an adminKey), only the expirationTime may be updated; setting any other field in this case will cause the transaction status to resolve to MODIFYING_IMMUTABLE_CONTRACT. - ---- Signing Requirements --- -1. Whether or not a contract has an admin Key, its expiry can be extended with only the transaction payer's signature. -2. Updating any other field of a mutable contract requires the admin key's signature. -3. If the update transaction includes a new admin key, this new key must also sign unless it is exactly an empty KeyList. This special sentinel key removes the existing admin key and causes the contract to become immutable. (Other Key structures without a constituent Ed25519 key will be rejected with INVALID_ADMIN_KEY.) */ -message ContractUpdateTransactionBody { - // The id of the contract to be updated - ContractID contractID = 1; - // The new expiry of the contract, no earlier than the current expiry (resolves to EXPIRATION_REDUCTION_NOT_ALLOWED otherwise) - Timestamp expirationTime = 2; - // The new key to control updates to the contract - Key adminKey = 3; - // (NOT YET IMPLEMENTED) The new id of the account to which the contract is proxy staked - AccountID proxyAccountID = 6; - // (NOT YET IMPLEMENTED) The new interval at which the contract will pay to extend its expiry (by the same interval) - Duration autoRenewPeriod = 7; - // The new id of the file asserted to contain the bytecode of the Solidity transaction that created this contract - FileID fileID = 8; - // The new contract memo, assumed to be Unicode encoded with UTF-8 (at most 100 bytes) - oneof memoField { - string memo = 9 [deprecated = true]; // [Deprecated] If set with a non-zero length, the new memo to be associated with the account (UTF-8 encoding max 100 bytes) - google.protobuf.StringValue memoWrapper = 10; // If set, the new memo to be associated with the account (UTF-8 encoding max 100 bytes) - } -} - diff --git a/src/main/proto/CryptoAddLiveHash.proto b/src/main/proto/CryptoAddLiveHash.proto deleted file mode 100644 index 04aec68c..00000000 --- a/src/main/proto/CryptoAddLiveHash.proto +++ /dev/null @@ -1,55 +0,0 @@ -syntax = "proto3"; - -package proto; - -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ‍ - */ - -option java_package = "com.hederahashgraph.api.proto.java"; -option java_multiple_files = true; - - -import "BasicTypes.proto"; -import "Duration.proto"; - -/* A hash---presumably of some kind of credential or certificate---along with a list of keys, each of which may be either a primitive or a threshold key. */ -message LiveHash { - // The account to which the livehash is attached - AccountID accountId = 1; - // The SHA-384 hash of a credential or certificate - bytes hash = 2; - // A list of keys (primitive or threshold), all of which must sign to attach the livehash to an account, and any one of which can later delete it. - KeyList keys = 3; - // The duration for which the livehash will remain valid - Duration duration = 5; -} - -/* At consensus, attaches the given livehash to the given account. -The hash can be deleted by the key controlling the account, or by any of the keys associated to the livehash. -Hence livehashes provide a revocation service for their implied credentials; for example, -when an authority grants a credential to the account, the account owner will cosign with the authority (or authorities) -to attach a hash of the credential to the account---hence proving the grant. If the credential is revoked, then any of -the authorities may delete it (or the account owner). In this way, the livehash mechanism acts as a revocation service. -An account cannot have two identical livehashes associated. To modify the list of keys in a livehash, the -livehash should first be deleted, then recreated with a new list of keys. */ -message CryptoAddLiveHashTransactionBody { - // A hash of some credential or certificate, along with the keys of the entities that asserted it validity - LiveHash liveHash = 3; -} diff --git a/src/main/proto/CryptoCreate.proto b/src/main/proto/CryptoCreate.proto deleted file mode 100644 index 33857dc8..00000000 --- a/src/main/proto/CryptoCreate.proto +++ /dev/null @@ -1,50 +0,0 @@ -syntax = "proto3"; - -package proto; - -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ‍ - */ - -option java_package = "com.hederahashgraph.api.proto.java"; -option java_multiple_files = true; - -import "BasicTypes.proto"; -import "Duration.proto"; - -/* -Create a new account. After the account is created, the AccountID for it is in the receipt. It can also be retrieved with a GetByKey query. Threshold values can be defined, and records are generated and stored for 25 hours for any transfer that exceeds the thresholds. This account is charged for each record generated, so the thresholds are useful for limiting record generation to happen only for large transactions. - -The Key field is the key used to sign transactions for this account. If the account has receiverSigRequired set to true, then all cryptocurrency transfers must be signed by this account's key, both for transfers in and out. If it is false, then only transfers out have to be signed by it. When the account is created, the payer account is charged enough hbars so that the new account will not expire for the next autoRenewPeriod seconds. When it reaches the expiration time, the new account will then be automatically charged to renew for another autoRenewPeriod seconds. If it does not have enough hbars to renew for that long, then the remaining hbars are used to extend its expiration as long as possible. If it is has a zero balance when it expires, then it is deleted. This transaction must be signed by the payer account. If receiverSigRequired is false, then the transaction does not have to be signed by the keys in the keys field. If it is true, then it must be signed by them, in addition to the keys of the payer account. -An entity (account, file, or smart contract instance) must be created in a particular realm. If the realmID is left null, then a new realm will be created with the given admin key. If a new realm has a null adminKey, then anyone can create/modify/delete entities in that realm. But if an admin key is given, then any transaction to create/modify/delete an entity in that realm must be signed by that key, though anyone can still call functions on smart contract instances that exist in that realm. A realm ceases to exist when everything within it has expired and no longer exists. -The current API ignores shardID, realmID, and newRealmAdminKey, and creates everything in shard 0 and realm 0, with a null key. Future versions of the API will support multiple realms and multiple shards. - */ -message CryptoCreateTransactionBody { - Key key = 1; // The key that must sign each transfer out of the account. If receiverSigRequired is true, then it must also sign any transfer into the account. - uint64 initialBalance = 2; // The initial number of tinybars to put into the account - AccountID proxyAccountID = 3; // ID of the account to which this account is proxy staked. If proxyAccountID is null, or is an invalid account, or is an account that isn't a node, then this account is automatically proxy staked to a node chosen by the network, but without earning payments. If the proxyAccountID account refuses to accept proxy staking , or if it is not currently running a node, then it will behave as if proxyAccountID was null. - uint64 sendRecordThreshold = 6 [deprecated=true]; // [Deprecated]. The threshold amount (in tinybars) for which an account record is created for any send/withdraw transaction - uint64 receiveRecordThreshold = 7 [deprecated=true]; // [Deprecated]. The threshold amount (in tinybars) for which an account record is created for any receive/deposit transaction - bool receiverSigRequired = 8; // If true, this account's key must sign any transaction depositing into this account (in addition to all withdrawals) - Duration autoRenewPeriod = 9; // The account is charged to extend its expiration date every this many seconds. If it doesn't have enough balance, it extends as long as possible. If it is empty when it expires, then it is deleted. - ShardID shardID = 10; // The shard in which this account is created - RealmID realmID = 11; // The realm in which this account is created (leave this null to create a new realm) - Key newRealmAdminKey = 12; // If realmID is null, then this the admin key for the new realm that will be created - string memo = 13; // The memo associated with the account (UTF-8 encoding max 100 bytes) -} diff --git a/src/main/proto/CryptoDelete.proto b/src/main/proto/CryptoDelete.proto deleted file mode 100644 index 16452a54..00000000 --- a/src/main/proto/CryptoDelete.proto +++ /dev/null @@ -1,34 +0,0 @@ -syntax = "proto3"; - -package proto; - -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ‍ - */ - -option java_package = "com.hederahashgraph.api.proto.java"; -option java_multiple_files = true; - -import "BasicTypes.proto"; - -/* Mark an account as deleted, moving all its current hbars to another account. It will remain in the ledger, marked as deleted, until it expires. Transfers into it a deleted account fail. But a deleted account can still have its expiration extended in the normal way. */ -message CryptoDeleteTransactionBody { - AccountID transferAccountID = 1; // The account ID which will receive all remaining hbars - AccountID deleteAccountID = 2; // The account ID which should be deleted -} diff --git a/src/main/proto/CryptoDeleteLiveHash.proto b/src/main/proto/CryptoDeleteLiveHash.proto deleted file mode 100644 index ecb66b20..00000000 --- a/src/main/proto/CryptoDeleteLiveHash.proto +++ /dev/null @@ -1,36 +0,0 @@ -syntax = "proto3"; - -package proto; - -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ‍ - */ - -option java_package = "com.hederahashgraph.api.proto.java"; -option java_multiple_files = true; - -import "BasicTypes.proto"; - -/* At consensus, deletes a livehash associated to the given account. The transaction must be signed by either the key of the owning account, or at least one of the keys associated to the livehash. */ -message CryptoDeleteLiveHashTransactionBody { - // The account owning the livehash - AccountID accountOfLiveHash = 1; - // The SHA-384 livehash to delete from the account - bytes liveHashToDelete = 2; -} diff --git a/src/main/proto/CryptoGetAccountBalance.proto b/src/main/proto/CryptoGetAccountBalance.proto deleted file mode 100644 index 8ea9e930..00000000 --- a/src/main/proto/CryptoGetAccountBalance.proto +++ /dev/null @@ -1,49 +0,0 @@ -syntax = "proto3"; - -package proto; - -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ‍ - */ - -option java_package = "com.hederahashgraph.api.proto.java"; -option java_multiple_files = true; - -import "BasicTypes.proto"; -import "QueryHeader.proto"; -import "ResponseHeader.proto"; -import "Timestamp.proto"; - -/* Get the balance of a cryptocurrency account. This returns only the balance, so it is a smaller -reply than CryptoGetInfo, which returns the balance plus additional information. */ -message CryptoGetAccountBalanceQuery { - QueryHeader header = 1; // Standard info sent from client to node, including the signed payment, and what kind of response is requested (cost, state proof, both, or neither). - oneof balanceSource { - AccountID accountID = 2; // The account ID for which information is requested - ContractID contractID = 3; // The account ID for which information is requested - } -} - -/* Response when the client sends the node CryptoGetAccountBalanceQuery */ -message CryptoGetAccountBalanceResponse { - ResponseHeader header = 1; // Standard response from node to client, including the requested fields: cost, or state proof, or both, or neither. - AccountID accountID = 2; // The account ID that is being described (this is useful with state proofs, for proving to a third party) - uint64 balance = 3; // The current balance, in tinybars. - repeated TokenBalance tokenBalances = 4; // The token balances possessed by the target account. -} diff --git a/src/main/proto/CryptoGetAccountRecords.proto b/src/main/proto/CryptoGetAccountRecords.proto deleted file mode 100644 index 2431c1bd..00000000 --- a/src/main/proto/CryptoGetAccountRecords.proto +++ /dev/null @@ -1,46 +0,0 @@ -syntax = "proto3"; - -package proto; - -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ‍ - */ - -option java_package = "com.hederahashgraph.api.proto.java"; -option java_multiple_files = true; - -import "BasicTypes.proto"; -import "TransactionRecord.proto"; -import "QueryHeader.proto"; -import "ResponseHeader.proto"; - -// Requests records of all transactions for which the given account was the effective payer in the last 3 minutes of consensus time and ledger.keepRecordsInState=true was true during handleTransaction. -message CryptoGetAccountRecordsQuery { - QueryHeader header = 1; // Standard info sent from client to node, including the signed payment, and what kind of response is requested (cost, state proof, both, or neither). - AccountID accountID = 2; // The account ID for which the records should be retrieved -} - -// Returns records of all transactions for which the given account was the effective payer in the last 3 minutes of consensus time and ledger.keepRecordsInState=true was true during handleTransaction. -message CryptoGetAccountRecordsResponse { - ResponseHeader header = 1; // Standard response from node to client, including the requested fields: cost, or state proof, or both, or neither - AccountID accountID = 2; // The account that this record is for - repeated TransactionRecord records = 3; // List of records -} - - diff --git a/src/main/proto/CryptoGetInfo.proto b/src/main/proto/CryptoGetInfo.proto deleted file mode 100644 index a37cd9a4..00000000 --- a/src/main/proto/CryptoGetInfo.proto +++ /dev/null @@ -1,65 +0,0 @@ -syntax = "proto3"; - -package proto; - -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ‍ - */ - -option java_package = "com.hederahashgraph.api.proto.java"; -option java_multiple_files = true; - -import "Timestamp.proto"; -import "Duration.proto"; -import "BasicTypes.proto"; -import "QueryHeader.proto"; -import "ResponseHeader.proto"; -import "CryptoAddLiveHash.proto"; - -/* Get all the information about an account, including the balance. This does not get the list of account records. */ -message CryptoGetInfoQuery { - QueryHeader header = 1; // Standard info sent from client to node, including the signed payment, and what kind of response is requested (cost, state proof, both, or neither). - AccountID accountID = 2; // The account ID for which information is requested -} - -/* Response when the client sends the node CryptoGetInfoQuery */ -message CryptoGetInfoResponse { - ResponseHeader header = 1; //Standard response from node to client, including the requested fields: cost, or state proof, or both, or neither - - message AccountInfo { - AccountID accountID = 1; // The account ID for which this information applies - string contractAccountID = 2; // The Contract Account ID comprising of both the contract instance and the cryptocurrency account owned by the contract instance, in the format used by Solidity - bool deleted = 3; // If true, then this account has been deleted, it will disappear when it expires, and all transactions for it will fail except the transaction to extend its expiration date - AccountID proxyAccountID = 4; // The Account ID of the account to which this is proxy staked. If proxyAccountID is null, or is an invalid account, or is an account that isn't a node, then this account is automatically proxy staked to a node chosen by the network, but without earning payments. If the proxyAccountID account refuses to accept proxy staking , or if it is not currently running a node, then it will behave as if proxyAccountID was null. - int64 proxyReceived = 6; // The total number of tinybars proxy staked to this account - Key key = 7; // The key for the account, which must sign in order to transfer out, or to modify the account in any way other than extending its expiration date. - uint64 balance = 8; // The current balance of account in tinybars - // [Deprecated]. The threshold amount, in tinybars, at which a record is created of any transaction that decreases the balance of this account by more than the threshold - uint64 generateSendRecordThreshold = 9 [deprecated=true]; - // [Deprecated]. The threshold amount, in tinybars, at which a record is created of any transaction that increases the balance of this account by more than the threshold - uint64 generateReceiveRecordThreshold = 10 [deprecated=true]; - bool receiverSigRequired = 11; // If true, no transaction can transfer to this account unless signed by this account's key - Timestamp expirationTime = 12; // The TimeStamp time at which this account is set to expire - Duration autoRenewPeriod = 13; // The duration for expiration time will extend every this many seconds. If there are insufficient funds, then it extends as long as possible. If it is empty when it expires, then it is deleted. - repeated LiveHash liveHashes = 14; // All of the livehashes attached to the account (each of which is a hash along with the keys that authorized it and can delete it) - repeated TokenRelationship tokenRelationships = 15; // All tokens related to this account - string memo = 16; // The memo associated with the account - } - AccountInfo accountInfo = 2; // Info about the account (a state proof can be generated for this) -} diff --git a/src/main/proto/CryptoGetLiveHash.proto b/src/main/proto/CryptoGetLiveHash.proto deleted file mode 100644 index dedf205a..00000000 --- a/src/main/proto/CryptoGetLiveHash.proto +++ /dev/null @@ -1,51 +0,0 @@ -syntax = "proto3"; - -package proto; - -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ‍ - */ - -option java_package = "com.hederahashgraph.api.proto.java"; -option java_multiple_files = true; - -import "BasicTypes.proto"; -import "QueryHeader.proto"; -import "ResponseHeader.proto"; -import "CryptoAddLiveHash.proto"; - -/* Requests a livehash associated to an account. */ -message CryptoGetLiveHashQuery { - // Standard info sent from client to node, including the signed payment, and what kind of response is requested (cost, state proof, both, or neither). - QueryHeader header = 1; - // The account to which the livehash is associated - AccountID accountID = 2; - // The SHA-384 data in the livehash - bytes hash = 3; -} - -/* Returns the full livehash associated to an account, if it is present. Note that the only way to obtain a state proof exhibiting the absence of a livehash from an account is to retrieve a state proof of the entire account with its list of livehashes. */ -message CryptoGetLiveHashResponse { - // Standard response from node to client, including the requested fields: cost, or state proof, or both, or neither - ResponseHeader header = 1; - // The livehash, if present - LiveHash liveHash = 2; -} - - diff --git a/src/main/proto/CryptoGetStakers.proto b/src/main/proto/CryptoGetStakers.proto deleted file mode 100644 index 4b5b2027..00000000 --- a/src/main/proto/CryptoGetStakers.proto +++ /dev/null @@ -1,53 +0,0 @@ -syntax = "proto3"; - -package proto; - -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ‍ - */ - -option java_package = "com.hederahashgraph.api.proto.java"; -option java_multiple_files = true; - -import "BasicTypes.proto"; -import "QueryHeader.proto"; -import "ResponseHeader.proto"; - -/* Get all the accounts that are proxy staking to this account. For each of them, give the amount currently staked. This is not yet implemented, but will be in a future version of the API. */ -message CryptoGetStakersQuery { - QueryHeader header = 1; // Standard info sent from client to node, including the signed payment, and what kind of response is requested (cost, state proof, both, or neither). - AccountID accountID = 2; // The Account ID for which the records should be retrieved -} - -/* information about a single account that is proxy staking */ -message ProxyStaker { - AccountID accountID = 1; // The Account ID that is proxy staking - int64 amount = 2; // The number of hbars that are currently proxy staked -} - -/* all of the accounts proxy staking to a given account, and the amounts proxy staked */ -message AllProxyStakers { - AccountID accountID = 1; // The Account ID that is being proxy staked to - repeated ProxyStaker proxyStaker = 2; // Each of the proxy staking accounts, and the amount they are proxy staking -} -/* Response when the client sends the node CryptoGetStakersQuery */ -message CryptoGetStakersResponse { - ResponseHeader header = 1; //Standard response from node to client, including the requested fields: cost, or state proof, or both, or neither - AllProxyStakers stakers = 3; // List of accounts proxy staking to this account, and the amount each is currently proxy staking -} diff --git a/src/main/proto/CryptoService.proto b/src/main/proto/CryptoService.proto deleted file mode 100644 index 184fbbc3..00000000 --- a/src/main/proto/CryptoService.proto +++ /dev/null @@ -1,63 +0,0 @@ -syntax = "proto3"; - -package proto; - -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ‍ - */ -option java_package = "com.hederahashgraph.service.proto.java"; - -import "Query.proto"; -import "Response.proto"; -import "TransactionResponse.proto"; -import "Transaction.proto"; - -/* -Transactions and queries for the Crypto Service -*/ -service CryptoService { - // Creates a new account by submitting the transaction - rpc createAccount (Transaction) returns (TransactionResponse); - // Updates an account by submitting the transaction - rpc updateAccount (Transaction) returns (TransactionResponse); - // Initiates a transfer by submitting the transaction - rpc cryptoTransfer (Transaction) returns (TransactionResponse); - // Deletes and account by submitting the transaction - rpc cryptoDelete (Transaction) returns (TransactionResponse); - // (NOT CURRENTLY SUPPORTED) Adds a livehash - rpc addLiveHash (Transaction) returns (TransactionResponse); - // (NOT CURRENTLY SUPPORTED) Deletes a livehash - rpc deleteLiveHash (Transaction) returns (TransactionResponse); - // (NOT CURRENTLY SUPPORTED) Retrieves a livehash for an account - rpc getLiveHash (Query) returns (Response); - // Returns all transactions in the last 180s of consensus time for which the given account was the effective payer and network property ledger.keepRecordsInState was true. - rpc getAccountRecords (Query) returns (Response); - // Retrieves the balance of an account - rpc cryptoGetBalance (Query) returns (Response); - // Retrieves the metadata of an account - rpc getAccountInfo (Query) returns (Response); - // Retrieves the latest receipt for a transaction that is either awaiting consensus, or reached consensus in the last 180 seconds - rpc getTransactionReceipts (Query) returns (Response); - // (NOT CURRENTLY SUPPORTED) Returns the records of transactions recently funded by an account - rpc getFastTransactionRecord (Query) returns (Response); - // Retrieves the record of a transaction that is either awaiting consensus, or reached consensus in the last 180 seconds - rpc getTxRecordByTxID (Query) returns (Response); - // (NOT CURRENTLY SUPPORTED) Retrieves the stakers for a node by account id - rpc getStakersByAccountID (Query) returns (Response); -} diff --git a/src/main/proto/CryptoTransfer.proto b/src/main/proto/CryptoTransfer.proto deleted file mode 100644 index d8222d9b..00000000 --- a/src/main/proto/CryptoTransfer.proto +++ /dev/null @@ -1,36 +0,0 @@ -syntax = "proto3"; - -package proto; - -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ‍ - */ - -option java_package = "com.hederahashgraph.api.proto.java"; -option java_multiple_files = true; - -import "BasicTypes.proto"; - -/* Transfer cryptocurrency from some accounts to other accounts. The accounts list can contain up to 10 accounts. The amounts list must be the same length as the accounts list. Each negative amount is withdrawn from the corresponding account (a sender), and each positive one is added to the corresponding account (a receiver). The amounts list must sum to zero. Each amount is a number of tinyBars (there are 100,000,000 tinyBars in one Hbar). -If any sender account fails to have sufficient hbars, then the entire transaction fails, and none of those transfers occur, though the transaction fee is still charged. This transaction must be signed by the keys for all the sending accounts, and for any receiving accounts that have receiverSigRequired == true. The signatures are in the same order as the accounts, skipping those accounts that don't need a signature. -*/ -message CryptoTransferTransactionBody { - TransferList transfers = 1; - repeated TokenTransferList tokenTransfers = 2; -} diff --git a/src/main/proto/CryptoUpdate.proto b/src/main/proto/CryptoUpdate.proto deleted file mode 100644 index ad7e3e3a..00000000 --- a/src/main/proto/CryptoUpdate.proto +++ /dev/null @@ -1,56 +0,0 @@ -syntax = "proto3"; - -package proto; - -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ‍ - */ - -option java_package = "com.hederahashgraph.api.proto.java"; -option java_multiple_files = true; - -import "BasicTypes.proto"; -import "Duration.proto"; -import "Timestamp.proto"; -import "google/protobuf/wrappers.proto"; - -/* -Change properties for the given account. Any null field is ignored (left unchanged). This transaction must be signed by the existing key for this account. If the transaction is changing the key field, then the transaction must be signed by both the old key (from before the change) and the new key. The old key must sign for security. The new key must sign as a safeguard to avoid accidentally changing to an invalid key, and then having no way to recover. -*/ -message CryptoUpdateTransactionBody { - AccountID accountIDToUpdate = 2; // The account ID which is being updated in this transaction - Key key = 3; // The new key - AccountID proxyAccountID = 4; // ID of the account to which this account is proxy staked. If proxyAccountID is null, or is an invalid account, or is an account that isn't a node, then this account is automatically proxy staked to a node chosen by the network, but without earning payments. If the proxyAccountID account refuses to accept proxy staking , or if it is not currently running a node, then it will behave as if proxyAccountID was null. - int32 proxyFraction = 5 [deprecated = true]; // [Deprecated]. Payments earned from proxy staking are shared between the node and this account, with proxyFraction / 10000 going to this account - oneof sendRecordThresholdField { - uint64 sendRecordThreshold = 6 [deprecated = true]; // [Deprecated]. The new threshold amount (in tinybars) for which an account record is created for any send/withdraw transaction - google.protobuf.UInt64Value sendRecordThresholdWrapper = 11 [deprecated = true]; // [Deprecated]. The new threshold amount (in tinybars) for which an account record is created for any send/withdraw transaction - } - oneof receiveRecordThresholdField { - uint64 receiveRecordThreshold = 7 [deprecated = true]; // [Deprecated]. The new threshold amount (in tinybars) for which an account record is created for any receive/deposit transaction. - google.protobuf.UInt64Value receiveRecordThresholdWrapper = 12 [deprecated = true]; // [Deprecated]. The new threshold amount (in tinybars) for which an account record is created for any receive/deposit transaction. - } - Duration autoRenewPeriod = 8; // The duration in which it will automatically extend the expiration period. If it doesn't have enough balance, it extends as long as possible. If it is empty when it expires, then it is deleted. - Timestamp expirationTime = 9; // The new expiration time to extend to (ignored if equal to or before the current one) - oneof receiverSigRequiredField { - bool receiverSigRequired = 10 [deprecated = true]; // [Deprecated] Do NOT use this field to set a false value because the server cannot distinguish from the default value. Use receiverSigRequiredWrapper field for this purpose. - google.protobuf.BoolValue receiverSigRequiredWrapper = 13; // If true, this account's key must sign any transaction depositing into this account (in addition to all withdrawals) - } - google.protobuf.StringValue memo = 14; // If set, the new memo to be associated with the account (UTF-8 encoding max 100 bytes) -} diff --git a/src/main/proto/Duration.proto b/src/main/proto/Duration.proto deleted file mode 100644 index 4d3c362c..00000000 --- a/src/main/proto/Duration.proto +++ /dev/null @@ -1,31 +0,0 @@ -syntax = "proto3"; - -package proto; - -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ‍ - */ - -option java_package = "com.hederahashgraph.api.proto.java"; -option java_multiple_files = true; - -/* A length of time in seconds. */ -message Duration { - int64 seconds = 1; // The number of seconds -} diff --git a/src/main/proto/ExchangeRate.proto b/src/main/proto/ExchangeRate.proto deleted file mode 100644 index 28c617c5..00000000 --- a/src/main/proto/ExchangeRate.proto +++ /dev/null @@ -1,47 +0,0 @@ -syntax = "proto3"; - -package proto; - -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ‍ - */ -option java_package = "com.hederahashgraph.api.proto.java"; -option java_multiple_files = true; - -import "Timestamp.proto"; - - -/* -An exchange rate between hbar and cents (USD) and the time at which the exchange rate will expire, and be superseded by a new exchange rate. -*/ -message ExchangeRate { - // Denominator in calculation of exchange rate between hbar and cents - int32 hbarEquiv = 1; - // Numerator in calculation of exchange rate between hbar and cents - int32 centEquiv = 2; - // Expiration time in seconds for this exchange rate - TimestampSeconds expirationTime = 3; -} -/* Two sets of exchange rates */ -message ExchangeRateSet { - // Current exchange rate - ExchangeRate currentRate = 1; - // Next exchange rate which will take effect when current rate expires - ExchangeRate nextRate = 2; -} diff --git a/src/main/proto/FileAppend.proto b/src/main/proto/FileAppend.proto deleted file mode 100644 index d099e877..00000000 --- a/src/main/proto/FileAppend.proto +++ /dev/null @@ -1,39 +0,0 @@ -syntax = "proto3"; - -package proto; - -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ‍ - */ - -option java_package = "com.hederahashgraph.api.proto.java"; -option java_multiple_files = true; - - -import "BasicTypes.proto"; - -/* -Append the given contents to the end of the specified file. If a file is too big to create with a single FileCreateTransaction, then it can be created with the first part of its contents, and then appended as many times as necessary to create the entire file. -*/ -message FileAppendTransactionBody { - // The file to which the bytes will be appended - FileID fileID = 2; - // The bytes that will be appended to the end of the specified file - bytes contents = 4; -} diff --git a/src/main/proto/FileCreate.proto b/src/main/proto/FileCreate.proto deleted file mode 100644 index 279edd5c..00000000 --- a/src/main/proto/FileCreate.proto +++ /dev/null @@ -1,53 +0,0 @@ -syntax = "proto3"; - -package proto; - -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ‍ - */ - -option java_package = "com.hederahashgraph.api.proto.java"; -option java_multiple_files = true; - -import "BasicTypes.proto"; -import "Timestamp.proto"; - -/* Create a new file, containing the given contents. -After the file is created, the FileID for it can be found in the receipt, or record, or retrieved with a GetByKey query. - - The file contains the specified contents (possibly empty). The file will automatically disappear at the expirationTime, unless its expiration is extended by another transaction before that time. If the file is deleted, then its contents will become empty and it will be marked as deleted until it expires, and then it will cease to exist. - - The keys field is a list of keys. All the keys on the list must sign to create or modify a file, but only one of them needs to sign in order to delete the file. Each of those "keys" may itself be threshold key containing other keys (including other threshold keys). In other words, the behavior is an AND for create/modify, OR for delete. This is useful for acting as a revocation server. If it is desired to have the behavior be AND for all 3 operations (or OR for all 3), then the list should have only a single Key, which is a threshold key, with N=1 for OR, N=M for AND. - - If a file is created without ANY keys in the keys field, the file is immutable and ONLY the expirationTime of the file can be changed with a FileUpdate transaction. The file contents or its keys cannot be changed. - - An entity (account, file, or smart contract instance) must be created in a particular realm. If the realmID is left null, then a new realm will be created with the given admin key. If a new realm has a null adminKey, then anyone can create/modify/delete entities in that realm. But if an admin key is given, then any transaction to create/modify/delete an entity in that realm must be signed by that key, though anyone can still call functions on smart contract instances that exist in that realm. A realm ceases to exist when everything within it has expired and no longer exists. - - The current API ignores shardID, realmID, and newRealmAdminKey, and creates everything in shard 0 and realm 0, with a null key. Future versions of the API will support multiple realms and multiple shards. - */ -message FileCreateTransactionBody { - Timestamp expirationTime = 2; // The time at which this file should expire (unless FileUpdateTransaction is used before then to extend its life) - KeyList keys = 3; // All these keys must sign to create or modify the file. Any one of them can sign to delete the file. - bytes contents = 4; // The bytes that are the contents of the file - - ShardID shardID = 5; // Shard in which this file is created - RealmID realmID = 6; // The Realm in which to the file is created (leave this null to create a new realm) - Key newRealmAdminKey = 7; // If realmID is null, then this the admin key for the new realm that will be created - string memo = 8; // The memo associated with the file (UTF-8 encoding max 100 bytes) -} diff --git a/src/main/proto/FileDelete.proto b/src/main/proto/FileDelete.proto deleted file mode 100644 index 27ad4045..00000000 --- a/src/main/proto/FileDelete.proto +++ /dev/null @@ -1,33 +0,0 @@ -syntax = "proto3"; - -package proto; - -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ‍ - */ - -option java_package = "com.hederahashgraph.api.proto.java"; -option java_multiple_files = true; - -import "BasicTypes.proto"; - -/* Delete the given file. After deletion, it will be marked as deleted and will have no contents. But information about it will continue to exist until it expires. A list of keys was given when the file was created. All the keys on that list must sign transactions to create or modify the file, but any single one of them can be used to delete the file. Each "key" on that list may itself be a threshold key containing other keys (including other threshold keys). */ -message FileDeleteTransactionBody { - FileID fileID = 2; // The file to delete. It will be marked as deleted until it expires. Then it will disappear. -} diff --git a/src/main/proto/FileGetContents.proto b/src/main/proto/FileGetContents.proto deleted file mode 100644 index 34d0a464..00000000 --- a/src/main/proto/FileGetContents.proto +++ /dev/null @@ -1,48 +0,0 @@ -syntax = "proto3"; - -package proto; - -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ‍ - */ - -option java_package = "com.hederahashgraph.api.proto.java"; -option java_multiple_files = true; - -import "BasicTypes.proto"; -import "QueryHeader.proto"; -import "ResponseHeader.proto"; - -/* Get the contents of a file. The content field is empty (no bytes) if the file is empty. */ -message FileGetContentsQuery { - QueryHeader header = 1; // Standard info sent from client to node, including the signed payment, and what kind of response is requested (cost, state proof, both, or neither). - FileID fileID = 2; // The file ID of the file whose contents are requested -} - -/* Response when the client sends the node FileGetContentsQuery */ -message FileGetContentsResponse { - ResponseHeader header = 1; //Standard response from node to client, including the requested fields: cost, or state proof, or both, or neither - message FileContents { - FileID fileID = 1; // The file ID of the file whose contents are being returned - bytes contents = 2; // The bytes contained in the file - } - FileContents fileContents = 2; // the file ID and contents (a state proof can be generated for this) -} - - diff --git a/src/main/proto/FileGetInfo.proto b/src/main/proto/FileGetInfo.proto deleted file mode 100644 index 35478227..00000000 --- a/src/main/proto/FileGetInfo.proto +++ /dev/null @@ -1,52 +0,0 @@ -syntax = "proto3"; - -package proto; - -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ‍ - */ - -option java_package = "com.hederahashgraph.api.proto.java"; -option java_multiple_files = true; - -import "Timestamp.proto"; -import "BasicTypes.proto"; -import "QueryHeader.proto"; -import "ResponseHeader.proto"; - -/* Get all of the information about a file, except for its contents. When a file expires, it no longer exists, and there will be no info about it, and the fileInfo field will be blank. If a transaction or smart contract deletes the file, but it has not yet expired, then the fileInfo field will be non-empty, the deleted field will be true, its size will be 0, and its contents will be empty. */ -message FileGetInfoQuery { - QueryHeader header = 1; // Standard info sent from client to node, including the signed payment, and what kind of response is requested (cost, state proof, both, or neither). - FileID fileID = 2; // The file ID of the file for which information is requested -} - -/* Response when the client sends the node FileGetInfoQuery */ -message FileGetInfoResponse { - ResponseHeader header = 1; //Standard response from node to client, including the requested fields: cost, or state proof, or both, or neither - - message FileInfo { - FileID fileID = 1; // The file ID of the file for which information is requested - int64 size = 2; // Number of bytes in contents - Timestamp expirationTime = 3; // The current time at which this account is set to expire - bool deleted = 4; // True if deleted but not yet expired - KeyList keys = 5; // One of these keys must sign in order to modify or delete the file - string memo = 6; // The memo associated with the file - } - FileInfo fileInfo = 2; // The information about the file -} diff --git a/src/main/proto/FileService.proto b/src/main/proto/FileService.proto deleted file mode 100644 index a1470d15..00000000 --- a/src/main/proto/FileService.proto +++ /dev/null @@ -1,51 +0,0 @@ -syntax = "proto3"; - -package proto; - -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ‍ - */ -option java_package = "com.hederahashgraph.service.proto.java"; - -import "Query.proto"; -import "Response.proto"; -import "TransactionResponse.proto"; -import "Transaction.proto"; - -/* -Transactions and queries for the file service. -*/ -service FileService { - // Creates a file - rpc createFile (Transaction) returns (TransactionResponse); - // Updates a file - rpc updateFile (Transaction) returns (TransactionResponse); - // Deletes a file - rpc deleteFile (Transaction) returns (TransactionResponse); - // Appends to a file - rpc appendContent (Transaction) returns (TransactionResponse); - // Retrieves the file contents - rpc getFileContent (Query) returns (Response); - // Retrieves the file information - rpc getFileInfo (Query) returns (Response); - // Deletes a file if the submitting account has network admin privileges - rpc systemDelete (Transaction) returns (TransactionResponse); - // Undeletes a file if the submitting account has network admin privileges - rpc systemUndelete (Transaction) returns (TransactionResponse); -} diff --git a/src/main/proto/FileUpdate.proto b/src/main/proto/FileUpdate.proto deleted file mode 100644 index 5a6784ba..00000000 --- a/src/main/proto/FileUpdate.proto +++ /dev/null @@ -1,41 +0,0 @@ -syntax = "proto3"; - -package proto; - -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ‍ - */ - -option java_package = "com.hederahashgraph.api.proto.java"; -option java_multiple_files = true; - -import "BasicTypes.proto"; -import "Timestamp.proto"; -import "google/protobuf/wrappers.proto"; - -/* -Modify the metadata and/or contents of a file. If a field is not set in the transaction body, the corresponding file attribute will be unchanged. This transaction must be signed by all the keys in the key list of the file being updated. If the keys themselves are being update, then the transaction must also be signed by all the new keys. - */ -message FileUpdateTransactionBody { - FileID fileID = 1; // The ID of the file to update - Timestamp expirationTime = 2; // The new expiry time (ignored if not later than the current expiry) - KeyList keys = 3; // The new list of keys that can modify or delete the file - bytes contents = 4; // The new contents that should overwrite the file's current contents - google.protobuf.StringValue memo = 5; // If set, the new memo to be associated with the file (UTF-8 encoding max 100 bytes) -} diff --git a/src/main/proto/Freeze.proto b/src/main/proto/Freeze.proto deleted file mode 100644 index 27d9ed07..00000000 --- a/src/main/proto/Freeze.proto +++ /dev/null @@ -1,40 +0,0 @@ -syntax = "proto3"; - -package proto; - -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ‍ - */ - -option java_package = "com.hederahashgraph.api.proto.java"; -option java_multiple_files = true; - -import "Duration.proto"; -import "Timestamp.proto"; -import "BasicTypes.proto"; - -/* Set the freezing period in which the platform will stop creating events and accepting transactions. This is used before safely shut down the platform for maintenance. */ -message FreezeTransactionBody { - int32 startHour = 1; // The start hour (in UTC time), a value between 0 and 23 - int32 startMin = 2; // The start minute (in UTC time), a value between 0 and 59 - int32 endHour = 3; // The end hour (in UTC time), a value between 0 and 23 - int32 endMin = 4; // The end minute (in UTC time), a value between 0 and 59 - FileID updateFile = 5; // The ID of the file needs to be updated during a freeze transaction - bytes fileHash = 6; // The hash value of the file, used to verify file content before performing freeze and update -} diff --git a/src/main/proto/FreezeService.proto b/src/main/proto/FreezeService.proto deleted file mode 100644 index 491d51d5..00000000 --- a/src/main/proto/FreezeService.proto +++ /dev/null @@ -1,33 +0,0 @@ -syntax = "proto3"; - -package proto; - -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ‍ - */ -option java_package = "com.hederahashgraph.service.proto.java"; - -import "TransactionResponse.proto"; -import "Transaction.proto"; - -/* The request and responses for freeze service. */ -service FreezeService { - - rpc freeze (Transaction) returns (TransactionResponse); // Freezes the nodes by submitting the transaction. The grpc server returns the TransactionResponse -} diff --git a/src/main/proto/GetByKey.proto b/src/main/proto/GetByKey.proto deleted file mode 100644 index 970034b2..00000000 --- a/src/main/proto/GetByKey.proto +++ /dev/null @@ -1,54 +0,0 @@ -syntax = "proto3"; - -package proto; - -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ‍ - */ - -option java_package = "com.hederahashgraph.api.proto.java"; -option java_multiple_files = true; - -import "BasicTypes.proto"; -import "QueryHeader.proto"; -import "ResponseHeader.proto"; -import "CryptoAddLiveHash.proto"; - -/* Get all accounts, claims, files, and smart contract instances whose associated keys include the given Key. The given Key must not be a contractID or a ThresholdKey. This is not yet implemented in the API, but will be in the future. */ -message GetByKeyQuery { - QueryHeader header = 1; // Standard info sent from client to node, including the signed payment, and what kind of response is requested (cost, state proof, both, or neither). - Key key = 2; // The key to search for. It must not contain a contractID nor a ThresholdSignature. -} - -/* the ID for a single entity (account, livehash, file, or smart contract instance) */ -message EntityID { - oneof entity { - AccountID accountID = 1; // The Account ID for the cryptocurrency account - LiveHash liveHash = 2; // A uniquely identifying livehash of an acount - FileID fileID = 3; // The file ID of the file - ContractID contractID = 4; // The smart contract ID that identifies instance - } -} -/* Response when the client sends the node GetByKeyQuery */ -message GetByKeyResponse { - ResponseHeader header = 1; //Standard response from node to client, including the requested fields: cost, or state proof, or both, or neither - repeated EntityID entities = 2; // The list of entities that include this public key in their associated Key list -} - - diff --git a/src/main/proto/GetBySolidityID.proto b/src/main/proto/GetBySolidityID.proto deleted file mode 100644 index 14063046..00000000 --- a/src/main/proto/GetBySolidityID.proto +++ /dev/null @@ -1,46 +0,0 @@ -syntax = "proto3"; - -package proto; - -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ‍ - */ - -option java_package = "com.hederahashgraph.api.proto.java"; -option java_multiple_files = true; - -import "BasicTypes.proto"; -import "QueryHeader.proto"; -import "ResponseHeader.proto"; - -/* Get the IDs in the format used by transactions, given the ID in the format used by Solidity. If the Solidity ID is for a smart contract instance, then both the ContractID and associated AccountID will be returned. */ -message GetBySolidityIDQuery { - QueryHeader header = 1; // Standard info sent from client to node, including the signed payment, and what kind of response is requested (cost, state proof, both, or neither). - string solidityID = 2; // The ID in the format used by Solidity -} - -/* Response when the client sends the node GetBySolidityIDQuery */ -message GetBySolidityIDResponse { - ResponseHeader header = 1; // Standard response from node to client, including the requested fields: cost, or state proof, or both, or neither - AccountID accountID = 2; // The Account ID for the cryptocurrency account - FileID fileID = 3; // The file Id for the file - ContractID contractID = 4; // A smart contract ID for the instance (if this is included, then the associated accountID will also be included) -} - - diff --git a/src/main/proto/NetworkGetVersionInfo.proto b/src/main/proto/NetworkGetVersionInfo.proto deleted file mode 100644 index e7dcf41e..00000000 --- a/src/main/proto/NetworkGetVersionInfo.proto +++ /dev/null @@ -1,42 +0,0 @@ -syntax = "proto3"; - -package proto; - -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ‍ - */ - -option java_package = "com.hederahashgraph.api.proto.java"; -option java_multiple_files = true; - -import "BasicTypes.proto"; -import "QueryHeader.proto"; -import "ResponseHeader.proto"; - -/* Get the deployed versions of Hedera Services and the HAPI proto in semantic version format */ -message NetworkGetVersionInfoQuery { - QueryHeader header = 1; // Standard info sent from client to node, including the signed payment, and what kind of response is requested (cost, state proof, both, or neither). -} - -/* Response when the client sends the node NetworkGetVersionInfoQuery */ -message NetworkGetVersionInfoResponse { - ResponseHeader header = 1; // Standard response from node to client, including the requested fields: cost, or state proof, or both, or neither - SemanticVersion hapiProtoVersion = 2; // The Hedera API (HAPI) protobuf version recognized by the responding node. - SemanticVersion hederaServicesVersion = 3; // The version of the Hedera Services software deployed on the responding node. -} diff --git a/src/main/proto/NetworkService.proto b/src/main/proto/NetworkService.proto deleted file mode 100644 index 49fce7df..00000000 --- a/src/main/proto/NetworkService.proto +++ /dev/null @@ -1,36 +0,0 @@ -syntax = "proto3"; - -package proto; - -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ‍ - */ - -option java_package = "com.hederahashgraph.service.proto.java"; - -import "Query.proto"; -import "Response.proto"; -import "TransactionResponse.proto"; -import "Transaction.proto"; - -/* The requests and responses for different network services. */ -service NetworkService { - rpc getVersionInfo (Query) returns (Response); // Retrieves the active versions of Hedera Services and HAPI proto - rpc uncheckedSubmit (Transaction) returns (TransactionResponse); // Submits a "wrapped" transaction to the network, skipping its standard prechecks. (Note that the "wrapper" UncheckedSubmit transaction is still subject to normal prechecks, including an authorization requirement that its payer be either the treasury or system admin account.) -} diff --git a/src/main/proto/Query.proto b/src/main/proto/Query.proto deleted file mode 100644 index e5b8e150..00000000 --- a/src/main/proto/Query.proto +++ /dev/null @@ -1,85 +0,0 @@ -syntax = "proto3"; - -package proto; - -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ‍ - */ - -option java_package = "com.hederahashgraph.api.proto.java"; -option java_multiple_files = true; - -import "GetByKey.proto"; -import "GetBySolidityID.proto"; - -import "ContractCallLocal.proto"; -import "ContractGetInfo.proto"; -import "ContractGetBytecode.proto"; -import "ContractGetRecords.proto"; - -import "CryptoGetAccountBalance.proto"; -import "CryptoGetAccountRecords.proto"; -import "CryptoGetInfo.proto"; -import "CryptoGetLiveHash.proto"; -import "CryptoGetStakers.proto"; - -import "FileGetContents.proto"; -import "FileGetInfo.proto"; - -import "TransactionGetReceipt.proto"; -import "TransactionGetRecord.proto"; -import "TransactionGetFastRecord.proto"; - -import "ConsensusGetTopicInfo.proto"; - -import "NetworkGetVersionInfo.proto"; -import "TokenGetInfo.proto"; -import "ScheduleGetInfo.proto"; - -/* A single query, which is sent from the client to a node. This includes all possible queries. Each Query should not have more than 50 levels. */ -message Query { - oneof query { - GetByKeyQuery getByKey = 1; // Get all entities associated with a given key - GetBySolidityIDQuery getBySolidityID = 2; // Get the IDs in the format used in transactions, given the format used in Solidity - ContractCallLocalQuery contractCallLocal = 3; // Call a function of a smart contract instance - ContractGetInfoQuery contractGetInfo = 4; // Get information about a smart contract instance - ContractGetBytecodeQuery contractGetBytecode = 5; // Get bytecode used by a smart contract instance - ContractGetRecordsQuery ContractGetRecords = 6; // Get Records of the contract instance - - CryptoGetAccountBalanceQuery cryptogetAccountBalance = 7; // Get the current balance in a cryptocurrency account - CryptoGetAccountRecordsQuery cryptoGetAccountRecords = 8; // Get all the records that currently exist for transactions involving an account - CryptoGetInfoQuery cryptoGetInfo = 9; // Get all information about an account - CryptoGetLiveHashQuery cryptoGetLiveHash = 10; // Get a single livehash from a single account, if present - CryptoGetStakersQuery cryptoGetProxyStakers = 11; // Get all the accounts that proxy stake to a given account, and how much they proxy stake (not yet implemented in the current API) - - FileGetContentsQuery fileGetContents = 12; // Get the contents of a file (the bytes stored in it) - FileGetInfoQuery fileGetInfo = 13; // Get information about a file, such as its expiration date - - TransactionGetReceiptQuery transactionGetReceipt = 14; // Get a receipt for a transaction (lasts 180 seconds) - TransactionGetRecordQuery transactionGetRecord = 15; // Get a record for a transaction - TransactionGetFastRecordQuery transactionGetFastRecord = 16; // Get a record for a transaction (lasts 180 seconds) - ConsensusGetTopicInfoQuery consensusGetTopicInfo = 50; // Get the parameters of and state of a consensus topic. - - NetworkGetVersionInfoQuery networkGetVersionInfo = 51; // Get the versions of the HAPI protobuf and Hedera Services software deployed on the responding node. - - TokenGetInfoQuery tokenGetInfo = 52; // Get all information about a token - - ScheduleGetInfoQuery scheduleGetInfo = 53; // Get all information about a scheduled entity - } -} diff --git a/src/main/proto/QueryHeader.proto b/src/main/proto/QueryHeader.proto deleted file mode 100644 index 4a074101..00000000 --- a/src/main/proto/QueryHeader.proto +++ /dev/null @@ -1,50 +0,0 @@ -syntax = "proto3"; - -package proto; - -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ‍ - */ - -option java_package = "com.hederahashgraph.api.proto.java"; -option java_multiple_files = true; - -import "Transaction.proto"; - -/* -The client uses the ResponseType to indicate that it desires the node send just the answer, or both the answer and a state proof. It can also ask for just the cost and not the answer itself (allowing it to tailor the payment transaction accordingly). If the payment in the query fails the precheck, then the response may have some fields blank. The state proof is only available for some types of information. It is available for a Record, but not a receipt. It is available for the information in each kind of *GetInfo request. -*/ -enum ResponseType { - // Response returns answer - ANSWER_ONLY = 0; - // (NOT YET SUPPORTED) Response returns both answer and state proof - ANSWER_STATE_PROOF = 1; - // Response returns the cost of answer - COST_ANSWER = 2; - // (NOT YET SUPPORTED) Response returns the total cost of answer and state proof - COST_ANSWER_STATE_PROOF = 3; -} - -/* -Each query from the client to the node will contain the QueryHeader, which gives the requested response type, and includes a payment transaction that will compensate the node for responding to the query. The payment can be blank if the query is free. -*/ -message QueryHeader { - Transaction payment = 1; // A signed CryptoTransferTransaction to pay the node a fee for handling this query - ResponseType responseType = 2; // The requested response, asking for cost, state proof, both, or neither -} diff --git a/src/main/proto/Response.proto b/src/main/proto/Response.proto deleted file mode 100644 index afbacc76..00000000 --- a/src/main/proto/Response.proto +++ /dev/null @@ -1,89 +0,0 @@ -syntax = "proto3"; - -package proto; - -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ‍ - */ - -option java_package = "com.hederahashgraph.api.proto.java"; -option java_multiple_files = true; - -import "GetByKey.proto"; -import "GetBySolidityID.proto"; - -import "ContractCallLocal.proto"; -import "ContractGetBytecode.proto"; -import "ContractGetInfo.proto"; -import "ContractGetRecords.proto"; - -import "CryptoGetAccountBalance.proto"; -import "CryptoGetAccountRecords.proto"; -import "CryptoGetInfo.proto"; -import "CryptoGetLiveHash.proto"; -import "CryptoGetStakers.proto"; - -import "FileGetContents.proto"; -import "FileGetInfo.proto"; - -import "TransactionGetReceipt.proto"; -import "TransactionGetRecord.proto"; -import "TransactionGetFastRecord.proto"; - -import "ConsensusGetTopicInfo.proto"; - -import "NetworkGetVersionInfo.proto"; - -import "TokenGetInfo.proto"; - -import "ScheduleGetInfo.proto"; - -/* A single response, which is returned from the node to the client, after the client sent the node a query. This includes all responses. */ -message Response { - oneof response { - GetByKeyResponse getByKey = 1; // Get all entities associated with a given key - GetBySolidityIDResponse getBySolidityID = 2; // Get the IDs in the format used in transactions, given the format used in Solidity - - ContractCallLocalResponse contractCallLocal = 3; // Response to call a function of a smart contract instance - ContractGetBytecodeResponse contractGetBytecodeResponse = 5; // Get the bytecode for a smart contract instance - ContractGetInfoResponse contractGetInfo = 4; // Get information about a smart contract instance - ContractGetRecordsResponse contractGetRecordsResponse = 6; //Get all existing records for a smart contract instance - - CryptoGetAccountBalanceResponse cryptogetAccountBalance = 7; // Get the current balance in a cryptocurrency account - CryptoGetAccountRecordsResponse cryptoGetAccountRecords = 8; // Get all the records that currently exist for transactions involving an account - CryptoGetInfoResponse cryptoGetInfo = 9; // Get all information about an account - CryptoGetLiveHashResponse cryptoGetLiveHash = 10; // Contains a livehash associated to an account - CryptoGetStakersResponse cryptoGetProxyStakers = 11; // Get all the accounts that proxy stake to a given account, and how much they proxy stake - - FileGetContentsResponse fileGetContents = 12; // Get the contents of a file (the bytes stored in it) - FileGetInfoResponse fileGetInfo = 13; // Get information about a file, such as its expiration date - - TransactionGetReceiptResponse transactionGetReceipt = 14; // Get a receipt for a transaction - TransactionGetRecordResponse transactionGetRecord = 15; // Get a record for a transaction - TransactionGetFastRecordResponse transactionGetFastRecord = 16; // Get a record for a transaction (lasts 180 seconds) - - ConsensusGetTopicInfoResponse consensusGetTopicInfo = 150; // Parameters of and state of a consensus topic.. - - NetworkGetVersionInfoResponse networkGetVersionInfo = 151; // Semantic versions of Hedera Services and HAPI proto - - TokenGetInfoResponse tokenGetInfo = 152; // Get all information about a token - - ScheduleGetInfoResponse scheduleGetInfo = 153; // Get all information about a schedule entity - } -} diff --git a/src/main/proto/ResponseCode.proto b/src/main/proto/ResponseCode.proto deleted file mode 100644 index 44e1d82d..00000000 --- a/src/main/proto/ResponseCode.proto +++ /dev/null @@ -1,233 +0,0 @@ -syntax = "proto3"; - -package proto; - -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ‍ - */ - -option java_package = "com.hederahashgraph.api.proto.java"; -option java_multiple_files = true; - -enum ResponseCodeEnum { - OK = 0; // The transaction passed the precheck validations. - INVALID_TRANSACTION = 1; // For any error not handled by specific error codes listed below. - PAYER_ACCOUNT_NOT_FOUND = 2; //Payer account does not exist. - INVALID_NODE_ACCOUNT = 3; //Node Account provided does not match the node account of the node the transaction was submitted to. - TRANSACTION_EXPIRED = 4; // Pre-Check error when TransactionValidStart + transactionValidDuration is less than current consensus time. - INVALID_TRANSACTION_START = 5; // Transaction start time is greater than current consensus time - INVALID_TRANSACTION_DURATION = 6; //valid transaction duration is a positive non zero number that does not exceed 120 seconds - INVALID_SIGNATURE = 7; // The transaction signature is not valid - MEMO_TOO_LONG = 8; //Transaction memo size exceeded 100 bytes - INSUFFICIENT_TX_FEE = 9; // The fee provided in the transaction is insufficient for this type of transaction - INSUFFICIENT_PAYER_BALANCE = 10; // The payer account has insufficient cryptocurrency to pay the transaction fee - DUPLICATE_TRANSACTION = 11; // This transaction ID is a duplicate of one that was submitted to this node or reached consensus in the last 180 seconds (receipt period) - BUSY = 12; //If API is throttled out - NOT_SUPPORTED = 13; //The API is not currently supported - - INVALID_FILE_ID = 14; //The file id is invalid or does not exist - INVALID_ACCOUNT_ID = 15; //The account id is invalid or does not exist - INVALID_CONTRACT_ID = 16; //The contract id is invalid or does not exist - INVALID_TRANSACTION_ID = 17; //Transaction id is not valid - RECEIPT_NOT_FOUND = 18; //Receipt for given transaction id does not exist - RECORD_NOT_FOUND = 19; //Record for given transaction id does not exist - INVALID_SOLIDITY_ID = 20; //The solidity id is invalid or entity with this solidity id does not exist - - - UNKNOWN = 21; // The responding node has submitted the transaction to the network. Its final status is still unknown. - SUCCESS = 22; // The transaction succeeded - FAIL_INVALID = 23; // There was a system error and the transaction failed because of invalid request parameters. - FAIL_FEE = 24; // There was a system error while performing fee calculation, reserved for future. - FAIL_BALANCE = 25; // There was a system error while performing balance checks, reserved for future. - - - KEY_REQUIRED = 26; //Key not provided in the transaction body - BAD_ENCODING = 27; //Unsupported algorithm/encoding used for keys in the transaction - INSUFFICIENT_ACCOUNT_BALANCE = 28; //When the account balance is not sufficient for the transfer - INVALID_SOLIDITY_ADDRESS = 29; //During an update transaction when the system is not able to find the Users Solidity address - - - INSUFFICIENT_GAS = 30; //Not enough gas was supplied to execute transaction - CONTRACT_SIZE_LIMIT_EXCEEDED = 31; //contract byte code size is over the limit - LOCAL_CALL_MODIFICATION_EXCEPTION = 32; //local execution (query) is requested for a function which changes state - CONTRACT_REVERT_EXECUTED = 33; //Contract REVERT OPCODE executed - CONTRACT_EXECUTION_EXCEPTION = 34; //For any contract execution related error not handled by specific error codes listed above. - INVALID_RECEIVING_NODE_ACCOUNT = 35; //In Query validation, account with +ve(amount) value should be Receiving node account, the receiver account should be only one account in the list - MISSING_QUERY_HEADER = 36; // Header is missing in Query request - - - ACCOUNT_UPDATE_FAILED = 37; // The update of the account failed - INVALID_KEY_ENCODING = 38; // Provided key encoding was not supported by the system - NULL_SOLIDITY_ADDRESS = 39; // null solidity address - - CONTRACT_UPDATE_FAILED = 40; // update of the contract failed - INVALID_QUERY_HEADER = 41; // the query header is invalid - - INVALID_FEE_SUBMITTED = 42; // Invalid fee submitted - INVALID_PAYER_SIGNATURE = 43; // Payer signature is invalid - - - KEY_NOT_PROVIDED = 44; // The keys were not provided in the request. - INVALID_EXPIRATION_TIME = 45; // Expiration time provided in the transaction was invalid. - NO_WACL_KEY = 46; //WriteAccess Control Keys are not provided for the file - FILE_CONTENT_EMPTY = 47; //The contents of file are provided as empty. - INVALID_ACCOUNT_AMOUNTS = 48; // The crypto transfer credit and debit do not sum equal to 0 - EMPTY_TRANSACTION_BODY = 49; // Transaction body provided is empty - INVALID_TRANSACTION_BODY = 50; // Invalid transaction body provided - - - INVALID_SIGNATURE_TYPE_MISMATCHING_KEY = 51; // the type of key (base ed25519 key, KeyList, or ThresholdKey) does not match the type of signature (base ed25519 signature, SignatureList, or ThresholdKeySignature) - INVALID_SIGNATURE_COUNT_MISMATCHING_KEY = 52; // the number of key (KeyList, or ThresholdKey) does not match that of signature (SignatureList, or ThresholdKeySignature). e.g. if a keyList has 3 base keys, then the corresponding signatureList should also have 3 base signatures. - - EMPTY_LIVE_HASH_BODY = 53; // the livehash body is empty - EMPTY_LIVE_HASH = 54; // the livehash data is missing - EMPTY_LIVE_HASH_KEYS = 55; // the keys for a livehash are missing - INVALID_LIVE_HASH_SIZE = 56; // the livehash data is not the output of a SHA-384 digest - - EMPTY_QUERY_BODY = 57; // the query body is empty - EMPTY_LIVE_HASH_QUERY = 58; // the crypto livehash query is empty - LIVE_HASH_NOT_FOUND = 59; // the livehash is not present - ACCOUNT_ID_DOES_NOT_EXIST = 60; // the account id passed has not yet been created. - LIVE_HASH_ALREADY_EXISTS = 61; // the livehash already exists for a given account - - - INVALID_FILE_WACL = 62; // File WACL keys are invalid - SERIALIZATION_FAILED = 63; // Serialization failure - TRANSACTION_OVERSIZE = 64; // The size of the Transaction is greater than transactionMaxBytes - TRANSACTION_TOO_MANY_LAYERS = 65; // The Transaction has more than 50 levels - CONTRACT_DELETED = 66; //Contract is marked as deleted - - PLATFORM_NOT_ACTIVE = 67; // the platform node is either disconnected or lagging behind. - KEY_PREFIX_MISMATCH = 68; // one public key matches more than one prefixes on the signature map - PLATFORM_TRANSACTION_NOT_CREATED = 69; // transaction not created by platform due to large backlog - INVALID_RENEWAL_PERIOD = 70; // auto renewal period is not a positive number of seconds - INVALID_PAYER_ACCOUNT_ID = 71; // the response code when a smart contract id is passed for a crypto API request - ACCOUNT_DELETED = 72; // the account has been marked as deleted - FILE_DELETED = 73; // the file has been marked as deleted - ACCOUNT_REPEATED_IN_ACCOUNT_AMOUNTS = 74; // same accounts repeated in the transfer account list - SETTING_NEGATIVE_ACCOUNT_BALANCE = 75; // attempting to set negative balance value for crypto account - OBTAINER_REQUIRED =76; // when deleting smart contract that has crypto balance either transfer account or transfer smart contract is required - OBTAINER_SAME_CONTRACT_ID =77; //when deleting smart contract that has crypto balance you can not use the same contract id as transferContractId as the one being deleted - OBTAINER_DOES_NOT_EXIST = 78; //transferAccountId or transferContractId specified for contract delete does not exist - MODIFYING_IMMUTABLE_CONTRACT = 79; //attempting to modify (update or delete a immutable smart contract, i.e. one created without a admin key) - FILE_SYSTEM_EXCEPTION = 80; //Unexpected exception thrown by file system functions - AUTORENEW_DURATION_NOT_IN_RANGE = 81; // the duration is not a subset of [MINIMUM_AUTORENEW_DURATION,MAXIMUM_AUTORENEW_DURATION] - ERROR_DECODING_BYTESTRING = 82; // Decoding the smart contract binary to a byte array failed. Check that the input is a valid hex string. - CONTRACT_FILE_EMPTY = 83; // File to create a smart contract was of length zero - CONTRACT_BYTECODE_EMPTY = 84; // Bytecode for smart contract is of length zero - INVALID_INITIAL_BALANCE=85; // Attempt to set negative initial balance - INVALID_RECEIVE_RECORD_THRESHOLD=86 [deprecated=true]; // [Deprecated]. attempt to set negative receive record threshold - INVALID_SEND_RECORD_THRESHOLD=87 [deprecated=true]; // [Deprecated]. attempt to set negative send record threshold - ACCOUNT_IS_NOT_GENESIS_ACCOUNT = 88; // Special Account Operations should be performed by only Genesis account, return this code if it is not Genesis Account - PAYER_ACCOUNT_UNAUTHORIZED = 89; // The fee payer account doesn't have permission to submit such Transaction - INVALID_FREEZE_TRANSACTION_BODY = 90; // FreezeTransactionBody is invalid - FREEZE_TRANSACTION_BODY_NOT_FOUND = 91; // FreezeTransactionBody does not exist - TRANSFER_LIST_SIZE_LIMIT_EXCEEDED = 92; //Exceeded the number of accounts (both from and to) allowed for crypto transfer list - RESULT_SIZE_LIMIT_EXCEEDED = 93; // Smart contract result size greater than specified maxResultSize - NOT_SPECIAL_ACCOUNT = 94; //The payer account is not a special account(account 0.0.55) - CONTRACT_NEGATIVE_GAS = 95; // Negative gas was offered in smart contract call - CONTRACT_NEGATIVE_VALUE = 96; // Negative value / initial balance was specified in a smart contract call / create - INVALID_FEE_FILE=97; // Failed to update fee file - INVALID_EXCHANGE_RATE_FILE=98; // Failed to update exchange rate file - INSUFFICIENT_LOCAL_CALL_GAS = 99; // Payment tendered for contract local call cannot cover both the fee and the gas - ENTITY_NOT_ALLOWED_TO_DELETE = 100; // Entities with Entity ID below 1000 are not allowed to be deleted - AUTHORIZATION_FAILED = 101; // Violating one of these rules: 1) treasury account can update all entities below 0.0.1000, 2) account 0.0.50 can update all entities from 0.0.51 - 0.0.80, 3) Network Function Master Account A/c 0.0.50 - Update all Network Function accounts & perform all the Network Functions listed below, 4) Network Function Accounts: i) A/c 0.0.55 - Update Address Book files (0.0.101/102), ii) A/c 0.0.56 - Update Fee schedule (0.0.111), iii) A/c 0.0.57 - Update Exchange Rate (0.0.112). - FILE_UPLOADED_PROTO_INVALID = 102; // Fee Schedule Proto uploaded but not valid (append or update is required) - FILE_UPLOADED_PROTO_NOT_SAVED_TO_DISK = 103; // Fee Schedule Proto uploaded but not valid (append or update is required) - FEE_SCHEDULE_FILE_PART_UPLOADED = 104; // Fee Schedule Proto File Part uploaded - EXCHANGE_RATE_CHANGE_LIMIT_EXCEEDED = 105; // The change on Exchange Rate exceeds Exchange_Rate_Allowed_Percentage - MAX_CONTRACT_STORAGE_EXCEEDED = 106; // Contract permanent storage exceeded the currently allowable limit - TRANSFER_ACCOUNT_SAME_AS_DELETE_ACCOUNT = 107; // Transfer Account should not be same as Account to be deleted - TOTAL_LEDGER_BALANCE_INVALID = 108; - EXPIRATION_REDUCTION_NOT_ALLOWED = 110; // The expiration date/time on a smart contract may not be reduced - MAX_GAS_LIMIT_EXCEEDED = 111; //Gas exceeded currently allowable gas limit per transaction - MAX_FILE_SIZE_EXCEEDED = 112; // File size exceeded the currently allowable limit - INVALID_TOPIC_ID = 150; // The Topic ID specified is not in the system. - INVALID_ADMIN_KEY = 155; // A provided admin key was invalid. - INVALID_SUBMIT_KEY = 156; // A provided submit key was invalid. - UNAUTHORIZED = 157; // An attempted operation was not authorized (ie - a deleteTopic for a topic with no adminKey). - INVALID_TOPIC_MESSAGE = 158; // A ConsensusService message is empty. - INVALID_AUTORENEW_ACCOUNT = 159; // The autoRenewAccount specified is not a valid, active account. - AUTORENEW_ACCOUNT_NOT_ALLOWED = 160; // An adminKey was not specified on the topic, so there must not be an autoRenewAccount. - // The topic has expired, was not automatically renewed, and is in a 7 day grace period before the topic will be - // deleted unrecoverably. This error response code will not be returned until autoRenew functionality is supported - // by HAPI. - TOPIC_EXPIRED = 162; - INVALID_CHUNK_NUMBER = 163; // chunk number must be from 1 to total (chunks) inclusive. - INVALID_CHUNK_TRANSACTION_ID = 164; // For every chunk, the payer account that is part of initialTransactionID must match the Payer Account of this transaction. The entire initialTransactionID should match the transactionID of the first chunk, but this is not checked or enforced by Hedera except when the chunk number is 1. - ACCOUNT_FROZEN_FOR_TOKEN = 165; // Account is frozen and cannot transact with the token - TOKENS_PER_ACCOUNT_LIMIT_EXCEEDED = 166; // An involved account already has more than tokens.maxPerAccount associations with non-deleted tokens. - INVALID_TOKEN_ID = 167; // The token is invalid or does not exist - INVALID_TOKEN_DECIMALS = 168; // Invalid token decimals - INVALID_TOKEN_INITIAL_SUPPLY = 169; // Invalid token initial supply - INVALID_TREASURY_ACCOUNT_FOR_TOKEN = 170; // Treasury Account does not exist or is deleted - INVALID_TOKEN_SYMBOL = 171; // Token Symbol is not UTF-8 capitalized alphabetical string - TOKEN_HAS_NO_FREEZE_KEY = 172; // Freeze key is not set on token - TRANSFERS_NOT_ZERO_SUM_FOR_TOKEN = 173; // Amounts in transfer list are not net zero - MISSING_TOKEN_SYMBOL = 174; // A token symbol was not provided - TOKEN_SYMBOL_TOO_LONG = 175; // The provided token symbol was too long - ACCOUNT_KYC_NOT_GRANTED_FOR_TOKEN = 176; // KYC must be granted and account does not have KYC granted - TOKEN_HAS_NO_KYC_KEY = 177; // KYC key is not set on token - INSUFFICIENT_TOKEN_BALANCE = 178; // Token balance is not sufficient for the transaction - TOKEN_WAS_DELETED = 179; // Token transactions cannot be executed on deleted token - TOKEN_HAS_NO_SUPPLY_KEY = 180; // Supply key is not set on token - TOKEN_HAS_NO_WIPE_KEY = 181; // Wipe key is not set on token - INVALID_TOKEN_MINT_AMOUNT = 182; // The requested token mint amount would cause an invalid total supply - INVALID_TOKEN_BURN_AMOUNT = 183; // The requested token burn amount would cause an invalid total supply - TOKEN_NOT_ASSOCIATED_TO_ACCOUNT = 184; // A required token-account relationship is missing - CANNOT_WIPE_TOKEN_TREASURY_ACCOUNT = 185; // The target of a wipe operation was the token treasury account - INVALID_KYC_KEY = 186; // The provided KYC key was invalid. - INVALID_WIPE_KEY = 187; // The provided wipe key was invalid. - INVALID_FREEZE_KEY = 188; // The provided freeze key was invalid. - INVALID_SUPPLY_KEY = 189; // The provided supply key was invalid. - MISSING_TOKEN_NAME = 190; // Token Name is not provided - TOKEN_NAME_TOO_LONG = 191; // Token Name is too long - INVALID_WIPING_AMOUNT = 192; // The provided wipe amount must not be negative, zero or bigger than the token holder balance - TOKEN_IS_IMMUTABLE = 193; // Token does not have Admin key set, thus update/delete transactions cannot be performed - TOKEN_ALREADY_ASSOCIATED_TO_ACCOUNT = 194; // An associateToken operation specified a token already associated to the account - TRANSACTION_REQUIRES_ZERO_TOKEN_BALANCES = 195; // An attempted operation is invalid until all token balances for the target account are zero - ACCOUNT_IS_TREASURY = 196; // An attempted operation is invalid because the account is a treasury - TOKEN_ID_REPEATED_IN_TOKEN_LIST = 197; // Same TokenIDs present in the token list - TOKEN_TRANSFER_LIST_SIZE_LIMIT_EXCEEDED = 198; // Exceeded the number of token transfers (both from and to) allowed for token transfer list - EMPTY_TOKEN_TRANSFER_BODY = 199; // TokenTransfersTransactionBody has no TokenTransferList - EMPTY_TOKEN_TRANSFER_ACCOUNT_AMOUNTS = 200; // TokenTransfersTransactionBody has a TokenTransferList with no AccountAmounts - - INVALID_SCHEDULE_ID = 201; // The Scheduled entity does not exist; or has now expired, been deleted, or been executed - SCHEDULE_IS_IMMUTABLE = 202; // The Scheduled entity cannot be modified. Admin key not set - INVALID_SCHEDULE_PAYER_ID = 203; // The provided Scheduled Payer does not exist - INVALID_SCHEDULE_ACCOUNT_ID = 204; // The Schedule Create Transaction TransactionID account does not exist - NO_NEW_VALID_SIGNATURES = 205; // The provided sig map did not contain any new valid signatures from required signers of the scheduled transaction - UNRESOLVABLE_REQUIRED_SIGNERS = 206; // The required signers for a scheduled transaction cannot be resolved, for example because they do not exist or have been deleted - SCHEDULED_TRANSACTION_NOT_IN_WHITELIST = 207; // Only whitelisted transaction types may be scheduled - SOME_SIGNATURES_WERE_INVALID = 208; // At least one of the signatures in the provided sig map did not represent a valid signature for any required signer - TRANSACTION_ID_FIELD_NOT_ALLOWED = 209; // The scheduled field in the TransactionID may not be set to true - IDENTICAL_SCHEDULE_ALREADY_CREATED = 210; // A schedule already exists with the same identifying fields of an attempted ScheduleCreate (that is, all fields other than scheduledPayerAccountID) - INVALID_ZERO_BYTE_IN_STRING = 211; // A string field in the transaction has a UTF-8 encoding with the prohibited zero byte - SCHEDULE_ALREADY_DELETED = 212; // A schedule being signed or deleted has already been deleted - SCHEDULE_ALREADY_EXECUTED = 213; // A schedule being signed or deleted has already been executed - MESSAGE_SIZE_TOO_LARGE = 214; // ConsensusSubmitMessage request's message size is larger than allowed. - OPERATION_REPEATED_IN_BUCKET_GROUPS = 215; // An operation was assigned to more than one throttle group in a given bucket - BUCKET_CAPACITY_OVERFLOW = 216; // The capacity needed to satisfy all opsPerSec groups in a bucket overflowed a signed 8-byte integral type - NODE_CAPACITY_NOT_SUFFICIENT_FOR_OPERATION = 217; // Given the network size in the address book, the node-level capacity for an operation would never be enough to accept a single request; usually means a bucket burstPeriod should be increased - BUCKET_HAS_NO_THROTTLE_GROUPS = 218; // A bucket was defined without any throttle groups - THROTTLE_GROUP_HAS_ZERO_OPS_PER_SEC = 219; // A throttle group was granted zero opsPerSec - SUCCESS_BUT_MISSING_EXPECTED_OPERATION = 220; // The throttle definitions file was updated, but some supported operations were not assigned a bucket - UNPARSEABLE_THROTTLE_DEFINITIONS = 221; // The new contents for the throttle definitions system file were not valid protobuf - INVALID_THROTTLE_DEFINITIONS = 222; // The new throttle definitions system file were invalid, and no more specific error could be divined -} diff --git a/src/main/proto/ResponseHeader.proto b/src/main/proto/ResponseHeader.proto deleted file mode 100644 index c08b0323..00000000 --- a/src/main/proto/ResponseHeader.proto +++ /dev/null @@ -1,38 +0,0 @@ -syntax = "proto3"; - -package proto; - -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ‍ - */ - -option java_package = "com.hederahashgraph.api.proto.java"; -option java_multiple_files = true; - -import "TransactionResponse.proto"; -import "QueryHeader.proto"; -import "ResponseCode.proto"; - -/* Every query receives a response containing the QueryResponseHeader. Either or both of the cost and stateProof fields may be blank, if the responseType didn't ask for the cost or stateProof. */ -message ResponseHeader { - ResponseCodeEnum nodeTransactionPrecheckCode = 1; // Result of fee transaction precheck, saying it passed, or why it failed - ResponseType responseType = 2; // The requested response is repeated back here, for convenience - uint64 cost = 3; // The fee that would be charged to get the requested information (if a cost was requested). Note: This cost only includes the query fee and does not include the transfer fee(which is required to execute the transfer transaction to debit the payer account and credit the node account with query fee) - bytes stateProof = 4; // The state proof for this information (if a state proof was requested, and is available) -} diff --git a/src/main/proto/SchedulableTransactionBody.proto b/src/main/proto/SchedulableTransactionBody.proto deleted file mode 100644 index 41f2b184..00000000 --- a/src/main/proto/SchedulableTransactionBody.proto +++ /dev/null @@ -1,114 +0,0 @@ -syntax = "proto3"; - -package proto; - -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ‍ - */ - -option java_package = "com.hederahashgraph.api.proto.java"; -option java_multiple_files = true; - -import "SystemDelete.proto"; -import "SystemUndelete.proto"; -import "Freeze.proto"; - -import "ContractCall.proto"; -import "ContractCreate.proto"; -import "ContractUpdate.proto"; - -import "CryptoCreate.proto"; -import "CryptoDelete.proto"; -import "CryptoTransfer.proto"; -import "CryptoUpdate.proto"; - -import "FileAppend.proto"; -import "FileCreate.proto"; -import "FileDelete.proto"; -import "FileUpdate.proto"; - -import "ContractDelete.proto"; - -import "ConsensusCreateTopic.proto"; -import "ConsensusUpdateTopic.proto"; -import "ConsensusDeleteTopic.proto"; -import "ConsensusSubmitMessage.proto"; - -import "TokenCreate.proto"; -import "TokenFreezeAccount.proto"; -import "TokenUnfreezeAccount.proto"; -import "TokenGrantKyc.proto"; -import "TokenRevokeKyc.proto"; -import "TokenDelete.proto"; -import "TokenUpdate.proto"; -import "TokenMint.proto"; -import "TokenBurn.proto"; -import "TokenWipeAccount.proto"; -import "TokenAssociate.proto"; -import "TokenDissociate.proto"; - -import "ScheduleDelete.proto"; - -/* A schedulable transaction. Note that the global/dynamic system property -scheduling.whitelist controls which transaction types may be scheduled. -In Hedera Services 0.13.0, it will include only CryptoTransfer and -ConsensusSubmitMessage functions. */ -message SchedulableTransactionBody { - uint64 transactionFee = 1; // The maximum transaction fee the client is willing to pay - string memo = 2; // A memo to include the execution record; the UTF-8 encoding may be up to 100 bytes and must not include the zero byte - oneof data { - ContractCallTransactionBody contractCall = 3; // Calls a function of a contract instance - ContractCreateTransactionBody contractCreateInstance = 4; // Creates a contract instance - ContractUpdateTransactionBody contractUpdateInstance = 5; // Updates a contract - ContractDeleteTransactionBody contractDeleteInstance = 6; //Delete contract and transfer remaining balance into specified account - - CryptoCreateTransactionBody cryptoCreateAccount = 7; // Create a new cryptocurrency account - CryptoDeleteTransactionBody cryptoDelete = 8; // Delete a cryptocurrency account (mark as deleted, and transfer hbars out) - CryptoTransferTransactionBody cryptoTransfer = 9; // Transfer amount between accounts - CryptoUpdateTransactionBody cryptoUpdateAccount = 10; // Modify information such as the expiration date for an account - - FileAppendTransactionBody fileAppend = 11; // Add bytes to the end of the contents of a file - FileCreateTransactionBody fileCreate = 12; // Create a new file - FileDeleteTransactionBody fileDelete = 13; // Delete a file (remove contents and mark as deleted until it expires) - FileUpdateTransactionBody fileUpdate = 14; // Modify information such as the expiration date for a file - SystemDeleteTransactionBody systemDelete = 15; // Hedera administrative deletion of a file or smart contract - SystemUndeleteTransactionBody systemUndelete = 16; //To undelete an entity deleted by SystemDelete - FreezeTransactionBody freeze = 17; // Freeze the nodes - - ConsensusCreateTopicTransactionBody consensusCreateTopic = 18; // Creates a topic - ConsensusUpdateTopicTransactionBody consensusUpdateTopic = 19; // Updates a topic - ConsensusDeleteTopicTransactionBody consensusDeleteTopic = 20; // Deletes a topic - ConsensusSubmitMessageTransactionBody consensusSubmitMessage = 21; // Submits message to a topic - - TokenCreateTransactionBody tokenCreation = 22; // Creates a token instance - TokenFreezeAccountTransactionBody tokenFreeze = 23; // Freezes account not to be able to transact with a token - TokenUnfreezeAccountTransactionBody tokenUnfreeze = 24; // Unfreezes account for a token - TokenGrantKycTransactionBody tokenGrantKyc = 25; // Grants KYC to an account for a token - TokenRevokeKycTransactionBody tokenRevokeKyc = 26; // Revokes KYC of an account for a token - TokenDeleteTransactionBody tokenDeletion = 27; // Deletes a token instance - TokenUpdateTransactionBody tokenUpdate = 28; // Updates a token instance - TokenMintTransactionBody tokenMint = 29; // Mints new tokens to a token's treasury account - TokenBurnTransactionBody tokenBurn = 30; // Burns tokens from a token's treasury account - TokenWipeAccountTransactionBody tokenWipe = 31; // Wipes amount of tokens from an account - TokenAssociateTransactionBody tokenAssociate = 32; // Associate tokens to an account - TokenDissociateTransactionBody tokenDissociate = 33; // Dissociate tokens from an account - - ScheduleDeleteTransactionBody scheduleDelete = 34; // Marks a schedule in the network's action queue as deleted, preventing it from executing - } -} diff --git a/src/main/proto/ScheduleCreate.proto b/src/main/proto/ScheduleCreate.proto deleted file mode 100644 index 946e8077..00000000 --- a/src/main/proto/ScheduleCreate.proto +++ /dev/null @@ -1,67 +0,0 @@ -syntax = "proto3"; - -package proto; - -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ‍ - */ - -option java_package = "com.hederahashgraph.api.proto.java"; -option java_multiple_files = true; - -import "BasicTypes.proto"; -import "SchedulableTransactionBody.proto"; - -/* -Create a new schedule entity (or simply, schedule) in the network's action queue. Upon SUCCESS, the receipt contains -the `ScheduleID` of the created schedule. A schedule entity includes a scheduledTransactionBody to be executed when the schedule -has collected enough signing Ed25519 keys to satisfy the scheduled transaction's signing requirements. Upon `SUCCESS`, the receipt also -includes the scheduledTransactionID to use to query for the record of the scheduled transaction's execution (if it occurs). - -The expiration time of a schedule is always 30 minutes; it remains in state and can be queried using GetScheduleInfo until expiration, -no matter if the scheduled transaction has executed or marked deleted. - -If the adminKey field is omitted, the resulting schedule is immutable. If the adminKey is set, the ScheduleDelete -transaction can be used to mark it as deleted. The creator may also specify an optional memo whose UTF-8 encoding is at most 100 -bytes and does not include the zero byte is also supported. - -When a scheduled transaction whose schedule has collected enough signing keys is executed, the network only charges its payer the service fee, -and not the node and network fees. If the optional payerAccountID is set, the network charges this account. Otherwise it charges the -payer of the originating ScheduleCreate. - -Two ScheduleCreate transactions are identical if they are equal in all their fields other than payerAccountID. -(Here "equal" should be understood in the sense of gRPC object equality in the network software runtime. In particular, a gRPC object with -unknown fields is not equal to a gRPC object without -unknown fields, even if they agree on all known fields.) - -A ScheduleCreate transaction that attempts to re-create an identical schedule already in state will receive a receipt with status -IDENTICAL_SCHEDULE_ALREADY_CREATED; the receipt will include the ScheduleID of the extant schedule, which may be -used in a subsequent ScheduleSign transaction. (The receipt will also include the TransactionID to use in querying -for the receipt or record of the scheduled transaction.) - -Other notable response codes include, INVALID_ACCOUNT_ID, UNSCHEDULABLE_TRANSACTION, UNRESOLVABLE_REQUIRED_SIGNERS, -INVALID_SIGNATURE. For more information please see the section of this documentation on the ResponseCode enum. -*/ - -message ScheduleCreateTransactionBody { - SchedulableTransactionBody scheduledTransactionBody = 1; // The scheduled transaction - string memo = 2; // An optional memo with a UTF-8 encoding of no more than 100 bytes which does not contain the zero byte - Key adminKey = 3; // An optional Hedera key which can be used to sign a ScheduleDelete and remove the schedule - AccountID payerAccountID = 4; // An optional id of the account to be charged the service fee for the scheduled transaction at the consensus time that it executes (if ever); defaults to the ScheduleCreate payer if not given -} diff --git a/src/main/proto/ScheduleDelete.proto b/src/main/proto/ScheduleDelete.proto deleted file mode 100644 index 3d155117..00000000 --- a/src/main/proto/ScheduleDelete.proto +++ /dev/null @@ -1,39 +0,0 @@ -syntax = "proto3"; - -package proto; - -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ‍ - */ - -option java_package = "com.hederahashgraph.api.proto.java"; -option java_multiple_files = true; - -import "BasicTypes.proto"; - -/* -Marks a schedule in the network's action queue as deleted. Must be signed by the admin key of the target schedule. -A deleted schedule cannot receive any additional signing keys, nor will it be executed. - -Other notable response codes include, INVALID_SCHEDULE_ID, SCHEDULE_WAS_DELETED, SCHEDULE_WAS_EXECUTED, -SCHEDULE_IS_IMMUTABLE. For more information please see the section of this documentation on the ResponseCode enum. -*/ -message ScheduleDeleteTransactionBody { - ScheduleID scheduleID = 1; // The ID of the Scheduled Entity -} diff --git a/src/main/proto/ScheduleGetInfo.proto b/src/main/proto/ScheduleGetInfo.proto deleted file mode 100644 index e2499774..00000000 --- a/src/main/proto/ScheduleGetInfo.proto +++ /dev/null @@ -1,69 +0,0 @@ -syntax = "proto3"; - -package proto; - -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ‍ - */ - -option java_package = "com.hederahashgraph.api.proto.java"; -option java_multiple_files = true; - -import "BasicTypes.proto"; -import "Timestamp.proto"; -import "QueryHeader.proto"; -import "ResponseHeader.proto"; -import "SchedulableTransactionBody.proto"; - -/* -Gets information about a schedule in the network's action queue. - -Responds with INVALID_SCHEDULE_ID if the requested schedule doesn't exist. -*/ -message ScheduleGetInfoQuery { - QueryHeader header = 1; // standard info sent from client to node including the signed payment, and what kind of response is requested (cost, state proof, both, or neither). - ScheduleID scheduleID = 2; // The id of the schedule to interrogate -} - -/* - Information summarizing schedule state -*/ -message ScheduleInfo { - ScheduleID scheduleID = 1; // The id of the schedule - oneof data { - Timestamp deletion_time = 2; // If the schedule has been deleted, the consensus time when this occurred - Timestamp execution_time = 3; // If the schedule has been executed, the consensus time when this occurred - } - Timestamp expirationTime = 4; // The time at which the schedule will expire - SchedulableTransactionBody scheduledTransactionBody = 5; // The scheduled transaction - string memo = 6; // The publicly visible memo of the schedule - Key adminKey = 7; // The key used to delete the schedule from state - KeyList signers = 8; // The Ed25519 keys the network deems to have signed the scheduled transaction - AccountID creatorAccountID = 9; // The id of the account that created the schedule - AccountID payerAccountID = 10; // The id of the account responsible for the service fee of the scheduled transaction - TransactionID scheduledTransactionID = 11; // The transaction id that will be used in the record of the scheduled transaction (if it executes) -} - -/* -Response wrapper for the ScheduleInfo -*/ -message ScheduleGetInfoResponse { - ResponseHeader header = 1; // Standard response from node to client, including the requested fields: cost, or state proof, or both, or neither - ScheduleInfo scheduleInfo = 2; // The information requested about this schedule instance -} diff --git a/src/main/proto/ScheduleService.proto b/src/main/proto/ScheduleService.proto deleted file mode 100644 index 25a5425e..00000000 --- a/src/main/proto/ScheduleService.proto +++ /dev/null @@ -1,59 +0,0 @@ -syntax = "proto3"; - -package proto; - -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ‍ - */ - -option java_package = "com.hederahashgraph.service.proto.java"; - -import "Query.proto"; -import "Response.proto"; -import "TransactionResponse.proto"; -import "Transaction.proto"; - -/* -Transactions and queries for the Schedule Service -The Schedule Service allows transactions to be submitted without all the required signatures and allows anyone to provide the required signatures independently after a transaction has already been created. -Execution: -Scheduled Transactions are executed once all required signatures are collected and witnessed. Every time new signature is provided, a check is performed on the "readiness" of the execution. -The Scheduled Transaction will be executed immediately after the transaction that triggered it and will be externalised in a separate Transaction Record. -Transaction Record: -The timestamp of the Scheduled Transaction will be equal to consensusTimestamp + 1 nano, where consensusTimestamp is the timestamp of the transaction that triggered the execution. -The Transaction ID of the Scheduled Transaction will have the scheduled property set to true and inherit the transactionValidStart and accountID from the ScheduleCreate transaction. -The scheduleRef property of the transaction record will be populated with the ScheduleID of the Scheduled Transaction. -Post execution: -Once a given Scheduled Transaction executes, it will be removed from the ledger and any upcoming operation referring the ScheduleID will resolve to INVALID_SCHEDULE_ID. -Expiry: -Scheduled Transactions have a global expiry time txExpiryTimeSecs (Currently set to 30 minutes). If txExpiryTimeSecs pass and the Scheduled Transaction haven't yet executed, it will be removed from the ledger as if ScheduleDelete operation is executed. -*/ -service ScheduleService { - // Creates a new Schedule by submitting the transaction - rpc createSchedule (Transaction) returns (TransactionResponse); - - // Signs a new Schedule by submitting the transaction - rpc signSchedule (Transaction) returns (TransactionResponse); - - // Deletes a new Schedule by submitting the transaction - rpc deleteSchedule (Transaction) returns (TransactionResponse); - - // Retrieves the metadata of a schedule entity - rpc getScheduleInfo (Query) returns (Response); -} diff --git a/src/main/proto/ScheduleSign.proto b/src/main/proto/ScheduleSign.proto deleted file mode 100644 index 33633269..00000000 --- a/src/main/proto/ScheduleSign.proto +++ /dev/null @@ -1,43 +0,0 @@ -syntax = "proto3"; - -package proto; - -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ‍ - */ - -option java_package = "com.hederahashgraph.api.proto.java"; -option java_multiple_files = true; - -import "BasicTypes.proto"; - -/* -Adds zero or more signing keys to a schedule. If the resulting set of signing keys satisfy the scheduled -transaction's signing requirements, it will be executed immediately after the triggering ScheduleSign. - -Upon SUCCESS, the receipt includes the scheduledTransactionID to use to query for the -record of the scheduled transaction's execution (if it occurs). - -Other notable response codes include INVALID_SCHEDULE_ID, SCHEDULE_WAS_DELETD, -INVALID_ACCOUNT_ID, UNRESOLVABLE_REQUIRED_SIGNERS, SOME_SIGNATURES_WERE_INVALID, -and NO_NEW_VALID_SIGNATURES. For more information please see the section of this -documentation on the ResponseCode enum. */ -message ScheduleSignTransactionBody { - ScheduleID scheduleID = 1; // The id of the schedule to add signing keys to -} diff --git a/src/main/proto/SmartContractService.proto b/src/main/proto/SmartContractService.proto deleted file mode 100644 index fa180e83..00000000 --- a/src/main/proto/SmartContractService.proto +++ /dev/null @@ -1,59 +0,0 @@ -syntax = "proto3"; - -package proto; - -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ‍ - */ -option java_package = "com.hederahashgraph.service.proto.java"; - -import "TransactionResponse.proto"; -import "Query.proto"; -import "Response.proto"; -import "Transaction.proto"; - -/* -Transactions and queries for the file service. -*/ -service SmartContractService { - // Creates a contract - rpc createContract (Transaction) returns (TransactionResponse); - // Updates a contract with the content - rpc updateContract (Transaction) returns (TransactionResponse); - // Calls a contract - rpc contractCallMethod (Transaction) returns (TransactionResponse); - // Retrieves the contract information - rpc getContractInfo (Query) returns (Response); - // Calls a smart contract to be run on a single node - rpc contractCallLocalMethod (Query) returns (Response); - // Retrieves the byte code of a contract - rpc ContractGetBytecode (Query) returns (Response); - // Retrieves a contract by its Solidity address - rpc getBySolidityID (Query) returns (Response); - // Always returns an empty record list, as contract accounts are never effective payers for transactions - rpc getTxRecordByContractID (Query) returns (Response) { - option deprecated = true; - }; - // Deletes a contract instance and transfers any remaining hbars to a specified receiver - rpc deleteContract (Transaction) returns (TransactionResponse); - // Deletes a contract if the submitting account has network admin privileges - rpc systemDelete (Transaction) returns (TransactionResponse); - // Undeletes a contract if the submitting account has network admin privileges - rpc systemUndelete (Transaction) returns (TransactionResponse); -} diff --git a/src/main/proto/SystemDelete.proto b/src/main/proto/SystemDelete.proto deleted file mode 100644 index 6f5f5ce2..00000000 --- a/src/main/proto/SystemDelete.proto +++ /dev/null @@ -1,40 +0,0 @@ -syntax = "proto3"; - -package proto; - -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ‍ - */ - -option java_package = "com.hederahashgraph.api.proto.java"; -option java_multiple_files = true; - -import "BasicTypes.proto"; -import "Timestamp.proto"; - -/* -Delete a file or smart contract - can only be done with a Hedera administrative multisignature. When it is deleted, it immediately disappears from the system as seen by the user, but is still stored internally until the expiration time, at which time it is truly and permanently deleted. Until that time, it can be undeleted by the Hedera administrative multisignature. When a smart contract is deleted, the cryptocurrency account within it continues to exist, and is not affected by the expiration time here. -*/ -message SystemDeleteTransactionBody { - oneof id { - FileID fileID = 1; // The file ID of the file to delete, in the format used in transactions - ContractID contractID = 2; // The contract ID instance to delete, in the format used in transactions - } - TimestampSeconds expirationTime = 3; // The timestamp in seconds at which the "deleted" file should truly be permanently deleted -} diff --git a/src/main/proto/SystemUndelete.proto b/src/main/proto/SystemUndelete.proto deleted file mode 100644 index 7aafbdcd..00000000 --- a/src/main/proto/SystemUndelete.proto +++ /dev/null @@ -1,38 +0,0 @@ -syntax = "proto3"; - -package proto; - -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ‍ - */ - -option java_package = "com.hederahashgraph.api.proto.java"; -option java_multiple_files = true; - -import "BasicTypes.proto"; - -/* -Undelete a file or smart contract that was deleted by SystemDelete; requires a Hedera administrative multisignature. -*/ -message SystemUndeleteTransactionBody { - oneof id { - FileID fileID = 1; // The file ID to undelete, in the format used in transactions - ContractID contractID = 2; // The contract ID instance to undelete, in the format used in transactions - } -} diff --git a/src/main/proto/ThrottleDefinitions.proto b/src/main/proto/ThrottleDefinitions.proto deleted file mode 100644 index 08947999..00000000 --- a/src/main/proto/ThrottleDefinitions.proto +++ /dev/null @@ -1,55 +0,0 @@ -syntax = "proto3"; - -package proto; - -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ‍ - */ - -option java_package = "com.hederahashgraph.api.proto.java"; -option java_multiple_files = true; - -import "BasicTypes.proto"; - -/* For details behind this throttling design, please see the docs/throttle-design.md -document in the Hedera Services repository. */ - -/* A set of operations which should be collectively throttled at a given milli-ops-per-second limit. */ -message ThrottleGroup { - repeated HederaFunctionality operations = 1; // The operations to be throttled - uint64 milliOpsPerSec = 2; // The number of total operations per second across the entire network, multiplied by 1000. So, to choose 3 operations per second (which on a network of 30 nodes is a tenth of an operation per second for each node), set milliOpsPerSec = 3000. And to choose 3.6 ops per second, use milliOpsPerSec = 3600. Minimum allowed value is 1, and maximum allowed value is 9223372. -} - -/* A list of throttle groups that should all compete for the same internal bucket. */ -message ThrottleBucket { - string name = 1; // A name for this bucket (primarily for use in logs) - uint64 burstPeriodMs = 2; // The number of milliseconds required for this bucket to drain completely when full. The product of this number and the least common multiple of the milliOpsPerSec values in this bucket must not exceed 9223372036. - repeated ThrottleGroup throttleGroups = 3; // The throttle groups competing for this bucket -} - -/* A list of throttle buckets which, simultaneously enforced, define the system's throttling policy. -
    -
  1. When an operation appears in more than one throttling bucket, all its buckets must have room -or it will be throttled.
  2. -
  3. An operation assigned to no buckets is always throttled.
  4. -
-*/ -message ThrottleDefinitions { - repeated ThrottleBucket throttleBuckets = 1; -} diff --git a/src/main/proto/Timestamp.proto b/src/main/proto/Timestamp.proto deleted file mode 100644 index 93080df3..00000000 --- a/src/main/proto/Timestamp.proto +++ /dev/null @@ -1,38 +0,0 @@ -syntax = "proto3"; - -package proto; - -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ‍ - */ - -option java_package = "com.hederahashgraph.api.proto.java"; -option java_multiple_files = true; - -/* An exact date and time. This is the same data structure as the protobuf Timestamp.proto (see the comments in https://github.com/google/protobuf/blob/master/src/google/protobuf/timestamp.proto) */ -message Timestamp { - int64 seconds = 1; // Number of complete seconds since the start of the epoch - int32 nanos = 2; // Number of nanoseconds since the start of the last second -} - -/* An exact date and time, with a resolution of one second (no nanoseconds). */ -message TimestampSeconds { - int64 seconds = 1; // Number of complete seconds since the start of the epoch -} - diff --git a/src/main/proto/TokenAssociate.proto b/src/main/proto/TokenAssociate.proto deleted file mode 100644 index 3fbf5699..00000000 --- a/src/main/proto/TokenAssociate.proto +++ /dev/null @@ -1,42 +0,0 @@ -syntax = "proto3"; - -package proto; - -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ‍ - */ - -option java_package = "com.hederahashgraph.api.proto.java"; -option java_multiple_files = true; - -import "BasicTypes.proto"; - -/* Associates the provided account with the provided tokens. Must be signed by the provided Account's key. - If the provided account is not found, the transaction will resolve to INVALID_ACCOUNT_ID. - If the provided account has been deleted, the transaction will resolve to ACCOUNT_DELETED. - If any of the provided tokens is not found, the transaction will resolve to INVALID_TOKEN_REF. - If any of the provided tokens has been deleted, the transaction will resolve to TOKEN_WAS_DELETED. - If an association between the provided account and any of the tokens already exists, the transaction will resolve to TOKEN_ALREADY_ASSOCIATED_TO_ACCOUNT. - If the provided account's associations count exceed the constraint of maximum token associations per account, the transaction will resolve to TOKENS_PER_ACCOUNT_LIMIT_EXCEEDED. - On success, associations between the provided account and tokens are made and the account is ready to interact with the tokens. - */ -message TokenAssociateTransactionBody { - AccountID account = 1; // The account to be associated with the provided tokens - repeated TokenID tokens = 2; // The tokens to be associated with the provided account -} diff --git a/src/main/proto/TokenBurn.proto b/src/main/proto/TokenBurn.proto deleted file mode 100644 index 0c723a38..00000000 --- a/src/main/proto/TokenBurn.proto +++ /dev/null @@ -1,39 +0,0 @@ -syntax = "proto3"; - -package proto; - -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ‍ - */ - -option java_package = "com.hederahashgraph.api.proto.java"; -option java_multiple_files = true; - -import "BasicTypes.proto"; - -/* -Burns tokens from the Token's treasury Account. If no Supply Key is defined, the transaction will resolve to TOKEN_HAS_NO_SUPPLY_KEY. -The operation decreases the Total Supply of the Token. Total supply cannot go below zero. -The amount provided must be in the lowest denomination possible. Example: -Token A has 2 decimals. In order to burn 100 tokens, one must provide amount of 10000. In order to burn 100.55 tokens, one must provide amount of 10055. - */ -message TokenBurnTransactionBody { - TokenID token = 1; // The token for which to burn tokens. If token does not exist, transaction results in INVALID_TOKEN_ID - uint64 amount = 2; // The amount to burn from the Treasury Account. Amount must be a positive non-zero number, not bigger than the token balance of the treasury account (0; balance], represented in the lowest denomination. -} diff --git a/src/main/proto/TokenCreate.proto b/src/main/proto/TokenCreate.proto deleted file mode 100644 index 92b78c21..00000000 --- a/src/main/proto/TokenCreate.proto +++ /dev/null @@ -1,60 +0,0 @@ -syntax = "proto3"; - -package proto; - -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ‍ - */ - -option java_package = "com.hederahashgraph.api.proto.java"; -option java_multiple_files = true; - -import "Duration.proto"; -import "BasicTypes.proto"; -import "Timestamp.proto"; - -/* -Create a new token. After the token is created, the Token ID for it is in the receipt. -The specified Treasury Account is receiving the initial supply of tokens as-well as the tokens from the Token Mint operation once executed. The balance of the treasury account is decreased when the Token Burn operation is executed. - -The initialSupply is the initial supply of the smallest parts of a token (like a tinybar, not an hbar). These are the smallest units of the token which may be transferred. - -The supply can change over time. If the total supply at some moment is S parts of tokens, and the token is using D decimals, then S must be less than or equal to 263-1, which is 9,223,372,036,854,775,807. The number of whole tokens (not parts) will be S / 10D. - -If decimals is 8 or 11, then the number of whole tokens can be at most a few billions or millions, respectively. For example, it could match Bitcoin (21 million whole tokens with 8 decimals) or hbars (50 billion whole tokens with 8 decimals). It could even match Bitcoin with milli-satoshis (21 million whole tokens with 11 decimals). - -Note that a created token is immutable if the adminKey is omitted. No property of an immutable token can ever change, with the sole exception of its expiry. Anyone can pay to extend the expiry time of an immutable token. - */ -message TokenCreateTransactionBody { - string name = 1; // The publicly visible name of the token, limited to a UTF-8 encoding of length tokens.maxSymbolUtf8Bytes. - string symbol = 2; // The publicly visible token symbol, limited to a UTF-8 encoding of length tokens.maxTokenNameUtf8Bytes. - uint32 decimals = 3; // The number of decimal places a token is divisible by. This field can never be changed! - uint64 initialSupply = 4; // Specifies the initial supply of tokens to be put in circulation. The initial supply is sent to the Treasury Account. The supply is in the lowest denomination possible. - AccountID treasury = 5; // The account which will act as a treasury for the token. This account will receive the specified initial supply - Key adminKey = 6; // The key which can perform update/delete operations on the token. If empty, the token can be perceived as immutable (not being able to be updated/deleted) - Key kycKey = 7; // The key which can grant or revoke KYC of an account for the token's transactions. If empty, KYC is not required, and KYC grant or revoke operations are not possible. - Key freezeKey = 8; // The key which can sign to freeze or unfreeze an account for token transactions. If empty, freezing is not possible - Key wipeKey = 9; // The key which can wipe the token balance of an account. If empty, wipe is not possible - Key supplyKey = 10; // The key which can change the supply of a token. The key is used to sign Token Mint/Burn operations - bool freezeDefault = 11; // The default Freeze status (frozen or unfrozen) of Hedera accounts relative to this token. If true, an account must be unfrozen before it can receive the token - Timestamp expiry = 13; // The epoch second at which the token should expire; if an auto-renew account and period are specified, this is coerced to the current epoch second plus the autoRenewPeriod - AccountID autoRenewAccount = 14; // An account which will be automatically charged to renew the token's expiration, at autoRenewPeriod interval - Duration autoRenewPeriod = 15; // The interval at which the auto-renew account will be charged to extend the token's expiry - string memo = 16; // The memo associated with the token (UTF-8 encoding max 100 bytes) -} diff --git a/src/main/proto/TokenDelete.proto b/src/main/proto/TokenDelete.proto deleted file mode 100644 index a849603a..00000000 --- a/src/main/proto/TokenDelete.proto +++ /dev/null @@ -1,36 +0,0 @@ -syntax = "proto3"; - -package proto; - -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ‍ - */ - -option java_package = "com.hederahashgraph.api.proto.java"; -option java_multiple_files = true; - -import "BasicTypes.proto"; - -/* - Marks a token as deleted, though it will remain in the ledger. - The operation must be signed by the specified Admin Key of the Token. If admin key is not set, Transaction will result in TOKEN_IS_IMMUTABlE. - Once deleted update, mint, burn, wipe, freeze, unfreeze, grant kyc, revoke kyc and token transfer transactions will resolve to TOKEN_WAS_DELETED. */ -message TokenDeleteTransactionBody { - TokenID token = 1; // The token to be deleted. If invalid token is specified, transaction will result in INVALID_TOKEN_ID -} diff --git a/src/main/proto/TokenDissociate.proto b/src/main/proto/TokenDissociate.proto deleted file mode 100644 index 9a1a14bb..00000000 --- a/src/main/proto/TokenDissociate.proto +++ /dev/null @@ -1,42 +0,0 @@ -syntax = "proto3"; - -package proto; - -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ‍ - */ - -option java_package = "com.hederahashgraph.api.proto.java"; -option java_multiple_files = true; - -import "BasicTypes.proto"; - -/* Dissociates the provided account with the provided tokens. Must be signed by the provided Account's key. - If the provided account is not found, the transaction will resolve to INVALID_ACCOUNT_ID. - If the provided account has been deleted, the transaction will resolve to ACCOUNT_DELETED. - If any of the provided tokens is not found, the transaction will resolve to INVALID_TOKEN_REF. - If any of the provided tokens has been deleted, the transaction will resolve to TOKEN_WAS_DELETED. - If an association between the provided account and any of the tokens does not exist, the transaction will resolve to TOKEN_NOT_ASSOCIATED_TO_ACCOUNT. - If the provided account has a nonzero balance with any of the provided tokens, the transaction will resolve to TRANSACTION_REQUIRES_ZERO_TOKEN_BALANCES. - On success, associations between the provided account and tokens are removed. - */ -message TokenDissociateTransactionBody { - AccountID account = 1; // The account to be dissociated with the provided tokens - repeated TokenID tokens = 2; // The tokens to be dissociated with the provided account -} diff --git a/src/main/proto/TokenFreezeAccount.proto b/src/main/proto/TokenFreezeAccount.proto deleted file mode 100644 index 3d49b9b4..00000000 --- a/src/main/proto/TokenFreezeAccount.proto +++ /dev/null @@ -1,42 +0,0 @@ -syntax = "proto3"; - -package proto; - -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ‍ - */ - -option java_package = "com.hederahashgraph.api.proto.java"; -option java_multiple_files = true; - -import "BasicTypes.proto"; - -/* Freezes transfers of the specified token for the account. Must be signed by the Token's freezeKey. - If the provided account is not found, the transaction will resolve to INVALID_ACCOUNT_ID. - If the provided account has been deleted, the transaction will resolve to ACCOUNT_DELETED. - If the provided token is not found, the transaction will resolve to INVALID_TOKEN_ID. - If the provided token has been deleted, the transaction will resolve to TOKEN_WAS_DELETED. - If an Association between the provided token and account is not found, the transaction will resolve to TOKEN_NOT_ASSOCIATED_TO_ACCOUNT. - If no Freeze Key is defined, the transaction will resolve to TOKEN_HAS_NO_FREEZE_KEY. - Once executed the Account is marked as Frozen and will not be able to receive or send tokens unless unfrozen. The operation is idempotent. - */ -message TokenFreezeAccountTransactionBody { - TokenID token = 1; // The token for which this account will be frozen. If token does not exist, transaction results in INVALID_TOKEN_ID - AccountID account = 2; // The account to be frozen -} diff --git a/src/main/proto/TokenGetInfo.proto b/src/main/proto/TokenGetInfo.proto deleted file mode 100644 index 397d172e..00000000 --- a/src/main/proto/TokenGetInfo.proto +++ /dev/null @@ -1,66 +0,0 @@ -syntax = "proto3"; - -package proto; - -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ‍ - */ - -option java_package = "com.hederahashgraph.api.proto.java"; -option java_multiple_files = true; - -import "BasicTypes.proto"; -import "QueryHeader.proto"; -import "ResponseHeader.proto"; -import "Timestamp.proto"; -import "Duration.proto"; - -/* Gets information about Token instance */ -message TokenGetInfoQuery { - QueryHeader header = 1; // Standard info sent from client to node, including the signed payment, and what kind of response is requested (cost, state proof, both, or neither) - TokenID token = 2; // The token for which information is requested. If invalid token is provided, INVALID_TOKEN_ID response is returned. -} - -/* The metadata about a Token instance */ -message TokenInfo { - TokenID tokenId = 1; // ID of the token instance - string name = 2; // The name of the token. It is a string of ASCII only characters - string symbol = 3; // The symbol of the token. It is a UTF-8 capitalized alphabetical string - uint32 decimals = 4; // The number of decimal places a token is divisible by - uint64 totalSupply = 5; // The total supply of tokens that are currently in circulation - AccountID treasury = 6; // The ID of the account which is set as Treasury - Key adminKey = 7; // The key which can perform update/delete operations on the token. If empty, the token can be perceived as immutable (not being able to be updated/deleted) - Key kycKey = 8; // The key which can grant or revoke KYC of an account for the token's transactions. If empty, KYC is not required, and KYC grant or revoke operations are not possible. - Key freezeKey = 9; // The key which can freeze or unfreeze an account for token transactions. If empty, freezing is not possible - Key wipeKey = 10; // The key which can wipe token balance of an account. If empty, wipe is not possible - Key supplyKey = 11; // The key which can change the supply of a token. The key is used to sign Token Mint/Burn operations - TokenFreezeStatus defaultFreezeStatus = 12; // The default Freeze status (not applicable, frozen or unfrozen) of Hedera accounts relative to this token. FreezeNotApplicable is returned if Token Freeze Key is empty. Frozen is returned if Token Freeze Key is set and defaultFreeze is set to true. Unfrozen is returned if Token Freeze Key is set and defaultFreeze is set to false - TokenKycStatus defaultKycStatus = 13; // The default KYC status (KycNotApplicable or Revoked) of Hedera accounts relative to this token. KycNotApplicable is returned if KYC key is not set, otherwise Revoked - bool deleted = 14; // Specifies whether the token was deleted or not - AccountID autoRenewAccount = 15; // An account which will be automatically charged to renew the token's expiration, at autoRenewPeriod interval - Duration autoRenewPeriod = 16; // The interval at which the auto-renew account will be charged to extend the token's expiry - Timestamp expiry = 17; // The epoch second at which the token will expire - string memo = 18; // The memo associated with the token -} - -/* Response when the client sends the node TokenGetInfoQuery */ -message TokenGetInfoResponse { - ResponseHeader header = 1; // Standard response from node to client, including the requested fields: cost, or state proof, or both, or neither - TokenInfo tokenInfo = 2; // The information requested about this token instance -} diff --git a/src/main/proto/TokenGrantKyc.proto b/src/main/proto/TokenGrantKyc.proto deleted file mode 100644 index 1156b41b..00000000 --- a/src/main/proto/TokenGrantKyc.proto +++ /dev/null @@ -1,42 +0,0 @@ -syntax = "proto3"; - -package proto; - -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ‍ - */ - -option java_package = "com.hederahashgraph.api.proto.java"; -option java_multiple_files = true; - -import "BasicTypes.proto"; - -/* Grants KYC to the account for the given token. Must be signed by the Token's kycKey. - If the provided account is not found, the transaction will resolve to INVALID_ACCOUNT_ID. - If the provided account has been deleted, the transaction will resolve to ACCOUNT_DELETED. - If the provided token is not found, the transaction will resolve to INVALID_TOKEN_ID. - If the provided token has been deleted, the transaction will resolve to TOKEN_WAS_DELETED. - If an Association between the provided token and account is not found, the transaction will resolve to TOKEN_NOT_ASSOCIATED_TO_ACCOUNT. - If no KYC Key is defined, the transaction will resolve to TOKEN_HAS_NO_KYC_KEY. - Once executed the Account is marked as KYC Granted. - */ -message TokenGrantKycTransactionBody { - TokenID token = 1; // The token for which this account will be granted KYC. If token does not exist, transaction results in INVALID_TOKEN_ID - AccountID account = 2; // The account to be KYCed -} diff --git a/src/main/proto/TokenMint.proto b/src/main/proto/TokenMint.proto deleted file mode 100644 index 0211f664..00000000 --- a/src/main/proto/TokenMint.proto +++ /dev/null @@ -1,39 +0,0 @@ -syntax = "proto3"; - -package proto; - -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ‍ - */ - -option java_package = "com.hederahashgraph.api.proto.java"; -option java_multiple_files = true; - -import "BasicTypes.proto"; - -/* -Mints tokens to the Token's treasury Account. If no Supply Key is defined, the transaction will resolve to TOKEN_HAS_NO_SUPPLY_KEY. -The operation increases the Total Supply of the Token. The maximum total supply a token can have is 2^63-1. -The amount provided must be in the lowest denomination possible. Example: -Token A has 2 decimals. In order to mint 100 tokens, one must provide amount of 10000. In order to mint 100.55 tokens, one must provide amount of 10055. - */ -message TokenMintTransactionBody { - TokenID token = 1; // The token for which to mint tokens. If token does not exist, transaction results in INVALID_TOKEN_ID - uint64 amount = 2; // The amount to mint to the Treasury Account. Amount must be a positive non-zero number represented in the lowest denomination of the token. The new supply must be lower than 2^63. -} diff --git a/src/main/proto/TokenRevokeKyc.proto b/src/main/proto/TokenRevokeKyc.proto deleted file mode 100644 index 4e780dc3..00000000 --- a/src/main/proto/TokenRevokeKyc.proto +++ /dev/null @@ -1,42 +0,0 @@ -syntax = "proto3"; - -package proto; - -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ‍ - */ - -option java_package = "com.hederahashgraph.api.proto.java"; -option java_multiple_files = true; - -import "BasicTypes.proto"; - -/* Revokes KYC to the account for the given token. Must be signed by the Token's kycKey. - If the provided account is not found, the transaction will resolve to INVALID_ACCOUNT_ID. - If the provided account has been deleted, the transaction will resolve to ACCOUNT_DELETED. - If the provided token is not found, the transaction will resolve to INVALID_TOKEN_ID. - If the provided token has been deleted, the transaction will resolve to TOKEN_WAS_DELETED. - If an Association between the provided token and account is not found, the transaction will resolve to TOKEN_NOT_ASSOCIATED_TO_ACCOUNT. - If no KYC Key is defined, the transaction will resolve to TOKEN_HAS_NO_KYC_KEY. - Once executed the Account is marked as KYC Revoked - */ -message TokenRevokeKycTransactionBody { - TokenID token = 1; // The token for which this account will get his KYC revoked. If token does not exist, transaction results in INVALID_TOKEN_ID - AccountID account = 2; // The account to be KYC Revoked -} diff --git a/src/main/proto/TokenService.proto b/src/main/proto/TokenService.proto deleted file mode 100644 index 3a2f98fa..00000000 --- a/src/main/proto/TokenService.proto +++ /dev/null @@ -1,61 +0,0 @@ -syntax = "proto3"; - -package proto; - -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ‍ - */ - -option java_package = "com.hederahashgraph.service.proto.java"; - -import "Query.proto"; -import "Response.proto"; -import "TransactionResponse.proto"; -import "Transaction.proto"; - -/* Transactions and queries for the Token Service */ -service TokenService { - // Creates a new Token by submitting the transaction - rpc createToken (Transaction) returns (TransactionResponse); - // Updates the account by submitting the transaction - rpc updateToken (Transaction) returns (TransactionResponse); - // Mints an amount of the token to the defined treasury account - rpc mintToken (Transaction) returns (TransactionResponse); - // Burns an amount of the token from the defined treasury account - rpc burnToken (Transaction) returns (TransactionResponse); - // Deletes a Token - rpc deleteToken (Transaction) returns (TransactionResponse); - // Wipes the provided amount of tokens from the specified Account ID - rpc wipeTokenAccount (Transaction) returns (TransactionResponse); - // Freezes the transfer of tokens to or from the specified Account ID - rpc freezeTokenAccount (Transaction) returns (TransactionResponse); - // Unfreezes the transfer of tokens to or from the specified Account ID - rpc unfreezeTokenAccount (Transaction) returns (TransactionResponse); - // Flags the provided Account ID as having gone through KYC - rpc grantKycToTokenAccount (Transaction) returns (TransactionResponse); - // Removes the KYC flag of the provided Account ID - rpc revokeKycFromTokenAccount (Transaction) returns (TransactionResponse); - // Associates tokens to an account - rpc associateTokens (Transaction) returns (TransactionResponse); - // Dissociates tokens from an account - rpc dissociateTokens (Transaction) returns (TransactionResponse); - - // Retrieves the metadata of a token - rpc getTokenInfo (Query) returns (Response); -} diff --git a/src/main/proto/TokenUnfreezeAccount.proto b/src/main/proto/TokenUnfreezeAccount.proto deleted file mode 100644 index 9676e1e5..00000000 --- a/src/main/proto/TokenUnfreezeAccount.proto +++ /dev/null @@ -1,42 +0,0 @@ -syntax = "proto3"; - -package proto; - -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ‍ - */ - -option java_package = "com.hederahashgraph.api.proto.java"; -option java_multiple_files = true; - -import "BasicTypes.proto"; - -/* Unfreezes transfers of the specified token for the account. Must be signed by the Token's freezeKey. - If the provided account is not found, the transaction will resolve to INVALID_ACCOUNT_ID. - If the provided account has been deleted, the transaction will resolve to ACCOUNT_DELETED. - If the provided token is not found, the transaction will resolve to INVALID_TOKEN_ID. - If the provided token has been deleted, the transaction will resolve to TOKEN_WAS_DELETED. - If an Association between the provided token and account is not found, the transaction will resolve to TOKEN_NOT_ASSOCIATED_TO_ACCOUNT. - If no Freeze Key is defined, the transaction will resolve to TOKEN_HAS_NO_FREEZE_KEY. - Once executed the Account is marked as Unfrozen and will be able to receive or send tokens. The operation is idempotent. - */ -message TokenUnfreezeAccountTransactionBody { - TokenID token = 1; // The token for which this account will be unfrozen. If token does not exist, transaction results in INVALID_TOKEN_ID - AccountID account = 2; // The account to be unfrozen -} diff --git a/src/main/proto/TokenUpdate.proto b/src/main/proto/TokenUpdate.proto deleted file mode 100644 index a3baac71..00000000 --- a/src/main/proto/TokenUpdate.proto +++ /dev/null @@ -1,56 +0,0 @@ -syntax = "proto3"; - -package proto; - -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ‍ - */ - -option java_package = "com.hederahashgraph.api.proto.java"; -option java_multiple_files = true; - -import "BasicTypes.proto"; -import "Duration.proto"; -import "Timestamp.proto"; -import "google/protobuf/wrappers.proto"; - -/* At consensus, updates an already created token to the given values. - -If no value is given for a field, that field is left unchanged. For an immutable tokens (that is, a token without an admin key), only the expiry may be updated. Setting any other field in that case will cause the transaction status to resolve to TOKEN_IS_IMMUTABLE. - ---- Signing Requirements --- -1. Whether or not a token has an admin key, its expiry can be extended with only the transaction payer's signature. -2. Updating any other field of a mutable token requires the admin key's signature. -3. If a new admin key is set, this new key must sign unless it is exactly an empty KeyList. This special sentinel key removes the existing admin key and causes the token to become immutable. (Other Key structures without a constituent Ed25519 key will be rejected with INVALID_ADMIN_KEY.) -4. If a new treasury is set, the new treasury account's key must sign the transaction. */ -message TokenUpdateTransactionBody { - TokenID token = 1; // The Token to be updated - string symbol = 2; // The new publicly visible Token symbol, limited to a UTF-8 encoding of length tokens.maxTokenNameUtf8Bytes. - string name = 3; // The new publicly visible name of the Token, limited to a UTF-8 encoding of length tokens.maxSymbolUtf8Bytes. - AccountID treasury = 4; // The new Treasury account of the Token. If the provided treasury account is not existing or deleted, the response will be INVALID_TREASURY_ACCOUNT_FOR_TOKEN. If successful, the Token balance held in the previous Treasury Account is transferred to the new one. - Key adminKey = 5; // The new admin key of the Token. If Token is immutable, transaction will resolve to TOKEN_IS_IMMUTABlE. - Key kycKey = 6; // The new KYC key of the Token. If Token does not have currently a KYC key, transaction will resolve to TOKEN_HAS_NO_KYC_KEY. - Key freezeKey = 7; // The new Freeze key of the Token. If the Token does not have currently a Freeze key, transaction will resolve to TOKEN_HAS_NO_FREEZE_KEY. - Key wipeKey = 8; // The new Wipe key of the Token. If the Token does not have currently a Wipe key, transaction will resolve to TOKEN_HAS_NO_WIPE_KEY. - Key supplyKey = 9; // The new Supply key of the Token. If the Token does not have currently a Supply key, transaction will resolve to TOKEN_HAS_NO_SUPPLY_KEY. - AccountID autoRenewAccount = 10; // The new account which will be automatically charged to renew the token's expiration, at autoRenewPeriod interval. - Duration autoRenewPeriod = 11; // The new interval at which the auto-renew account will be charged to extend the token's expiry. - Timestamp expiry = 12; // The new expiry time of the token. Expiry can be updated even if admin key is not set. If the provided expiry is earlier than the current token expiry, transaction wil resolve to INVALID_EXPIRATION_TIME - google.protobuf.StringValue memo = 13; // If set, the new memo to be associated with the token (UTF-8 encoding max 100 bytes) -} diff --git a/src/main/proto/TokenWipeAccount.proto b/src/main/proto/TokenWipeAccount.proto deleted file mode 100644 index 444c1d14..00000000 --- a/src/main/proto/TokenWipeAccount.proto +++ /dev/null @@ -1,47 +0,0 @@ -syntax = "proto3"; - -package proto; - -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ‍ - */ - -option java_package = "com.hederahashgraph.api.proto.java"; -option java_multiple_files = true; - -import "BasicTypes.proto"; - -/* Wipes the provided amount of tokens from the specified Account. Must be signed by the Token's Wipe key. - If the provided account is not found, the transaction will resolve to INVALID_ACCOUNT_ID. - If the provided account has been deleted, the transaction will resolve to ACCOUNT_DELETED. - If the provided token is not found, the transaction will resolve to INVALID_TOKEN_ID. - If the provided token has been deleted, the transaction will resolve to TOKEN_WAS_DELETED. - If an Association between the provided token and account is not found, the transaction will resolve to TOKEN_NOT_ASSOCIATED_TO_ACCOUNT. - If Wipe Key is not present in the Token, transaction results in TOKEN_HAS_NO_WIPE_KEY. - If the provided account is the Token's Treasury Account, transaction results in CANNOT_WIPE_TOKEN_TREASURY_ACCOUNT - On success, tokens are removed from the account and the total supply of the token is decreased by the wiped amount. - - The amount provided is in the lowest denomination possible. Example: - Token A has 2 decimals. In order to wipe 100 tokens from account, one must provide amount of 10000. In order to wipe 100.55 tokens, one must provide amount of 10055. - */ -message TokenWipeAccountTransactionBody { - TokenID token = 1; // The token for which the account will be wiped. If token does not exist, transaction results in INVALID_TOKEN_ID - AccountID account = 2; // The account to be wiped - uint64 amount = 3; // The amount of tokens to wipe from the specified account. Amount must be a positive non-zero number in the lowest denomination possible, not bigger than the token balance of the account (0; balance] -} diff --git a/src/main/proto/Transaction.proto b/src/main/proto/Transaction.proto deleted file mode 100644 index 8ebaac27..00000000 --- a/src/main/proto/Transaction.proto +++ /dev/null @@ -1,39 +0,0 @@ -syntax = "proto3"; - -package proto; - -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ‍ - */ - -option java_package = "com.hederahashgraph.api.proto.java"; -option java_multiple_files = true; - - -import "Duration.proto"; -import "BasicTypes.proto"; - -/* A single signed transaction, including all its signatures. The SignatureList will have a Signature for each Key in the transaction, either explicit or implicit, in the order that they appear in the transaction. For example, a CryptoTransfer will first have a Signature corresponding to the Key for the paying account, followed by a Signature corresponding to the Key for each account that is sending or receiving cryptocurrency in the transfer. Each Transaction should not have more than 50 levels. - * The SignatureList field is deprecated and succeeded by SignatureMap. - */ -message Transaction { - bytes signedTransactionBytes = 5; // SignedTransaction serialized into bytes - bytes bodyBytes = 4 [deprecated = true]; // TransactionBody serialized into bytes, which needs to be signed - SignatureMap sigMap = 3 [deprecated = true]; // The signatures on the body with the new format, to authorize the transaction -} diff --git a/src/main/proto/TransactionBody.proto b/src/main/proto/TransactionBody.proto deleted file mode 100644 index 43b2c288..00000000 --- a/src/main/proto/TransactionBody.proto +++ /dev/null @@ -1,129 +0,0 @@ -syntax = "proto3"; - -package proto; - -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ‍ - */ - -option java_package = "com.hederahashgraph.api.proto.java"; -option java_multiple_files = true; - -import "SystemDelete.proto"; -import "SystemUndelete.proto"; -import "Freeze.proto"; - -import "ContractCall.proto"; -import "ContractCreate.proto"; -import "ContractUpdate.proto"; - -import "CryptoAddLiveHash.proto"; -import "CryptoCreate.proto"; -import "CryptoDelete.proto"; -import "CryptoDeleteLiveHash.proto"; -import "CryptoTransfer.proto"; -import "CryptoUpdate.proto"; - -import "FileAppend.proto"; -import "FileCreate.proto"; -import "FileDelete.proto"; -import "FileUpdate.proto"; - -import "Duration.proto"; -import "BasicTypes.proto"; -import "ContractDelete.proto"; - -import "ConsensusCreateTopic.proto"; -import "ConsensusUpdateTopic.proto"; -import "ConsensusDeleteTopic.proto"; -import "ConsensusSubmitMessage.proto"; - -import "UncheckedSubmit.proto"; - -import "TokenCreate.proto"; -import "TokenFreezeAccount.proto"; -import "TokenUnfreezeAccount.proto"; -import "TokenGrantKyc.proto"; -import "TokenRevokeKyc.proto"; -import "TokenDelete.proto"; -import "TokenUpdate.proto"; -import "TokenMint.proto"; -import "TokenBurn.proto"; -import "TokenWipeAccount.proto"; -import "TokenAssociate.proto"; -import "TokenDissociate.proto"; - -import "ScheduleCreate.proto"; -import "ScheduleDelete.proto"; -import "ScheduleSign.proto"; - -/* A single transaction. All transaction types are possible here. */ -message TransactionBody { - TransactionID transactionID = 1; // The ID for this transaction, which includes the payer's account (the account paying the transaction fee). If two transactions have the same transactionID, they won't both have an effect - AccountID nodeAccountID = 2; // The account of the node that submits the client's transaction to the network - uint64 transactionFee = 3; // The maximum transaction fee the client is willing to pay - Duration transactionValidDuration = 4; //The transaction is invalid if consensusTimestamp > transactionID.transactionValidStart + transactionValidDuration - bool generateRecord = 5 [deprecated = true]; // Should a record of this transaction be generated? (A receipt is always generated, but the record is optional) - string memo = 6; // Any notes or descriptions that should be put into the record (max length 100) - oneof data { - ContractCallTransactionBody contractCall = 7; // Calls a function of a contract instance - ContractCreateTransactionBody contractCreateInstance = 8; // Creates a contract instance - ContractUpdateTransactionBody contractUpdateInstance = 9; // Updates a contract - ContractDeleteTransactionBody contractDeleteInstance = 22; //Delete contract and transfer remaining balance into specified account - - CryptoAddLiveHashTransactionBody cryptoAddLiveHash = 10; // Attach a new livehash to an account - CryptoCreateTransactionBody cryptoCreateAccount = 11; // Create a new cryptocurrency account - CryptoDeleteTransactionBody cryptoDelete = 12; // Delete a cryptocurrency account (mark as deleted, and transfer hbars out) - CryptoDeleteLiveHashTransactionBody cryptoDeleteLiveHash = 13; // Remove a livehash from an account - CryptoTransferTransactionBody cryptoTransfer = 14; // Transfer amount between accounts - CryptoUpdateTransactionBody cryptoUpdateAccount = 15; // Modify information such as the expiration date for an account - - FileAppendTransactionBody fileAppend = 16; // Add bytes to the end of the contents of a file - FileCreateTransactionBody fileCreate = 17; // Create a new file - FileDeleteTransactionBody fileDelete = 18; // Delete a file (remove contents and mark as deleted until it expires) - FileUpdateTransactionBody fileUpdate = 19; // Modify information such as the expiration date for a file - SystemDeleteTransactionBody systemDelete = 20; // Hedera administrative deletion of a file or smart contract - SystemUndeleteTransactionBody systemUndelete = 21; //To undelete an entity deleted by SystemDelete - FreezeTransactionBody freeze = 23; // Freeze the nodes - - ConsensusCreateTopicTransactionBody consensusCreateTopic = 24; // Creates a topic - ConsensusUpdateTopicTransactionBody consensusUpdateTopic = 25; // Updates a topic - ConsensusDeleteTopicTransactionBody consensusDeleteTopic = 26; // Deletes a topic - ConsensusSubmitMessageTransactionBody consensusSubmitMessage = 27; // Submits message to a topic - - UncheckedSubmitBody uncheckedSubmit = 28; - - TokenCreateTransactionBody tokenCreation = 29; // Creates a token instance - TokenFreezeAccountTransactionBody tokenFreeze = 31; // Freezes account not to be able to transact with a token - TokenUnfreezeAccountTransactionBody tokenUnfreeze = 32; // Unfreezes account for a token - TokenGrantKycTransactionBody tokenGrantKyc = 33; // Grants KYC to an account for a token - TokenRevokeKycTransactionBody tokenRevokeKyc = 34; // Revokes KYC of an account for a token - TokenDeleteTransactionBody tokenDeletion = 35; // Deletes a token instance - TokenUpdateTransactionBody tokenUpdate = 36; // Updates a token instance - TokenMintTransactionBody tokenMint = 37; // Mints new tokens to a token's treasury account - TokenBurnTransactionBody tokenBurn = 38; // Burns tokens from a token's treasury account - TokenWipeAccountTransactionBody tokenWipe = 39; // Wipes amount of tokens from an account - TokenAssociateTransactionBody tokenAssociate = 40; // Associate tokens to an account - TokenDissociateTransactionBody tokenDissociate = 41; // Dissociate tokens from an account - - ScheduleCreateTransactionBody scheduleCreate = 42; // Creates a schedule in the network's action queue - ScheduleDeleteTransactionBody scheduleDelete = 43; // Deletes a schedule from the network's action queue - ScheduleSignTransactionBody scheduleSign = 44; // Adds one or more Ed25519 keys to the affirmed signers of a scheduled transaction - } -} diff --git a/src/main/proto/TransactionContents.proto b/src/main/proto/TransactionContents.proto deleted file mode 100644 index 24d8b2c7..00000000 --- a/src/main/proto/TransactionContents.proto +++ /dev/null @@ -1,33 +0,0 @@ -syntax = "proto3"; - -package proto; - -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ‍ - */ - -option java_package = "com.hederahashgraph.api.proto.java"; -option java_multiple_files = true; - -import "BasicTypes.proto"; - -message SignedTransaction { - bytes bodyBytes = 1; // TransactionBody serialized into bytes, which needs to be signed - SignatureMap sigMap = 2; // The signatures on the body with the new format, to authorize the transaction -} diff --git a/src/main/proto/TransactionGetFastRecord.proto b/src/main/proto/TransactionGetFastRecord.proto deleted file mode 100644 index 9a8fc100..00000000 --- a/src/main/proto/TransactionGetFastRecord.proto +++ /dev/null @@ -1,42 +0,0 @@ -syntax = "proto3"; - -package proto; - -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ‍ - */ - -option java_package = "com.hederahashgraph.api.proto.java"; -option java_multiple_files = true; - -import "TransactionRecord.proto"; -import "BasicTypes.proto"; -import "QueryHeader.proto"; -import "ResponseHeader.proto"; - -/* Get the tx record of a transaction, given its transaction ID. Once a transaction reaches consensus, then information about whether it succeeded or failed will be available until the end of the receipt period. Before and after the receipt period, and for a transaction that was never submitted, the receipt is unknown. This query is free (the payment field is left empty). */ -message TransactionGetFastRecordQuery { - QueryHeader header = 1; // Standard info sent from client to node, including the signed payment, and what kind of response is requested (cost, state proof, both, or neither). - TransactionID transactionID = 2; // The ID of the transaction for which the record is requested. -} -/* Response when the client sends the node TransactionGetFastRecordQuery. If it created a new entity (account, file, or smart contract instance) then one of the three ID fields will be filled in with the ID of the new entity. Sometimes a single transaction will create more than one new entity, such as when a new contract instance is created, and this also creates the new account that it owned by that instance. */ -message TransactionGetFastRecordResponse { - ResponseHeader header = 1; //Standard response from node to client, including the requested fields: cost, or state proof, or both, or neither - TransactionRecord transactionRecord = 2; // The requested transaction records -} diff --git a/src/main/proto/TransactionGetReceipt.proto b/src/main/proto/TransactionGetReceipt.proto deleted file mode 100644 index 34240983..00000000 --- a/src/main/proto/TransactionGetReceipt.proto +++ /dev/null @@ -1,44 +0,0 @@ -syntax = "proto3"; - -package proto; - -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ‍ - */ - -option java_package = "com.hederahashgraph.api.proto.java"; -option java_multiple_files = true; - -import "TransactionReceipt.proto"; -import "BasicTypes.proto"; -import "QueryHeader.proto"; -import "ResponseHeader.proto"; - -/* Get the receipt of a transaction, given its transaction ID. Once a transaction reaches consensus, then information about whether it succeeded or failed will be available until the end of the receipt period. Before and after the receipt period, and for a transaction that was never submitted, the receipt is unknown. This query is free (the payment field is left empty). No State proof is available for this response*/ -message TransactionGetReceiptQuery { - QueryHeader header = 1; // Standard info sent from client to node, including the signed payment, and what kind of response is requested (cost, state proof, both, or neither). - TransactionID transactionID = 2; // The ID of the transaction for which the receipt is requested. - bool includeDuplicates = 3; // Whether receipts of processing duplicate transactions should be returned along with the receipt of processing the first consensus transaction with the given id whose status was neither INVALID_NODE_ACCOUNT nor INVALID_PAYER_SIGNATURE; or, if no such receipt exists, the receipt of processing the first transaction to reach consensus with the given transaction id.. -} -/* Response when the client sends the node TransactionGetReceiptQuery. If it created a new entity (account, file, or smart contract instance) then one of the three ID fields will be filled in with the ID of the new entity. Sometimes a single transaction will create more than one new entity, such as when a new contract instance is created, and this also creates the new account that it owned by that instance. No State proof is available for this response */ -message TransactionGetReceiptResponse { - ResponseHeader header = 1; //Standard response from node to client, including the requested fields: cost, or state proof, or both, or neither - TransactionReceipt receipt = 2; // Either the receipt of processing the first consensus transaction with the given id whose status was neither INVALID_NODE_ACCOUNT nor INVALID_PAYER_SIGNATURE; or, if no such receipt exists, the receipt of processing the first transaction to reach consensus with the given transaction id. - repeated TransactionReceipt duplicateTransactionReceipts = 4; // The receipts of processing all consensus transaction with the same id as the distinguished receipt above, in chronological order. -} diff --git a/src/main/proto/TransactionGetRecord.proto b/src/main/proto/TransactionGetRecord.proto deleted file mode 100644 index 6019211a..00000000 --- a/src/main/proto/TransactionGetRecord.proto +++ /dev/null @@ -1,46 +0,0 @@ -syntax = "proto3"; - -package proto; - -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ‍ - */ - -option java_package = "com.hederahashgraph.api.proto.java"; -option java_multiple_files = true; - -import "TransactionRecord.proto"; -import "BasicTypes.proto"; -import "QueryHeader.proto"; -import "ResponseHeader.proto"; - -/* Get the record for a transaction. If the transaction requested a record, then the record lasts for one hour, and a state proof is available for it. If the transaction created an account, file, or smart contract instance, then the record will contain the ID for what it created. If the transaction called a smart contract function, then the record contains the result of that call. If the transaction was a cryptocurrency transfer, then the record includes the TransferList which gives the details of that transfer. If the transaction didn't return anything that should be in the record, then the results field will be set to nothing. */ -message TransactionGetRecordQuery { - QueryHeader header = 1; // Standard info sent from client to node, including the signed payment, and what kind of response is requested (cost, state proof, both, or neither). - TransactionID transactionID = 2; // The ID of the transaction for which the record is requested. - bool includeDuplicates = 3; // Whether records of processing duplicate transactions should be returned along with the record of processing the first consensus transaction with the given id whose status was neither INVALID_NODE_ACCOUNT nor INVALID_PAYER_SIGNATURE; or, if no such record exists, the record of processing the first transaction to reach consensus with the given transaction id.. -} - -/* Response when the client sends the node TransactionGetRecordQuery */ -message TransactionGetRecordResponse { - ResponseHeader header = 1; // Standard response from node to client, including the requested fields: cost, or state proof, or both, or neither. - TransactionRecord transactionRecord = 3; // Either the record of processing the first consensus transaction with the given id whose status was neither INVALID_NODE_ACCOUNT nor INVALID_PAYER_SIGNATURE; or, if no such record exists, the record of processing the first transaction to reach consensus with the given transaction id. - repeated TransactionRecord duplicateTransactionRecords = 4; // The records of processing all consensus transaction with the same id as the distinguished record above, in chronological order. -} - diff --git a/src/main/proto/TransactionReceipt.proto b/src/main/proto/TransactionReceipt.proto deleted file mode 100644 index 38e23c90..00000000 --- a/src/main/proto/TransactionReceipt.proto +++ /dev/null @@ -1,112 +0,0 @@ -syntax = "proto3"; - -package proto; - -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ‍ - */ - -option java_package = "com.hederahashgraph.api.proto.java"; -option java_multiple_files = true; - -import "BasicTypes.proto"; -import "ResponseCode.proto"; -import "ExchangeRate.proto"; - -/* -The summary of a transaction's result so far. If the transaction has not reached consensus, this result will be necessarily incomplete. - */ -message TransactionReceipt { - // The consensus status of the transaction; is UNKNOWN if consensus has not been reached, or if the - // associated transaction did not have a valid payer signature - ResponseCodeEnum status = 1; - - // In the receipt of a CryptoCreate, the id of the newly created account - AccountID accountID = 2; - // In the receipt of a FileCreate, the id of the newly created file - FileID fileID = 3; - // In the receipt of a ContractCreate, the id of the newly created contract - ContractID contractID = 4; - // The exchange rates in effect when the transaction reached consensus - ExchangeRateSet exchangeRate = 5; - // In the receipt of a ConsensusCreateTopic, the id of the newly created topic. - TopicID topicID = 6; - - // In the receipt of a ConsensusSubmitMessage, the new sequence number of the topic that received the message - uint64 topicSequenceNumber = 7; - - // In the receipt of a ConsensusSubmitMessage, the new running hash of the topic that received the message. - // This 48-byte field is the output of a particular SHA-384 digest whose input data are determined by the - // value of the topicRunningHashVersion below. The bytes of each uint64 or uint32 are to be in Big-Endian - // format. - // - // IF the topicRunningHashVersion is '0' or '1', then the input data to the SHA-384 digest are, in order: - // --- - // 1. The previous running hash of the topic (48 bytes) - // 2. The topic's shard (8 bytes) - // 3. The topic's realm (8 bytes) - // 4. The topic's number (8 bytes) - // 5. The number of seconds since the epoch before the ConsensusSubmitMessage reached consensus (8 bytes) - // 6. The number of nanoseconds since 5. before the ConsensusSubmitMessage reached consensus (4 bytes) - // 7. The topicSequenceNumber from above (8 bytes) - // 8. The message bytes from the ConsensusSubmitMessage (variable). - // - // IF the topicRunningHashVersion is '2', then the input data to the SHA-384 digest are, in order: - // --- - // 1. The previous running hash of the topic (48 bytes) - // 2. The topicRunningHashVersion below (8 bytes) - // 3. The topic's shard (8 bytes) - // 4. The topic's realm (8 bytes) - // 5. The topic's number (8 bytes) - // 6. The number of seconds since the epoch before the ConsensusSubmitMessage reached consensus (8 bytes) - // 7. The number of nanoseconds since 6. before the ConsensusSubmitMessage reached consensus (4 bytes) - // 8. The topicSequenceNumber from above (8 bytes) - // 9. The output of the SHA-384 digest of the message bytes from the consensusSubmitMessage (48 bytes) - // - // Otherwise, IF the topicRunningHashVersion is '3', then the input data to the SHA-384 digest are, in order: - // --- - // 1. The previous running hash of the topic (48 bytes) - // 2. The topicRunningHashVersion below (8 bytes) - // 3. The payer account's shard (8 bytes) - // 4. The payer account's realm (8 bytes) - // 5. The payer account's number (8 bytes) - // 6. The topic's shard (8 bytes) - // 7. The topic's realm (8 bytes) - // 8. The topic's number (8 bytes) - // 9. The number of seconds since the epoch before the ConsensusSubmitMessage reached consensus (8 bytes) - // 10. The number of nanoseconds since 9. before the ConsensusSubmitMessage reached consensus (4 bytes) - // 11. The topicSequenceNumber from above (8 bytes) - // 12. The output of the SHA-384 digest of the message bytes from the consensusSubmitMessage (48 bytes) - bytes topicRunningHash = 8; - - // In the receipt of a ConsensusSubmitMessage, the version of the SHA-384 digest used to update the running hash. - uint64 topicRunningHashVersion = 9; - - // In the receipt of a CreateToken, the id of the newly created token - TokenID tokenID = 10; - - // In the receipt of TokenMint, TokenWipe, TokenBurn, the current total supply of this token - uint64 newTotalSupply = 11; - - // In the receipt of a ScheduleCreate, the id of the newly created Scheduled Entity - ScheduleID scheduleID = 12; - - // In the receipt of a ScheduleCreate or ScheduleSign that resolves to SUCCESS, the TransactionID that should be used to query for the receipt or record of the relevant scheduled transaction - TransactionID scheduledTransactionID = 13; -} diff --git a/src/main/proto/TransactionRecord.proto b/src/main/proto/TransactionRecord.proto deleted file mode 100644 index 36f207f2..00000000 --- a/src/main/proto/TransactionRecord.proto +++ /dev/null @@ -1,49 +0,0 @@ -syntax = "proto3"; - -package proto; - -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ‍ - */ - -option java_package = "com.hederahashgraph.api.proto.java"; -option java_multiple_files = true; - -import "Timestamp.proto"; -import "BasicTypes.proto"; -import "TransactionReceipt.proto"; -import "CryptoTransfer.proto"; -import "ContractCallLocal.proto"; - -/* Response when the client sends the node TransactionGetRecordResponse */ -message TransactionRecord { - TransactionReceipt receipt = 1; // The status (reach consensus, or failed, or is unknown) and the ID of any new account/file/instance created. - bytes transactionHash = 2; // The hash of the Transaction that executed (not the hash of any Transaction that failed for having a duplicate TransactionID) - Timestamp consensusTimestamp = 3; // The consensus timestamp (or null if didn't reach consensus yet) - TransactionID transactionID = 4; // The ID of the transaction this record represents - string memo = 5; // The memo that was submitted as part of the transaction (max 100 bytes) - uint64 transactionFee = 6; // The actual transaction fee charged, not the original transactionFee value from TransactionBody - oneof body { - ContractFunctionResult contractCallResult = 7; // Record of the value returned by the smart contract function (if it completed and didn't fail) from ContractCallTransaction - ContractFunctionResult contractCreateResult = 8; // Record of the value returned by the smart contract constructor (if it completed and didn't fail) from ContractCreateTransaction - } - TransferList transferList = 10; // All hbar transfers as a result of this transaction, such as fees, or transfers performed by the transaction, or by a smart contract it calls, or by the creation of threshold records that it triggers. - repeated TokenTransferList tokenTransferLists = 11; // All Token transfers as a result of this transaction - ScheduleID scheduleRef = 12; // Reference to the scheduled transaction ID that this transaction record represent -} diff --git a/src/main/proto/TransactionResponse.proto b/src/main/proto/TransactionResponse.proto deleted file mode 100644 index 542e261d..00000000 --- a/src/main/proto/TransactionResponse.proto +++ /dev/null @@ -1,35 +0,0 @@ -syntax = "proto3"; - -package proto; - -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ‍ - */ - -option java_package = "com.hederahashgraph.api.proto.java"; -option java_multiple_files = true; - -import "ResponseCode.proto"; - - -/* When the client sends the node a transaction of any kind, the node replies with this, which simply says that the transaction passed the precheck (so the node will submit it to the network) or it failed (so it won't). If the fee offered was insufficient, this will also contain the amount of the required fee. To learn the consensus result, the client should later obtain a receipt (free), or can buy a more detailed record (not free). */ -message TransactionResponse { - ResponseCodeEnum nodeTransactionPrecheckCode = 1; // The response code that indicates the current status of the transaction. - uint64 cost = 2; // If the response code was INSUFFICIENT_TX_FEE, the actual transaction fee that would be required to execute the transaction. -} diff --git a/src/main/proto/UncheckedSubmit.proto b/src/main/proto/UncheckedSubmit.proto deleted file mode 100644 index 00c6e812..00000000 --- a/src/main/proto/UncheckedSubmit.proto +++ /dev/null @@ -1,33 +0,0 @@ -syntax = "proto3"; - -package proto; - -/*- - * ‌ - * Hedera Network Services Protobuf - * ​ - * Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC - * ​ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ‍ - */ - -option java_package = "com.hederahashgraph.api.proto.java"; -option java_multiple_files = true; - -/* -Submit an arbitrary (serialized) Transaction to the network without prechecks. Requires superuser privileges. -*/ -message UncheckedSubmitBody { - bytes transactionBytes = 1; // The serialized bytes of the Transaction to be submitted without prechecks -}