diff --git a/.coderabbit.yaml b/.coderabbit.yaml index 7f3afb755..f3f8a3275 100644 --- a/.coderabbit.yaml +++ b/.coderabbit.yaml @@ -18,7 +18,6 @@ reviews: in_progress_fortune: false # Do not stall time with a message (spammy) poem: false # Do not write a literal poem (spammy) enable_prompt_for_ai_agents: false # Disable prompts for AI agents (spammy) - # TOKEN REVIEW INSTRUCTIONS token_review_instructions: &token_review_instructions | You are acting as a senior maintainer reviewing token-related code @@ -291,6 +290,71 @@ reviews: - Do NOT block the PR on them. - Do NOT suggest fixes inline. - Instead, aggregate all out-of-scope issues into a single comment with a list of recommendations for one or more follow-up issues that can be created. + + PROTOCOL SOURCE OF TRUTH + + The generated protobuf Python modules in this repository + (files ending in `_pb2.py`, `_pb2.pyi`, `_pb2_grpc.py`) + represent the authoritative contract of what the + network accepts. + + Treat them as LAW for responses sent to the network. + + They are the compiled form of the `.proto` definitions and + define the exact: + + - message structures + - nesting + - enums + - presence semantics + - types + + These files define wire format and contractual requirements — + not SDK architecture. + + ------------------------------------------------------------------ + MANDATORY PROTO VERIFICATION + ------------------------------------------------------------------ + + When reviewing any change that: + + - constructs a protobuf message + - converts SDK objects to/from protobuf + - reads values from protobuf + - writes values into protobuf + + you MUST: + + 1. Locate the corresponding message or service in the generated modules. + 2. Compare SDK ↔ protobuf field mappings. + 3. Verify: + + - field names match exactly (should) + - optional vs presence handling matches + - defaults are not silently altered + - enums map correctly + - no field is invented or dropped + + 4. Confirm required identifiers are validated BEFORE proto construction. + + If you did not perform this inspection, + you are NOT allowed to produce feedback. + + ------------------------------------------------------------------ + WHAT CONSTITUTES A DEFECT + ------------------------------------------------------------------ + + Report ONLY problems that cause: + + - wire incompatibility + - incorrect or missing data transmission + - presence/absence errors + - semantic divergence from protobuf + - API or behavioral breakage + + If protobuf alignment is correct, + a confirmation statement is expected. + path_instructions: # --- CODEOWNERS REVIEW INSTRUCTIONS --- - path: ".github/CODEOWNERS" diff --git a/.gitignore b/.gitignore index c85306d25..cdf0a2a49 100644 --- a/.gitignore +++ b/.gitignore @@ -17,7 +17,6 @@ myenv/ # Generated protobuf files .protos -src/hiero_sdk_python/hapi # VS Code settings .vscode/ diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 000000000..e69de29bb diff --git a/CHANGELOG.md b/CHANGELOG.md index 3b56c8dad..2dcfcecad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -153,17 +153,9 @@ This changelog is based on [Keep a Changelog](https://keepachangelog.com/en/1.1. - Replaced the docstring in `entity_id_helper.py` with one that is correct. (#1623) ### Changed -- Refactored `setup_client()` in all `examples/query/` files to use `Client.from_env()` for simplified client initialization (#1449) -- Updated return of to_bytes function in `src/hiero_sdk_python/transaction/transaction.py`. (#1631) -- Added missing return type `src/hiero_sdk_python/utils/entity_id_helper.py`. (#1622) -- Update `verify_freeze()` to treat only ACCOUNT_FROZEN_FOR_TOKEN as a successful freeze verification (#1515) -- Updated team.md with new triage, committers and maintainer (#1692) -- Removed outdated "Common Issues" section from CONTRIBUTING.md that referenced non-existent docs/common_issues.md (`#1665`) -- Hide the commit verification bot marker in pull request comments. -- Added missing type hints to sign method in Transaction class (#1630) -- Refactored `examples/consensus/topic_create_transaction.py` to use `Client.from_env()` (#1611) -- Updated GitHub Actions setup-node action to v6.2.0. +- Refactored AccountInfo class to use the staking_info(#1366) - chore: format tests/unit/mock_server.py with black (#1542) +- Refactored AccountInfo class to use the staking_info - Updated actions/checkout to v6.0.1 and actions/github-script v8.0.0 in bot-next-issue-recommendation workflow (#1586) - Expanded inactivity bot messages to include `/unassign` command information for contributors (#1555) - Update the acceptance criteria wording in the issue templates to improve clarity and consistency for contributors (#1491) diff --git a/proto/address_book_service.proto b/proto/address_book_service.proto new file mode 100644 index 000000000..dd1730f51 --- /dev/null +++ b/proto/address_book_service.proto @@ -0,0 +1,152 @@ +/** + * # Address Book Service API + * GRPC service definitions for the Hedera Address Book Service (HABS). + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package + +import "transaction_response.proto"; +import "transaction.proto"; + +/** + * The Address Book service provides the ability for Hedera network node + * administrators to add, update, and remove consensus nodes. This addition, + * update, or removal of a consensus node requires governing council approval, + * but each node operator may update their own operational attributes without + * additional approval, reducing overhead for routine operations. + * + * Most operations are `privileged operations` and require governing council + * approval. + * + * ### For a node creation transaction. + * - The node operator SHALL create a `createNode` transaction. + * - The node operator MUST sign this transaction with the `Key` + * set as the `admin_key` for the new `Node`. + * - The node operator SHALL deliver the signed transaction to the Hedera + * council representative. + * - The Hedera council representative SHALL arrange for council members to + * review and sign the transaction. + * - Once sufficient council members have signed the transaction, the + * Hedera council representative SHALL submit the transaction to the + * network. + * - Upon receipt of a valid and signed node creation transaction the network + * software SHALL + * - Validate the threshold signature for the Hedera governing council + * - Validate the signature of the `Key` provided as the new `admin_key` + * for the `Node`. + * - Create the new node in state, this new node SHALL NOT be active in the + * network at this time. + * - When executing the next `freeze` transaction with `freeze_type` set to + * `PREPARE_UPGRADE`, update network configuration and bring the + * new node to an active status within the network. The node to be added + * SHALL be active in the network following this upgrade. + * + * ### For a node deletion transaction. + * - The node operator or Hedera council representative SHALL create a + * `deleteNode` transaction. + * - If the node operator creates the transaction + * - The node operator MUST sign this transaction with the `Key` + * set as the `admin_key` for the existing `Node`. + * - The node operator SHALL deliver the signed transaction to the Hedera + * council representative. + * - The Hedera council representative SHALL arrange for council members to + * review and sign the transaction. + * - Once sufficient council members have signed the transaction, the + * Hedera council representative SHALL submit the transaction to the + * network. + * - Upon receipt of a valid and signed node deletion transaction the network + * software SHALL + * - Validate the signature for the Hedera governing council + * - Remove the existing node from network state. The node SHALL still + * be active in the network at this time. + * - When executing the next `freeze` transaction with `freeze_type` set to + * `PREPARE_UPGRADE`, update network configuration and remove the + * node to be deleted from the network. The node to be deleted SHALL NOT + * be active in the network following this upgrade. + * + * ### For a node update transaction. + * - The node operator SHALL create an `updateNode` transaction. + * - The node operator MUST sign this transaction with the active `key` + * assigned as the `admin_key`. + * - The node operator SHALL submit the transaction to the + * network. Hedera council approval SHALL NOT be sought for this + * transaction + * - Upon receipt of a valid and signed node update transaction the network + * software SHALL + * - If the transaction modifies the value of the "node account", + * - Validate the signature of the active `key` for the account + * assigned as the _current_ "node account". + * - Validate the signature of the active `key` for the account to be + * assigned as the _new_ "node account". + * - Modify the node information held in network state with the changes + * requested in the update transaction. The node changes SHALL NOT be + * applied to network configuration, and SHALL NOT affect network + * operation at this time. + * - When executing the next `freeze` transaction with `freeze_type` set to + * `PREPARE_UPGRADE`, update network configuration according to the + * modified information in network state. The requested changes SHALL + * affect network operation following this upgrade. + */ +service AddressBookService { + /** + * A transaction to create a new consensus node in the network + * address book. + *

+ * This transaction, once complete, SHALL add a new consensus node to the + * network state.
+ * The new consensus node SHALL remain in state, but SHALL NOT participate + * in network consensus until the network updates the network configuration. + *

+ * Hedera governing council authorization is REQUIRED for this transaction. + */ + rpc createNode (proto.Transaction) returns (proto.TransactionResponse); + + /** + * A transaction to remove a consensus node from the network address + * book. + *

+ * This transaction, once complete, SHALL remove the identified consensus + * node from the network state. + *

+ * Hedera governing council authorization is REQUIRED for this transaction. + */ + rpc deleteNode (proto.Transaction) returns (proto.TransactionResponse); + + /** + * A transaction to update an existing consensus node from the network + * address book. + *

+ * This transaction, once complete, SHALL modify the identified consensus + * node state as requested. + *

+ * This transaction is authorized by the node operator + */ + rpc updateNode (proto.Transaction) returns (proto.TransactionResponse); +} diff --git a/proto/basic_types.proto b/proto/basic_types.proto new file mode 100644 index 000000000..edf1496a5 --- /dev/null +++ b/proto/basic_types.proto @@ -0,0 +1,2457 @@ +/** + * # Basic Types + * Fundamental message types used across transactions and state as field types. + * + * ### Requirements for identifier values + * - Most entities in the network SHALL be identified by a multi-part + * identifier. These identifier values SHALL consist of a shard, a realm, and + * an entity identifier. + * - Shard, Realm, and Entity Number MUST all be whole numbers. + * - A Shard SHALL be globally unique. + * - A Realm MAY be reused between shards, but SHALL be unique within a shard. + * - An Entity Number MAY be reused between shards and realms, but SHALL be + * unique within each combination of shard and realm. + * - Every object (e.g. account, file, token, etc...) SHALL be scoped to exactly + * one realm and shard. Thus a File has a FileID, a numeric triplet, such as + * 0.0.2 for shard 0, realm 0, entity 2. + * - Identifier values SHOULD use an Entity Number as the third component of the + * identifier. Some, however, MAY use alternative or composite values for the + * Entity portion of the three part identifier. Any such alternative or + * composite value MUST be unique within that shard and realm combination. + * - The entity portion of the identifier, regardless of type, MUST be unique + * within that realm and shard combination and MAY be globally unique. + * - The triplet of shard.realm.entity MUST be globally unique, even across + * different identifier types. + * - Each realm SHALL maintain a single counter for entity numbers, so if there + * is an identifier with value 0.1.2, then there MUST NOT be an identifier + * with value 0.1.2 for any other object. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +import "google/protobuf/wrappers.proto"; + +option java_package = "com.hederahashgraph.api.proto.java"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +/** + * A shard identifier.
+ * A shard is a partition of nodes running the network that processes + * transactions separately from other shards. Each shard is effectively an + * independent instance of the overall network that shares the same virtual + * distributed ledger, and may gossip cross-shard transactions with other + * shards to maintain overall correct processing of the ledger. + */ +message ShardID { + /** + * A whole number shard identifier. + */ + int64 shardNum = 1; +} + +/** + * A realm identifier.
+ * Within a given shard, every realm has a unique numeric identifier. + * Each account, file, and contract instance belongs to exactly one realm. + */ +message RealmID { + /** + * A whole number shard identifier. + */ + int64 shardNum = 1; + + /** + * A whole number realm identifier. + */ + int64 realmNum = 2; +} + +/** + * Unique identifier for a token.
+ * As with all entity identifiers within the network, a token identifier + * consists of a combination of shard number, realm number, and entity number. + * Each of these numbers is unique within its scope (shard > realm > entity). + */ +message TokenID { + /** + * A whole number shard identifier. + */ + int64 shardNum = 1; + + /** + * A whole number realm identifier. + */ + int64 realmNum = 2; + + /** + * A whole number token identifier. + */ + int64 tokenNum = 3; +} + +/** + * A specific hash algorithm. + * + * We did not reuse Record Stream `HashAlgorithm` here because in all cases, + * currently, this will be `SHA2_384` and if that is the default value then + * we can save space by not serializing it, whereas `HASH_ALGORITHM_UNKNOWN` + * is the default for Record Stream `HashAlgorithm`. + * + * Note that enum values here MUST NOT match the name of any other enum value + * in the same `package`, as protobuf follows `C++` scope rules and all enum + * _names_ are treated as global constants within the `package`. + */ +enum BlockHashAlgorithm { + /** + * A SHA2 algorithm SHA-384 hash. + *

+ * This is the default value, if a field of this enumerated type is + * not set, then this is the value that will be decoded when the + * serialized message is read. + */ + SHA2_384 = 0; +} + +/** + * A unique identifier for an Hedera account. + * + * An account identifier is of the form `shard.realm.[number|alias]`.
+ * The identifier MAY use the alias form when transferring HBAR to a public key + * before the account for that key is created, when only the alias value is + * known, or in some smart contracts that use the EVM address style alias to + * refer to Accounts.
+ * When the account entry is completed, the alias SHALL be stored separately in + * the Account record, and the identifier in the Account SHALL use the + * `accountNum` form. + * + * --- + * ### Additional Notes + * + * #### Alias + * There is considerable complexity with `alias` (aka `evm_address`) for + * Accounts. Much of this comes from the existence of a "hidden" alias for + * almost all accounts, and the reuse of the alias field for both EVM reference + * and "automatic" account creation.
+ * For the purposes of this specification, we will use the following terms for + * clarity. + * - `key_alias`
+ * The account public key as a protobuf serialized message and used for + * auto-creation and subsequent lookup. This is only valid if the account + * key is a single `primitive` key, either Ed25519 or ECDSA_SECP256K1. + * - `evm_address`
+ * Exists for every account and is one of + * - `contract_address`
+ * The 20 byte EVM address prescribed by `CREATE` or `CREATE2` + * - `evm_key_address`
+ * An arbitrary 20 byte EVM address that, for a usable externally owned + * account (EOA) SHALL be the rightmost 20 bytes of the Keccak-256 hash + * of a ECDSA_SECP256K1 key.
+ * Such accounts may be created in one of three ways: + * - Sending hbar or fungible tokens to an unused + * ECDSA_SECP256K1 key alias. + * - Sending hbar or fungible tokens to an unassigned 20-byte + * EVM address. + * - Submitting a `CryptoCreate` signed with the corresponding + * private key. + * - `long_zero`
+ * A synthetic 20 byte address inferred for "normally" created accounts. + * It is constructed from the "standard" AccountID as follows. + * 1. 4 byte big-endian shard number + * 1. 8 byte big-endian realm number + * 1. 8 byte big-endian entity number
+ * + * The `alias` field in the `Account` message SHALL contain one of four values + * for any given account. + * - The `key_alias`, if the account was created by transferring HBAR to the + * `key_alias` public key value. + * - The `evm_key_address` if the account was created from an EVM public key + * - The `contract_address` if the account belongs to an EVM contract + * - Not-Set/null/Bytes.EMPTY (collectively `null`) if the account was + * created normally + * + * If the `alias` field of an `Account` is any form of `null`, then the account + * MAY be referred to by `alias` in an `AccountID` by using the `long_zero` + * address for the account.
+ * This "hidden default" alias SHALL NOT be stored, but is synthesized by the + * node software as needed, and may be synthesized by an EVM contract or client + * software as well. + * + * --- + * + * #### Alias forms + * An `AccountID` in a transaction MAY reference an `Account` with + * `shard.realm.alias`.
+ * If the account `alias` field is set for an Account, that value SHALL be the + * account alias.
+ * If the account `alias` field is not set for an Account, the `long_zero` alias + * SHALL be the account alias. + */ +message AccountID { + /** + * A whole number shard identifier. + */ + int64 shardNum = 1; + + /** + * A whole number realm identifier. + */ + int64 realmNum = 2; + + oneof account { + /** + * A whole number account number, unique within its realm and shard. + *

+ * For any AccountID fields in the query response, transaction records, + * transaction receipts, or block stream `accountNum` MUST be used. + */ + int64 accountNum = 3; + + /** + * An alias value.
+ * Alias is a value used in some contexts to refer to an account when + * account number is not available, and may be an alias public key, or + * an EVM address. + */ + bytes alias = 4; + } +} + +/** + * An identifier for a unique token (or "NFT"), used by both contract + * and token services. + */ +message NftID { + /** + * A token identifier.
+ * This token represents the collection containing this NFT. + */ + TokenID token_ID = 1; + + /** + * A unique serial number.
+ * This serial number is unique within its token type. + */ + int64 serial_number = 2; +} + +/** + * An identifier for a File within the network. + */ +message FileID { + /** + * A whole number shard identifier. + */ + int64 shardNum = 1; + + /** + * A whole number realm identifier. + */ + int64 realmNum = 2; + + /** + * A whole number file identifier, unique within its realm and shard. + */ + int64 fileNum = 3; +} + +/** + * An identifier for a smart contract within the network. + */ +message ContractID { + /** + * A whole number shard identifier. + */ + int64 shardNum = 1; + + /** + * A whole number realm identifier. + */ + int64 realmNum = 2; + + oneof contract { + /** + * A whole number contract identifier, unique within its realm and shard. + */ + int64 contractNum = 3; + + /** + * A 20-byte EVM address of the contract to call. + *

+ * A contract created via a HAPI `ContractCreate` call SHALL have + * an EVM address determined by its `shard.realm.num` identifier.
+ * This address is as follows + *

    + *
  1. 4 byte big-endian shard number
  2. + *
  3. 8 byte big-endian realm number
  4. + *
  5. 8 byte big-endian contract number
  6. + *
+ * This address is not stored in state, but is computed when needed. + *

+ * Contracts created by any other means, including a HAPI + * `EthereumTransaction` whose `to` address is the zero address, + * SHALL have the EVM address prescribed by the `CREATE` or + * `CREATE2` opcode, as applicable. + */ + bytes evm_address = 4; + } +} + +/** + * An unique identifier for a topic.
+ * Topics are part of the consensus service, messages are published to a topic. + */ +message TopicID { + /** + * A whole number shard identifier. + */ + int64 shardNum = 1; + + /** + * A whole number realm identifier. + */ + int64 realmNum = 2; + + /** + * A whole number topic identifier, unique within its realm and shard. + */ + int64 topicNum = 3; +} + +/** + * An unique identifier for a Schedule + */ +message ScheduleID { + /** + * A whole number shard + */ + int64 shardNum = 1; + + /** + * A whole number realm + */ + int64 realmNum = 2; + + /** + * A whole number schedule, unique within its realm and shard + */ + int64 scheduleNum = 3; +} + +/** + * A transaction identifier.
+ * This is used for retrieving receipts and records for a transaction + * and internally by the network for detecting when duplicate transactions are + * submitted. + * + * A transaction may be processed more reliably by submitting it to + * several 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 SHALL NOT be executed (and SHALL result in a + * `DUPLICATE_TRANSACTION` response).
+ * Multiple submission increase reliability on the assumption that an error in, + * for example, network connectivity will not affect all nodes equally. Latency + * might be slightly lower, if one node is handling intake significantly slower + * than others, for example. The base transaction fee is required for each + * submission, however, so the total fees charged are significantly higher when + * using this approach. + * + * ### Requirements + * Each transaction identifier MUST be unique.
+ * Multiple transactions MAY be submitted with the same transaction + * identifier, but all except the first SHALL be rejected as duplicate + * transactions.
+ * An identifier MUST specify a `payer` account to be charged all fees + * associated with the transaction.
+ * The `payer` account MUST exist and MUST have sufficient HBAR to pay all + * transaction fees.
+ * An identifier MUST specify a "valid start time".
+ * The "valid start time" MUST be strictly _earlier_ than the current + * network consensus time when submitted.
+ * The "valid start time" MUST NOT be more than `transaction.maxValidDuration` + * seconds before the current network consensus time when submitted.
+ * A client-submitted transaction MUST NOT set the `scheduled` flag. + * + * ### Additional Notes + * + * Additional items applicable to Scheduled Transactions: + * + * - The ID of a Scheduled Transaction, once executed, SHALL inherit both + * `transactionValidStart` and `accountID` from the `ScheduleCreate` + * transaction that created the schedule. + * - The `scheduled` property SHALL be set for Scheduled Transactions. + */ +message TransactionID { + /** + * A timestamp for the transaction start time.
+ * This is the earliest expected start time for this transaction. + *

+ * This value MUST be strictly less than `consensusTimestamp` when the + * transaction is submitted. + */ + Timestamp transactionValidStart = 1; + + /** + * An Account identifier. + *

+ * The identified account SHALL pay transaction fees for this transaction. + */ + AccountID accountID = 2; + + /** + * A scheduled transaction flag.
+ * If set, this transaction represents the execution of a Schedule after + * all necessary signatures are gathered. + *

+ * This flag MUST NOT be set in a user-submitted transaction. + */ + bool scheduled = 3; + + /** + * An identifier for an internal transaction.
+ * An internal transaction is one that was spawned as part of handling a + * user transaction. These internal transactions share the + * transactionValidStart and accountID of the user transaction, so a nonce + * is necessary to give them a unique TransactionID. + *

+ * An example is when a "parent" ContractCreate or ContractCall transaction + * calls one or more HTS precompiled contracts; each of the "child" + * transactions spawned for a precompile has a transaction id with a + * different nonce. + *

+ * This value MUST be unset for user-submitted transactions. + */ + int32 nonce = 4; +} + +/** + * An account, and the amount that it sends or receives during a token transfer. + * + * This message is only relevant to fungible/common token transfers. + * Non-fungible/unique (NFT) token transfers MUST use the NftTransfer message. + */ +message AccountAmount { + /** + * An account identifier that will send or receive token(s). + */ + AccountID accountID = 1; + + /** + * An amount to send (negative) or receive (positive). + *

+ * This amount MUST be denominated in the smallest unit of the relevant + * token.
+ * For HBAR this SHALL be tinybar (10-8 HBAR).
+ * For other fungible/common tokens this SHALL depend on the value of + * `decimals` for that token. + */ + sint64 amount = 2; + + /** + * An approved allowance flag.
+ * If true then the transfer is expected to be an approved allowance. + *

+ * If set, `accountID` SHALL be the owner that previously approved + * the allowance.
+ * The default value SHALL be false (unset). + */ + bool is_approval = 3; +} + +/** + * A list of accounts and amounts to transfer. + * + * Each `AccountAmount` SHALL specify the account and the amount to + * send(negative) or receive(positive).
+ * Each `TransferList` SHALL be contained in another message that contains + * other details required to complete a transfer. This is typically a + * `CryptoTransferTransactionBody` or `TransactionRecord`.
+ * The `TransferList` SHALL only be used for HBAR transfers. Other token types + * MUST use the `TokenTransferList` message. + */ +message TransferList { + /** + * A list of AccountAmount pairs.
+ * Each entry in this list is an account and an amount to transfer + * into it (positive) or out of it (negative) + */ + repeated AccountAmount accountAmounts = 1; +} + +/** + * A NFT transfer.
+ * This refers to a sender account, a receiver account, and the serial number + * of an NFT to transfer from sender to receiver. + * + * Each `NftTransfer` SHALL be contained in another message (typically + * `TokenTransferList`) that details which `Token` type applies to this NFT + * transfer. + */ +message NftTransfer { + /** + * An Account identifier for the sender. + */ + AccountID senderAccountID = 1; + + /** + * An Account identifier for the receiver. + */ + AccountID receiverAccountID = 2; + + /** + * A serial number for the NFT to transfer. + */ + int64 serialNumber = 3; + + /** + * An approved allowance flag.
+ * If true then the transfer is expected to be an approved allowance. + *

+ * If set, `senderAccountID` SHALL be the owner that previously approved + * the allowance.
+ * If set, the `senderAccountID` MUST be the "payer" account for + * the transaction
+ * The default value SHALL be false (unset). + */ + bool is_approval = 4; +} + +/** + * A list of transfers for a particular (non-HBAR) token type. + * + * A `TokenTransferList` applies to a single token type, but may contain many + * individual transfers.
+ * Each transfer of a fungible/common token MUST specify an `accountID` and + * `amount`. Amount SHALL be positive when the account receives tokens, and + * SHALL be negative when the account sends tokens. The amount SHOULD NOT be + * `0`.
+ * In a transfer list containing fungible/common tokens in the `transfers` + * list, the sum of all such transfers MUST be zero (`0`). + * Each transfer of a unique token SHALL specify both sender and receiver, as + * well as the serial number transferred.
+ * A single `TokenTransferList` MUST contain `transfers` or `nftTransfers`, + * but MUST NOT contain both. + */ +message TokenTransferList { + /** + * A token identifier.
+ * This is the token to be transferred. + */ + TokenID token = 1; + + /** + * A list of account amounts. + *

+ * Each entry SHALL have an account and amount.
+ * These transfers SHALL be "double-entry" style; the credits (positive + * amount) and debits (negative amount) MUST sum to 0, unless this + * transfer list is part of a `mint` or `burn` operation.
+ * This SHALL be be set for fungible/common tokens and MUST be + * empty otherwise. + */ + repeated AccountAmount transfers = 2; + + /** + * A list of NftTransfers. + *

+ * Each entry SHALL have a sender and receiver account, and the + * serial number of the unique token to transfer.
+ * This SHALL be be set for non-fungible/unique tokens and SHALL be + * empty otherwise. + */ + repeated NftTransfer nftTransfers = 3; + + /** + * An expected decimal precision.
+ * This is the number of decimals a fungible/common token type is + * _expected_ to have. + *

+ * The transfer SHALL fail with response code `UNEXPECTED_TOKEN_DECIMALS` + * if this is set and the actual decimals specified for the `Token` differ + * from this value.
+ * If `nftTransfers` is set, then this value SHOULD NOT be set. + */ + google.protobuf.UInt32Value expected_decimals = 4; +} + +/** + * A rational number.
+ * A common use is to set the amount of a value transfer to collect as a + * custom fee. + * + * It is RECOMMENDED that both numerator and denominator be no larger than + * necessary to express the required fraction. A very large numerator, in + * particular, may not be reliable. + * Both fields are REQUIRED and SHOULD be positive integers. + */ +message Fraction { + /** + * A fractional number's numerator. + */ + int64 numerator = 1; + + /** + * A fractional number's denominator. + *

+ * A zero value SHALL fail with response code `FRACTION_DIVIDES_BY_ZERO`. + */ + int64 denominator = 2; +} + +/** + * Possible Token Types (IWA Compatibility). + * + * Apart from fungible and non-fungible, Tokens can have either a common or + * unique representation. Furthermore, tokens can have intrinsic or referential + * value, and can be whole and indivisible or fractional.
+ * These distinction might seem subtle, but it is important when considering + * how tokens can be traced, used, transferred, and if they can have isolated + * unique properties. + * + * A few examples (these may not match enumerations below) using IWA taxonomy. + *

+ *
fungible, whole, intrinsic, unique
+ *
Physical fiat currency
+ *
fungible, fractional, intrinsic, common
+ *
bank balance fiat currency
+ *
non-fungible, fractional, reference, unique
+ *
"mutual" collectible/art/property ownership
+ *
non-fungible, whole, intrinsic, unique
+ *
Physical work of fine art
+ *
non-fungible, whole, reference, unique
+ *
Registered property title
+ *
+ */ +enum TokenType { + /** + * A fungible/common token.
+ * Tokens of this type are interchangeable with one another, where any + * quantity of tokens has the same value as another equal quantity, if + * they are in the same class. Tokens share a single set of properties, + * and are not distinct from one another. Ownership is represented as a + * balance or quantity associated to a given account. Tokens may be + * divided into fractional tokens, within reasonable limits. + *

+ * IWA taxonomy _fungible, fractional, intrinsic, common_ + */ + FUNGIBLE_COMMON = 0; + + /** + * A non-fungible/unique token.
+ * Tokens of this type are unique, and are not interchangeable with other + * tokens of the same type. Each token carries a serial number which is + * unique for that token, these tokens may have a different trade value + * for each individual token. The tokens are individually accounted and + * often carry additional unique properties. Tokens cannot be subdivided, + * and value is related to what the individual token represents. + *

+ * IWA taxonomy _non-fungible, whole, reference, unique_ + */ + NON_FUNGIBLE_UNIQUE = 1; +} + +/** + * A transaction sub type.
+ * This enumeration enables a set of transaction base fees to be broadly + * defined for a type of operation and also be modified, when necessary, + * based on specifics of the operation. + * + * ### Explanation + * The resource cost for a TokenMint operation is different between minting + * fungible/common and non-fungible/unique tokens. This `enum` is used to + * "mark" a cost as applying to one or the other.
+ * Similarly, the resource cost for a basic `tokenCreate` without a custom + * fee schedule may yield a _base_ fee of $1. The resource cost for a + * `tokenCreate` _with_ a custom fee schedule is different and may yield a + * _base_ fee of $2 or more. + */ +enum SubType { + /** + * The resource cost for the transaction type has no additional attributes + */ + DEFAULT = 0; + + /** + * The resource cost for the transaction type includes an operation on a + * fungible/common token + */ + TOKEN_FUNGIBLE_COMMON = 1; + + /** + * The resource cost for the transaction type includes an operation on + * a non-fungible/unique token + */ + TOKEN_NON_FUNGIBLE_UNIQUE = 2; + + /** + * The resource cost for the transaction type includes an operation on a + * fungible/common token with a custom fee schedule + */ + TOKEN_FUNGIBLE_COMMON_WITH_CUSTOM_FEES = 3; + + /** + * The resource cost for the transaction type includes an operation on a + * non-fungible/unique token with a custom fee schedule + */ + TOKEN_NON_FUNGIBLE_UNIQUE_WITH_CUSTOM_FEES = 4; + + /** + * The resource cost for the transaction type includes a ScheduleCreate + * containing a ContractCall. + */ + SCHEDULE_CREATE_CONTRACT_CALL = 5; + + /** + * The resource cost for the transaction type includes a TopicCreate + * with custom fees. + */ + TOPIC_CREATE_WITH_CUSTOM_FEES = 6; + + /** + * The resource cost for the transaction type includes a ConsensusSubmitMessage + * for a topic with custom fees. + */ + SUBMIT_MESSAGE_WITH_CUSTOM_FEES = 7; +} + +/** + * Possible Token Supply Types (IWA Compatibility). + * + * This `enum` indicates the limit of tokens that can exist during the + * lifetime of a token definition. The "infinite" supply is only theoretically + * infinite, as it is still limited to the magnitude of a 64-bit signed + * integer. A "finite" supply is further limited to a value specified when + * the token is created (or updated, if not immutable). + */ +enum TokenSupplyType { + /** + * An unlimited supply.
+ * This indicates that tokens of this type have an upper bound of + * Long.MAX_VALUE.
+ * The supply is accounted in the smallest units of the token + * (i.e. 10-`decimals` whole tokens) + */ + INFINITE = 0; + + /** + * A limited supply.
+ * This indicates that tokens of this type have an upper bound of + * `maxSupply`.
+ * The maximum supply SHALL be provided on token creation, but MAY be + * changed thereafter if the token has an `admin_key` set. + */ + FINITE = 1; +} + +/** + * Types of validation strategies for token keys. + */ +enum TokenKeyValidation { + /** + * Perform all token key validations.
+ * This is the default value and behavior. + */ + FULL_VALIDATION = 0; + + /** + * Perform no validations at all for all passed token keys. + */ + NO_VALIDATION = 1; +} + +/** + * Possible token freeze status values. + * + * This is returned by `TokenGetInfoQuery` or `CryptoGetInfoResponse` + * in `TokenRelationship`. + */ +enum TokenFreezeStatus { + /** + * The token does not support freeze or cannot be frozen for the designated + * account.
+ * Typically this indicates that the token does not have a `freeze_key` set. + */ + FreezeNotApplicable = 0; + + /** + * The token is currently frozen for the designated account. + */ + Frozen = 1; + + /** + * The token is not currently frozen for the designated account. + */ + Unfrozen = 2; +} + +/** + * Possible token "KYC" status values. + * + * This is returned by `TokenGetInfoQuery` or `CryptoGetInfoResponse` + * in `TokenRelationship`. + */ +enum TokenKycStatus { + /** + * The token does not support KYC or cannot grant KYC for the + * designated account.
+ * Typically this indicates that the token does not have a `kyc_key` set. + */ + KycNotApplicable = 0; + + /** + * The designated account is currently granted KYC status for the + * designated token. + */ + Granted = 1; + + /** + * The designated account is not currently granted KYC status for the + * designated token. + */ + Revoked = 2; +} + +/** + * Possible Pause status values. + * + * This is returned by `TokenGetInfoQuery` in `TokenRelationship`. + */ +enum TokenPauseStatus { + /** + * The token does not support pause or cannot be paused.
+ * Typically this indicates that the token does not have a `pause_key` set. + */ + PauseNotApplicable = 0; + + /** + * The token is currently paused. + */ + Paused = 1; + + /** + * The token is not currently paused. + */ + Unpaused = 2; +} + +/** + * A Key is an entity representing one or more cryptographic public/private key + * pairs and, optionally, the structure for how multiple signatures may be + * composed to meet complex multiple-signature authorization requirements. + * + * A Key can be a public key from either the Ed25519 or ECDSA(secp256k1) + * signature schemes. In the ECDSA(secp256k1) case we require the 33-byte + * compressed form of the public key. For simplicity, we call these + * cryptographic public keys `primitive` keys.
+ * If an entity has a primitive key associated to it, then the corresponding + * private key must sign any transaction to send tokens or perform other + * actions requiring authorization. + * + * A Key can also be the ID of a smart contract, which SHALL authorize that + * contract to execute any system contract with signing requirements that are + * met by the key.
+ * > Example + * >> If account `0.0.A` has a threshold key whose threshold is satisfied + * >> by a contract ID key for contract `0.0.C`, then when `0.0.C` is called, + * >> it is authorized to use system contracts to manage any asset owned by + * >> `0.0.A`. If the contract ID key is "delegatable", then `0.0.C` can even + * >> perform these actions when running code accessed via `DELEGATECALL`. + * + * A Key can be a "threshold key", which is a list of N keys, any M of which + * may sign in order for the signature to be considered valid. The value of + * M for a given threshold key MUST be less than or equal to N. A threshold + * key is sometimes called a "M-of-N" key. + * + * A Key can be a "key list" where all keys in the list must sign unless + * specified otherwise in the documentation for a specific transaction + * type (e.g. FileDeleteTransactionBody).
+ * This implies that the use of a key list is dependent on context. For + * example, an Hedera file that is created with a list of keys, SHALL require + * that all of those keys must sign a transaction to create or modify the file, + * but only one key from that list MUST sign a transaction to delete the file. + * So it is a single list that sometimes acts as a N-of-N threshold key, and + * sometimes acts as a 1-of-N threshold key.
+ * To reduce confusion this may cause, a key list SHALL always be considered + * N-of-N, unless specified otherwise in official documentation.
+ * A key list MAY have repeated primitive public keys, but the signature + * requirement for all keys in a repeated set SHALL be satisfied by a single + * valid signature. There is no mechanism to require a single key to sign a + * single transaction more than once. + * + * Any list or threshold key MAY have nested key lists or threshold keys. + * This allows, for example, the keys within a threshold signature to + * themselves be threshold, list, contract, or primitive keys. This nesting + * structure enables complex asymmetric multi-party signature requirements to + * be met. + * + * To ensure adequate performance and transaction security, key nesting is + * limited to at most fifteen(15) levels. + */ +message Key { + oneof key { + /** + * A smart contract instance that is authorized implicitly. + *

+ * This key type SHALL require that the code in the active message frame + * belong to the contract with the given id. + */ + ContractID contractID = 1; + + /** + * An array of Ed25519 public key bytes. + */ + bytes ed25519 = 2; + + /** + * This option is not currently supported.
+ * An array of RSA-3072 public key bytes. + */ + bytes RSA_3072 = 3 [deprecated = true]; + + /** + * This option is not currently supported.
+ * An array of ECDSA, using the p-384 curve, public key bytes. + */ + bytes ECDSA_384 = 4 [deprecated = true]; + + /** + * A threshold, M, combined with a list of N keys, any M of which are + * sufficient to form a valid signature. + */ + ThresholdKey thresholdKey = 5; + + /** + * A list of keys. This may be treated like a "N-of-N" threshold key, + * as a component of another key, or in some other manner as documented. + */ + KeyList keyList = 6; + + /** + * A set of compressed ECDSA(secp256k1) public key bytes.
+ * This is an EVM compatibility format. + */ + bytes ECDSA_secp256k1 = 7; + + /** + * A smart contract that, if the recipient of the active message frame, + * SHALL be imputed authorization.
+ * Setting this key type is a more permissive version of setting a + * contractID key. + *

+ * This key form SHALL NOT strictly require that the code being executed + * in the frame belong to the given contract. The code in frame MAY be + * running another contract via a `delegatecall`. + */ + ContractID delegatable_contract_id = 8; + } +} + +/** + * A threshold value and a list of public keys that, together, form a threshold + * signature requirement. Any subset of the keys in the list may satisfy the + * signature requirements of this type of key, provided the number of keys meets + * or exceeds the threshold. For example, if a particular key has a threshold of + * three(3) and eight(8) keys in the list, then any three(3) signatures, from + * the list of eight(8), is sufficient to authorize that key. + * + * For threshold purposes, all signatures from a single `primitive` key are + * considered a single signature, so that signature(s) from a single key SHALL + * NOT _directly_ meet a threshold greater than one(1). + * + * #### Note + * > It is possible to construct a complex key structure that _would_ enable a + * > single primitive key to successfully meet a threshold requirement. All + * > threshold keys SHOULD be carefully audited to ensure no one `primitive` + * > key, or smart contract, has disproportionate capability. + */ +message ThresholdKey { + /** + * A transaction MUST have valid signatures from at least this number of + * separate keys, from the `keys` list to be authorized by this key. + */ + uint32 threshold = 1; + + /** + * A list of the keys that MAY satisfy signature requirements of this key. + */ + KeyList keys = 2; +} + +/** + * A list of keys.
+ * A `KeyList` requires all keys (N-of-N) to sign, unless otherwise + * specified in official documentation. A KeyList may contain repeated keys, + * but all such repeated keys are considered a single key when determining + * signature authorization. + * + * ### Additional Notes + * 1. An empty key list is the "standard" mechanism to represent an + * unassigned key. For example, if the `admin_key` of a token is set + * to the empty key list, then that token has no admin key, and + * functionality that requires an admin key to sign the + * transaction is disabled. + */ +message KeyList { + /** + * A list of keys. All values in this list SHALL be non-null. + *

+ */ + repeated Key keys = 1; +} + +/** + * This message is deprecated and MUST NOT be used to communicate with + * network nodes. It is retained here only for historical reasons. + * + * Client software MUST NOT include this message in any request.
+ * Compliant nodes SHALL NOT accept any request containing this message. + * + * Please use the `SignaturePair` and `SignatureMap` messages instead of + * this message. + */ +message Signature { + option deprecated = true; + + oneof signature { + /** + * Smart contract virtual signature (always length zero). + */ + bytes contract = 1; + + /** + * Ed25519 signature bytes. + */ + bytes ed25519 = 2; + + /** + * RSA-3072 signature bytes. + */ + bytes RSA_3072 = 3; + + /** + * ECDSA p-384 signature bytes. + */ + bytes ECDSA_384 = 4; + + /** + * 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. + */ + ThresholdSignature thresholdSignature = 5; + + /** + * A list of M signatures, each corresponding to a Key in a KeyList + * of the same length. + */ + SignatureList signatureList = 6; + } +} + +/** + * This message is deprecated and MUST NOT be used to communicate with network + * nodes. It is retained here only for historical reasons. + * + * Client software MUST NOT include this message in any request.
+ * Compliant nodes SHALL NOT accept any request containing this message. + * + * Please use the `SignaturePair` and `SignatureMap` messages, in combination + * with `ThresholdKey` keys, instead of this message. + */ +message ThresholdSignature { + option deprecated = true; + + /** + * For an N-of-M threshold key, this is a list of M signatures, at least N + * of which must be non-null. + */ + SignatureList sigs = 2; +} + +/** + * This message is deprecated and MUST NOT be used to communicate with network + * nodes. It is retained here only for historical reasons. + * + * Client software MUST NOT include this message in any request.
+ * Compliant nodes SHALL NOT accept any request containing this message. + * + * Please use the `SignaturePair` and `SignatureMap` messages instead of + * this message. + */ +message SignatureList { + option deprecated = true; + + /** + * Each signature corresponds to a Key in the KeyList. + */ + repeated Signature sigs = 2; +} + +/** + * A public key and signature pair.
+ * Only Ed25519 and ECDSA(secp256k1) keys and signatures are currently supported + * as cryptographic (non-implied) signatures. + */ +message SignaturePair { + /** + * Prefix bytes of the public key. + *

+ * The client may use any number of bytes from zero to the whole length of + * the public key for pubKeyPrefix. If zero bytes are used, then it MUST be + * true that only one cryptographic key is required to sign the associated + * transaction.
+ * If the `pubKeyPrefix` is 0 bytes and more than a single cryptographic + * key is required to sign the transaction, the request SHALL resolve to + * `INVALID_SIGNATURE`. + *

Important Note
+ * In the special case that a signature is provided to authorize a + * precompiled contract, the `pubKeyPrefix` MUST contain the _entire public + * key_.
+ * That is, if the key is an Ed25519 key, the `pubKeyPrefix` MUST be + * 32 bytes long and contain the full public key bytes.
+ * If the key is an ECDSA(secp256k1) key, the `pubKeyPrefix` MUST be + * 33 bytes long and contain the full _compressed_ form of the public key. + *
+ *

+ *

Purpose
+ *
The `pubKeyPrefix` exists to save cost. A signed transaction with + * shorter prefixes will have fewer bytes, and so will have a lower + * transaction fee. + * The prefixes, however, MUST be long enough to distinguish between all + * of the public keys that might be signing the transaction. Therefore, + * software signing a transaction SHOULD evaluate which keys might possibly + * be required to sign a transaction, and ensure that the shortest prefix + * that is sufficient to unambiguously identify the correct key is used. + *
+ */ + bytes pubKeyPrefix = 1; + + oneof signature { + /** + * A smart contract virtual signature. + *

+ * This value MUST be length zero, if set. + */ + bytes contract = 2; + + /** + * An Ed25519 signature. + */ + bytes ed25519 = 3; + + /** + * This option is not supported.
+ * A RSA-3072 signature. + */ + bytes RSA_3072 = 4 [deprecated = true]; + + /** + * This option is not supported.
+ * ECDSA p-384 signature. + */ + bytes ECDSA_384 = 5 [deprecated = true]; + + /** + * An ECDSA(secp256k1) signature. + */ + bytes ECDSA_secp256k1 = 6; + } +} + +/** + * A set of signatures corresponding to every unique public key that + * signed a given transaction. + * + * If any public key matches more than one prefix in the signature map, + * the transaction containing that map SHALL fail immediately with the + * response code `KEY_PREFIX_MISMATCH`. + */ +message SignatureMap { + /** + * A list of signature pairs for a specific transaction.
+ * Each signature pair represents a single cryptographic (`primitive`) + * public key identified by a "prefix" value and the cryptographic + * signature produced for that key. + */ + repeated SignaturePair sigPair = 1; +} + +/** + * The transactions and queries supported by Hedera Hashgraph. + */ +enum HederaFunctionality { + // FUTURE - Uncomment when https://github.com/hashgraph/pbj/issues/339 is fixed; + // currently the PBJ-generated unit tests fail when using reserved ordinals + // reserved 96, 97, 98, 99; + + /** + * Unused - The first value is unused because this default value is + * ambiguous with an "unset" value and therefore should not be used. + */ + NONE = 0; + + /** + * Transfer tokens among accounts. + */ + CryptoTransfer = 1; + + /** + * Update an account. + */ + CryptoUpdate = 2; + + /** + * Delete an account. + */ + CryptoDelete = 3; + + /** + * Add a livehash to an account + */ + CryptoAddLiveHash = 4 [deprecated = true]; + + /** + * Delete a livehash from an account + */ + CryptoDeleteLiveHash = 5 [deprecated = true]; + + /** + * Execute a smart contract call. + */ + ContractCall = 6; + + /** + * Create a smart contract. + */ + ContractCreate = 7; + + /** + * Update a smart contract. + */ + ContractUpdate = 8; + + /** + * Create a "file" stored in the ledger. + */ + FileCreate = 9; + + /** + * Append data to a "file" stored in the ledger. + */ + FileAppend = 10; + + /** + * Update a "file" stored in the ledger. + */ + FileUpdate = 11; + + /** + * Delete a "file" stored in the ledger. + */ + FileDelete = 12; + + /** + * Get the balance for an account. + */ + CryptoGetAccountBalance = 13; + + /** + * Get a full account record. + */ + CryptoGetAccountRecords = 14; + + /** + * Get information about a token. + */ + CryptoGetInfo = 15; + + /** + * Execute a local smart contract call.
+ * Used by contracts to call other contracts. + */ + ContractCallLocal = 16; + + /** + * Get information about a smart contract. + */ + ContractGetInfo = 17; + + /** + * Get the compiled bytecode that implements a smart contract. + */ + ContractGetBytecode = 18; + + /** + * Get a smart contract record by reference to the solidity ID. + */ + GetBySolidityID = 19; + + /** + * Get a smart contract by reference to the contract key. + */ + GetByKey = 20; + + /** + * Get the live hash for an account + */ + CryptoGetLiveHash = 21 [deprecated = true]; + + /** + * Get the accounts proxy staking to a given account. + */ + CryptoGetStakers = 22 [deprecated = true]; + + /** + * Get the contents of a "file" stored in the ledger. + */ + FileGetContents = 23; + + /** + * Get the metadata for a "file" stored in the ledger. + */ + FileGetInfo = 24; + + /** + * Get transaction record(s) for a specified transaction ID. + */ + TransactionGetRecord = 25; + + /** + * Get all transaction records for a specified contract ID in + * the past 24 hours.
+ * deprecated since version 0.9.0 + */ + ContractGetRecords = 26 [deprecated = true]; + + /** + * Create a new account + */ + CryptoCreate = 27; + + /** + * Delete a "system" "file" stored in the ledger.
+ * "System" files are files with special purpose and ID values within a + * specific range.
+ * These files require additional controls and can only be deleted when + * authorized by accounts with elevated privilege. + */ + SystemDelete = 28; + + /** + * Undo the delete of a "system" "file" stored in the ledger.
+ * "System" files are files with special purpose and ID values within a + * specific range.
+ * These files require additional controls and can only be deleted when + * authorized by accounts with elevated privilege. This operation allows + * such files to be restored, within a reasonable timeframe, if + * deleted improperly. + */ + SystemUndelete = 29; + + /** + * Delete a smart contract + */ + ContractDelete = 30; + + /** + * Stop all processing and "freeze" the entire network.
+ * This is generally sent immediately prior to upgrading the network.
+ * After processing this transactions all nodes enter a quiescent state. + */ + Freeze = 31; + + /** + * Create a Transaction Record.
+ * This appears to be purely internal and unused. + */ + CreateTransactionRecord = 32; + + /** + * Auto-renew an account.
+ * This is used for internal fee calculations. + */ + CryptoAccountAutoRenew = 33; + + /** + * Auto-renew a smart contract.
+ * This is used for internal fee calculations. + */ + ContractAutoRenew = 34; + + /** + * Get version information for the ledger.
+ * This returns a the version of the software currently running the network + * for both the protocol buffers and the network services (node). + */ + GetVersionInfo = 35; + + /** + * Get a receipt for a specified transaction ID. + */ + TransactionGetReceipt = 36; + + /** + * Create a topic for the Hedera Consensus Service (HCS). + */ + ConsensusCreateTopic = 50; + + /** + * Update an HCS topic. + */ + ConsensusUpdateTopic = 51; + + /** + * Delete an HCS topic. + */ + ConsensusDeleteTopic = 52; + + /** + * Get metadata (information) for an HCS topic. + */ + ConsensusGetTopicInfo = 53; + + /** + * Publish a message to an HCS topic. + */ + ConsensusSubmitMessage = 54; + + /** + * Submit a transaction, bypassing intake checking. + * Only enabled in local-mode. + */ + UncheckedSubmit = 55; + + /** + * Create a token for the Hedera Token Service (HTS). + */ + TokenCreate = 56; + + /** + * Get metadata (information) for an HTS token. + */ + TokenGetInfo = 58; + + /** + * Freeze a specific account with respect to a specific HTS token. + *

+ * Once this transaction completes that account CANNOT send or receive + * the specified token. + */ + TokenFreezeAccount = 59; + + /** + * Remove a "freeze" from an account with respect to a specific HTS token. + */ + TokenUnfreezeAccount = 60; + + /** + * Grant KYC status to an account for a specific HTS token. + */ + TokenGrantKycToAccount = 61; + + /** + * Revoke KYC status from an account for a specific HTS token. + */ + TokenRevokeKycFromAccount = 62; + + /** + * Delete a specific HTS token. + */ + TokenDelete = 63; + + /** + * Update a specific HTS token. + */ + TokenUpdate = 64; + + /** + * Mint HTS token amounts to the treasury account for that token. + */ + TokenMint = 65; + + /** + * Burn HTS token amounts from the treasury account for that token. + */ + TokenBurn = 66; + + /** + * Wipe all amounts for a specific HTS token from a specified account. + */ + TokenAccountWipe = 67; + + /** + * Associate a specific HTS token to an account. + */ + TokenAssociateToAccount = 68; + + /** + * Dissociate a specific HTS token from an account. + */ + TokenDissociateFromAccount = 69; + + /** + * Create a scheduled transaction + */ + ScheduleCreate = 70; + + /** + * Delete a scheduled transaction + */ + ScheduleDelete = 71; + + /** + * Sign a scheduled transaction + */ + ScheduleSign = 72; + + /** + * Get metadata (information) for a scheduled transaction + */ + ScheduleGetInfo = 73; + + /** + * Get NFT metadata (information) for a range of NFTs associated to a + * specific non-fungible/unique HTS token and owned by a specific account. + */ + TokenGetAccountNftInfos = 74 [deprecated = true]; + + /** + * Get metadata (information) for a specific NFT identified by token and + * serial number. + */ + TokenGetNftInfo = 75 [deprecated = true]; + + /** + * Get NFT metadata (information) for a range of NFTs associated to a + * specific non-fungible/unique HTS token. + */ + TokenGetNftInfos = 76; + + /** + * Update a token's custom fee schedule. + *

+ * If a transaction of this type is not signed by the token + * `fee_schedule_key` it SHALL fail with INVALID_SIGNATURE, or + * TOKEN_HAS_NO_FEE_SCHEDULE_KEY if there is no `fee_schedule_key` set. + */ + TokenFeeScheduleUpdate = 77; + + /** + * Get execution time(s) for one or more "recent" TransactionIDs. + */ + NetworkGetExecutionTime = 78 [deprecated = true]; + + /** + * Pause a specific HTS token + */ + TokenPause = 79; + + /** + * Unpause a paused HTS token. + */ + TokenUnpause = 80; + + /** + * Approve an allowance for a spender relative to the owner account, which + * MUST sign the transaction. + */ + CryptoApproveAllowance = 81; + + /** + * Delete (unapprove) an allowance previously approved + * for the owner account. + */ + CryptoDeleteAllowance = 82; + + /** + * Get all the information about an account, including balance + * and allowances.
+ * This does not get a list of account records. + */ + GetAccountDetails = 83; + + /** + * Perform an Ethereum (EVM) transaction.
+ * CallData may be inline if small, or in a "file" if large. + */ + EthereumTransaction = 84; + + /** + * Used to indicate when the network has updated the staking information + * at the end of a staking period and to indicate a new staking period + * has started. + */ + NodeStakeUpdate = 85; + + /** + * Generate and return a pseudorandom number based on network state. + */ + UtilPrng = 86; + + /** + * Get a record for a "recent" transaction. + */ + TransactionGetFastRecord = 87 [deprecated = true]; + + /** + * Update the metadata of one or more NFT's of a specific token type. + */ + TokenUpdateNfts = 88; + + /** + * Create a node + */ + NodeCreate = 89; + + /** + * Update a node + */ + NodeUpdate = 90; + + /** + * Delete a node + */ + NodeDelete = 91; + + /** + * Transfer one or more token balances held by the requesting account + * to the treasury for each token type. + */ + TokenReject = 92; + + /** + * Airdrop one or more tokens to one or more accounts. + */ + TokenAirdrop = 93; + + /** + * Remove one or more pending airdrops from state on behalf of + * the sender(s) for each airdrop. + */ + TokenCancelAirdrop = 94; + + /** + * Claim one or more pending airdrops + */ + TokenClaimAirdrop = 95; + + /** + * Submit a signature of a state root hash gossiped to other nodes + */ + StateSignatureTransaction = 100; + + /** + * Publish a hinTS key to the network. + */ + HintsKeyPublication = 101; + + /** + * Vote for a particular preprocessing output of a hinTS construction. + */ + HintsPreprocessingVote = 102; + + /** + * Sign a partial signature for the active hinTS construction. + */ + HintsPartialSignature = 103; + + /** + * Sign a particular history assembly. + */ + HistoryAssemblySignature = 104; + + /** + * Publish a roster history proof key to the network. + */ + HistoryProofKeyPublication = 105; + + /** + * Vote for a particular history proof. + */ + HistoryProofVote = 106; + + /** + * Publish a random CRS to the network. + */ + CrsPublication = 107; + + /** + * Submit a batch of transactions to run atomically + */ + AtomicBatch = 108; +} + +/** + * A set of values the nodes use in determining transaction and query fees, and + * constants involved in fee calculations. + * + * Nodes SHALL multiply the amount of "resources" allocated to a transaction or + * query by the corresponding price to calculate the appropriate fee. Units are + * one-thousandth of a `tinyCent`. The "resource" allocations SHALL be estimated + * based on transaction characteristics and current network state, and MAY be + * further adjusted based on network load and congestion. + * + * This SHALL be used, in different contexts, for the cost _factors_ used to + * calculate charged amounts, for the resource accumulation, and for actual + * amounts to be charged.
+ * Amounts recorded here MUST be converted to tinybar according to the + * current active `ExchangeRate` for the network. + */ +message FeeComponents { + /** + * Base: "minimum total fee". + *

+ * The calculated fee MUST be greater than this value. + */ + int64 min = 1; + + /** + * Base: "maximum total fee". + *

+ * The calculated fee MUST be less than this value. + */ + int64 max = 2; + + /** + * Base: "constant fee".
+ * A baseline constant contribution to total fee. + */ + int64 constant = 3; + + /** + * Bandwidth: "bytes per transaction".
+ * The fee for bandwidth consumed by a transaction, measured in bytes + */ + int64 bpt = 4; + + /** + * Signatures: "validations per transaction".
+ * The fee for signature verifications required by a transaction + */ + int64 vpt = 5; + + /** + * Memory: "RAM byte-hours".
+ * The fee for RAM required to process a transaction, + * measured in byte-hours + */ + int64 rbh = 6; + + /** + * Disk: "storage byte-hours".
+ * The fee for storage required by a transaction, measured in byte-hours + */ + int64 sbh = 7; + + /** + * Compute: Ethereum term for a derivative EVM compute resource.
+ * The fee of computation for a smart contract transaction. The value of + * gas is set by a conversion rate, and is regularly updated to reflect + * reasonable and customary costs. + */ + int64 gas = 8; + + /** + * Ad valorem: "transferred value".
+ * The fee for HBAR transferred by a transaction. + */ + int64 tv = 9; + + /** + * Response memory: "bytes per response".
+ * The fee for data retrieved from memory to deliver a response, + * measured in bytes + */ + int64 bpr = 10; + + /** + * Response disk: "storage bytes per response".
+ * The fee for data retrieved from disk to deliver a response, + * measured in bytes + */ + int64 sbpr = 11; +} + +/** + * The fee schedule for a specific transaction or query based on the fee data. + */ +message TransactionFeeSchedule { + /** + * An enumeration for a particular transaction or query.
+ * The functionality type determines the base cost parameters. + */ + HederaFunctionality hederaFunctionality = 1; + + /** + * Use `fees` instead of this field.
+ * Resource price coefficients. + */ + FeeData feeData = 2 [deprecated = true]; + + /** + * The resource price coefficients for transaction type and any applicable + * subtypes.
+ * The multiple entries enable support for subtype price definitions. + */ + repeated FeeData fees = 3; +} + +/** + * A total fee, in component amounts charged for a transaction. + * + * Total fees are composed of three sets of components. + * - Node data, components that compensate the specific node that submitted + * the transaction. + * - Network data, components that compensate the Hedera network for gossiping + * the transaction and determining the consensus timestamp. + * - Service data, components that compensate the Hedera network for the ongoing + * maintenance and operation of the network, as well as ongoing development + * of network services. + * + * Fee components are recorded in thousandths of a tiny cent, and the network + * exchange rate converts these to tinybar amounts, which are what the network + * charges for transactions and what the network reports in the record stream. + */ +message FeeData { + /** + * Fee components to be paid to the submitting node. + */ + FeeComponents nodedata = 1; + + /** + * Fee components to be paid to the network for bringing a + * transaction to consensus. + */ + FeeComponents networkdata = 2; + + /** + * Fee components to be paid to the network for providing the immediate and + * ongoing services associated with executing the transaction, maintaining + * the network, and developing the network software. + */ + FeeComponents servicedata = 3; + + /** + * A sub-type distinguishing between different types of `FeeData` that may + * apply to the same base transaction type (associated with + * an `HederaFunctionality`). + */ + SubType subType = 4; +} + +/** + * A set of fee schedules covering all transaction types and query types, along + * with a specific time at which this fee schedule will expire. + * + * Nodes SHALL use the most recent unexpired fee schedule to determine the fees + * for all transactions based on various resource components imputed to each + * transaction. + */ +message FeeSchedule { + /** + * Sets of fee coefficients for various transaction or query types. + */ + repeated TransactionFeeSchedule transactionFeeSchedule = 1; + + /** + * A time, in seconds since the `epoch`, when this fee schedule + * will expire. + *

+ * For this purpose, `epoch` SHALL be the UNIX epoch + * with 0 at `1970-01-01T00:00:00.000Z`. + */ + TimestampSeconds expiryTime = 2; +} + +/** + * The "current" fee schedule and the "next" fee schedule. + * + * The current fee schedule is the schedule that SHALL apply to the current + * transaction.
+ * The next fee schedule is the schedule that SHALL apply after the current + * schedule expires.
+ * We store both to avoid a condition where transactions are processed very + * near the time when a fee schedule expires and it might be indeterminate + * which fees to apply. With both current and next fee schedule the network + * can deterministically apply the correct fee schedule based on consensus + * timestamp for each transaction. + */ +message CurrentAndNextFeeSchedule { + /** + * A current, unexpired, fee schedule. + */ + FeeSchedule currentFeeSchedule = 1; + + /** + * A future fee schedule to use when the current schedule expires. + */ + FeeSchedule nextFeeSchedule = 2; +} + +/** + * A network node endpoint.
+ * Each network node in the global address book publishes one or more endpoints + * which enable the nodes to communicate both with other nodes, for gossip, and + * with clients to receive transaction requests. + * + * This message supports IPv4 with address and TCP port, + * and MAY include a FQDN instead of an IP address.
+ * IPv6 is not currently supported. + * + * When the `domain_name` field is set, the `ipAddressV4` field + * MUST NOT be set.
+ * When the `ipAddressV4` field is set, the `domain_name` field + * MUST NOT be set. + */ +message ServiceEndpoint { + /** + * A 32-bit IPv4 address.
+ * This is the address of the endpoint, encoded in pure "big-endian" + * (i.e. left to right) order (e.g. `127.0.0.1` has hex bytes in the + * order `7F`, `00`, `00`, `01`). + */ + bytes ipAddressV4 = 1; + + /** + * A TCP port to use. + *

+ * This value MUST be between 0 and 65535, inclusive. + */ + int32 port = 2; + + /** + * A node domain name. + *

+ * This MUST be the fully qualified domain name of the node.
+ * This value MUST NOT exceed 253 characters.
+ * When the `domain_name` field is set, the `ipAddressV4` + * field MUST NOT be set.
+ * When the `ipAddressV4` field is set, the `domain_name` + * field MUST NOT be set. + */ + string domain_name = 3; +} + +/** + * 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). + * + * All active fields are populated in the `0.0.102` address book file.
+ * Only fields documented with "`0.0.101` field" are populated in the 0.0.101 + * address book file. + * + * This message MAY be superseded by messages in state/addressbook/node.proto + * and node_get_info.proto. + */ +message NodeAddress { + /** + * ServiceEndpoint is now used to retrieve a node's list of IP + * addresses and ports.
+ * The IP address of the Node, as a string, encoded in UTF-8.
+ * This value SHALL NOT be populated. + */ + bytes ipAddress = 1 [deprecated = true]; + + /** + * ServiceEndpoint is now used to retrieve a node's list of IP + * addresses and ports.
+ * The port number of the grpc server for the node.
+ * This value SHALL NOT be populated. + */ + int32 portno = 2 [deprecated = true]; + + /** + * Description provides short text functionality.
+ * A short description of the node. + *

+ * This field SHALL NOT be populated. + */ + bytes memo = 3 [deprecated = true]; + + /** + * A hexadecimal String encoding of an X509 public key. + *

+ * This X509 RSA _public_ key SHALL be used to verify record stream files + * (e.g., record stream files).
+ * This field SHALL be a string of hexadecimal characters, encoded UTF-8, + * which, translated to binary, form the public key DER encoding. + */ + string RSA_PubKey = 4; + + /** + * A numeric identifier for the node. + *

+ * This value SHALL NOT be sequential. + *

+ * A `0.0.101` field + */ + int64 nodeId = 5; + + /** + * An account to be paid the "node" portion of transaction fees.
+ * The "node" fees are paid to the node that submitted the transaction. + *

+ * A `0.0.101` field + */ + AccountID nodeAccountId = 6; + + /** + * A hash of the node's TLS certificate. + *

+ * This field SHALL be a string of hexadecimal characters, encoded UTF-8, + * which, translated to binary, form a SHA-384 hash of the node's TLS + * certificate in PEM format. + * This TLS certificate MUST be encoded UTF-8 and normalized according to + * the NFKD form prior to computing the hash value.
+ * The value of this field SHALL be used to verify the node TLS + * certificate when presented during protocol negotiation. + *

+ * A `0.0.101` field + */ + bytes nodeCertHash = 7; + + /** + * A node's service IP addresses and TCP ports.
+ * Nodes require multiple endpoints to ensure that inter-node communication + * (e.g. gossip) is properly separated from client communication to + * API endpoints. + *

+ * A `0.0.101` field + */ + repeated ServiceEndpoint serviceEndpoint = 8; + + /** + * A short description of the node. + *

+ * This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes` + * (default 100) bytes when encoded as UTF-8. + */ + string description = 9; + + /** + * This is replaced by per-account stake tracking and dynamic + * calculation.
+ * The amount of tinybar staked to the node.
+ * This value SHOULD NOT be populated, and SHALL be ignored. + */ + int64 stake = 10 [deprecated = true]; +} + +/** + * A list of nodes and their metadata that contains details of the nodes + * running the network. + * + * Used to parse the contents of system files `0.0.101` and `0.0.102`. + */ +message NodeAddressBook { + /** + * Published data for all nodes in the network + */ + repeated NodeAddress nodeAddress = 1; +} + +/** + * A software version according to "[semantic versioning](https://semver.org/)" + * or "date versioning". + * + * Hedera currently modifies the "typical" semantic versioning somewhat, the + * `major` version is always `0`, and each release increments the `minor` + * version. The `patch` and `pre` components are used in the typical manner. + * The `build` component is not generally used. + */ +message SemanticVersion { + /** + * A major version.
+ * Hedera does not increment this value and retains a `0` value to + * indicate that API may change for any release. + *

+ * This value SHALL increment for an incompatible API change.
+ */ + int32 major = 1; + + /** + * A minor version.
+ * Hedera increments this value with each release.
+ * There may be incompatible API changes in any Hedera Services release. + *

+ * This value SHALL increment for backwards-compatible new + * functionality. + */ + int32 minor = 2; + + /** + * A patch version. + *

+ * This value SHALL increment for backwards-compatible bug fixes. + */ + int32 patch = 3; + + /** + * A pre-release version. + *

+ * This MAY be denoted by appending a hyphen and a series of dot separated + * identifiers per [Semver Specification](https://semver.org/#spec-item-9); + * given a string `0.14.0-alpha.1+21AF26D3`, this field would contain + * 'alpha.1' + */ + string pre = 4; + + /** + * A build version. + *

+ * Build version MAY be denoted by appending a plus sign and a series of + * dot separated identifiers immediately following the patch or pre-release + * version per [Semver Specification](https://semver.org/#spec-item-10); so + * given a string `0.14.0-alpha.1+21AF26D3`, this field + * would contain '21AF26D3' + */ + string build = 5; +} + +/** + * A single runtime configuration setting. + * + * Typically a name-value pair, this may also contain a small amount of + * associated data. + */ +message Setting { + /** + * A name for this setting property. + */ + string name = 1; + + /** + * A value for this setting property. + */ + string value = 2; + + /** + * A small quantity of data associated with this setting. + *

+ * This SHOULD be less than 100 bytes.
+ * If the value is a string, it MUST be encoded UTF-8. + */ + bytes data = 3; +} + +/** + * Setting values representing a source of runtime configuration information. + */ +message ServicesConfigurationList { + /** + * A List of `Setting` values, typically read from application properties. + */ + repeated Setting nameValue = 1; +} + +/** + * An Hedera Token Service token relationship. A token relationship describes + * the connection between an Account and a Token type, including the current + * account balance in that token. + * + * A `TokenRelationship` SHALL contain, for the designated token and enclosing + * account, The account's current balance, whether the account has KYC granted, + * whether the assets are frozen and whether the association was automatic.
+ * A `TokenRelationship` MAY also contain the `symbol` and `decimals` values + * copied from the token.
+ * `TokenRelationship` entries SHALL be valid only within the context of a + * `GetAccountDetails` query response, or other enclosing message, which + * specifies the account side of the relationship. + */ +message TokenRelationship { + /** + * A token identifier. + *

+ * This MUST match an existing token that is not deleted. + */ + TokenID tokenId = 1; + + /** + * A token symbol. + *

+ * This MUST match an existing token that is not deleted.
+ * This MUST match the value for the token identified in `tokenId`. + */ + string symbol = 2; + + /** + * An account balance for this token. + *

+ * For fungible/common tokens this SHALL be the balance that the + * account holds of that token. The value is provided as an integer amount + * of the smallest unit of the token (i.e. 10`-decimals` whole + * tokens).
+ * For non-fungible/unique tokens this SHALL be the whole number of + * unique tokens held by the account for this token type. + */ + uint64 balance = 3; + + /** + * A KYC status for the account with respect to this token. + *

+ * This may be `KycNotApplicable`, `Granted` or `Revoked` and, if KYC is + * not supported for this token (e.g. the `kyc_key` of the token is not + * set), this SHALL be `KycNotApplicable`. + */ + TokenKycStatus kycStatus = 4; + + /** + * A Freeze status for the account with respect to this token. + *

+ * This value SHALL be one of `FreezeNotApplicable`, `Frozen` + * or `Unfrozen`.
+ * If the token cannot freeze account assets (e.g. the `freeze_key` of the + * token is not set), this SHALL be `FreezeNotApplicable`. + */ + TokenFreezeStatus freezeStatus = 5; + + /** + * A maximum "precision" for this token. + *

+ * This value MUST match the `decimals` field of the token identified in + * the `tokenId` field.
+ * A single whole token SHALL be divided into at most + * 10`decimals` sub-units. + */ + uint32 decimals = 6; + + /** + * An automatic association flag. + *

+ * This SHALL be set if the relationship was created implicitly + * (automatically).
+ * This SHALL be unset if the relationship was created explicitly + * (manually) via a `TokenAssociate` transaction. + */ + bool automatic_association = 7; +} + +/** + * A number of _transferable units_ of a specified token. + * + * The transferable unit of a token is its smallest denomination, as given by + * the token's `decimals` property. Each minted token contains + * 10`decimals` 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 { + /** + * A token identifier. + */ + TokenID tokenId = 1; + + /** + * A number of transferable units of the identified token. + *

+ * For fungible/common tokens this SHALL be the balance, in units of + * 10`-decimals` whole tokens.
+ * For non-fungible/unique tokens, this SHALL be the number of + * individual unique tokens in this balance. + */ + uint64 balance = 2; + + /** + * A number of "decimals" precision. + *

+ * This MUST match the `decimals` value for the token identified by the + * `tokenId` field. + */ + uint32 decimals = 3; +} + +/** + * A set of token balance values. + * + * Each entry describes the balance the enclosing account holds for a specific + * token. The balance is an amount for a fungible/common token or a count for + * a non-fungible/unique token. + */ +message TokenBalances { + /** + * A list of token balance values.
+ * Each entry represents a single account balance for a single token. + */ + repeated TokenBalance tokenBalances = 1; +} + +/** + * An association between a token and an account. + * + * An account must be associated with a token before that account can transact + * in (send or receive) that token. + */ +message TokenAssociation { + /** + * A token identifier for the associated token. + */ + TokenID token_id = 1; + + /** + * An account identifier for the associated account. + */ + AccountID account_id = 2; +} + +/** + * Staking information for an account or a contract. + * + * This is used for responses returned from `CryptoGetInfo` or + * `ContractGetInfo` queries. + */ +message StakingInfo { + + /** + * A flag indicating that the holder of this account has chosen to decline + * staking rewards. + */ + bool decline_reward = 1; + + /** + * A `Timestamp` of the start time for the latest active staking period. + *

+ * This MUST be a period during which either the staking settings for this + * account or contract changed or the account or contract received staking + * rewards, whichever is later. Examples of a change in staking settings + * include starting staking or changing the staked_node_id.
+ * If this account or contract is not currently staked to a node, then this + * field SHALL NOT be set. + */ + Timestamp stake_period_start = 2; + + /** + * An amount, in tinybar, to be received in the next reward payout.
+ * Rewards are not paid out immediately; for efficiency reasons rewards are + * only paid out as part of another transaction involving that account. + */ + int64 pending_reward = 3; + + /** + * A proxy-staked balance.
+ * The total HBAR balance of all accounts that delegate staking to this + * account or contract. + */ + int64 staked_to_me = 4; + + oneof staked_id { + /** + * A delegated stake. + *

+ * This account delegates to the indicated account for staking purposes. + */ + AccountID staked_account_id = 5; + + /** + * A direct stake. + *

+ * This accounts stakes its balance to the designated node. + */ + int64 staked_node_id = 6; + } +} + +/** + * A unique, composite, identifier for a pending airdrop. + * + * Each pending airdrop SHALL be uniquely identified by + * a `PendingAirdropId`.
+ * A `PendingAirdropId` SHALL be recorded when created and MUST be provided in + * any transaction that would modify that pending airdrop + * (such as a `claimAirdrop` or `cancelAirdrop`). + */ +message PendingAirdropId { + /** + * A sending account. + *

+ * This is the account that initiated, and SHALL fund, + * this pending airdrop.
+ * This field is REQUIRED. + */ + AccountID sender_id = 1; + + /** + * A receiving account. + *

+ * This is the ID of the account that SHALL receive the airdrop.
+ * This field is REQUIRED. + */ + AccountID receiver_id = 2; + + oneof token_reference { + /** + * A token identifier.
+ * This is the type of token for a fungible/common token airdrop. + *

+ * This field is REQUIRED for a fungible/common token and MUST NOT + * be used for a non-fungible/unique token. + */ + TokenID fungible_token_type = 3; + + /** + * The id of a single NFT
+ * This is the type of token for a non-fungible/unique token airdrop + * and consists of a Token ID and serial number. + *

+ * This field is REQUIRED for a non-fungible/unique token and + * MUST NOT be used for a fungible/common token. + */ + NftID non_fungible_token = 4; + } +} + +/** + * A single pending airdrop value. + * + * This message SHALL record the airdrop amount for a + * fungible/common token.
+ * This message SHOULD be null for a non-fungible/unique token.
+ * If a non-null `PendingAirdropValue` is set for a non-fungible/unique + * token, the amount field MUST be `0`. + * + * It is RECOMMENDED that implementations store pending airdrop information + * as a key-value map from `PendingAirdropId` to `PendingAirdropValue`, with + * a `null` value used for non-fungible pending airdrops. + */ +message PendingAirdropValue { + /** + * An amount to transfer for fungible/common tokens.
+ * This is expressed in the smallest available units for that token + * (i.e. 10-`decimals` whole tokens). + *

+ * This amount SHALL be transferred from the sender to the receiver, + * if claimed.
+ * If the token is a fungible/common token, this value MUST be strictly + * greater than `0`.
+ * If the token is a non-fungible/unique token, this message SHOULD NOT + * be set, and if set, this field MUST be `0`. + */ + uint64 amount = 1; +} diff --git a/proto/consensus_create_topic.proto b/proto/consensus_create_topic.proto new file mode 100644 index 000000000..1084e06ac --- /dev/null +++ b/proto/consensus_create_topic.proto @@ -0,0 +1,183 @@ +/** + * # Create Topic + * Create a new topic for the Hedera Consensus Service (HCS). + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; +import "custom_fees.proto"; +import "duration.proto"; + +/** + * Create a topic to accept and group consensus messages. + * + * If `autoRenewAccount` is specified, that account Key MUST also sign this + * transaction.
+ * If `adminKey` is set, that Key MUST sign the transaction.
+ * On success, the resulting `TransactionReceipt` SHALL contain the newly + * created `TopicId`. + * + * The `autoRenewPeriod` on a topic MUST be set to a value between + * `autoRenewPeriod.minDuration` and `autoRenewPeriod.maxDuration`. These + * values are configurable, typically 30 and 92 days.
+ * This also sets the initial expirationTime of the topic. + * + * If no `adminKey` is set on a topic + * -`autoRenewAccount` SHALL NOT be set on the topic. + * - A `deleteTopic` transaction SHALL fail. + * - An `updateTopic` transaction that only extends the expirationTime MAY + * succeed. + * - Any other `updateTopic` transaction SHALL fail. + * + * If the topic expires and is not automatically renewed, the topic SHALL enter + * the `EXPIRED` state. + * - All transactions on the topic SHALL fail with TOPIC_EXPIRED + * - Except an updateTopic() call that only extends the expirationTime. + * - getTopicInfo() SHALL succeed, and show the topic is expired. + * The topic SHALL remain in the `EXPIRED` state for a time determined by the + * `autorenew.gracePeriod` (configurable, originally 7 days).
+ * After the grace period, if the topic's expirationTime is not extended, the + * topic SHALL be automatically deleted from state entirely, and cannot be + * recovered or recreated. + * + * ### Block Stream Effects + * None + */ +message ConsensusCreateTopicTransactionBody { + /** + * A short memo for this topic. + *

+ * This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes` + * (default 100) bytes when encoded as UTF-8. + */ + string memo = 1; + + /** + * Access control for modification of the topic after it is created. + *

+ * If this field is set, that key MUST sign this transaction.
+ * If this field is set, that key MUST sign each future transaction to + * update or delete the topic.
+ * An updateTopic transaction that _only_ extends the topic expirationTime + * (a "manual renewal" transaction) SHALL NOT require admin key + * signature.
+ * A topic without an admin key SHALL be immutable, except for expiration + * and renewal.
+ * If adminKey is not set, then `autoRenewAccount` SHALL NOT be set. + */ + Key adminKey = 2; + + /** + * Access control for message submission to the topic. + *

+ * If this field is set, that key MUST sign each consensus submit message + * for this topic.
+ * If this field is not set then any account may submit a message on the + * topic, without restriction. + */ + Key submitKey = 3; + + /** + * The initial lifetime, in seconds, for the topic.
+ * This is also the number of seconds for which the topic SHALL be + * automatically renewed upon expiring, if it has a valid auto-renew + * account. + *

+ * This value MUST be set.
+ * This value MUST be greater than the configured + * MIN_AUTORENEW_PERIOD.
+ * This value MUST be less than the configured MAX_AUTORENEW_PERIOD. + */ + Duration autoRenewPeriod = 6; + + /** + * The ID of the account to be charged renewal fees at the topic's + * expirationTime to extend the lifetime of the topic. + *

+ * The topic lifetime SHALL be extended by the smallest of the following: + *

+ * If this value is set, the referenced account MUST sign this + * transaction.
+ * If this value is set, the `adminKey` field MUST also be set (though that + * key MAY not have any correlation to this account). + */ + AccountID autoRenewAccount = 7; + + /** + * Access control for update or delete of custom fees. + *

+ * If set, subsequent `consensus_update_topic` transactions signed with this + * key MAY update or delete the custom fees for this topic.
+ * If not set, the custom fees for this topic SHALL BE immutable.
+ * If not set when the topic is created, this field CANNOT be set via + * update.
+ * If set when the topic is created, this field MAY be changed via update. + */ + Key fee_schedule_key = 8; + + /** + * A set of keys.
+ * Keys in this list are permitted to submit messages to this topic without + * paying custom fees associated with this topic. + *

+ * If a submit transaction is signed by _any_ key included in this set, + * custom fees SHALL NOT be charged for that transaction.
+ * This field MUST NOT contain more than 10 keys.
+ * fee_exempt_key_list SHALL NOT contain any duplicate keys.
+ * fee_exempt_key_list MAY contain keys for accounts that are inactive, + * deleted, or non-existent.
+ * If fee_exempt_key_list is unset in this transaction, there SHALL NOT be + * any fee-exempt keys. In particular, the following keys SHALL NOT be + * implicitly or automatically added to this list: + * `adminKey`, `submitKey`, `fee_schedule_key`. + */ + repeated Key fee_exempt_key_list = 9; + + /** + * A set of custom fee definitions.
+ * These are fees to be assessed for each submit to this topic. + *

+ * Each fee defined in this set SHALL be evaluated for + * each message submitted to this topic, and the resultant + * total assessed fees SHALL be charged.
+ * Custom fees defined here SHALL be assessed in addition to the base + * network and node fees.
+ * custom_fees list SHALL NOT contain more than + * `MAX_CUSTOM_FEE_ENTRIES_FOR_TOPICS` entries. + */ + repeated FixedCustomFee custom_fees = 10; +} diff --git a/proto/consensus_delete_topic.proto b/proto/consensus_delete_topic.proto new file mode 100644 index 000000000..4bc28d3a0 --- /dev/null +++ b/proto/consensus_delete_topic.proto @@ -0,0 +1,57 @@ +/** + * # Delete Topic + * Delete an existing topic from the Hedera Consensus Service (HCS). + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; + +/** + * Delete a topic. + * + * Once deleted, subsequent transactions or queries for that topic SHALL NOT + * succeed.
+ * If adminKey is set on the topic, this transaction MUST be signed by that + * key.
+ * If adminKey is not set on the topic, this transaction SHALL fail with a + * response code of `UNAUTHORIZED`. A topic without an adminKey cannot be + * deleted (but MAY expire). + * + * ### Block Stream Effects + * None + */ +message ConsensusDeleteTopicTransactionBody { + /** + * Topic to be deleted. + */ + TopicID topicID = 1; +} diff --git a/proto/consensus_get_topic_info.proto b/proto/consensus_get_topic_info.proto new file mode 100644 index 000000000..ed116f608 --- /dev/null +++ b/proto/consensus_get_topic_info.proto @@ -0,0 +1,88 @@ +/** + * # Get Topic + * Query a topic in the Hedera Consensus Service (HCS). + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; +import "query_header.proto"; +import "response_header.proto"; +import "consensus_topic_info.proto"; + +/** + * Retrieve the latest state of a topic. + * + * This method is unrestricted and allowed on any topic by any payer + * account.
+ * A query for a deleted topic MAY succeed if the topic is within the + * "autorenew grace period".
+ * A query for a topic removed from state SHALL NOT succeed. + */ +message ConsensusGetTopicInfoQuery { + /** + * Standard information sent with every query operation.
+ * This includes the signed payment and what kind of response is requested + * (cost, state proof, both, or neither). + */ + QueryHeader header = 1; + + /** + * A topic ID. + *

+ * The network SHALL return information for this topic, if successful. + */ + TopicID topicID = 2; +} + +/** + * Query response to describe the current state of a topic in the Hedera + * Consensus Service(HCS). + */ +message ConsensusGetTopicInfoResponse { + /** + * The standard response information for queries.
+ * This includes the values requested in the `QueryHeader` + * (cost, state proof, both, or neither). + */ + ResponseHeader header = 1; + + /** + * The ID of the topic requested in the query. + */ + TopicID topicID = 2; + + + /** + * Information describing the current state of the topic. + */ + ConsensusTopicInfo topicInfo = 5; +} diff --git a/proto/consensus_service.proto b/proto/consensus_service.proto new file mode 100644 index 000000000..2b7afe48e --- /dev/null +++ b/proto/consensus_service.proto @@ -0,0 +1,126 @@ +/** + * # Consensus Service API + * GRPC service definitions for the Hedera Consensus Service (HCS). + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package + +import "query.proto"; +import "response.proto"; +import "transaction_response.proto"; +import "transaction.proto"; + +/** + * The Hedera Consensus Service (HCS) provides the ability for a 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. + * + */ +service ConsensusService { + /** + * Create an HCS topic. + *

+ * On success, the resulting TransactionReceipt SHALL contain the newly + * created TopicId.
+ * If the `adminKey` is set on the topic, this transaction MUST be signed + * by that key.
+ * If the `adminKey` is _not_ set on the topic, this transaction MUST NOT + * set an `autoRenewAccount`. The new topic will be immutable and must be + * renewed manually.
+ * If the `autoRenewAccount` is set on the topic, this transaction MUST be + * signed by that account.
+ *

+ * The request body MUST be a + * [ConsensusCreateTopicTransactionBody](#proto.ConsensusCreateTopicTransactionBody) + */ + rpc createTopic (Transaction) returns (TransactionResponse); + + /** + * Update an HCS topic. + *

+ * If the `adminKey` is not set on the topic, this transaction MUST extend + * the `expirationTime` and MUST NOT modify any other field.
+ * If the `adminKey` is set on the topic, this transaction MUST be signed + * by that key.
+ * If this transaction sets a new `adminKey`, this transaction MUST be + * signed by _both_ keys, the pre-update `adminKey` and + * the post-update `adminKey`.
+ * If this transaction sets a new, non-null, `autoRenewAccount`, the newly + * set account MUST sign this transaction.
+ *

+ * The request body MUST be a + * [ConsensusUpdateTopicTransactionBody](#proto.ConsensusUpdateTopicTransactionBody) + */ + rpc updateTopic (Transaction) returns (TransactionResponse); + + /** + * Delete an HCS topic. + *

+ * If this transaction succeeds, all subsequent transactions referencing + * the deleted topic SHALL fail.
+ * The `adminKey` MUST be set on the topic and this transaction MUST be + * signed by that key.
+ * If the `adminKey` is not set on the topic, this transaction SHALL fail + * with a response code of `UNAUTHORIZED`. A topic without an `adminKey` + * cannot be deleted, but MAY expire.
+ *

+ * The request body MUST be a + * [ConsensusDeleteTopicTransactionBody](#proto.ConsensusDeleteTopicTransactionBody) + */ + rpc deleteTopic (Transaction) returns (TransactionResponse); + + /** + * Submit a message to an HCS topic. + *

+ * Valid and authorized messages on valid topics will be ordered by the + * consensus service, published in the block stream, and available to all + * subscribers on this topic via the mirror nodes.
+ * If this transaction succeeds the resulting TransactionReceipt SHALL + * contain the latest topicSequenceNumber and topicRunningHash for the + * topic.
+ * If the topic has a `submitKey` then that key MUST sign this + * transaction.
+ *

+ * The request body MUST be a + * [ConsensusSubmitMessageTransactionBody](#proto.ConsensusSubmitMessageTransactionBody) + */ + rpc submitMessage (Transaction) returns (TransactionResponse); + + /** + * Retrieve the latest state of a topic. This method is unrestricted and + * allowed on any topic by any payer account. + *

+ * The request body MUST be a + * [ConsensusGetTopicInfoQuery](#proto.ConsensusGetTopicInfoQuery)
+ * The response body SHALL be a + * [ConsensusGetTopicInfoResponse](#proto.ConsensusGetTopicInfoResponse) + */ + rpc getTopicInfo (Query) returns (Response); +} diff --git a/proto/consensus_submit_message.proto b/proto/consensus_submit_message.proto new file mode 100644 index 000000000..3c53c3161 --- /dev/null +++ b/proto/consensus_submit_message.proto @@ -0,0 +1,110 @@ +/** + * # Submit Message + * Submit a message to a topic via the Hedera Consensus Service (HCS). + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; + +/** + * Consensus message "chunk" detail.
+ * This message carries information describing the way in which a message + * submitted for consensus is broken into multiple fragments to fit within + * network transaction size limits. + * + * The use of multiple message fragments is RECOMMENDED for any message + * greater than 4KiB in total size. + * + * ### Block Stream Effects + * None + */ +message ConsensusMessageChunkInfo { + /** + * The TransactionID of the first chunk. + *

+ * This MUST be set for every chunk in a fragmented message. + */ + TransactionID initialTransactionID = 1; + + /** + * The total number of chunks in the message. + */ + int32 total = 2; + + /** + * The sequence number (from 1 to total) of the current chunk + * in the message. + */ + int32 number = 3; +} + +/** + * Submit a message for consensus.
+ * This transaction adds a new entry to the "end" of a topic, and provides + * the core function of the consensus service. + * + * Valid and authorized messages on valid topics SHALL be ordered by the + * consensus service, published in the block stream, and available to all + * subscribers on this topic via the mirror nodes.
+ * If this transaction succeeds the resulting `TransactionReceipt` SHALL contain + * the latest `topicSequenceNumber` and `topicRunningHash` for the topic.
+ * If the topic `submitKey` is set, and not an empty `KeyList`, then that key + * MUST sign this transaction. + * + * ### Block Stream Effects + * None + */ +message ConsensusSubmitMessageTransactionBody { + /** + * Topic to submit message to. + */ + TopicID topicID = 1; + + /** + * A message to be submitted. + *

+ * This Transaction (including signatures) MUST be less than 6KiB.
+ * Messages SHOULD be less than 4KiB. A "chunked" message MAY be submitted + * if a message larger than this is required. + */ + bytes message = 2; + + /** + * Information for the current "chunk" in a fragmented message. + *

+ * This value is REQUIRED if the full `message` is submitted in two or + * more fragments due to transaction size limits.
+ * If the message is submitted in a single transaction, then this + * field SHOULD NOT be set. + */ + ConsensusMessageChunkInfo chunkInfo = 3; +} diff --git a/proto/consensus_topic_info.proto b/proto/consensus_topic_info.proto new file mode 100644 index 000000000..da8e12091 --- /dev/null +++ b/proto/consensus_topic_info.proto @@ -0,0 +1,193 @@ +/** + * # Topic Information + * Query response describing a topic of the Hedera Consensus Service (HCS). + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; +import "custom_fees.proto"; +import "duration.proto"; +import "timestamp.proto"; + +/** + * A query response describing the current state of a topic for the Hedera + * Consensus Service (HCS). + */ +message ConsensusTopicInfo { + /** + * A short description of this topic. + *

+ * This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes` + * (default 100) bytes when encoded as UTF-8. + */ + string memo = 1; + + /** + * The latest running hash of the topic. + *

+ * This 48-byte field is the output of a SHA-384 digest with input + * data determined by the current version of the running hash algorithm + * used by the network.
+ * All new transactions SHALL use algorithm version `3`.
+ * The bytes of each uint64 or uint32 encoded for the hash input + * MUST be in Big-Endian format. + *

+ *


+ * If the algorithm version 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. + *
  3. The `topicRunningHashVersion` (8 bytes)
  4. + *
  5. The payer account's shard (8 bytes)
  6. + *
  7. The payer account's realm (8 bytes)
  8. + *
  9. The payer account's number (8 bytes)
  10. + *
  11. The topic's shard (8 bytes)
  12. + *
  13. The topic's realm (8 bytes)
  14. + *
  15. The topic's number (8 bytes)
  16. + *
  17. The number of seconds since the epoch when the + * `ConsensusSubmitMessage` reached consensus (8 bytes)
  18. + *
  19. The number of nanoseconds within the second when the + * `ConsensusSubmitMessage` reached consensus (4 bytes)
  20. + *
  21. The `topicSequenceNumber` (8 bytes)
  22. + *
  23. The output of a SHA-384 digest of the message bytes from the + * `ConsensusSubmitMessage` (48 bytes)
  24. + *
+ */ + bytes runningHash = 2; + + /** + * A current sequence number (starting at 1 for the first message) + * for messages on this topic. + */ + uint64 sequenceNumber = 3; + + /** + * An expiration time for this topic, in seconds since the epoch. + *

+ * For this purpose, `epoch` SHALL be the UNIX epoch + * with 0 at `1970-01-01T00:00:00.000Z`. + */ + Timestamp expirationTime = 4; + + /** + * A key that MUST sign any transaction to update or delete this topic. + *

+ * If this value is not set (null) then the topic CANNOT be deleted, + * modified, or updated. + */ + Key adminKey = 5; + + /** + * A key that MUST sign any transaction to submit a message to this topic. + *

+ * If this value is not set (null) then any account MAY submit messages to + * this topic. + */ + Key submitKey = 6; + + /** + * A duration, in seconds, to extend the `expirationTime` value when + * this topic is automatically renewed. + *

+ * If the `autoRenewAccount` value for this topic is set to a valid account + * with sufficient HBAR balance to pay renewal fees when this topic + * expires, the system SHALL automatically renew this topic, extending the + * `expirationTime` value by the number of seconds described here.
+ * If, however, the `autoRenewAccount` lacks sufficient HBAR balance + * to pay renewal fees when this topic expires, this topic SHALL be + * deleted after the time period specified in the `AUTORENEW_GRACE_PERIOD` + * configuration value. + */ + Duration autoRenewPeriod = 7; + + /** + * An account that is designated to pay automatic renewal fees. + *

+ * If this value is a valid account ID when this topic expires, + * this account SHALL be charged the renewal fees for this topic, + * if it holds sufficient HBAR balance. If the account does not hold + * sufficient HBAR balance to pay renewal fees when necessary, then + * this topic SHALL be deleted.
+ * If this value is not set (null), or is not a valid account ID, when + * this topic expires, then this topic SHALL be deleted after the time + * period specified in the `AUTORENEW_GRACE_PERIOD` configuration value. + */ + AccountID autoRenewAccount = 8; + + /** + * A ledger ID of the network that generated this response. + *

+ * This value SHALL identify the distributed ledger that responded to + * this query. + */ + bytes ledger_id = 9; + + /** + * Access control for update/delete of custom fees. + *

+ * If unset, custom fees CANNOT be set for this topic.
+ * If not set when the topic is created, this field CANNOT be set via + * update.
+ * If set when the topic is created, this field MAY be changed via update. + */ + Key fee_schedule_key = 10; + + /** + * A set of keys.
+ * Keys in this list are permitted to submit messages to this topic without + * paying custom fees associated with this topic. + *

+ * If a topic submit message is signed by _any_ key included in this set, + * custom fees SHALL NOT be charged for that transaction.
+ * `fee_exempt_key_list` MAY contain keys for accounts that are inactive, + * deleted, or non-existent.
+ * If not set, there SHALL NOT be any fee-exempt keys. In particular, the + * following keys SHALL NOT be implicitly or automatically added to this + * list: `adminKey`, `submitKey`, `fee_schedule_key`. + * A `fee_exempt_key_list` MUST NOT contain more than + * `MAX_ENTRIES_FOR_FEE_EXEMPT_KEY_LIST` keys. + * A `fee_exempt_key_list` MUST NOT contain any duplicate keys. + */ + repeated Key fee_exempt_key_list = 11; + + /** + * A set of custom fee definitions.
+ * These are fees to be assessed for each submit to this topic. + *

+ * Each fee defined in this set SHALL be evaluated for + * each message submitted to this topic, and the resultant + * total assessed fees SHALL be charged.
+ * Custom fees defined here SHALL be assessed in addition to the base + * network and node fees. + */ + repeated FixedCustomFee custom_fees = 12; +} diff --git a/proto/consensus_update_topic.proto b/proto/consensus_update_topic.proto new file mode 100644 index 000000000..02e7f6406 --- /dev/null +++ b/proto/consensus_update_topic.proto @@ -0,0 +1,185 @@ +/** + * # Update Topic + * Update a topic for the Hedera Consensus Service (HCS). + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "google/protobuf/wrappers.proto"; +import "basic_types.proto"; +import "custom_fees.proto"; +import "duration.proto"; +import "timestamp.proto"; + +/** + * Update the fields of an existing HCS topic. + * + * The topicID field is REQUIRED. All other fields are OPTIONAL.
+ * Fields set on this transaction SHALL be updated.
+ * Fields _not_ set on this transaction SHALL NOT be updated. + * + * ### Block Stream Effects + * None + */ +message ConsensusUpdateTopicTransactionBody { + /** + * The topic ID specifying the topic to update. + *

+ * A topic with this ID MUST exist and MUST NOT be deleted.
+ * This value is REQUIRED. + */ + TopicID topicID = 1; + + /** + * An updated memo to be associated with this topic. + *

+ * If this value is set, the current `adminKey` for the topic MUST sign + * this transaction.
+ * This value, if set, SHALL be encoded UTF-8 and SHALL NOT exceed + * 100 bytes when so encoded. + */ + google.protobuf.StringValue memo = 2; + + /** + * An updated expiration time for this topic, in seconds since the epoch. + *

+ * For this purpose, `epoch` SHALL be the UNIX epoch + * with 0 at `1970-01-01T00:00:00.000Z`.
+ * The expirationTime MUST NOT be greater than the sum of + * `MAX_AUTORENEW_PERIOD` and the actual consensus timestamp of + * this transaction.
+ * If `adminKey` is unset for the _topic_, this transaction MUST NOT + * modify any other field. + */ + Timestamp expirationTime = 4; + + /** + * Updated access control for modification of the topic. + *

+ * If this field is set, that key and the previously set key MUST both + * sign this transaction.
+ * If this value is an empty `KeyList`, the prior key MUST sign this + * transaction, and the topic SHALL be immutable after this transaction + * completes, except for expiration and renewal. + */ + Key adminKey = 6; + + /** + * Updated access control for message submission to the topic. + *

+ * If this value is set, the current `adminKey` for the topic MUST sign + * this transaction.
+ * If this value is set to an empty `KeyList`, the `submitKey` for the + * topic will be unset after this transaction completes. When the + * `submitKey` is unset, any account may submit a message on the topic, + * without restriction. + */ + Key submitKey = 7; + + /* + * An updated value for the number of seconds by which the topic expiration + * will be automatically extended upon expiration, if it has a valid + * auto-renew account. + *

+ * If this value is set, the current `adminKey` for the topic MUST sign + * this transaction.
+ * This value, if set, MUST be greater than the + * configured MIN_AUTORENEW_PERIOD.
+ * This value, if set, MUST be less than the + * configured MAX_AUTORENEW_PERIOD. + */ + Duration autoRenewPeriod = 8; + + /** + * An updated ID for the account to be charged renewal fees at the topic's + * `expirationTime` to extend the lifetime of the topic. + *

+ * If this value is set and not the "sentinel account", the referenced + * account MUST sign this transaction.
+ * If this value is set, the current `adminKey` for the topic MUST sign + * this transaction.
+ * If this value is set to the "sentinel account", which is `0.0.0`, the + * `autoRenewAccount` SHALL be removed from the topic. + */ + AccountID autoRenewAccount = 9; + + /** + * Access control for update/delete of custom fees. + *

+ * If set, subsequent consensus_update_topic transactions signed with this + * key MAY update or delete the custom fees for this topic.
+ * If this field is set, the admin key MUST sign this transaction.
+ * If this field is set, the previous value SHALL be replaced.
+ * If set to a 'Key' containing an empty 'KeyList', the previous value + * SHALL be cleared.
+ * If not set, the current key SHALL NOT change.
+ * If unset in state, this field MUST NOT be set in this transaction.
+ * If not set when the topic is created, this field CANNOT be set via + * update.
+ */ + Key fee_schedule_key = 10; + + /** + * A set of keys
+ * Keys in this list are permitted to submit messages to this topic without + * paying custom fees associated with this topic. + *

+ * If a submit transaction is signed by _any_ key included in this set, + * custom fees SHALL NOT be charged for that transaction.
+ * If this field is not set, the current set of keys SHALL NOT change.
+ * If this field is set, but contains an empty list, any existing fee-exempt + * keys SHALL be removed.
+ * A `fee_exempt_key_list` MUST NOT contain more than + * `MAX_ENTRIES_FOR_FEE_EXEMPT_KEY_LIST` keys.
+ * A `fee_exempt_key_list` MUST NOT contain any duplicate keys.
+ * A `fee_exempt_key_list` MAY contain keys for accounts that are inactive, + * deleted, or non-existent. + */ + FeeExemptKeyList fee_exempt_key_list = 11; + + /** + * A set of custom fee definitions.
+ * These are fees to be assessed for each submit to this topic. + *

+ * Each fee defined in this set SHALL be evaluated for + * each message submitted to this topic, and the resultant + * total assessed fees SHALL be charged.
+ * Custom fees defined here SHALL be assessed in addition to the base + * network and node fees.
+ * If this field is not set, the current set of custom fees + * SHALL NOT change.
+ * If this field is set, but contains an empty list, all current custom fees + * SHALL be removed. + * custom_fees list SHALL NOT contain more than + * `MAX_CUSTOM_FEE_ENTRIES_FOR_TOPICS` entries. + */ + FixedCustomFeeList custom_fees = 12; +} diff --git a/proto/contract_call.proto b/proto/contract_call.proto new file mode 100644 index 000000000..604560c3a --- /dev/null +++ b/proto/contract_call.proto @@ -0,0 +1,87 @@ +/** + * # Contract Call + * Transaction body for calls to a Smart Contract. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; + +/** + * Call a function of a given smart contract, providing function parameter + * inputs as needed. + * + * Resource ("gas") charges SHALL include all relevant fees incurred by the + * contract execution, including any storage required.
+ * The total transaction fee SHALL incorporate all of the "gas" actually + * consumed as well as the standard fees for transaction handling, data + * transfers, signature verification, etc...
+ * The response SHALL contain the output returned by the function call. + * + * ### Block Stream Effects + * A `CallContractOutput` message SHALL be emitted for each transaction. + */ +message ContractCallTransactionBody { + /** + * The ID of a smart contract to call. + */ + ContractID contractID = 1; + + /** + * A maximum limit to the amount of gas to use for this call. + *

+ * The network SHALL charge the greater of the following, but + * SHALL NOT charge more than the value of this field. + *

    + *
  1. The actual gas consumed by the smart contract call.
  2. + *
  3. `80%` of this value.
  4. + *
+ * The `80%` factor encourages reasonable estimation, while allowing for + * some overage to ensure successful execution. + */ + int64 gas = 2; + + /** + * An amount of tinybar sent via this contract call. + *

+ * If this is non-zero, the function MUST be `payable`. + */ + int64 amount = 3; + + /** + * The smart contract function to call. + *

+ * This MUST contain The application binary interface (ABI) encoding of the + * function call per the Ethereum contract ABI standard, giving the + * function signature and arguments being passed to the function. + */ + bytes functionParameters = 4; +} diff --git a/proto/contract_call_local.proto b/proto/contract_call_local.proto new file mode 100644 index 000000000..394b97372 --- /dev/null +++ b/proto/contract_call_local.proto @@ -0,0 +1,134 @@ +/** + * # Local Contract Call + * A Contract Call executed directly on the current node + * (that is, without consensus). + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; +import "contract_types.proto"; +import "query_header.proto"; +import "response_header.proto"; + +/** + * Call a view function of a given smart contract
+ * The call must provide function parameter inputs as needed.
+ * This is potentially useful for calling view functions that will not revert + * when executed in a static EVM context. Many such use cases will be better + * served by using a Mirror Node API, however. + * + * This is performed locally on the particular node that the client is + * communicating with. Executing the call locally is faster and less costly, + * but imposes certain restrictions.
+ * The call MUST NOT change the state of the contract instance. This also + * precludes any expenditure or transfer of HBAR or other tokens.
+ * The call SHALL NOT have a separate consensus timestamp.
+ * The call SHALL NOT generate a record nor a receipt.
+ * The response SHALL contain the output returned by the function call.
+ * Any contract call that would use the `STATICCALL` opcode MAY be called via + * contract call local with performance and cost benefits. + * + * Unlike a ContractCall transaction, the node SHALL always consume the + * _entire_ amount of offered "gas" in determining the fee for this query, so + * accurate gas estimation is important. + */ +message ContractCallLocalQuery { + /** + * Standard information sent with every query operation.
+ * This includes the signed payment and what kind of response is requested + * (cost, state proof, both, or neither). + *

+ * The payment MUST be sufficient for the base fees _and_ the full amount + * in the `gas` field. + */ + QueryHeader header = 1; + + /** + * The ID of a smart contract to call. + */ + ContractID contractID = 2; + + /** + * The amount of "gas" to use for this call. + *

+ * This transaction SHALL consume all of the gas offered and charge the + * corresponding fee according to the current exchange rate between + * HBAR and "gas". + */ + int64 gas = 3; + + /** + * The smart contract function to call, and the parameters to pass to that + * function. + *

+ * These SHALL be presented in EVM bytecode function call format. + */ + bytes functionParameters = 4; + + /** + * Do not use this field; it is ignored in the current software. + *

+ * The maximum number of bytes that the result might include.
+ * The call will fail if it would have returned more than this number + * of bytes. + */ + int64 maxResultSize = 5 [deprecated = true]; + + /** + * The account that is the "sender" for this contract call. + *

+ * If this is not set it SHALL be interpreted as the accountId from the + * associated transactionId.
+ * If this is set then either the associated transaction or the foreign + * transaction data MUST be signed by the referenced account. + */ + AccountID sender_id = 6; +} + +/** + * The response returned by a `ContractCallLocalQuery` transaction. + */ +message ContractCallLocalResponse { + /** + * The standard response information for queries.
+ * This includes the values requested in the `QueryHeader` + * (cost, state proof, both, or neither). + */ + ResponseHeader header = 1; + + /** + * The result(s) returned by the function call, if successful. + *

+ * If the call failed this value SHALL be unset. + */ + ContractFunctionResult functionResult = 2; +} diff --git a/proto/contract_create.proto b/proto/contract_create.proto new file mode 100644 index 000000000..401626740 --- /dev/null +++ b/proto/contract_create.proto @@ -0,0 +1,290 @@ +/** + * # Smart Contract Create + * + * Create a new smart contract. + * + * ## General Comments + * - A smart contract 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 characteristic + * is generally true if the contract instance was created without a value + * for the `adminKey` field. For some uses, however, it may 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 `adminKey` is set to a valid Key (which MAY be complex), then a + * transaction that can change the state of the smart contract in arbitrary + * ways MAY be signed with enough signatures to activate that Key. Such + * transactions might reverse a transaction, change the code to close an + * unexpected loophole, remove an exploit, or adjust outputs in ways not + * covered by the code itself. The admin key MAY also be used to change the + * autoRenewPeriod, and change the adminKey field itself (for example, to + * remove that key after a suitable testing period). The API currently does + * not implement all relevant capabilities. But it does allow the `adminKey` + * field to be set and queried, and MAY implement further administrative + * capability in future releases. + * - The current API ignores shardID, realmID, and newRealmAdminKey, and + * creates everything in shard 0 and realm 0. Future versions of the system + * MAY support additional shards and realms. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; +import "duration.proto"; + +/** + * Create a new smart contract. + * + * If this transaction succeeds, the `ContractID` for the new smart contract + * SHALL be set in the transaction receipt.
+ * The contract is defined by the initial bytecode (or `initcode`). The + * `initcode` SHALL be stored either in a previously created file, or in the + * transaction body itself for very small contracts. + * + * As part of contract creation, the constructor defined for the new smart + * contract SHALL run with the parameters provided in the + * `constructorParameters` field.
+ * The gas to "power" that constructor MUST be provided via the `gas` field, + * and SHALL be charged to the payer for this transaction.
+ * If the contract _constructor_ stores information, it is charged gas for that + * storage. There is a separate fee in HBAR to maintain that storage until the + * expiration, and that fee SHALL be added to this transaction as part of the + * _transaction fee_, rather than gas. + * + * ### Block Stream Effects + * A `CreateContractOutput` message SHALL be emitted for each transaction. + */ +message ContractCreateTransactionBody { + + oneof initcodeSource { + /** + * The source for the smart contract EVM bytecode. + *

+ * The file containing the smart contract initcode. + * A copy of the contents SHALL be made and held as `bytes` + * in smart contract state.
+ * The contract bytecode is limited in size only by the + * network file size limit. + */ + FileID fileID = 1; + + /** + * The source for the smart contract EVM bytecode. + *

+ * The bytes of the smart contract initcode. A copy of the contents + * SHALL be made and held as `bytes` in smart contract state.
+ * This value is limited in length by the network transaction size + * limit. This entire transaction, including all fields and signatures, + * MUST be less than the network transaction size limit. + */ + bytes initcode = 16; + } + + /** + * Access control for modification of the smart contract after + * it is created. + *

+ * If this field is set, that key MUST sign this transaction.
+ * If this field is set, that key MUST sign each future transaction to + * update or delete the contract.
+ * An updateContract transaction that _only_ extends the topic + * expirationTime (a "manual renewal" transaction) SHALL NOT require + * admin key signature. + *

+ * A contract without an admin key SHALL be immutable, except for + * expiration and renewal. + */ + Key adminKey = 3; + + /** + * A maximum limit to the amount of gas to use for the constructor call. + *

+ * The network SHALL charge the greater of the following, but SHALL NOT + * charge more than the value of this field. + *

    + *
  1. The actual gas consumed by the smart contract + * constructor call.
  2. + *
  3. `80%` of this value.
  4. + *
+ * The `80%` factor encourages reasonable estimation, while allowing for + * some overage to ensure successful execution. + */ + int64 gas = 4; + + /** + * The amount of HBAR to use as an initial balance for the account + * representing the new smart contract. + *

+ * This value is presented in tinybar + * (10-8 HBAR).
+ * The HBAR provided here will be withdrawn from the payer account that + * signed this transaction. + */ + int64 initialBalance = 5; + + /** + * Proxy account staking is handled via `staked_id`. + *

+ * Former field to designate a proxy account for HBAR staking. + * This field MUST NOT be set. + */ + AccountID proxyAccountID = 6 [deprecated = true]; + + /** + * The initial lifetime, in seconds, for the smart contract, and the number + * of seconds for which the smart contract will be automatically renewed + * upon expiration. + *

+ * This value MUST be set.
+ * This value MUST be greater than the configured MIN_AUTORENEW_PERIOD.
+ * This value MUST be less than the configured MAX_AUTORENEW_PERIOD.
+ */ + Duration autoRenewPeriod = 8; + + /** + * An array of bytes containing the EVM-encoded parameters to pass to + * the smart contract constructor defined in the smart contract init + * code provided. + */ + bytes constructorParameters = 9; + + /** + *

Review Question
+ *
Should this be deprecated?
+ * It's never been used and probably never should be used...
+ * Shard should be determined by the node the transaction is submitted to. + *
+ *

+ * The shard in which to create the new smart contract.
+ * This value is currently ignored. + */ + ShardID shardID = 10; + + /** + *

Review Question
+ *
Should this be deprecated?
+ * It's never been used and probably never should be used...
+ * Realm should be determined by node and network parameters. + *
+ *

+ * The shard/realm in which to create the new smart contract.
+ * This value is currently ignored. + */ + RealmID realmID = 11; + + /** + *

Review Question
+ *
Should this be deprecated?
+ * It's never been used and probably never should be used...
+ * If a realm is used, it must already exist; we shouldn't be creating it + * without a separate transaction.
+ *

+ * This was intended to provide an admin key for any new realm created + * during the creation of the smart contract.
+ * This value is currently ignored. a new realm SHALL NOT be created, + * regardless of the value of `realmID`. + */ + Key newRealmAdminKey = 12; + + /** + * A short memo for this smart contract. + *

+ * This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes` + * (default 100) bytes when encoded as UTF-8. + */ + string memo = 13; + + /** + * The maximum number of tokens that can be auto-associated with this + * smart contract. + *

+ * If this is less than or equal to `used_auto_associations` (or 0), then + * this contract MUST manually associate with a token before transacting + * in that token.
+ * Following HIP-904 This value may also be `-1` to indicate no limit.
+ * This value MUST NOT be less than `-1`. + */ + int32 max_automatic_token_associations = 14; + + /** + * The id of an account, in the same shard and realm as this smart + * contract, that has signed this transaction, allowing the network to use + * its balance, when needed, to automatically extend this contract's + * expiration time. + *

+ * If this field is set, that key MUST sign this transaction.
+ * If this field is set, then the network SHALL deduct the necessary fees + * from the designated auto renew account, if that account has sufficient + * balance. If the auto renew account does not have sufficient balance, + * then the fees for contract renewal SHALL be deducted from the HBAR + * balance held by the smart contract.
+ * If this field is not set, then all renewal fees SHALL be deducted from + * the HBAR balance held by this contract. + */ + AccountID auto_renew_account_id = 15; + + oneof staked_id { + + /** + * An account ID. + *

+ * This smart contract SHALL stake its HBAR via this account as proxy. + */ + AccountID staked_account_id = 17; + + /** + * The ID of a network node. + *

+ * This smart contract SHALL stake its HBAR to this node. + *

+ *

Note: node IDs do fluctuate as node operators change. + * Most contracts are immutable, and a contract staking to an invalid + * node ID SHALL NOT participate in staking. Immutable contracts MAY + * find it more reliable to use a proxy account for staking + * (via `staked_account_id`) to enable updating the _effective_ staking + * node ID when necessary through updating the proxy + * account.
+ */ + int64 staked_node_id = 18; + } + + /** + * A flag indicating that this smart contract declines to receive any + * reward for staking its HBAR balance to help secure the network. + *

+ * If set to true, this smart contract SHALL NOT receive any reward for + * staking its HBAR balance to help secure the network, regardless of + * staking configuration, but MAY stake HBAR to support the network + * without reward. + */ + bool decline_reward = 19; +} diff --git a/proto/contract_delete.proto b/proto/contract_delete.proto new file mode 100644 index 000000000..a8c9b4b86 --- /dev/null +++ b/proto/contract_delete.proto @@ -0,0 +1,102 @@ +/** + * # Contract Delete + * Delete a smart contract, transferring any remaining balance to a + * designated account. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; + +/** + * Delete a smart contract, and transfer any remaining HBAR balance to a + * designated account. + * + * If this call succeeds then all subsequent calls to that smart contract + * SHALL execute the `0x0` opcode, as required for EVM equivalence. + * + * ### Requirements + * - An account or smart contract MUST be designated to receive all remaining + * account balances. + * - The smart contract MUST have an admin key set. If the contract does not + * have `admin_key` set, then this transaction SHALL fail and response code + * `MODIFYING_IMMUTABLE_CONTRACT` SHALL be set. + * - If `admin_key` is, or contains, an empty `KeyList` key, it SHALL be + * treated the same as an admin key that is not set. + * - The `Key` set for `admin_key` on the smart contract MUST have a valid + * signature set on this transaction. + * - The designated receiving account MAY have `receiver_sig_required` set. If + * that field is set, the receiver account MUST also sign this transaction. + * - The field `permanent_removal` MUST NOT be set. That field is reserved for + * internal system use when purging the smart contract from state. Any user + * transaction with that field set SHALL be rejected and a response code + * `PERMANENT_REMOVAL_REQUIRES_SYSTEM_INITIATION` SHALL be set. + * + * ### Block Stream Effects + * None + */ +message ContractDeleteTransactionBody { + /** + * The id of the contract to be deleted. + *

+ * This field is REQUIRED. + */ + ContractID contractID = 1; + + oneof obtainers { + /** + * An Account ID recipient. + *

+ * This account SHALL receive all HBAR and other tokens still owned by + * the contract that is removed. + */ + AccountID transferAccountID = 2; + + /** + * A contract ID recipient. + *

+ * This contract SHALL receive all HBAR and other tokens still owned by + * the contract that is removed. + */ + ContractID transferContractID = 3; + } + + /** + * A flag indicating that this transaction is "synthetic"; initiated by the + * node software. + *

+ * The consensus nodes create such "synthetic" transactions to both to + * properly manage state changes and to communicate those changes to other + * systems via the Block Stream.
+ * A user-initiated transaction MUST NOT set this flag. + */ + bool permanent_removal = 4; +} diff --git a/proto/contract_get_bytecode.proto b/proto/contract_get_bytecode.proto new file mode 100644 index 000000000..f5d4331cc --- /dev/null +++ b/proto/contract_get_bytecode.proto @@ -0,0 +1,75 @@ +/** + * # Get Contract Bytecode + * A standard query to read the current bytecode for a smart contract. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; +import "query_header.proto"; +import "response_header.proto"; + +/** + * A transaction body to request the current bytecode for a smart contract. + */ +message ContractGetBytecodeQuery { + /** + * Standard information sent with every query operation.
+ * This includes the signed payment and what kind of response is requested + * (cost, state proof, both, or neither). + */ + QueryHeader header = 1; + + /** + * A smart contract ID. + *

+ * The network SHALL return bytecode for this smart contract, if successful. + */ + ContractID contractID = 2; +} + +/** + * Information returned in response to a "get bytecode" query for a + * smart contract. + */ +message ContractGetBytecodeResponse { + /** + * The standard response information for queries.
+ * This includes the values requested in the `QueryHeader` + * (cost, state proof, both, or neither). + */ + ResponseHeader header = 1; + + /** + * The current bytecode of the requested smart contract. + */ + bytes bytecode = 6; +} diff --git a/proto/contract_get_info.proto b/proto/contract_get_info.proto new file mode 100644 index 000000000..26bf05235 --- /dev/null +++ b/proto/contract_get_info.proto @@ -0,0 +1,181 @@ +/** + * # Contract Get Info + * A standard query to obtain detailed information about a smart contract. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "timestamp.proto"; +import "duration.proto"; +import "basic_types.proto"; +import "query_header.proto"; +import "response_header.proto"; + +/** + * Request detailed information about a smart contract. + */ +message ContractGetInfoQuery { + /** + * Standard information sent with every query operation.
+ * This includes the signed payment and what kind of response is requested + * (cost, state proof, both, or neither). + */ + QueryHeader header = 1; + + /** + * A smart contract ID. + *

+ * The network SHALL return information for this smart contract, + * if successful. + */ + ContractID contractID = 2; +} + +/** + * Information returned in response to a "get info" query for a smart contract. + */ +message ContractGetInfoResponse { + /** + * The standard response information for queries.
+ * This includes the values requested in the `QueryHeader` + * (cost, state proof, both, or neither). + */ + ResponseHeader header = 1; + + /** + * The information, as requested, for a smart contract. + * A state proof MAY be generated for this value. + */ + ContractInfo contractInfo = 2; + + message ContractInfo { + /** + * The ID of the smart contract requested in the query. + */ + ContractID contractID = 1; + + /** + * The Account ID for the account entry associated with this + * smart contract. + */ + AccountID accountID = 2; + + /** + * The "Solidity" form contract ID.
+ * This is a hexadecimal string form of the 20-byte EVM address + * of the contract. + */ + string contractAccountID = 3; + + /** + * The key that MUST sign any transaction to update or modify this + * smart contract. + *

+ * If this value is null, or is an empty `KeyList` then the contract + * CANNOT be deleted, modified, or updated, but MAY still expire. + */ + Key adminKey = 4; + + /** + * The point in time at which this contract will expire. + */ + Timestamp expirationTime = 5; + + /** + * The duration, in seconds, for which the contract lifetime will be + * automatically extended upon expiration, provide sufficient HBAR is + * available at that time to pay the renewal fee.
+ * See `auto_renew_account_id` for additional conditions. + */ + Duration autoRenewPeriod = 6; + + /** + * The amount of storage used by this smart contract. + */ + int64 storage = 7; + + /** + * A short description of this smart contract. + *

+ * This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes` + * (default 100) bytes when encoded as UTF-8. + */ + string memo = 8; + + /** + * The current HBAR balance, in tinybar, of the smart contract account. + */ + uint64 balance = 9; + + /** + * A flag indicating that this contract is deleted. + */ + bool deleted = 10; + + /** + * Because HIP-367, + * which allows an account to be associated to an unlimited number of + * tokens, it became necessary to only provide this information from + * a Mirror Node.
+ * The list of tokens associated to this contract. + */ + repeated TokenRelationship tokenRelationships = 11 [deprecated = true]; + + /** + * The ledger ID of the network that generated this response. + *

+ * This value SHALL identify the distributed ledger that responded to + * this query. + */ + bytes ledger_id = 12; + + /** + * An account designated to pay the renewal fee upon automatic renewal + * of this contract. + *

+ * If this is not set, or is set to an account with zero HBAR + * available, the HBAR balance of the contract, if available, + * SHALL be used to pay the renewal fee. + */ + AccountID auto_renew_account_id = 13; + + /** + * The maximum number of tokens that the contract can be + * associated to automatically. + */ + int32 max_automatic_token_associations = 14; + + /** + * Staking information for this contract. + */ + StakingInfo staking_info = 15; + } +} diff --git a/proto/contract_get_records.proto b/proto/contract_get_records.proto new file mode 100644 index 000000000..6f3ba566b --- /dev/null +++ b/proto/contract_get_records.proto @@ -0,0 +1,88 @@ +/** + * # Get contract records + * Deprecated query messages to read all recent contract transaction records. + * + * > REVIEW QUESTION + * >> Can we delete this file and remove the related query entirely? + * >> It appears it hasn't been supported for over 3½ years... + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; +import "transaction_record.proto"; +import "query_header.proto"; +import "response_header.proto"; + +/** + * Deprecated and not supported after release `0.9.0`. + * Request records of all transactions against the given contract in the last 25 hours. + */ +message ContractGetRecordsQuery { + option deprecated = true; + /** + * Standard information sent with every query operation.
+ * This includes the signed payment and what kind of response is requested + * (cost, state proof, both, or neither). + */ + QueryHeader header = 1; + + /** + * A smart contract ID. + *

+ * The network SHALL return information for this smart contract, if successful. + */ + ContractID contractID = 2; +} + +/** + * Deprecated and not supported after release `0.9.0`. + * Response with records of all transactions against the given contract in the last 25 hours. + */ +message ContractGetRecordsResponse { + option deprecated = true; + /** + * The standard response information for queries.
+ * This includes the values requested in the `QueryHeader` + * (cost, state proof, both, or neither). + */ + ResponseHeader header = 1; + + /** + * A smart contract that this response describes. + */ + ContractID contractID = 2; + + /** + * A list of records, each with contractCreateResult or contractCallResult as its body + */ + repeated TransactionRecord records = 3; +} diff --git a/proto/contract_types.proto b/proto/contract_types.proto new file mode 100644 index 000000000..669ef46b2 --- /dev/null +++ b/proto/contract_types.proto @@ -0,0 +1,248 @@ +/** + * # Contract Message Types + * Message types used in contract transactions. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; +import "google/protobuf/wrappers.proto"; + +/** + * A contract "nonce" reference.
+ * This connects a contract and its "nonce" value, and is primarily for use in + * query responses. A "nonce" is short for "nonsense" and is usually a value + * with no particular meaning. + * + * The nonce of a contract SHALL be incremented when that contract creates + * another contract. + */ +message ContractNonceInfo { + /** + * A contract identifier.
+ * This refers to the contract that holds this nonce value. + */ + ContractID contract_id = 1; + + /** + * A "nonce" value. + * The current value of the nonce associated with the identified contract. + */ + int64 nonce = 2; +} + +/** + * EVM log data for a contract call.
+ * The EVM log information produced by a smart contract function call. + * + * Each contract function call MAY return zero or more log events. + */ +message ContractLoginfo { + /** + * A contract identifier.
+ * This refers to the contract that generated this log entry. + */ + ContractID contractID = 1; + + /** + * A bloom filter.
+ * This filter applies to this log entry and indexes the contract log data + * in the full data of the Ethereum block.
+ * EIP-7668 proposes to remove bloom filters as they are quite low value + * in practice and separate indexing services are more effective. + */ + bytes bloom = 2; + + /** + * A list of the "topics" in this log entry.
+ * The EVM permits up to 4 topics, each of which is 32 bytes (one EVM word). + *

+ * The first "topic" is special, and MUST contain the keccak256 hash of the + * event signature, if the event is not anonymous. + */ + repeated bytes topic = 3; + + /** + * Event data for this log entry.
+ * This is binary data consisting of an arbitrary number of 256 bit + * (32 byte) words. The content of that data is determined by the smart + * contract code.
+ */ + bytes data = 4; +} + +/** + * A contract function result.
+ * 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. The ContractCreateInstance transaction record also carries a + * function result, which is the results of the call to the constructor. + */ +message ContractFunctionResult { + // No comments here: PBJ issue #217 + reserved 8; // Removed Field. + + /** + * A contract identifier.
+ * This identifies the smart contract that defines the function called. + */ + ContractID contractID = 1; + + /** + * Result data from the function call. + *

+ * This SHALL be encoded in RLP bytecode format. + */ + bytes contractCallResult = 2; + + /** + * Any error message produced by the contract call. + *

+ * This SHALL be unset if the contract call succeeded. + */ + string errorMessage = 3; + + /** + * A bloom filter produced by this contract call.
+ * Ethereum uses this bloom filter to search for call results in the + * Ethereum block history. High false positive rates make the bloom + * filters quite limited value. + */ + bytes bloom = 4; + + /** + * A quantity of "gas" used.
+ * This represents the resource units expended to execute this + * contract call, and correlates to transaction costs. + */ + uint64 gasUsed = 5; + + /** + * Any Log events produced by this contract call. + */ + repeated ContractLoginfo logInfo = 6; + + /** + * Replaced by values in transaction records to support + * `CREATE2` calls.
+ *

+ * The list of smart contracts that were created by the function call.
+ * The created ids will now _also_ be externalized through internal + * transaction records, where each record has its alias field populated + * with the new contract's EVM address.
+ * This is needed for contracts created with CREATE2, which removes the + * trivial relationship between a new contract's Identifier and its + * Solidity address. + */ + repeated ContractID createdContractIDs = 7 [deprecated = true]; + + /** + * A created contract address.
+ * If the function created a new contract (e.g. `CREATE2`), + * this is the primary 20-byte EVM address for that contract. + *

+ * Every contract SHALL have a "base" EVM address that is determined by its + * `shard.realm.num` contract ID.
+ * This address is constructed as follows + *

    + *
  1. The first 4 bytes are the big-endian + * representation of the shard.
  2. + *
  3. The next 8 bytes are the big-endian + * representation of the realm.
  4. + *
  5. The final 8 bytes are the big-endian + * representation of the number.
  6. + *
+ *

+ * Contracts created via `CREATE2` SHALL have an _additional_, primary, + * address that is derived from the + * EIP-1014 + * specification. This additional address SHALL NOT be directly related to + * the `shard.realm.num` contract ID.
+ * It should be emphasized that Contracts created via a `CREATE2` call can + * also be referenced via the same "base" EVM address as described above. + */ + google.protobuf.BytesValue evm_address = 9; + + /** + * The amount of gas available for this call, sometimes referred to as the + * gasLimit.
+ * This field SHALL NOT be populated when the associated `TransactionBody` + * in the block stream is a `ContractCreateTransactionBody` or + * a `ContractCallTransactionBody`. + */ + int64 gas = 10; + + /** + * An amount, in tinybar, sent by this function call.
+ * This SHALL be zero(0) if the function called is not `payable`.
+ * This field SHALL NOT be populated when the associated `TransactionBody` + * in the block stream is a `ContractCreateTransactionBody` or + * a `ContractCallTransactionBody`. + */ + int64 amount = 11; + + /** + * The smart contract function to call, and the parameters to pass to that + * function.
+ * These SHALL be presented in EVM bytecode function call format.
+ * This field SHALL NOT be populated when the associated `TransactionBody` + * in the block stream is a `ContractCreateTransactionBody` or + * a `ContractCallTransactionBody`. + */ + bytes functionParameters = 12; + + /** + * The account that was the "sender" for this contract call.
+ * If this is not set it SHALL be read from the accountId in the + * transactionId for the contract call.
+ * This field SHALL NOT be populated when the associated `TransactionBody` + * in the block stream is a `ContractCreateTransactionBody` or + * a `ContractCallTransactionBody`. + */ + AccountID sender_id = 13; + + /** + * A list of contract account nonce values.
+ * This list SHALL contain a nonce value for each contract account modified + * as a result of this contract call. These nonce values SHALL be the value + * after the contract call is completed. + */ + repeated ContractNonceInfo contract_nonces = 14; + + /** + * A nonce value for the "signer account".
+ * If the contract call updated the signer nonce for the signer account + * (i.e. by creating another contract), this field SHALL contain the + * updated value.
+ * If the signer account nonce was not updated, this field SHALL be `null`. + */ + google.protobuf.Int64Value signer_nonce = 15; +} diff --git a/proto/contract_update.proto b/proto/contract_update.proto new file mode 100644 index 000000000..7923b2883 --- /dev/null +++ b/proto/contract_update.proto @@ -0,0 +1,196 @@ +/** + * # Contract Update + * Modify a smart contract. Any change other than updating the expiration time + * requires that the contract be modifiable (has a valid `adminKey`) and that + * the transaction be signed by the `adminKey` + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; +import "duration.proto"; +import "timestamp.proto"; +import "google/protobuf/wrappers.proto"; + +/** + * Modify the current state of a smart contract. + * + * ### Requirements + * - The `adminKey` MUST sign all contract update transactions except one + * that only updates the `expirationTime`. + * - A transaction that modifies any field other than `expirationTime` for + * a contract without a valid `adminKey` set SHALL fail with response + * code `MODIFYING_IMMUTABLE_CONTRACT`. + * - Fields set to non-default values in this transaction SHALL be updated on + * success. Fields not set to non-default values SHALL NOT be + * updated on success. + * + * ### Block Stream Effects + * None + */ +message ContractUpdateTransactionBody { + /** + * The contact ID that identifies the smart contract to be updated.
+ * This field MUST be set, and MUST NOT be a default ID (`0.0.0`). + */ + ContractID contractID = 1; + + /** + * If set, modify the time at which this contract will expire.
+ * An expired contract requires a rent payment to "renew" the contract. + * A transaction to update this field is how that rent payment is made. + *

+ * This value MUST NOT be less than the current `expirationTime` + * of the contract. If this value is earlier than the current + * value, the transaction SHALL fail with response + * code `EXPIRATION_REDUCTION_NOT_ALLOWED`. + */ + Timestamp expirationTime = 2; + + /** + * If set, modify the key that authorizes updates to the contract. + *

+ * If this field is set to a valid Key, this key and the previously set key + * MUST both sign this transaction.
+ * If this value is an empty `KeyList`, the prior key MUST sign this + * transaction, and the smart contract SHALL be immutable after this + * transaction completes, except for expiration and renewal.
+ * If this value is not an empty `KeyList`, but does not contain any + * cryptographic keys, or is otherwise malformed, this transaction SHALL + * fail with response code `INVALID_ADMIN_KEY`. + */ + Key adminKey = 3; + + /** + * Replaced with `staked_id` alternatives. + * This field is unused and SHALL NOT modify the contract state.
+ * The id of an account to which the contract is proxy staked + */ + AccountID proxyAccountID = 6 [deprecated = true]; + + /** + * If set, modify the duration added to expiration time by each + * auto-renewal to this value. + */ + Duration autoRenewPeriod = 7; + + /** + * This field is unused and SHALL NOT modify the contract state.
+ * Previously, an ID of a file containing the bytecode of the Solidity + * transaction that created this contract. + */ + FileID fileID = 8 [deprecated = true]; + + // This should be condensed to just a field instead of a oneof and field 9 reserved. + oneof memoField { + /** + * This value could not accurately distinguish unset or deliberately + * empty. memoWrapper should be used instead.
+ */ + string memo = 9 [deprecated = true]; + + /** + * If set, modify the short memo for this smart contract. + *

+ * This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes` + * (default 100) bytes when encoded as UTF-8. + */ + google.protobuf.StringValue memoWrapper = 10; + } + + /** + * If set, modify the maximum number of tokens that can be auto-associated with the + * contract. + *

+ * If this is set and less than or equal to `used_auto_associations`, or 0, then this contract + * MUST manually associate with a token before transacting in that token.
+ * This value MAY also be `-1` to indicate no limit.
+ * This value MUST NOT be less than `-1`. + */ + google.protobuf.Int32Value max_automatic_token_associations = 11; + + /** + * If set, modify the account, in the same shard and realm as this smart + * contract, that has agreed to allow the network to use its balance, when + * needed, to automatically extend this contract's expiration time. + *

+ * If this field is set to a non-default value, that Account MUST sign this + * transaction.
+ * If this field is set to a default AccountID value (`0.0.0`), any + * pre-existing `auto_renew_account_id` value SHALL be removed on success. + */ + AccountID auto_renew_account_id = 12; + + oneof staked_id { + /** + * An account identifier.
+ * A staked account acts as a proxy, and this contract effectively + * nominates the same node as the identified account. + *

+ * If set, modify this smart contract such that it SHALL stake its HBAR + * to the same node as the identified account.
+ * If this field is set to a default AccountID value (`0.0.0`), any + * pre-existing `staked_account_id` value SHALL be removed on success. + */ + AccountID staked_account_id = 13; + + /** + * A node identifier.
+ * A staked node identifier indicates the consensus node that this + * account nominates for staking. + *

+ * If set, modify this smart contract such that it SHALL stake its HBAR + * to this node. + * If set to a the value `-1` any pre-existing `staked_node_id` value + * SHALL be removed on success. + *

+ *

Note: node IDs do fluctuate as node operators change. + * Most contracts are immutable, and a contract staking to an invalid + * node ID SHALL NOT participate in staking. Immutable contracts may + * find it more reliable to use a proxy account for staking (via + * `staked_account_id`) to enable updating the _effective_ staking node + * ID when necessary through updating the proxy account.
+ */ + int64 staked_node_id = 14; + } + + /** + * A flag indicating if staking rewards are declined.
+ * If set, modify the flag indicating if this contract declines to accept + * rewards for staking its HBAR to secure the network. + *

+ * If set to true, this smart contract SHALL NOT receive any reward for + * staking its HBAR balance to help secure the network, regardless of + * staking configuration, but MAY stake HBAR to support the network + * without reward. + */ + google.protobuf.BoolValue decline_reward = 15; +} diff --git a/proto/crypto_add_live_hash.proto b/proto/crypto_add_live_hash.proto new file mode 100644 index 000000000..3bf71cbe4 --- /dev/null +++ b/proto/crypto_add_live_hash.proto @@ -0,0 +1,101 @@ +/** + * # Add Live Hash + * Associate content to an account via a SHA-384 hash. + * + * > Important + * >> This transaction is obsolete and not supported.
+ * >> Any transaction of this type that is submitted SHALL fail + * >> with a `PRE_CHECK` result of `NOT_SUPPORTED`. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + + +import "basic_types.proto"; +import "duration.proto"; + +/** + * A Live Hash value associating some item of content to an account. + * + * This message represents a desired entry in the ledger for a SHA-384 + * hash of some content, an associated specific account, a list of authorized + * keys, and a duration the live hash is "valid". + */ +message LiveHash { + /** + * An account associated via this live hash to the hashed content. + */ + AccountID accountId = 1; + + /** + * A SHA-384 hash of some content that is associated to the account + * or account holder. + */ + bytes hash = 2; + + /** + * A list of keys, all of which MUST sign the transaction to add the + * live hash.
+ * Any one of these keys may, however, remove the live hash to revoke + * the association. + */ + KeyList keys = 3; + + /** + * A duration describing how long this Live Hash SHALL remain valid.
+ * A Live Hash SHOULD NOT be relied upon after this duration has elapsed. + */ + Duration duration = 5; +} + +/** + * Add a hash value to the ledger and associate it with an account. + * + * Create an entry in the ledger for a SHA-384 hash of some content, and + * associate that with a specific account. This is sometimes used to associate + * a credential or certificate with an account as a public record.
+ * The entry created is also associated with a list of keys, all of which + * MUST sign this transaction.
+ * The account key for the associated account MUST sign this transaction.
+ * + * The live hash, once created, MAY be removed from the ledger with one + * or more signatures. + * - The account key of the account associated to the live hash. + * - Any one key from the key list in the live hash entry. + * - Any combination of keys from the key list in the live hash entry. + */ +message CryptoAddLiveHashTransactionBody { + /** + * A Live Hash to be added to the ledger and associated with + * the identified account. + */ + LiveHash liveHash = 3; +} diff --git a/proto/crypto_approve_allowance.proto b/proto/crypto_approve_allowance.proto new file mode 100644 index 000000000..d87507b89 --- /dev/null +++ b/proto/crypto_approve_allowance.proto @@ -0,0 +1,258 @@ +/** + * # Approve Allowance + * This transaction body provides a mechanism to add "allowance" entries + * for an account. These allowances enable one account to spend or transfer + * token balances (for fungible/common tokens), individual tokens (for + * non-fungible/unique tokens), or all non-fungible tokens owned by the + * account, now or in the future (if `approved_for_all` is set). + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; +import "google/protobuf/wrappers.proto"; + +/** + * Create ("Approve") allowances for one account to transfer tokens owned + * by a different account.
+ * An allowance permits a "spender" account to independently transfer tokens + * owned by a separate "owner" account. Each such allowance permits spending + * any amount, up to a specified limit, for fungible/common tokens; a single + * specified non-fungible/unique token, or all non-fungible/unique tokens + * of a particular token type held by the "owner" account. + * + * If the "owner" account is not specified for any allowance in this + * transaction (the `owner` field is not set), the `payer` account for this + * transaction SHALL be owner for that allowance.
+ * Each `owner` account specified in any allowance approved in this + * transaction MUST sign this transaction.
+ * If the `amount` field for any fungible/common allowance in this + * transaction is `0`, then that allowance SHOULD match an existing, + * previously approved, allowance which SHALL be removed.
+ * There are three lists in this message. Each list MAY be empty, but + * _at least one_ list MUST contain _at least one_ entry. + * + * Example for the `payer` rule.
+ * - Given an account `0.0.X` that pays for this transaction, and owner + * is not specified in an allowance of `200` HBAR to spender account + * `0.0.Y`. At consensus the spender account `0.0.Y` will have a new + * allowance to spend `200` HBAR from the balance of account `0.0.X`. + * + * ### Block Stream Effects + * None + */ +message CryptoApproveAllowanceTransactionBody { + /** + * List of hbar allowances approved by the account owner. + *

+ * This list MAY be empty, provided at least one other list is + * not empty. + */ + repeated CryptoAllowance cryptoAllowances = 1; + + /** + * List of non-fungible token allowances approved by the account owner. + *

+ * This list MAY be empty, provided at least one other list is + * not empty. + */ + repeated NftAllowance nftAllowances = 2; + + /** + * List of fungible token allowances approved by the account owner. + *

+ * This list MAY be empty, provided at least one other list is + * not empty. + */ + repeated TokenAllowance tokenAllowances = 3; +} + +/** + * An approved allowance of hbar transfers. + * This message specifies one allowance for a single, unique, combination + * of owner, spender, and amount. + * + * If `owner` is not set, the effective `owner` SHALL be the `payer` for the + * enclosing transaction.
+ * The `spender` MUST be specified and MUST be a valid account.
+ * The `amount` MUST be a whole number, and SHOULD be greater than `0` unless + * this allowance is intended to _remove_ a previously approved allowance. + */ +message CryptoAllowance { + /** + * An owner account identifier.
+ * This is the account identifier of the account granting an allowance + * for the `spender` to transfer tokens held by this account. + */ + AccountID owner = 1; + + /** + * A spender account identifier.
+ * This is the account identifier of the account permitted to transfer + * tokens held by the `owner`. + */ + AccountID spender = 2; + + /** + * An amount of tinybar (10-8 HBAR).
+ * This is the amount of HBAR held by the `owner` that the + * `spender` is permitted to transfer. + *

+ * This value MUST be a whole number.
+ * This value MUST be greater than 0 to create a new allowance.
+ * This value MAY be exactly `0` to _remove_ an existing allowance.
+ */ + int64 amount = 3; +} + +/** + * An approved allowance of non-fungible tokens.
+ * This type of allowance may permit transfers for one or more individual + * unique tokens, or may permit transfers for all unique tokens of the + * specified type. + * + * If `owner` is not set, the effective `owner` SHALL be the `payer` for the + * enclosing transaction.
+ * The `spender` MUST be specified and MUST be a valid account.
+ * If `approve_for_all` is set, then `serial_numbers` SHOULD be empty + * and SHALL be ignored. + * If `approve_for_all` is unset, then `serial_numbers` MUST NOT be empty. + */ +message NftAllowance { + /** + * A token identifier.
+ * This identifies the type of token the `spender` is permitted to + * transfer from the `owner`. + *

+ * The identified token type MUST be a non-fungible/unique token. + */ + TokenID tokenId = 1; + + /** + * An owner account identifier.
+ * This is the account identifier of the account granting an allowance + * for the `spender` to transfer tokens held by this account. + */ + AccountID owner = 2; + + /** + * A spender account identifier.
+ * This is the account identifier of the account permitted to transfer + * tokens held by the `owner`. + */ + AccountID spender = 3; + + /** + * A list of token serial numbers.
+ * The list of serial numbers that the spender is permitted to transfer. + *

+ * The `owner` MUST currently hold each token identified in this list. + */ + repeated int64 serial_numbers = 4; + + /** + * A flag indicating this allowance applies to all tokens of the + * specified (non-fungible/unique) type. + *

+ * If true, the `spender` SHALL be permitted to transfer any or all + * of the `owner`'s tokens of the specified token type. + * This SHALL apply not only to currently owned tokens, but to all + * such tokens acquired in the future, unless the + * allowance is `delete`d. + */ + google.protobuf.BoolValue approved_for_all = 5; + + /** + * A spender-owner account identifier.
+ * This account identifier identifies a `spender` for whom an existing + * `approved_for_all` allowance was previously created. This enables + * an account with such broad access to grant allowances to transfer + * individual tokens from the original owner without involving that + * original owner. + *

+ * If this is set, the account identified MUST sign this transaction, but + * the `owner` account MAY NOT sign this transaction.
+ * If this is set, there MUST exist an active `approved_for_all` + * allowance from the `owner` for the `delegating_spender` to transfer + * all tokens of the type identified by the `tokenId` field.
+ * If this value is set, the `approved_for_all` flag MUST be `false`. + */ + AccountID delegating_spender = 6; +} + +/** + * An approved allowance of fungible/common token transfers. + * This message specifies one allowance for a single, unique, combination + * of token, owner, spender, and amount. + * + * If `owner` is not set, the effective `owner` SHALL be the `payer` for the + * enclosing transaction.
+ * The `tokenId` MUST be specified and MUST be a valid + * fungible/common token type.
+ * The `spender` MUST be specified and MUST be a valid account.
+ * The `amount` MUST be a whole number, and SHOULD be greater than `0` unless + * this allowance is intended to _remove_ a previously approved allowance. + */ +message TokenAllowance { + /** + * A token identifier.
+ * This identifies the type of token the `spender` is permitted to + * transfer from the `owner`. + *

+ * The identified token type MUST be a fungible/common token. + */ + TokenID tokenId = 1; + + /** + * An owner account identifier.
+ * This is the account identifier of the account granting an allowance + * for the `spender` to transfer tokens held by this account. + */ + AccountID owner = 2; + + /** + * A spender account identifier.
+ * This is the account identifier of the account permitted to transfer + * tokens held by the `owner`. + */ + AccountID spender = 3; + + /** + * An amount of fractional tokens (10-decimals tokens).
+ * This is the amount of tokens held by the `owner` that the + * `spender` is permitted to transfer. + *

+ * This value MUST be a whole number.
+ * This value MUST be greater than 0 to create a new allowance.
+ * This value MAY be exactly `0` to _remove_ an existing allowance.
+ */ + int64 amount = 4; +} diff --git a/proto/crypto_create.proto b/proto/crypto_create.proto new file mode 100644 index 000000000..a4f6b8b84 --- /dev/null +++ b/proto/crypto_create.proto @@ -0,0 +1,216 @@ +/** + * # Crypto Create + * Messages to create a new end-user account within the distributed ledger. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; +import "duration.proto"; + +/* + * Create a new account. + * + * If the auto_renew_account field is set, the key of the referenced account + * MUST sign this transaction.
+ * Current limitations REQUIRE that `shardID` and `realmID` both MUST be `0`. + * This is expected to change in the future. + * + * ### Block Stream Effects + * The newly created account SHALL be included in State Changes. + */ +message CryptoCreateTransactionBody { + // Removed prior to oldest available history + reserved 4,5; + + /** + * The identifying key for this account. + * This key represents the account owner, and is required for most actions + * involving this account that do not modify the account itself. This key + * may also identify the account for smart contracts. + *

+ * This field is REQUIRED. + * This `Key` MUST NOT be an empty `KeyList` and MUST contain at least one + * "primitive" (i.e. cryptographic) key value. + */ + Key key = 1; + + /** + * An amount, in tinybar, to deposit to the newly created account. + *

+ * The deposited amount SHALL be debited to the "payer" account for this + * transaction. + */ + uint64 initialBalance = 2; + + /** + * Use `staked_id` instead.
+ * An account identifier for a staking proxy. + */ + AccountID proxyAccountID = 3 [deprecated = true]; + + /** + * Removed prior to the first available history, and may be related to an + * early design dead-end.
+ * An amount below which record stream records would not be created for + * a transaction that reduces this account balance. + */ + uint64 sendRecordThreshold = 6 [deprecated = true]; + + /** + * Removed prior to the first available history, and may be related to an + * early design dead-end.
+ * An amount below which record stream records would not be created for + * a transaction that increases this account balance. + */ + uint64 receiveRecordThreshold = 7 [deprecated = true]; + + /** + * A flag indicating the account holder must authorize all incoming + * token transfers. + *

+ * If this flag is set then any transaction that would result in adding + * hbar or other tokens to this account balance MUST be signed by the + * identifying key of this account (that is, the `key` field).
+ * If this flag is set, then the account key (`key` field) MUST sign + * this create transaction, in addition to the transaction payer. + */ + bool receiverSigRequired = 8; + + /** + * The duration between account automatic renewals.
+ * All entities in state may be charged "rent" occasionally (typically + * every 90 days) to prevent unnecessary growth of the ledger. This value + * sets the interval between such events for this account. + *

+ * If the account balance (in HBAR) is insufficient to pay the full renewal + * fee, the entire HBAR balance SHALL be consumed and the expiration for + * the account SHALL be extended as far as the available balance can + * support.
+ * If the account HBAR balance is `0` when the account must be renewed, then + * the account SHALL be deleted, and subsequently removed from state. + */ + Duration autoRenewPeriod = 9; + + /** + * The shard in which this account is created + *

+ * Currently, this MUST be `0`.
+ * If the desired shard is `0`, this SHOULD NOT be set. + */ + ShardID shardID = 10; + + /** + * The realm in which this account is created. + *

+ * The shard number for this realm MUST match the value in `shardID`.
+ * Currently, this MUST be `0` for both fields.
+ * If the desired realm is `0`, this SHOULD NOT be set. + */ + RealmID realmID = 11; + + /** + * This field was never actually used or enabled, and is not expected to + * ever be used in the future.
+ */ + Key newRealmAdminKey = 12 [deprecated = true]; + + /** + * A short description of this Account. + *

+ * This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes` + * (default 100) bytes when encoded as UTF-8. + */ + string memo = 13; + + /** + * A maximum number of tokens that can be auto-associated + * with this account.
+ * By default this value is 0 for all accounts except for automatically + * created accounts (e.g. smart contracts), which default to -1. + *

+ * If this value is `0`, then this account MUST manually associate to + * a token before holding or transacting in that token.
+ * This value MAY also be `-1` to indicate no limit.
+ * This value MUST NOT be less than `-1`. + */ + int32 max_automatic_token_associations = 14; + + oneof staked_id { + /** + * ID of the account to which this account is staking its balances. + *

+ * If this account is not currently staking its balances, then this + * field, if set, MUST be the sentinel value of `0.0.0`. + */ + AccountID staked_account_id = 15; + + /** + * ID of the node this account is staked to. + *

+ * If this account is not currently staking its balances, then this + * field, if set, SHALL be the sentinel value of `-1`.
+ * Wallet software SHOULD surface staking issues to users and provide a + * simple mechanism to update staking to a new node ID in the event the + * prior staked node ID ceases to be valid. + */ + int64 staked_node_id = 16; + } + + /** + * A boolean indicating that this account has chosen to decline rewards for + * staking its balances. + *

+ * This account MAY still stake its balances, but SHALL NOT receive reward + * payments for doing so, if this value is set. + */ + bool decline_reward = 17; + + /** + * Bytes to be used as the account's alias. + *

+ * This value, if set, MUST be one of the following values
+ *

+ * All aliases within the network MUST be unique. If this value matches an + * existing account alias, this `create` transaction SHALL fail.
+ * If an account exists with a particular alias value, any transaction to + * transfer value _to_ that alias SHALL deposit the transferred value in + * the existing account, and SHALL NOT assess an account creation fee.
+ * Once set, an account alias is immutable and MUST NOT be changed. + */ + bytes alias = 18; +} diff --git a/proto/crypto_delete.proto b/proto/crypto_delete.proto new file mode 100644 index 000000000..72d27364c --- /dev/null +++ b/proto/crypto_delete.proto @@ -0,0 +1,78 @@ +/** + * # Crypto Delete + * Message to delete an account. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; + +/** + * Delete an account.
+ * This will mark an account deleted, and transfer all tokens to a "sweep" + * account. + * + * A deleted account SHALL NOT hold a balance in any token type.
+ * A deleted account SHALL remain in state until it expires.
+ * Transfers that would increase the balance of a deleted account + * SHALL fail.
+ * A deleted account MAY be subject of a `cryptoUpdate` transaction to extend + * its expiration.
+ * When a deleted account expires it SHALL be removed entirely, and SHALL NOT + * be archived. + * + * ### Block Stream Effects + * None + */ +message CryptoDeleteTransactionBody { + /** + * An account identifier. + *

+ * The identified account SHALL receive all tokens, token balances, + * and non-fungible/unique from the deleted account.
+ * The identified account MUST sign this transaction.
+ * If not set, the account to be deleted MUST NOT have a balance in any + * token, a balance in HBAR, or hold any NFT. + */ + AccountID transferAccountID = 1; + + /** + * An account identifier. + *

+ * This account SHALL be deleted if this transaction succeeds.
+ * This account SHOULD NOT hold any balance other than HBAR.
+ * If this account _does_ hold balances, the `transferAccountID` value + * MUST be set to a valid transfer account.
+ * This account MUST sign this transaction.
+ * This field MUST be set to a valid account identifier. + */ + AccountID deleteAccountID = 2; +} diff --git a/proto/crypto_delete_allowance.proto b/proto/crypto_delete_allowance.proto new file mode 100644 index 000000000..22aff67cf --- /dev/null +++ b/proto/crypto_delete_allowance.proto @@ -0,0 +1,108 @@ +/** + * # Crypto Delete Allowance + * Delete one or more NFT allowances that permit transfer of tokens from + * an "owner" account by a different, "spender", account. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; + +/** + * Delete one or more allowances.
+ * Given one or more, previously approved, allowances for non-fungible/unique + * tokens to be transferred by a spending account from an owning account; + * this transaction removes a specified set of those allowances. + * + * The owner account for each listed allowance MUST sign this transaction.
+ * Allowances for HBAR cannot be removed with this transaction. The owner + * account MUST submit a new `cryptoApproveAllowance` transaction with the + * amount set to `0` to "remove" that allowance.
+ * Allowances for fungible/common tokens cannot be removed with this + * transaction. The owner account MUST submit a new `cryptoApproveAllowance` + * transaction with the amount set to `0` to "remove" that allowance.
+ * + * ### Block Stream Effects + * None + */ +message CryptoDeleteAllowanceTransactionBody { + /** + * List of non-fungible/unique token allowances to remove. + *

+ * This list MUST NOT be empty. + */ + repeated NftRemoveAllowance nftAllowances = 2; + + // Note: Field numbers 1 and 3 were very briefly used in early + // versions of this file, but were removed prior to any release + // version. Those field numbers MAY be reused. +} + +/** + * A single allowance for one non-fungible/unique token. + * This is specific to removal, and the allowance is identified for that + * specific purpose. + * + * All fields in this message are REQUIRED. + * The `serial_numbers` list MUST NOT be empty. + * The combination of field values in this message MUST match existing + * allowances for one or more individual non-fungible/unique tokens. + * + * ### Removing an allowance that is `approve_for_all` + * To remove an allowance that has set the `approve_for_all` flag, the + * `owner` account must first _approve_ a **new** allowance for a specific + * serial number using a `cryptoApproveAllowance`, and then, if desired, + * that newly approved allowance to a specific serial number may be + * deleted in a separate `cryptoDeleteAllowance` transaction. + */ +message NftRemoveAllowance { + /** + * A token identifier. + *

+ * This MUST be a valid token identifier for a non-fungible/unique + * token type. + */ + TokenID token_id = 1; + + /** + * An `owner` account identifier. + *

+ * This account MUST sign the transaction containing this message. + */ + AccountID owner = 2; + + /** + * The list of serial numbers to remove allowances from. + *

+ * This list MUST NOT be empty. + */ + repeated int64 serial_numbers = 3; +} diff --git a/proto/crypto_delete_live_hash.proto b/proto/crypto_delete_live_hash.proto new file mode 100644 index 000000000..8eed51ba2 --- /dev/null +++ b/proto/crypto_delete_live_hash.proto @@ -0,0 +1,62 @@ +/** + * # Delete Live Hash + * Dissociate a specific live hash from a specified account. + * + * > Important + * >> This transaction is obsolete and not supported.
+ * >> Any transaction of this type that is submitted SHALL fail with a `PRE_CHECK` result + * >> of `NOT_SUPPORTED`. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; + +/** + * Delete a specific live hash associated to a given account. + * + * This transaction MUST be signed by either the key of the associated account, + * or at least one of the keys listed in the live hash. + * + * ### Block Stream Effects + * None + */ +message CryptoDeleteLiveHashTransactionBody { + /** + * An account associated to a live hash. + */ + AccountID accountOfLiveHash = 1; + + /** + * The SHA-384 value of a specific live hash to delete. + */ + bytes liveHashToDelete = 2; +} diff --git a/proto/crypto_get_account_balance.proto b/proto/crypto_get_account_balance.proto new file mode 100644 index 000000000..8660c3ffe --- /dev/null +++ b/proto/crypto_get_account_balance.proto @@ -0,0 +1,121 @@ +/** + * # Crypto Get Account Balance + * Query request to obtain balance information for a single account. + * + * This query SHOULD NOT be used by client software, queries to a + * Mirror Node provide more information at much lower cost. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; +import "query_header.proto"; +import "response_header.proto"; + +/** + * Query to read the HBAR balance of an account or contract. + * + * This query SHALL return _only_ the HBAR balance for an account + * or smart contract. Early releases of the network would return all + * fungible/common token balances, but HIP-367 made it infeasible to + * return all such balances. This query SHALL NOT return any information + * beyond the current HBAR balance. + */ +message CryptoGetAccountBalanceQuery { + /** + * Standard information sent with every query operation.
+ * This includes the signed payment and what kind of response is requested + * (cost, state proof, both, or neither). + */ + QueryHeader header = 1; + + oneof balanceSource { + /** + * An account identifier.
+ * This identifies an account for which the balance is requested. + *

+ * Exactly one identifier MUST be provided. + */ + AccountID accountID = 2; + + /** + * A smart contract identifier.
+ * This identifies a smart contract for which the balance is requested. + *

+ * Exactly one identifier MUST be provided. + */ + ContractID contractID = 3; + } +} + +/** + * Response to a CryptoGetAccountBalanceQuery.
+ * + * This response SHALL contain only the information needed to + * identify the query request and the actual HBAR balance of the + * identified account or contract. + */ +message CryptoGetAccountBalanceResponse { + /** + * The standard response information for queries.
+ * This includes the values requested in the `QueryHeader` + * (cost, state proof, both, or neither). + */ + ResponseHeader header = 1; + + /** + * An account identifier.
+ * This is the account ID queried.
+ * The inclusion of the account queried is useful with state proofs, + * when needed to prove an account balance to a third party. + */ + AccountID accountID = 2; + + /** + * A current account balance.
+ * This is the current HBAR balance denominated in tinybar + * (10-8 HBAR). + */ + uint64 balance = 3; + + /** + * This field became infeasible to support after HIP-367 removed limits on + * the number of associated tokens.
+ * A list of token balances for all tokens associated to the account. + *

+ * This field was deprecated by + * HIP-367, which + * allowed an account to be associated to an unlimited number of tokens. + * This scale makes it more efficient for users to consult mirror nodes + * to review their token balances. + */ + repeated TokenBalance tokenBalances = 4 [deprecated = true]; +} diff --git a/proto/crypto_get_account_records.proto b/proto/crypto_get_account_records.proto new file mode 100644 index 000000000..76abf0575 --- /dev/null +++ b/proto/crypto_get_account_records.proto @@ -0,0 +1,96 @@ +/** + * # Crypto Get Account Records + * Messages for a query to retrieve recent transaction records involving a + * specified account as effective `payer`.
+ * A "recent" transaction is typically one that reached consensus within + * the previous three(`3`) minutes of _consensus_ time. Additionally, the + * network only stores records in state when + * `ledger.keepRecordsInState=true` was true during transaction handling. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; +import "transaction_record.proto"; +import "query_header.proto"; +import "response_header.proto"; + +/** + * Request records of all "recent" transactions for which the specified + * account is the effective payer. + */ +message CryptoGetAccountRecordsQuery { + /** + * Standard information sent with every query operation.
+ * This includes the signed payment and what kind of response is requested + * (cost, state proof, both, or neither). + */ + QueryHeader header = 1; + + /** + * An account identifier.
+ * This identifies the account to use when filtering the + * transaction record lists. + *

+ * This field is REQUIRED. + */ + AccountID accountID = 2; +} + +/** + * Return records of all "recent" transactions for which the specified + * account is the effective payer. + */ +message CryptoGetAccountRecordsResponse { + /** + * The standard response information for queries.
+ * This includes the values requested in the `QueryHeader` + * (cost, state proof, both, or neither). + */ + ResponseHeader header = 1; + + /** + * An account identifier.
+ * This identifies the account used when filtering the + * transaction record lists. + *

+ * This field SHALL match the requested account identifier. + */ + AccountID accountID = 2; + + /** + * A list of records. + *

+ * This list SHALL contain all available and "recent" records in which + * the account identified in the `accountID` field acted as effective payer. + */ + repeated TransactionRecord records = 3; +} diff --git a/proto/crypto_get_info.proto b/proto/crypto_get_info.proto new file mode 100644 index 000000000..27655c8df --- /dev/null +++ b/proto/crypto_get_info.proto @@ -0,0 +1,295 @@ +/** + * # Get Account Information + * A standard query to inspect the full detail of an account. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "timestamp.proto"; +import "duration.proto"; +import "basic_types.proto"; +import "query_header.proto"; +import "response_header.proto"; +import "crypto_add_live_hash.proto"; + +/** + * A query to read information for an account. + * + * The returned information SHALL include balance.
+ * The returned information SHALL NOT include allowances.
+ * The returned information SHALL NOT include token relationships.
+ * The returned information SHALL NOT include account records. + */ +message CryptoGetInfoQuery { + /** + * Standard information sent with every query operation.
+ * This includes the signed payment and what kind of response is requested + * (cost, state proof, both, or neither). + */ + QueryHeader header = 1; + + /** + * The account ID for which information is requested + */ + AccountID accountID = 2; +} + +/** + * Response when the client sends the node CryptoGetInfoQuery + */ +message CryptoGetInfoResponse { + /** + * The standard response information for queries.
+ * This includes the values requested in the `QueryHeader` + * (cost, state proof, both, or neither). + */ + ResponseHeader header = 1; + + /** + * Information describing A single Account in the Hedera distributed ledger. + * + * #### Attributes + * Each Account may have a unique three-part identifier, a Key, and one or + * more token balances. Accounts also have an alias, which has multiple + * forms, and may be set automatically. Several additional items are + * associated with the Account to enable full functionality. + * + * #### Expiration + * Accounts, as most items in the network, have an expiration time, recorded + * as a `Timestamp`, and must be "renewed" for a small fee at expiration. + * This helps to reduce the amount of inactive accounts retained in state. + * Another account may be designated to pay any renewal fees and + * automatically renew the account for (by default) 30-90 days at a time as + * a means to optionally ensure important accounts remain active. + * + * ### Staking + * Accounts may participate in securing the network by "staking" the account + * balances to a particular network node, and receive a portion of network + * fees as a reward. An account may optionally decline these rewards but + * still stake its balances. + * + * #### Transfer Restrictions + * An account may optionally require that inbound transfer transactions be + * signed by that account as receiver (in addition to any other signatures + * required, including sender). + * + */ + message AccountInfo { + // Removed prior to oldest available history + reserved 5; + + /** + * a unique identifier for this account. + *

+ * An account identifier, when assigned to this field, SHALL be of + * the form `shard.realm.number`. + */ + AccountID accountID = 1; + + /** + * A Solidity ID. + *

+ * This SHALL be populated if this account is a smart contract, and + * SHALL NOT be populated otherwise.
+ * This SHALL be formatted as a string according to Solidity ID + * standards. + */ + string contractAccountID = 2; + + /** + * A boolean indicating that this account is deleted. + *

+ * Any transaction involving a deleted account SHALL fail. + */ + bool deleted = 3; + + /** + * Replaced by StakingInfo.
+ * ID of the account to which this account is staking its balances. If + * this account is not currently staking its balances, then this field, + * if set, SHALL be the sentinel value of `0.0.0`. + */ + AccountID proxyAccountID = 4 [deprecated = true]; + + /** + * Replaced by StakingInfo.
+ * The total amount of tinybar proxy staked to this account. + */ + int64 proxyReceived = 6 [deprecated = true]; + + /** + * The key to be used to sign transactions from this account, if any. + *

+ * This key SHALL NOT be set for hollow accounts until the account + * is finalized.
+ * This key SHALL be set on all other accounts, except for certain + * immutable accounts (0.0.800 and 0.0.801) necessary for network + * function and otherwise secured by the governing council. + */ + Key key = 7; + + /** + * The HBAR balance of this account, in tinybar (10-8 HBAR). + *

+ * This value SHALL always be a whole number. + */ + uint64 balance = 8; + + /** + * Obsolete and unused.
+ * The threshold amount, in tinybars, at which a record was created for + * any transaction that decreased the balance of this account. + */ + uint64 generateSendRecordThreshold = 9 [deprecated = true]; + + /** + * Obsolete and unused.
+ * The threshold amount, in tinybars, at which a record was created for + * any transaction that increased the balance of this account. + */ + uint64 generateReceiveRecordThreshold = 10 [deprecated = true]; + + /** + * A boolean indicating that the account requires a receiver signature + * for inbound token transfer transactions. + *

+ * If this value is `true` then a transaction to transfer tokens to this + * account SHALL NOT succeed unless this account has signed the + * transfer transaction. + */ + bool receiverSigRequired = 11; + + /** + * The current expiration time for this account. + *

+ * This account SHALL be due standard renewal fees when the network + * consensus time exceeds this time.
+ * If rent and expiration are enabled for the network, and automatic + * renewal is enabled for this account, renewal fees SHALL be charged + * after this time, and, if charged, the expiration time SHALL be + * extended for another renewal period.
+ * This account MAY be expired and removed from state at any point + * after this time if not renewed.
+ * An account holder MAY extend this time by submitting an account + * update transaction to modify expiration time, subject to the current + * maximum expiration time for the network. + */ + Timestamp expirationTime = 12; + + /** + * A duration to extend this account's expiration. + *

+ * The network SHALL extend the account's expiration by this + * duration, if funds are available, upon automatic renewal.
+ * This SHALL NOT apply if the account is already deleted + * upon expiration.
+ * If this is not provided in an allowed range on account creation, the + * transaction SHALL fail with INVALID_AUTO_RENEWAL_PERIOD. The default + * values for the minimum period and maximum period are currently + * 30 days and 90 days, respectively. + */ + Duration autoRenewPeriod = 13; + + /** + * 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 LiveHash liveHashes = 14; + + /** + * As of `HIP-367`, which enabled unlimited token associations, the + * potential scale for this value requires that users consult a mirror + * node for this information. + */ + repeated TokenRelationship tokenRelationships = 15 [deprecated = true]; + + /** + * A short description of this account. + *

+ * This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes` + * (default 100) bytes when encoded as UTF-8. + */ + string memo = 16; + + /** + * The total number of non-fungible/unique tokens owned by this account. + */ + int64 ownedNfts = 17; + + /** + * The maximum number of tokens that can be auto-associated with the + * account. + *

+ * If this is less than or equal to `used_auto_associations` (or 0), + * then this account MUST manually associate with a token before + * transacting in that token.
+ * Following HIP-904 This value may also be `-1` to indicate no + * limit.
+ * This value MUST NOT be less than `-1`. + */ + int32 max_automatic_token_associations = 18; + + /** + * An account alias.
+ * This is a value used in some contexts to reference an account when + * the tripartite account identifier is not available. + *

+ * This field, when set to a non-default value, is immutable and + * SHALL NOT be changed. + */ + bytes alias = 19; + + /** + * The ledger ID of the network that generated this response. + *

+ * This value SHALL identify the distributed ledger that responded to + * this query. + */ + bytes ledger_id = 20; + + /** + * The ethereum transaction nonce associated with this account. + */ + int64 ethereum_nonce = 21; + + /** + * Staking information for this account. + */ + StakingInfo staking_info = 22; + } + + /** + * Details of the account. + *

+ * A state proof MAY be generated for this field. + */ + AccountInfo accountInfo = 2; +} diff --git a/proto/crypto_get_live_hash.proto b/proto/crypto_get_live_hash.proto new file mode 100644 index 000000000..bee0bdb11 --- /dev/null +++ b/proto/crypto_get_live_hash.proto @@ -0,0 +1,90 @@ +/** + * # Get Live Hash + * Standard query to inspect associations between content and accounts + * via SHA-384 hashes. + * + * > Important + * >> This query is obsolete and not supported.
+ * >> Any query of this type that is submitted SHALL fail with a `PRE_CHECK` + * >> result of `NOT_SUPPORTED`. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; +import "query_header.proto"; +import "response_header.proto"; +import "crypto_add_live_hash.proto"; + +/** + * Request detail for a specific live hash associated to a specific account. + */ +message CryptoGetLiveHashQuery { + /** + * Standard information sent with every query operation.
+ * This includes the signed payment and what kind of response is requested + * (cost, state proof, both, or neither). + */ + QueryHeader header = 1; + + /** + * An account ID.
+ * The network SHALL return live hash information for this account, + * if successful. + */ + AccountID accountID = 2; + + /** + * The specific SHA-384 live hash to inspect + */ + bytes hash = 3; +} + +/** + * Return the full live hash associated to an account, if it is present. + * + * > Note that to generate a state proof of the _absence_ of a live hash from + * > an account a transaction MUST retrieve a state proof of the `Account` + * > with its list of live hashes. + */ +message CryptoGetLiveHashResponse { + /** + * The standard response information for queries.
+ * This includes the values requested in the `QueryHeader` + * (cost, state proof, both, or neither). + */ + ResponseHeader header = 1; + + /** + * The requested live hash, if found. + */ + LiveHash liveHash = 2; +} diff --git a/proto/crypto_get_stakers.proto b/proto/crypto_get_stakers.proto new file mode 100644 index 000000000..3c8f12790 --- /dev/null +++ b/proto/crypto_get_stakers.proto @@ -0,0 +1,114 @@ +/** + * # Get Stakers + * Query all of the accounts proxy staking _to_ a specified account. + * + * > Important + * >> This query is obsolete and not supported.
+ * >> Any query of this type that is submitted SHALL fail with a `PRE_CHECK` + * >> result of `NOT_SUPPORTED`. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; +import "query_header.proto"; +import "response_header.proto"; + +/** + * Get all the accounts that are proxy staking to this account. For each of + * them, give the amount currently staked. This was never implemented. + */ +message CryptoGetStakersQuery { + option deprecated = true; + /** + * Standard information sent with every query operation.
+ * This includes the signed payment and what kind of response is requested + * (cost, state proof, both, or neither). + */ + QueryHeader header = 1; + + /** + * The Account ID for which the records should be retrieved + */ + AccountID accountID = 2; +} + +/** + * information about a single account that is proxy staking + */ +message ProxyStaker { + option deprecated = true; + /** + * The Account ID that is proxy staking + */ + AccountID accountID = 1; + + /** + * The number of hbars that are currently proxy staked + */ + int64 amount = 2; +} + +/** + * All of the accounts proxy staking to a given account, and the amounts proxy + * staked + */ +message AllProxyStakers { + option deprecated = true; + /** + * The Account ID that is being proxy staked to + */ + AccountID accountID = 1; + + /** + * Each of the proxy staking accounts, and the amount they are proxy staking + */ + repeated ProxyStaker proxyStaker = 2; +} + +/** + * Response when the client sends the node CryptoGetStakersQuery + */ +message CryptoGetStakersResponse { + option deprecated = true; + /** + * The standard response information for queries.
+ * This includes the values requested in the `QueryHeader` + * (cost, state proof, both, or neither). + */ + ResponseHeader header = 1; + + /** + * List of accounts proxy staking to this account, and the amount each is + * currently proxy staking + */ + AllProxyStakers stakers = 3; +} diff --git a/proto/crypto_service.proto b/proto/crypto_service.proto new file mode 100644 index 000000000..9b64286e0 --- /dev/null +++ b/proto/crypto_service.proto @@ -0,0 +1,139 @@ +/** + * # Crypto Service + * A service defining transactions and queries related to accounts. + * + * This includes transactions for HBAR transfers and balance queries as well as + * transactions to manage "allowances" which permit a third party to spend a + * portion of the HBAR balance in an account.
+ * Basic account, record, and receipt queries are also defined in this service. + * + * Transactions and queries relating to tokens _other than HBAR_ are defined + * in the Token Service. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package + +import "query.proto"; +import "response.proto"; +import "transaction_response.proto"; +import "transaction.proto"; + +/** + * Transactions and queries for the Hedera Crypto Service. + */ +service CryptoService { + // The following queries are permanently removed. + // getStakersByAccountID, getFastTransactionRecord + + /** + * Create a new account by submitting the transaction + */ + rpc createAccount (Transaction) returns (TransactionResponse); + + /** + * Update an account by submitting the transaction + */ + rpc updateAccount (Transaction) returns (TransactionResponse); + + /** + * Initiate a transfer by submitting the transaction + */ + rpc cryptoTransfer (Transaction) returns (TransactionResponse); + + /** + * Delete an account by submitting the transaction + */ + rpc cryptoDelete (Transaction) returns (TransactionResponse); + + /** + * Add one or more approved allowances for spenders to transfer the paying + * account's hbar or tokens. + */ + rpc approveAllowances (Transaction) returns (TransactionResponse); + + /** + * Delete one or more of the specific approved NFT serial numbers on an + * owner account. + */ + rpc deleteAllowances (Transaction) returns (TransactionResponse); + + /** + * Add a livehash + *

Important
+ * This transaction is obsolete, not supported, and SHALL fail with a + * pre-check result of `NOT_SUPPORTED`.
+ */ + rpc addLiveHash (Transaction) returns (TransactionResponse) {option deprecated = true;}; + + /** + * Delete a livehash + *
Important
+ * This transaction is obsolete, not supported, and SHALL fail with a + * pre-check result of `NOT_SUPPORTED`.
+ */ + rpc deleteLiveHash (Transaction) returns (TransactionResponse) {option deprecated = true;}; + + /** + * Retrieve a livehash for an account + *
Important
+ * This query is obsolete, not supported, and SHALL fail with a pre-check + * result of `NOT_SUPPORTED`.
+ */ + rpc getLiveHash (Query) returns (Response) {option deprecated = true;}; + + /** + * Return 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); + + /** + * Retrieve the balance of an account + */ + rpc cryptoGetBalance (Query) returns (Response); + + /** + * Retrieve the metadata of an account + */ + rpc getAccountInfo (Query) returns (Response); + + /** + * Retrieve the latest receipt for a transaction that is either awaiting + * consensus, or reached consensus in the last 180 seconds + */ + rpc getTransactionReceipts (Query) returns (Response); + + /** + * Retrieve the record of a transaction that is either awaiting consensus, + * or reached consensus in the last 180 seconds + */ + rpc getTxRecordByTxID (Query) returns (Response); +} diff --git a/proto/crypto_transfer.proto b/proto/crypto_transfer.proto new file mode 100644 index 000000000..f7b04fa9a --- /dev/null +++ b/proto/crypto_transfer.proto @@ -0,0 +1,96 @@ +/** + * # Crypto Transfer + * Transaction to transfer HBAR between accounts, or between accounts and + * smart contracts. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; + +/** + * Transfer HBAR and/or other tokens among two or more accounts and/or smart + * contracts. + * + * Transfers of HBAR or fungible/common tokens in this transaction are + * structured as a "double-entry" transfer list which debits one or more + * accounts, and separately credits one or more accounts. Each such transfer + * list may specify up to 10 individual credits or debits.
+ * Transfers of non-fungible/unique tokens in this transaction are + * structured as a "single-entry" transfer list, which both debits one account + * and credits another account in a single entry. + * + * At least one transfer MUST be present, this MAY be an HBAR transfer in + * `transfers`, or MAY be a token transfer in `tokenTransfers`.
+ * Either `transfers` or `tokenTransfers` MAY be unset, provided the other + * is set and not empty.
+ * If any one account with a debit in any transfer list holds insufficient + * balance to complete the transfer, the entire transaction SHALL fail, and + * all transfers SHALL NOT be completed.
+ * If any one account that is _sending_ an individual non-fungible/unique (NFT) + * token does not currently hold that unique NFT, the entire transaction SHALL + * FAIL, and all transfers SHALL NOT be completed. + * The transaction fee SHALL be charged for a transaction that fails due to + * insufficient balance or not holding the NFT to be transferred.
+ * Each account with any debit amounts in any transfer list MUST sign this + * transaction.
+ * Each account with any credit amounts in any transfer list that also has the + * `receiverSigRequired` flag set MUST sign this transaction. + * + * ### Block Stream Effects + * All debits and credits completed by this transaction SHALL be included in + * the transaction result transfer list.
+ * Multiple fungible/common debits from one account, or credits to one account, + * MAY be consolidated to a single debit or credit entry in the + * transaction result.
+ * Multiple non-fungible/unique transfers SHALL NOT be consolidated in the + * transaction result. + */ +message CryptoTransferTransactionBody { + /** + * A list of HBAR transfers. + *

+ * Each transfer in this list MUST be denominated in tinybar. + */ + TransferList transfers = 1; + + /** + * One or more lists of token transfers. + *

+ * This list MUST NOT contain more than 10 entries.
+ * If custom fees must be charged, the fee SHALL be assessed against the + * effective "payer" for this transaction.
+ * If the effective "payer" for this transaction lacks sufficient balance + * to pay custom fees assessed, the entire transaction SHALL fail with a + * response code `INSUFFICIENT_PAYER_BALANCE_FOR_CUSTOM_FEE`. + */ + repeated TokenTransferList tokenTransfers = 2; +} diff --git a/proto/crypto_update.proto b/proto/crypto_update.proto new file mode 100644 index 000000000..002067594 --- /dev/null +++ b/proto/crypto_update.proto @@ -0,0 +1,234 @@ +/** + * # Crypto Update + * Modify a single account. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; +import "duration.proto"; +import "timestamp.proto"; +import "google/protobuf/wrappers.proto"; + +/** + * Modify the current state of an account. + * + * ### Requirements + * - The `key` for this account MUST sign all account update transactions. + * - If the `key` field is set for this transaction, then _both_ the current + * `key` and the new `key` MUST sign this transaction, for security and to + * prevent setting the `key` field to an invalid value. + * - If the `auto_renew_account` field is set for this transaction, the account + * identified in that field MUST sign this transaction. + * - Fields set to non-default values in this transaction SHALL be updated on + * success. Fields not set to non-default values SHALL NOT be + * updated on success. + * - All fields that may be modified in this transaction SHALL have a + * default value of unset (a.k.a. `null`). + * + * ### Block Stream Effects + * None + */ +message CryptoUpdateTransactionBody { + // NOTE: Seven deprecated fields should probably be removed and the + // field names reserved. + // reserved 4,5,6,7,10,11,12 + // Also, the `receiverSigRequiredField` oneOf should be removed + // around `receiverSigRequiredWrapper` and the field renamed + // (both actions are "safe" in protobuf) to `receiver_signature_required`. + + /** + * An account identifier.
+ * This identifies the account which is to be modified in this transaction. + *

+ * This field is REQUIRED. + */ + AccountID accountIDToUpdate = 2; + + /** + * An account key.
+ * This may be a "primitive" key (a singly cryptographic key), or a + * composite key. + *

+ * If set, this key MUST be a valid key.
+ * If set, the previous key and new key MUST both sign this transaction. + */ + Key key = 3; + + /** + * Removed in favor of the `staked_id` oneOf.
+ * An account identifier for a "proxy" account. This account's HBAR are + * staked to a node selected by the proxy account. + */ + AccountID proxyAccountID = 4 [deprecated = true]; + + /** + * Removed prior to the first available history.
+ * A fraction to split staking rewards between this account and the proxy + * account. + */ + int32 proxyFraction = 5 [deprecated = true]; + + // This entire oneOf is deprecated, and the concept is not implemented. + oneof sendRecordThresholdField { + /** + * Removed prior to the first available history, and may be related + * to an early design dead-end.
+ * The new threshold amount (in tinybars) for which an account record is + * created for any send/withdraw transaction + */ + uint64 sendRecordThreshold = 6 [deprecated = true]; + + /** + * Removed prior to the first available history, and may be related + * to an early design dead-end.
+ * 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]; + + } + + // This entire oneOf is deprecated, and the concept is not implemented. + oneof receiveRecordThresholdField { + /** + * Removed prior to the first available history, and may be related + * to an early design dead-end.
+ * The new threshold amount (in tinybars) for which an account record is + * created for any receive/deposit transaction. + */ + uint64 receiveRecordThreshold = 7 [deprecated = true]; + + /** + * Removed prior to the first available history, and may be related + * to an early design dead-end.
+ * 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]; + } + + /** + * A duration to extend account expiration.
+ * An amount of time, in seconds, to extend the expiration date for this + * account when _automatically_ renewed. + *

+ * This duration MUST be between the current configured minimum and maximum + * values defined for the network.
+ * This duration SHALL be applied only when _automatically_ extending the + * account expiration. + */ + Duration autoRenewPeriod = 8; + + /** + * A new account expiration time, in seconds since the epoch. + *

+ * For this purpose, `epoch` SHALL be the UNIX epoch with 0 + * at `1970-01-01T00:00:00.000Z`.
+ * If set, this value MUST be later than the current consensus time.
+ * If set, this value MUST be earlier than the current consensus time + * extended by the current maximum expiration time configured for the + * network. + */ + Timestamp expirationTime = 9; + + oneof receiverSigRequiredField { + /** + * Removed to distinguish between unset and a default value.
+ * 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. + */ + bool receiverSigRequired = 10 [deprecated = true]; + + /** + * A flag indicating the account holder must authorize all incoming + * token transfers. + *

+ * If this flag is set then any transaction that would result in adding + * hbar or other tokens to this account balance MUST be signed by the + * identifying key of this account (that is, the `key` field). + */ + google.protobuf.BoolValue receiverSigRequiredWrapper = 13; + } + + /** + * A short description of this Account. + *

+ * This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes` + * (default 100) bytes when encoded as UTF-8. + */ + google.protobuf.StringValue memo = 14; + + /** + * A maximum number of tokens that can be auto-associated + * with this account.
+ * By default this value is 0 for all accounts except for automatically + * created accounts (i.e smart contracts) which default to -1. + *

+ * If this value is `0`, then this account MUST manually associate to + * a token before holding or transacting in that token.
+ * This value MAY also be `-1` to indicate no limit.
+ * If set, this value MUST NOT be less than `-1`.
+ */ + google.protobuf.Int32Value max_automatic_token_associations = 15; + + oneof staked_id { + /** + * ID of the account to which this account is staking its balances. + *

+ * If this account is not currently staking its balances, then this + * field, if set, MUST be the sentinel value of `0.0.0`. + */ + AccountID staked_account_id = 16; + + /** + * ID of the node this account is staked to. + *

+ * If this account is not currently staking its balances, then this + * field, if set, SHALL be the sentinel value of `-1`.
+ * Wallet software SHOULD surface staking issues to users and provide a + * simple mechanism to update staking to a new node ID in the event the + * prior staked node ID ceases to be valid. + */ + int64 staked_node_id = 17; + } + + /** + * A boolean indicating that this account has chosen to decline rewards for + * staking its balances. + *

+ * This account MAY still stake its balances, but SHALL NOT receive reward + * payments for doing so, if this value is set, and `true`. + */ + google.protobuf.BoolValue decline_reward = 18; + +} diff --git a/proto/custom_fees.proto b/proto/custom_fees.proto new file mode 100644 index 000000000..8450edcd8 --- /dev/null +++ b/proto/custom_fees.proto @@ -0,0 +1,422 @@ +/** + * # Custom Fees + * Fees defined by token creators that are charged as part of each + * transfer of that token type. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; + +/** + * A descriptor for a fee based on a portion of the tokens transferred. + * + * This fee option describes fees as a fraction of the amount of + * fungible/common token(s) transferred. The fee also describes a minimum + * and maximum amount, both of which are OPTIONAL. + * + * This type of fee SHALL be assessed only for fungible/common tokens.
+ * This type of fee MUST NOT be defined for a non-fungible/unique + * token type.
+ * This fee SHALL be paid with the same type of tokens as those + * transferred.
+ * The fee MAY be subtracted from the transferred tokens, or MAY be assessed + * to the sender in addition to the tokens actually transferred, based on + * the `net_of_transfers` field. + * + * When a single transaction sends tokens from one sender to multiple + * recipients, and the `net_of_transfers` flag is false, the network + * SHALL attempt to evenly assess the total fee across all recipients + * proportionally. This may be inexact and, particularly when there are + * large differences between recipients, MAY result in small deviations + * from an ideal "fair" distribution.
+ * If the sender lacks sufficient tokens to pay fees, or the assessment + * of custom fees reduces the net amount transferred to or below zero, + * the transaction MAY fail due to insufficient funds to pay all fees. + */ +message FractionalFee { + /** + * A Fraction of the transferred tokens to assess as a fee.
+ * This value MUST be less than or equal to one.
+ * This value MUST be greater than zero. + */ + Fraction fractional_amount = 1; + + /** + * A minimum fee to charge, in units of 10-decimals tokens. + *

+ * This value is OPTIONAL, with a default of `0` indicating no minimum.
+ * If set, this value MUST be greater than zero.
+ * If set, all transfers SHALL pay at least this amount. + */ + int64 minimum_amount = 2; + + /** + * A maximum fee to charge, in units of 10-decimals tokens. + *

+ * This value is OPTIONAL, with a default of `0` indicating no maximum.
+ * If set, this value MUST be greater than zero.
+ * If set, any fee charged SHALL NOT exceed this value.
+ * This value SHOULD be strictly greater than `minimum_amount`. + * If this amount is less than or equal to `minimum_amount`, then + * the fee charged SHALL always be equal to this value and + * `fractional_amount` SHALL NOT have any effect. + */ + int64 maximum_amount = 3; + + /** + * Flag requesting to assess the calculated fee against the sender, + * without reducing the amount transferred.
+ * #### Effects of this flag + *

    + *
  1. If this value is true + *
      + *
    • The receiver of a transfer SHALL receive the entire + * amount sent.
    • + *
    • The fee SHALL be charged to the sender as an additional + * amount, increasing the token transfer debit.
    • + *
    + *
  2. + *
  3. If this value is false + *
      + *
    • The receiver of a transfer SHALL receive the amount sent + * _after_ deduction of the calculated fee.
    • + *
    + *
  4. + *
+ */ + bool net_of_transfers = 4; +} + +/** + * A fixed fee to assess for each token transfer, regardless of the + * amount transferred.
+ * This fee type describes a fixed fee for each transfer of a token type. + * + * The fee SHALL be charged to the `sender` for the token transfer + * transaction.
+ * This fee MAY be assessed in HBAR, the token type transferred, or any + * other token type, as determined by the `denominating_token_id` field. + */ +message FixedFee { + /** + * The amount to assess for each transfer. + *

+ * This value MUST be greater than `0`.
+ * This amount is expressed in units of 10-decimals tokens. + */ + int64 amount = 1; + + /** + * The token type used to pay the assessed fee. + *

+ * If this is unset, the fee SHALL be assessed in HBAR.
+ * If this is set, the fee SHALL be assessed in the token identified. + * This MAY be any token type. Custom fees assessed in other token types + * are more likely to fail, however, and it is RECOMMENDED that token + * creators denominate custom fees in the transferred token, HBAR, or + * well documented and closely related token types.
+ * If this value is set to `0.0.0` in the `tokenCreate` transaction, it + * SHALL be replaced with the `TokenID` of the newly created token. + */ + TokenID denominating_token_id = 2; +} + +/** + * A fee to assess during a CryptoTransfer that changes ownership of a + * non-fungible/unique (NFT) token.
+ * This message defines the fraction of the fungible value exchanged for an + * NFT that the ledger should collect as a royalty. + * "Fungible value" includes both HBAR (ℏ) and units of fungible HTS tokens. + * When the NFT sender does not receive any fungible value, the ledger will + * assess the fallback fee, if present, to the new NFT owner. Royalty fees + * can only be added to non-fungible/unique tokens. + * + * #### Important Note + * > Users should be aware that native royalty fees are _strictly_ a + * > convenience feature, SHALL NOT be guaranteed, and the network SHALL NOT + * > enforce _inescapable_ royalties on the exchange of a unique NFT.
+ * > For _one_ example, if the counterparties agree to split their value + * > transfer and NFT exchange into separate transactions, the network cannot + * > possibly determine the value exchanged. Even trustless transactions, + * > using a smart contract or other form of escrow, can arrange such split + * > transactions as a single _logical_ transfer. + * + * Counterparties that wish to _respect_ creator royalties MUST follow the + * pattern the network recognizes. + *

+ * A single transaction MUST contain all three elements, transfer of the NFT, + * debit of fungible value from the receiver, and credit of fungible value to + * the sender, in order for the network to accurately assess royalty fees. + *
+ *
+ * Two examples are presented here. + *
+ * The NFT sender and receiver MUST both sign a single `cryptoTransfer` that + * transfers the NFT from sender to receiver, debits the fungible value from + * the receiver, and credits the sender with the fungible value the receiver + * is exchanging for the NFT.
+ * A marketplace using an approved spender account for an escrow transaction + * MUST credit the account selling the NFT in the same `cryptoTransfer` + * transaction that transfers the NFT to, and deducts fungible value from, + * the buying account. + *
+ * This type of fee MAY NOT produce accurate results if multiple transfers + * are executed in a single transaction. It is RECOMMENDED that each + * NFT subject to royalty fees be transferred separately and without + * unrelated fungible token transfers. + * + * The network SHALL NOT consider third-party transfers, including + * "approved spender" accounts, in collecting royalty fees. An honest + * broker MUST ensure that transfer of an NFT and payment delivered to + * the sender are present in the same transaction. + * There is an + * [open suggestion](https://github.com/hashgraph/hedera-improvement-proposal/discussions/578) + * that proposes to broaden the scope of transfers from which the network + * automatically collects royalties to cover related third parties. If this + * interests or concerns you, please add your voice to that discussion. + */ +message RoyaltyFee { + /** + * The fraction of fungible value exchanged for an NFT to collect + * as royalty. + *

+ * This SHALL be applied once to the total fungible value transferred + * for the transaction.
+ * There SHALL NOT be any adjustment based on multiple transfers + * involving the NFT sender as part of a single transaction. + */ + Fraction exchange_value_fraction = 1; + + /** + * A fixed fee to assess if no fungible value is known to be traded + * for the NFT. + *

+ * If an NFT is transferred without a corresponding transfer of + * _fungible_ value returned in the same transaction, the network + * SHALL charge this fee as a fallback.
+ * Fallback fees MAY have unexpected effects when interacting with + * escrow, market transfers, and smart contracts. + * It is RECOMMENDED that developers carefully consider possible + * effects from fallback fees when designing systems that facilitate + * the transfer of NFTs. + */ + FixedFee fallback_fee = 2; +} + +/** + * A transfer fee to assess during a CryptoTransfer.
+ * This fee applies to transactions that transfer units of the token to + * which the fee is attached. A custom fee may be either fixed or fractional, + * and must specify a fee collector account to receive the assessed fees. + * + * Custom fees MUST be greater than zero (0). + */ +message CustomFee { + oneof fee { + /** + * A fixed fee to be charged to the `sender` for every token transfer. + *

+ * This type of fee MAY be defined for any token type.
+ * This type of fee MAY be more consistent and reliable than + * other types. + */ + FixedFee fixed_fee = 1; + + /** + * A fee defined as a fraction of the tokens transferred. + *

+ * This type of fee MUST NOT be defined for a non-fungible/unique + * token type.
+ * This fee MAY be charged to either sender, as an increase to the + * amount sent, or receiver, as a reduction to the amount received. + */ + FractionalFee fractional_fee = 2; + + /** + * A fee charged as royalty for any transfer of a + * non-fungible/unique token. + *

+ * This type of fee MUST NOT be defined for a + * fungible/common token type. + */ + RoyaltyFee royalty_fee = 4; + + } + /** + * The account to receive the custom fee. + */ + AccountID fee_collector_account_id = 3; + + /** + * Flag indicating to exempt all custom fee collector accounts for this + * token type from paying this custom fee when sending tokens. + *

+ * The treasury account for a token, and the account identified by the + * `fee_collector_account_id` field of this `CustomFee` are always exempt + * from this custom fee to avoid redundant and unnecessary transfers. + * If this value is `true` then the account(s) identified in + * `fee_collector_account_id` for _all_ custom fee definitions for this + * token type SHALL also be exempt from this custom fee. + * This behavior is specified in HIP-573. + */ + bool all_collectors_are_exempt = 5; +} + +/** + * Description of a transfer added to a `cryptoTransfer` transaction that + * satisfies custom fee requirements. + * + * It is important to note that this is not the actual transfer. The transfer + * of value SHALL be merged into the original transaction to minimize the + * number of actual transfers. This descriptor presents the fee assessed + * separately in the record stream so that the details of the fee assessed + * are not hidden in this process. + */ +message AssessedCustomFee { + /** + * An amount of tokens assessed for this custom fee. + *

+ * This shall be expressed in units of 10-decimals tokens. + */ + int64 amount = 1; + + /** + * The token transferred to satisfy this fee. + *

+ * If the token transferred is HBAR, this field SHALL NOT be set. + */ + TokenID token_id = 2; + + /** + * An account that received the fee assessed. + *

+ * This SHALL NOT be the sender or receiver of the original + * cryptoTransfer transaction. + */ + AccountID fee_collector_account_id = 3; + + /** + * An account that provided the tokens assessed as a fee. + *

+ * This SHALL be the account that _would have_ had a higher balance + * absent the fee. In most cases this SHALL be the `sender`, but + * some _fractional_ fees reduce the amount transferred, and in those + * cases the `receiver` SHALL be the effective payer for the fee.
+ * There are currently no situations where a third party pays a custom + * fee. This MAY change in a future release. + */ + repeated AccountID effective_payer_account_id = 4; +} + +/** + * A custom fee definition for a consensus topic. + *

+ * This fee definition is specific to an Hedera Consensus Service (HCS) topic + * and SHOULD NOT be used in any other context.
+ * All fields for this message are REQUIRED.
+ * Only "fixed" fee definitions are supported because there is no basis for + * a fractional fee on a consensus submit transaction. + */ +message FixedCustomFee { + /** + * A fixed custom fee. + *

+ * The amount of HBAR or other token described by this `FixedFee` SHALL + * be charged to the transction payer for each message submitted to a + * topic that assigns this consensus custom fee. + */ + FixedFee fixed_fee = 1; + + /** + * A collection account identifier. + *

+ * All amounts collected for this consensus custom fee SHALL be transferred + * to the account identified by this field. + */ + AccountID fee_collector_account_id = 2; +} + +/** + * A wrapper around a consensus custom fee list.
+ * This wrapper exists to enable an update transaction to differentiate between + * a field that is not set and an empty list of custom fees. + *

+ * An _unset_ field of this type SHALL NOT modify existing values.
+ * A _set_ field of this type with an empty `fees` list SHALL remove any + * existing values. + */ +message FixedCustomFeeList { + /** + * A set of custom fee definitions.
+ * These are fees to be assessed for each submit to a topic. + */ + repeated FixedCustomFee fees = 1; +} + +/** + * A wrapper for fee exempt key list.
+ * This wrapper exists to enable an update transaction to differentiate between + * a field that is not set and an empty list of keys. + *

+ * An _unset_ field of this type SHALL NOT modify existing values.
+ * A _set_ field of this type with an empty `keys` list SHALL remove any + * existing values. + */ +message FeeExemptKeyList { + /** + * A set of keys.
+ * The keys in this list are permitted to submit messages to the + * topic without paying the topic's custom fees. + *

+ * If a submit transaction is signed by _any_ key included in this set, + * custom fees SHALL NOT be charged for that transaction. + */ + repeated Key keys = 1; +} + +/** + * A maximum custom fee that the user is willing to pay. + *

+ * This message is used to specify the maximum custom fee that given user is + * willing to pay. + */ +message CustomFeeLimit { + /** + * A payer account identifier. + */ + AccountID account_id = 1; + + /** + * The maximum fees that the user is willing to pay for the message. + */ + repeated FixedFee fees = 2; +} diff --git a/proto/duration.proto b/proto/duration.proto new file mode 100644 index 000000000..31dfe8619 --- /dev/null +++ b/proto/duration.proto @@ -0,0 +1,47 @@ +/** + * # Duration + * A duration, in seconds. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +/** + * A length of time in seconds. + * + * It is RECOMMENDED that this message be used whenever an amount of time, + * rather than a specific point in time, is needed. + */ +message Duration { + /** + * The number of seconds for this duration. + */ + int64 seconds = 1; +} diff --git a/proto/ethereum_transaction.proto b/proto/ethereum_transaction.proto new file mode 100644 index 000000000..64c52e636 --- /dev/null +++ b/proto/ethereum_transaction.proto @@ -0,0 +1,111 @@ +/** + * # Ethereum Call + * Make an Ethereum transaction "call" with all data in Ethereum formats, + * including the contract alias. Call data may be in the transaction, + * or stored within an Hedera File.
+ * The caller MAY offer additional gas above what is offered in the call + * data, but MAY be charged up to 80% of that value if the amount required + * is less than this "floor" amount. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; + +/** + * A transaction in Ethereum format.
+ * Make an Ethereum transaction "call" with all data in Ethereum formats, + * including the contract alias. Call data may be in the transaction, or + * stored within an Hedera File. + * + * The caller MAY offer additional gas above what is offered in the call data, + * but MAY be charged up to 80% of that value if the amount required is less + * than this "floor" amount. + * + * ### Block Stream Effects + * An `EthereumOutput` message SHALL be emitted for each transaction. + */ +message EthereumTransactionBody { + + /** + * The raw Ethereum transaction data. + *

+ * This transaction MUST be RLP encoded.
+ * This SHALL be the complete transaction data unless the `call_data` + * field is set.
+ * If `call_data` is set, this field SHALL be modified to replace the + * `callData` element with the content of the referenced file.
+ * The transaction signature SHALL be validated after `callData` is + * complete, if necessary. + */ + bytes ethereum_data = 1; + + /** + * The `callData` for the Ethereum transaction. + *

+ * If this field is set, the data in the `ethereum_data` field SHALL be + * re-written to replace the `callData` element with the contents of this + * file at time of execution.
+ * The Ethereum transaction MUST be "rehydrated" with this modified + * `callData` before signature validation MAY be performed. + */ + FileID call_data = 2; + + /** + * A maximum amount of "gas" offered to pay the Ethereum transaction costs. + *

+ * This gas offered is in addition to any gas supplied with the Ethereum + * transaction as declared in the `ethereum_data`.
+ * In most circumstances the account with an alias matching the public + * key available from the Ethereum transaction signature offers sufficient + * gas to power the transaction, but in some cases it MAY be desirable + * for the account submitting this transaction to either supplement + * or entirely fund the transaction cost.
+ * The amount of gas offered here SHALL be used to pay for + * transaction costs _in excess_ of any gas offered within + * the Ethereum transaction.
+ * If the gas offered within the Ethereum transaction is sufficient + * for all costs, the gas offered in this field SHALL NOT be expended.
+ * Regardless of actual transaction cost, the payer for this transaction + * SHALL NOT be charged more gas than the amount offered here.
+ * If the sum of both gas amounts is not sufficient to pay for the + * transaction, the entire total amount of gas offered SHALL be expended, + * the transaction SHALL fail, and the response code `INSUFFICIENT_GAS` + * SHALL be set.
+ * If any amount of gas is charged to the payer of this transaction, + * at least 80% of the value offered in this field SHALL be charged + * as a minimum fee.
+ * If the amount of gas authorized in the Ethereum transaction data is `0`, + * then the payer of this transaction SHALL be charged the entire cost of + * the Ethereum transaction, subject to the limit set in this field. + */ + int64 max_gas_allowance = 3; +} diff --git a/proto/exchange_rate.proto b/proto/exchange_rate.proto new file mode 100644 index 000000000..ac12e02b2 --- /dev/null +++ b/proto/exchange_rate.proto @@ -0,0 +1,104 @@ +/** + * # Exchange Rates + * Exchange rates that define ratios between HBAR and USD. + * + * Fees are denominated in USD, but paid in HBAR, so accurate exchange + * rates are important and the exchange rates kept in state are updated + * frequently.
+ * Exchange rates are also reported in every receipt for fee transparency. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "timestamp.proto"; + +/** + * An exchange rate as a ratio of USD cents per HBAR. + * + * This ratio SHALL be used to convert tinycent (`10-8` USD cent) + * to tinybar for fees and other purposes.
+ * When applying an `ExchangeRate`, implementations SHOULD ensure input values + * are `tinycent` and/or `tinybar` before applying the exchange ratio.
+ * Exchange results MAY be converted to USD or HBAR via division if whole + * unit values are required. + * + * The ratio described here SHALL be assigned such that a value in `tinybar` + * may be obtained with the following equation. + * ``` + * amountInTinybar = (amountInTinycent * hbarEquiv) / centEquiv + * ``` + */ +message ExchangeRate { + /** + * Denominator for a ratio of USD cents per HBAR. + */ + int32 hbarEquiv = 1; + + /** + * Numerator for a ratio of USD cents per HBAR. + */ + int32 centEquiv = 2; + + /** + * Expiration time stamp for this exchange rate. + */ + TimestampSeconds expirationTime = 3; +} + +/** + * A set of two exchange rates.
+ * The exchange rate for the network is stored and reported as a set of + * two rates; current and next. This structure supports the network cleanly + * switching between exchange rates when necessary. This also provides clear + * notice to clients when the exchange rate will change and the exchange + * rate that will be applied for the next time period. + * + * The difference in rate between `currentRate` and `nextRate` MUST NOT exceed + * the configured maximum percentage change. This limit SHALL be a + * network configuration value. + */ +message ExchangeRateSet { + /** + * A current exchange rate. + *

+ * When present in a receipt, this SHALL be the exchange rate used to + * compute the fees for that transaction. + */ + ExchangeRate currentRate = 1; + + /** + * A future exchange rate. + *

+ * This exchange rate SHALL be applied after the current exchange + * rate expires. + */ + ExchangeRate nextRate = 2; +} diff --git a/proto/file_append.proto b/proto/file_append.proto new file mode 100644 index 000000000..b96ce48ae --- /dev/null +++ b/proto/file_append.proto @@ -0,0 +1,86 @@ +/** + * # File Append + * A transaction body message to append data to a "file" in state. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; + +/** + * A transaction body for an `appendContent` transaction.
+ * This transaction body provides a mechanism to append content to a "file" in + * network state. Hedera transactions are limited in size, but there are many + * uses for in-state byte arrays (e.g. smart contract bytecode) which require + * more than may fit within a single transaction. The `appendFile` transaction + * exists to support these requirements. The typical pattern is to create a + * file, append more data until the full content is stored, verify the file is + * correct, then update the file entry with any final metadata changes (e.g. + * adding threshold keys and removing the initial upload key). + * + * Each append transaction MUST remain within the total transaction size limit + * for the network (typically 6144 bytes).
+ * The total size of a file MUST remain within the maximum file size limit for + * the network (typically 1048576 bytes). + * + * #### Signature Requirements + * Append transactions MUST have signatures from _all_ keys in the `KeyList` + * assigned to the `keys` field of the file.
+ * See the [File Service](#FileService) specification for a detailed + * explanation of the signature requirements for all file transactions. + * + * ### Block Stream Effects + * None + */ +message FileAppendTransactionBody { + /** + * A file identifier.
+ * This identifies the file to which the `contents` will be appended. + *

+ * This field is REQUIRED.
+ * The identified file MUST exist.
+ * The identified file MUST NOT be larger than the current maximum file + * size limit.
+ * The identified file MUST NOT be deleted.
+ * The identified file MUST NOT be immutable. + */ + FileID fileID = 2; + + /** + * An array of bytes to append.
+ *

+ * This content SHALL be appended to the identified file if this + * transaction succeeds.
+ * This field is REQUIRED.
+ * This field MUST NOT be empty. + */ + bytes contents = 4; +} diff --git a/proto/file_create.proto b/proto/file_create.proto new file mode 100644 index 000000000..9203fb7f1 --- /dev/null +++ b/proto/file_create.proto @@ -0,0 +1,139 @@ +/** + * # File Create + * Messages to create a new file entry. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; +import "timestamp.proto"; + +/** + * Create a new file. + * + * If successful, the new file SHALL contain the (possibly empty) content + * provided in the `contents` field.
+ * When the current consensus time exceeds the `expirationTime` value, the + * network SHALL expire the file, and MAY archive the state entry. + * + * #### Signature Requirements + * The HFS manages file authorization in a manner that can be confusing. + * The core element of file authorization is the `keys` field, + * which is a `KeyList`; a list of individual `Key` messages, each of which + * may represent a simple or complex key.
+ * The file service transactions treat this list differently.
+ * A `fileCreate`, `fileAppend`, or `fileUpdate` MUST have a valid signature + * from _each_ key in the list.
+ * A `fileDelete` MUST have a valid signature from _at least one_ key in + * the list. This is different, and allows a file "owned" by many entities + * to be deleted by any one of those entities. A deleted file cannot be + * restored, so it is important to consider this when assigning keys for + * a file.
+ * If any of the keys in a `KeyList` are complex, the full requirements of + * each complex key must be met to count as a "valid signature" for that key. + * A complex key structure (i.e. a `ThresholdKey`, or `KeyList`, possibly + * including additional `ThresholdKey` or `KeyList` descendants) may be + * assigned as the sole entry in a file `keys` field to ensure all transactions + * have the same signature requirements. + * + * If the `keys` field is an empty `KeyList`, then the file SHALL be immutable + * and the only transaction permitted to modify that file SHALL be a + * `fileUpdate` transaction with _only_ the `expirationTime` set. + * + * #### Shard and Realm + * The current API ignores shardID and realmID. All files are created in + * shard 0 and realm 0. Future versions of the API may support multiple + * realms and multiple shards. + * + * ### Block Stream Effects + * After the file is created, the FileID for it SHALL be returned in the + * transaction receipt, and SHALL be recorded in the transaction record. + */ +message FileCreateTransactionBody { + /** + * An expiration timestamp. + *

+ * When the network consensus time exceeds this value, the network + * SHALL expire the file. + */ + Timestamp expirationTime = 2; + + /** + * A list of keys that represent file "owners". + *

+ * Every `Key` in this list MUST sign this `fileCreate` transaction, as + * well as any `fileUpdate` or `fileAppend` that modifies this file.
+ * At least one `Key` in this list MUST sign any `fileDelete` transaction + * to delete this file.
+ * If this `KeyList` is empty, the file SHALL be created immutable and the + * only field that may be changed subsequently is the `expirationTime`. + * An immutable file cannot be deleted except with a `systemDelete` + * transaction, or by expiration. + */ + KeyList keys = 3; + + /** + * A byte array of file content. + *

+ * The file SHALL be created with initial content equal to this field. + */ + bytes contents = 4; + + /** + * A shard in which this file is created + */ + ShardID shardID = 5; + + /** + * A realm in which this file is created. + *

+ * The shard number for this realm MUST match the value in `shardID`.
+ * Currently, this MUST be `0` for both fields.
+ * If the desired realm is `0.0`, this SHOULD NOT be set. + */ + RealmID realmID = 6; + + /** + * The "create realm" was never enabled, and + * should not be possible on file creation.
+ * An admin key for a new realm, if one is created. + * Added deprecated tag 2024-05. + */ + Key newRealmAdminKey = 7 [deprecated = true]; + + /** + * A short description of this file. + *

+ * This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes` + * (default 100) bytes when encoded as UTF-8. + */ + string memo = 8; +} diff --git a/proto/file_delete.proto b/proto/file_delete.proto new file mode 100644 index 000000000..413c97770 --- /dev/null +++ b/proto/file_delete.proto @@ -0,0 +1,73 @@ +/** + * # File Delete + * A message for a transaction to delete a file. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; + +/** + * Mark a file as deleted and remove its content from network state. + * + * The metadata for a deleted file SHALL be retained at least until the + * expiration time for the file is exceeded.
+ * On completion, the identified file SHALL be marked `deleted`.
+ * On completion, the identified file SHALL have an empty `contents` array.
+ * This transaction SHALL be final and irreversible.
+ * + * #### Signature Requirements + * At least _one_ key from the `KeyList` in the `keys` field of the + * identified file MUST sign this transaction.
+ * If the keys field for the identified file is an empty `KeyList` (because that + * file was previously created or updated to have an empty `KeyList`), then the + * file is considered immutable and this message SHALL fail as UNAUTHORIZED. + * See the [File Service](#FileService) specification for a detailed + * explanation of the signature requirements for all file transactions. + * + * ### What is a "system" file + * A "system" file is any file with a file number less than or equal to the + * current configuration value for `ledger.numReservedSystemEntities`, + * typically `750`. + * + * ### Block Stream Effects + * None + */ +message FileDeleteTransactionBody { + /** + * A file identifier.
+ * This identifies the file to delete. + *

+ * The identified file MUST NOT be a "system" file.
+ * This field is REQUIRED. + */ + FileID fileID = 2; +} diff --git a/proto/file_get_contents.proto b/proto/file_get_contents.proto new file mode 100644 index 000000000..b4f6ed8b8 --- /dev/null +++ b/proto/file_get_contents.proto @@ -0,0 +1,106 @@ +/** + * # File Get Contents + * Messages for a query to retrieve the content of a file in the + * Hedera File Service (HFS). + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; +import "query_header.proto"; +import "response_header.proto"; + +/** + * A query request to the Hedera File Service (HFS) for file content.
+ * This query requests the content of a file, but none of the information + * _about_ a file. A client should submit a `fileGetInfo` query to view + * information about a file.
+ * File content may also be available from a block node or mirror node, + * generally at lower cost. + */ +message FileGetContentsQuery { + /** + * Standard information sent with every query operation.
+ * This includes the signed payment and what kind of response is requested + * (cost, state proof, both, or neither). + */ + QueryHeader header = 1; + + /** + * A file identifier. + *

+ * This MUST be the identifier of a file that exists in HFS.
+ * This value SHALL identify the file to be queried. + */ + FileID fileID = 2; +} + +/** + * A response to a query for the content of a file in the + * Hedera File Service (HFS). + * + * This message SHALL contain the full content of the requested file, but + * SHALL NOT contain any metadata. + */ +message FileGetContentsResponse { + /** + * The standard response information for queries.
+ * This includes the values requested in the `QueryHeader` + * (cost, state proof, both, or neither). + */ + ResponseHeader header = 1; + + message FileContents { + /** + * A file identifier. + *

+ * This SHALL be the identifier of a file that exists in HFS.
+ * This value SHALL identify the file that was queried. + */ + FileID fileID = 1; + + /** + * A byte array of file content. + *

+ * This SHALL contain the full content of the requested file.
+ * This SHALL be empty if, and only if, the file content is empty. + */ + bytes contents = 2; + } + + /** + * A combination of File identifier and content bytes. + *

+ * This SHALL NOT be set if the file does not exist.
+ * The network MAY generate a state proof for this field. + */ + FileContents fileContents = 2; +} diff --git a/proto/file_get_info.proto b/proto/file_get_info.proto new file mode 100644 index 000000000..53bb422e8 --- /dev/null +++ b/proto/file_get_info.proto @@ -0,0 +1,150 @@ +/** + * # File Get Information + * Messages for a query to retrieve the metadata for a file in the + * Hedera File Service (HFS). + * + * The query defined here does not include the content of the file. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "timestamp.proto"; +import "basic_types.proto"; +import "query_header.proto"; +import "response_header.proto"; + +/** + * Query to request file metadata from the Hedera File Service (HFS).
+ * This query requests all of the information _about_ a file, but none of the + * _content_ of a file. A client should submit a `fileGetContents` query to + * view the content of a file. File content _may_ also be available from a + * block node or mirror node, generally at lower cost. + * + * File metadata SHALL be available for active files and deleted files.
+ * The size of a deleted file SHALL be `0` and the content SHALL be empty. + */ +message FileGetInfoQuery { + /** + * Standard information sent with every query operation.
+ * This includes the signed payment and what kind of response is requested + * (cost, state proof, both, or neither). + */ + QueryHeader header = 1; + + /** + * A file identifier. + *

+ * This MUST be the identifier of a file that exists in HFS.
+ * This value SHALL identify the file to be queried. + */ + FileID fileID = 2; +} + +/** + * A response to a query for the metadata of a file in the HFS. + */ +message FileGetInfoResponse { + /** + * The standard response information for queries.
+ * This includes the values requested in the `QueryHeader` + * (cost, state proof, both, or neither). + */ + ResponseHeader header = 1; + + message FileInfo { + /** + * A file identifier. + *

+ * This SHALL be the identifier of a file that exists in HFS.
+ * This value SHALL identify the file that was queried. + */ + FileID fileID = 1; + + /** + * A size, in bytes, for the file. + */ + int64 size = 2; + + /** + * An expiration timestamp. + *

+ * The file SHALL NOT expire before the network consensus time + * exceeds this value.
+ * The file SHALL expire after the network consensus time + * exceeds this value.
+ */ + Timestamp expirationTime = 3; + + /** + * A flag indicating this file is deleted. + *

+ * A deleted file SHALL have a size `0` and empty content. + */ + bool deleted = 4; + + /** + * A KeyList listing all keys that "own" the file. + *

+ * All keys in this list MUST sign a transaction to append to the + * file content, or to modify file metadata.
+ * At least _one_ key in this list MUST sign a transaction to delete + * this file.
+ * If this is an empty `KeyList`, the file is immutable, cannot be + * modified or deleted, but MAY expire. A `fileUpdate` transaction MAY + * extend the expiration time for an immutable file. + */ + KeyList keys = 5; + + /** + * A short description for this file. + *

+ * This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes` + * (default 100) bytes when encoded as UTF-8. + */ + string memo = 6; + + /** + * A ledger identifier for the responding network. + *

+ * This value SHALL identify the distributed ledger that responded to + * this query. + */ + bytes ledger_id = 7; + } + + /** + * A combination of fields from the requested file metadata. + *

+ * This SHALL NOT be set if the identified file does not exist + * or has expired. + */ + FileInfo fileInfo = 2; +} diff --git a/proto/file_service.proto b/proto/file_service.proto new file mode 100644 index 000000000..11c456cfa --- /dev/null +++ b/proto/file_service.proto @@ -0,0 +1,138 @@ +/** + * # File Service + * gRPC definitions for the Hedera File Service (HFS). + * + * The HFS manages bulk data in the form of byte arrays of arbitrary + * size, up to a network-configured maximum size. These files are + * most often used to store bulk data for distributed applications + * and smart contracts. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package + +import "query.proto"; +import "response.proto"; +import "transaction_response.proto"; +import "transaction.proto"; + +/** + * Service gRPC definitions for the Hedera File Service (HFS). + * + * #### Signature Requirements + * The HFS manages file authorization differently, depending on type of file + * transaction, and this can be surprising.
+ * The core element of file authorization is the `keys` field, + * which is a `KeyList`; a list of individual `Key` messages, each of which + * may represent a simple or complex key.
+ * The file service transactions treat this list differently.
+ * A `fileCreate`, `fileAppend`, or `fileUpdate` MUST have a valid signature + * from _each_ key in the list.
+ * A `fileDelete` MUST have a valid signature from _at least one_ key in + * the list. This is different, and allows a file "owned" by many entities + * to be deleted by any one of those entities. A deleted file cannot be + * restored, so it is important to consider this when assigning keys for + * a file.
+ * If any of the keys in a `KeyList` are complex, the full requirements of + * each complex key must be met to count as a "valid signature" for that key. + * A complex key structure (i.e. a `ThresholdKey`, or `KeyList`, possibly + * including additional `ThresholdKey` or `KeyList` descendants) may be + * assigned as the sole entry in a file `keys` field to ensure all transactions + * have the same signature requirements. + */ +service FileService { + /** + * Create a file in HFS. + */ + rpc createFile (Transaction) returns (TransactionResponse); + + /** + * Update a file in HFS. + */ + rpc updateFile (Transaction) returns (TransactionResponse); + + /** + * Delete a file in HFS.
+ * The content of a file deleted in this manner is completely removed + * from network state, but the file metadata remains. + */ + rpc deleteFile (Transaction) returns (TransactionResponse); + + /** + * Append content to a file in HFS. + */ + rpc appendContent (Transaction) returns (TransactionResponse); + + /** + * Retrieve the content of a file in HFS.
+ * Note that this query retrieves _only_ the file content, not any of + * the metadata for the file. + */ + rpc getFileContent (Query) returns (Response); + + /** + * Retrieve the metadata for a file in HFS.
+ * Note that this query does not retrieve the file _content_. + */ + rpc getFileInfo (Query) returns (Response); + + /** + * Delete a "regular" file without "owner" authorization.
+ * This transaction _does not_ require signatures for the keys in + * the file `keys` list, but must be signed by a "privileged" account. + *

+ * This transaction SHALL NOT accept a file identifier for + * a "system" file.
+ * This transaction SHALL NOT remove the _content_ of the file from state. + * This permits use of the `systemUndelete` to reverse this action if + * performed in error. + *

+ * This is a privileged transaction, and only accounts 2-59 are permitted + * to call this function, by default. The actual restriction is in the + * `api-permission.properties` file in the consensus node configuration. + */ + rpc systemDelete (Transaction) returns (TransactionResponse); + + /** + * Undelete a "regular" file. + * This transaction must be signed by a "privileged" account.
+ *

+ * This transaction SHALL NOT accept a file identifier for + * a "system" file.
+ * The file identified SHOULD have been previously deleted.
+ * This transaction SHALL NOT recover the _content_ of a file unless that + * file was deleted with a `systemDelete` transaction. The _content_ of a + * file deleted with a `fileDelete` transaction is not retained in state. + *

+ * This is a privileged transaction, and only accounts 2-60 are permitted + * to call this function, by default. The actual restriction is in the + * `api-permission.properties` file in the consensus node configuration. + */ + rpc systemUndelete (Transaction) returns (TransactionResponse); +} diff --git a/proto/file_update.proto b/proto/file_update.proto new file mode 100644 index 000000000..711a54206 --- /dev/null +++ b/proto/file_update.proto @@ -0,0 +1,110 @@ +/** + * # File Update + * A message to modify the metadata for a file and/or _replace_ the contents. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; +import "timestamp.proto"; +import "google/protobuf/wrappers.proto"; + +/** + * Update the metadata, and/or replace the content, of a file in the + * Hedera File Service (HFS). + * + * Any field which is not set (i.e. is null) in this message, other than + * `fileID`, SHALL be ignored.
+ * If the `keys` list for the identified file is an empty `KeyList`, then + * this message MUST NOT set any field except `expirationTime`. + * + * #### Signature Requirements + * Every `Key` in the `keys` list for the identified file MUST sign this + * transaction, if any field other than `expirationTime` is to be updated.
+ * If the `keys` list for the identified file is an empty `KeyList` (because + * this file was previously created or updated to have an empty `KeyList`), + * then the file is considered immutable and this message MUST NOT set any + * field except `expirationTime`.
+ * See the [File Service](#FileService) specification for a detailed + * explanation of the signature requirements for all file transactions. + * + * ### Block Stream Effects + * None + */ +message FileUpdateTransactionBody { + /** + * A file identifier for the file to update. + *

+ * This field is REQUIRED. + */ + FileID fileID = 1; + + /** + * An expiration timestamp. + *

+ * If set, this value MUST be strictly later than the existing + * `expirationTime` value, or else it will be ignored.
+ * If set, this value SHALL replace the existing `expirationTime`.
+ * If this field is the only field set, then this transaction SHALL NOT + * require any signature other than the `payer` for the transaction.
+ * When the network consensus time exceeds the then-current + * `expirationTime`, the network SHALL expire the file. + */ + Timestamp expirationTime = 2; + + /** + * The new list of keys that "own" this file. + *

+ * If set, every key in this `KeyList` MUST sign this transaction.
+ * If set, every key in the _previous_ `KeyList` MUST _also_ + * sign this transaction.
+ * If this value is an empty `KeyList`, then the file SHALL be immutable + * after completion of this transaction. + */ + KeyList keys = 3; + + /** + * An array of bytes. + *

+ * This value, if set, SHALL _replace_ the existing file content. + * If this value is set to an empty byte array, the content of the file + * SHALL be unchanged. + */ + bytes contents = 4; + + /** + * A short description of this file. + *

+ * This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes` + * (default 100) bytes when encoded as UTF-8. + */ + google.protobuf.StringValue memo = 5; +} diff --git a/proto/freeze.proto b/proto/freeze.proto new file mode 100644 index 000000000..954853edd --- /dev/null +++ b/proto/freeze.proto @@ -0,0 +1,152 @@ +/** + * # Freeze + * Transaction body for a network "freeze" transaction. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "timestamp.proto"; +import "basic_types.proto"; +import "freeze_type.proto"; + +/** + * A transaction body for all five freeze transactions. + * + * Combining five different transactions into a single message, this + * transaction body MUST support options to schedule a freeze, abort a + * scheduled freeze, prepare a software upgrade, prepare a telemetry + * upgrade, or initiate a software upgrade. + * + * For a scheduled freeze, at the scheduled time, according to + * network consensus time + * - A freeze (`FREEZE_ONLY`) causes the network nodes to stop creating + * events or accepting transactions, and enter a persistent + * maintenance state. + * - A freeze upgrade (`FREEZE_UPGRADE`) causes the network nodes to stop + * creating events or accepting transactions, and upgrade the node software + * from a previously prepared upgrade package. The network nodes then + * restart and rejoin the network after upgrading. + * + * For other freeze types, immediately upon processing the freeze transaction + * - A Freeze Abort (`FREEZE_ABORT`) cancels any pending scheduled freeze. + * - A prepare upgrade (`PREPARE_UPGRADE`) begins to extract the contents of + * the specified upgrade file to the local filesystem. + * - A telemetry upgrade (`TELEMETRY_UPGRADE`) causes the network nodes to + * extract a telemetry upgrade package to the local filesystem and signal + * other software on the machine to upgrade, without impacting the node or + * network processing. + * + * ### Block Stream Effects + * Unknown + */ +message FreezeTransactionBody { + /** + * Rejected if set; replace with `start_time`.
+ * The start hour (in UTC time), a value between 0 and 23 + */ + int32 startHour = 1 [deprecated = true]; + + /** + * Rejected if set; replace with `start_time`.
+ * The start minute (in UTC time), a value between 0 and 59 + */ + int32 startMin = 2 [deprecated = true]; + + /** + * Rejected if set; end time is neither assigned nor guaranteed and depends + * on many uncontrolled factors.
+ * The end hour (in UTC time), a value between 0 and 23 + */ + int32 endHour = 3 [deprecated = true]; + + /** + * Rejected if set; end time is neither assigned nor guaranteed and depends + * on many uncontrolled factors.
+ * The end minute (in UTC time), a value between 0 and 59 + */ + int32 endMin = 4 [deprecated = true]; + + /** + * An upgrade file. + *

+ * If set, the identifier of a file in network state.
+ * The contents of this file MUST be a `zip` file and this data + * SHALL be extracted to the node filesystem during a + * `PREPARE_UPGRADE` or `TELEMETRY_UPGRADE` freeze type.
+ * The `file_hash` field MUST match the SHA384 hash of the content + * of this file.
+ * The extracted data SHALL be used to perform a network software update + * if a `FREEZE_UPGRADE` freeze type is subsequently processed. + */ + FileID update_file = 5; + + /** + * A SHA384 hash of file content.
+ * This is a hash of the file identified by `update_file`. + *

+ * This MUST be set if `update_file` is set, and MUST match the + * SHA384 hash of the contents of that file. + */ + bytes file_hash = 6; + + /** + * A start time for the freeze. + *

+ * If this field is REQUIRED for the specified `freeze_type`, then + * when the network consensus time reaches this instant

    + *
  1. The network SHALL stop accepting transactions.
  2. + *
  3. The network SHALL gossip a freeze state.
  4. + *
  5. The nodes SHALL, in coordinated order, disconnect and + * shut down.
  6. + *
  7. The nodes SHALL halt or perform a software upgrade, depending + * on `freeze_type`.
  8. + *
  9. If the `freeze_type` is `FREEZE_UPGRADE`, the nodes SHALL + * restart and rejoin the network upon completion of the + * software upgrade.
  10. + *
+ *
+ * If the `freeze_type` is `TELEMETRY_UPGRADE`, the start time is required, + * but the network SHALL NOT stop, halt, or interrupt transaction + * processing. The required field is an historical anomaly and SHOULD + * change in a future release.
+ */ + Timestamp start_time = 7; + + /** + * The type of freeze. + *

+ * This REQUIRED field effectively selects between five quite different + * transactions in the same transaction body. Depending on this value + * the service may schedule a freeze, prepare upgrades, perform upgrades, + * or even abort a previously scheduled freeze. + */ + FreezeType freeze_type = 8; +} diff --git a/proto/freeze_service.proto b/proto/freeze_service.proto new file mode 100644 index 000000000..88aaa9239 --- /dev/null +++ b/proto/freeze_service.proto @@ -0,0 +1,57 @@ +/** + * # Freeze Service + * A service to manage network freeze events. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package + +import "transaction_response.proto"; +import "transaction.proto"; + +/** + * A service to manage network "freeze" events. + * + * This service provides a facility to prepare for network upgrades, halt network processing, + * perform network software upgrades, and automatically restart the network following an upgrade. + */ +service FreezeService { + /** + * Freeze, cancel, or prepare a freeze. + * This single transaction performs all of the functions supported + * by the network freeze service. These functions include actions to + * prepare an upgrade, prepare a telemetry upgrade, freeze the network, + * freeze the network for upgrade, or abort a scheduled freeze. + *

+ * The actual freeze action SHALL be determined by the `freeze_type` field + * of the `FreezeTransactionBody`.
+ * The transaction body MUST be a `FreezeTransactionBody`. + */ + rpc freeze (Transaction) returns (TransactionResponse); +} diff --git a/proto/freeze_type.proto b/proto/freeze_type.proto new file mode 100644 index 000000000..606131687 --- /dev/null +++ b/proto/freeze_type.proto @@ -0,0 +1,136 @@ +/** + * # Freeze Type + * An enumeration to select the type of a network freeze. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +/** + * An enumeration of possible network freeze types. + * + * Each enumerated value SHALL be associated to a single network freeze + * scenario. Each freeze scenario defines the specific parameters + * REQUIRED for that freeze. + */ +enum FreezeType { + /** + * An invalid freeze type. + *

+ * The first value in a protobuf enum is a default value. This default + * is RECOMMENDED to be an invalid value to aid in detecting unset fields. + */ + UNKNOWN_FREEZE_TYPE = 0; + + /** + * Freeze the network, and take no further action. + *

+ * The `start_time` field is REQUIRED, MUST be strictly later than the + * consensus time when this transaction is handled, and SHOULD be between + * `300` and `3600` seconds after the transaction identifier + * `transactionValidStart` field.
+ * The fields `update_file` and `file_hash` SHALL be ignored.
+ * A `FREEZE_ONLY` transaction SHALL NOT perform any network + * changes or upgrades.
+ * After this freeze is processed manual intervention is REQUIRED + * to restart the network. + */ + FREEZE_ONLY = 1; + + /** + * This freeze type does not freeze the network, but begins + * "preparation" to upgrade the network. + *

+ * The fields `update_file` and `file_hash` are REQUIRED + * and MUST be valid.
+ * The `start_time` field SHALL be ignored.
+ * A `PREPARE_UPGRADE` transaction SHALL NOT freeze the network or + * interfere with general transaction processing.
+ * If this freeze type is initiated after a `TELEMETRY_UPGRADE`, the + * prepared telemetry upgrade SHALL be reset and all telemetry upgrade + * artifacts in the filesystem SHALL be deleted.
+ * At some point after this freeze type completes (dependent on the size + * of the upgrade file), the network SHALL be prepared to complete + * a software upgrade of all nodes. + */ + PREPARE_UPGRADE = 2; + + /** + * Freeze the network to perform a software upgrade. + *

+ * The `start_time` field is REQUIRED, MUST be strictly later than the + * consensus time when this transaction is handled, and SHOULD be between + * `300` and `3600` seconds after the transaction identifier + * `transactionValidStart` field.
+ * A software upgrade file MUST be prepared prior to this transaction.
+ * After this transaction completes, the network SHALL initiate an + * upgrade and restart of all nodes at the start time specified. + */ + FREEZE_UPGRADE = 3; + + /** + * Abort a pending network freeze operation. + *

+ * All fields SHALL be ignored for this freeze type.
+ * This freeze type MAY be submitted after a `FREEZE_ONLY`, + * `FREEZE_UPGRADE`, or `TELEMETRY_UPGRADE` is initiated.
+ * This freeze type MUST be submitted and reach consensus + * before the `start_time` designated for the current pending + * freeze to be effective.
+ * After this freeze type is processed, the upgrade file hash + * and pending freeze start time stored in the network SHALL + * be reset to default (empty) values. + */ + FREEZE_ABORT = 4; + + /** + * Prepare an upgrade of auxiliary services and containers + * providing telemetry/metrics. + *

+ * The `start_time` field is REQUIRED, MUST be strictly later than the + * consensus time when this transaction is handled, and SHOULD be between + * `300` and `3600` seconds after the transaction identifier + * `transactionValidStart` field.
+ * The `update_file` field is REQUIRED and MUST be valid.
+ * A `TELEMETRY_UPGRADE` transaction SHALL NOT freeze the network or + * interfere with general transaction processing.
+ * This freeze type MUST NOT be initiated between a `PREPARE_UPGRADE` + * and `FREEZE_UPGRADE`. If this freeze type is initiated after a + * `PREPARE_UPGRADE`, the prepared upgrade SHALL be reset and all software + * upgrade artifacts in the filesystem SHALL be deleted.
+ * At some point after this freeze type completes (dependent on the + * size of the upgrade file), the network SHALL automatically upgrade + * the telemetry/metrics services and containers as directed in + * the specified telemetry upgrade file. + *

The condition that `start_time` is REQUIRED is an + * historical anomaly and SHOULD change in a future release.
+ */ + TELEMETRY_UPGRADE = 5; +} diff --git a/proto/get_account_details.proto b/proto/get_account_details.proto new file mode 100644 index 000000000..411b2abca --- /dev/null +++ b/proto/get_account_details.proto @@ -0,0 +1,425 @@ +/** + * # Get Account Details + * A standard query to inspect the full detail of an account. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "timestamp.proto"; +import "duration.proto"; +import "basic_types.proto"; +import "query_header.proto"; +import "response_header.proto"; + +/** + * Request detail information about an account. + * + * The returned information SHALL include balance and allowances.
+ * The returned information SHALL NOT include a list of account records. + * + * #### Important + * This query is a _privileged_ query. Only "system" accounts SHALL be + * permitted to submit this query. + */ +message GetAccountDetailsQuery { + /** + * Standard information sent with every query operation.
+ * This includes the signed payment and what kind of response is requested + * (cost, state proof, both, or neither). + */ + QueryHeader header = 1; + + /** + * An account ID for which information is requested + *

+ * This value SHALL identify the account to be queried.
+ * This value MUST identify a valid account.
+ * This field is REQUIRED. + */ + AccountID account_id = 2; +} + +/** + * A response to a `GetAccountDetailsQuery`. + * + * This SHALL contain the account details if requested and successful. + */ +message GetAccountDetailsResponse { + /** + * The standard response information for queries.
+ * This includes the values requested in the `QueryHeader` + * (cost, state proof, both, or neither). + */ + ResponseHeader header = 1; + + /** + * Information describing a single Account in the Hedera distributed ledger. + * + * #### Attributes + * Each Account may have a unique three-part identifier, a Key, and one or + * more token balances. Accounts also have an alias, which has multiple + * forms, and may be set automatically. Several additional items are + * associated with the Account to enable full functionality. + * + * #### Expiration + * Accounts, as most items in the network, have an expiration time, recorded + * as a `Timestamp`, and must be "renewed" for a small fee at expiration. + * This helps to reduce the amount of inactive accounts retained in state. + * Another account may be designated to pay any renewal fees and + * automatically renew the account for (by default) 30-90 days at a time as + * a means to optionally ensure important accounts remain active. + * + * ### Staking + * Accounts may participate in securing the network by "staking" the account + * balances to a particular network node, and receive a portion of network + * fees as a reward. An account may optionally decline these rewards but + * still stake its balances. + * + * #### Transfer Restrictions + * An account may optionally require that inbound transfer transactions be + * signed by that account as receiver (in addition to any other signatures + * required, including sender). + * + */ + message AccountDetails { + /** + * The unique ID of this account. + *

+ * An account ID, when assigned to this field, SHALL be of + * the form `shard.realm.number`.
+ * Transactions MAY reference the account by alias, but the account + * itself MUST always have a purely numeric identifier. This numeric + * ID is the value used to reference the account in query responses, + * transaction receipts, transaction records, and the block stream. + */ + AccountID account_id = 1; + + /** + * A Solidity ID.
+ * This identifies the contract instance, and the `Account` associated + * with that contract instance. + *

+ * This SHALL be populated if this account is a smart contract, and + * SHALL NOT be populated otherwise.
+ * This SHALL be formatted as a string according to Solidity ID + * standards. + */ + string contract_account_id = 2; + + /** + * A boolean indicating that this account is deleted. + */ + bool deleted = 3; + + /** + * Replaced by StakingInfo.
+ * ID of the account to which this account is staking its balances. If + * this account is not currently staking its balances, then this field, + * if set, SHALL be the sentinel value of `0.0.0`. + */ + AccountID proxy_account_id = 4 [deprecated = true]; + + /** + * The total amount of tinybar proxy staked to this account. + */ + int64 proxy_received = 5; + + /** + * The key to be used to sign transactions from this account, if any. + *

+ * This key SHALL NOT be set for hollow accounts until the account + * is finalized.
+ * This key SHALL be set on all other accounts, except for certain + * immutable accounts (0.0.800 and 0.0.801) necessary for network + * function and otherwise secured by the governing council. + */ + Key key = 6; + + /** + * The HBAR balance of this account, in tinybar (10-8 HBAR). + *

+ * This value SHALL always be a whole number. + */ + uint64 balance = 7; + + /** + * A boolean indicating that the account requires a receiver signature + * for inbound token transfer transactions. + *

+ * If this value is `true` then a transaction to transfer tokens to this + * account SHALL NOT succeed unless this account has signed the + * transfer transaction. + */ + bool receiver_sig_required = 8; + + /** + * The current expiration time for this account. + *

+ * This account SHALL be due standard renewal fees when the network + * consensus time exceeds this time.
+ * If rent and expiration are enabled for the network, and automatic + * renewal is enabled for this account, renewal fees SHALL be charged + * after this time, and, if charged, the expiration time SHALL be + * extended for another renewal period.
+ * This account MAY be expired and removed from state at any point + * after this time if not renewed.
+ * An account holder MAY extend this time by submitting an account + * update transaction to modify expiration time, subject to the current + * maximum expiration time for the network. + */ + Timestamp expiration_time = 9; + + /** + * A duration to extend this account's expiration. + *

+ * The network SHALL extend the account's expiration by this + * duration, if funds are available, upon automatic renewal.
+ * This SHALL NOT apply if the account is already deleted + * upon expiration.
+ * If this is not provided in an allowed range on account creation, the + * transaction SHALL fail with INVALID_AUTO_RENEWAL_PERIOD. The default + * values for the minimum period and maximum period are currently + * 30 days and 90 days, respectively. + */ + Duration auto_renew_period = 10; + + /** + * As of `HIP-367`, which enabled unlimited token associations, the + * potential scale for this value requires that users consult a mirror + * node for this information. Only the top `maxRelsPerInfoQuery` + * (default 1000) relationships will be returned by this query.
+ * A list of tokens to which this account is "associated", enabling the + * transfer of that token type by this account. + */ + repeated TokenRelationship token_relationships = 11; + + /** + * A short description of this account. + *

+ * This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes` + * (default 100) bytes when encoded as UTF-8. + */ + string memo = 12; + + /** + * The total number of non-fungible/unique tokens owned by this account. + */ + int64 owned_nfts = 13; + + /** + * The maximum number of tokens that can be auto-associated with the + * account. + *

+ * If this is less than or equal to `used_auto_associations` (or 0), + * then this account MUST manually associate with a token before + * transacting in that token.
+ * Following HIP-904 This value may also be `-1` to indicate no + * limit.
+ * This value MUST NOT be less than `-1`. + */ + int32 max_automatic_token_associations = 14; + + /** + * An account EVM alias.
+ * This is a value used in some contexts to reference an account when + * the tripartite account identifier is not available. + *

+ * This field, when set to a non-default value, is immutable and + * SHALL NOT be changed. + */ + bytes alias = 15; + + /** + * The ledger ID of the network that generated this response. + *

+ * This value SHALL identify the distributed ledger that responded to + * this query. + */ + bytes ledger_id = 16; + + /** + * A list of crypto (HBAR) allowances approved by this account. + *

+ * If this is not empty, each allowance SHALL permit a specified + * "spender" account to spend this account's HBAR balance, up + * to a designated limit.
+ * This field SHALL permit spending only HBAR balance, not other + * tokens the account may hold.
+ * Allowances for other tokens SHALL be listed in the + * `token_allowances` field or the + * `approve_for_all_nft_allowances` field. + */ + repeated GrantedCryptoAllowance granted_crypto_allowances = 17; + + /** + * A list of non-fungible token (NFT) allowances approved by + * this account. + *

+ * If this is not empty, each allowance SHALL permit a specified + * "spender" account to transfer _all_ of this account's + * non-fungible/unique tokens from a particular collection.
+ * Allowances for a specific serial number MUST be directly + * associated with that specific non-fungible/unique token, rather + * than the holding account. + */ + repeated GrantedNftAllowance granted_nft_allowances = 18; + + /** + * A list of fungible token allowances approved by this account. + *

+ * If this is not empty, each allowance SHALL permit a specified + * "spender" to spend this account's fungible tokens, of the + * designated type, up to a designated limit. + */ + repeated GrantedTokenAllowance granted_token_allowances = 19; + + } + + /** + * Details of the account. + *

+ * A state proof MAY be generated for this field. + */ + AccountDetails account_details = 2; +} + +/** + * Permission granted by one account (the "funding" account) to another + * account (the "spender" account) that allows the spender to spend a + * specified amount of HBAR owned by the funding account. + * + * An allowance SHALL NOT transfer any HBAR directly, it only permits + * transactions signed only by the spender account to transfer HBAR, up + * to the amount specified, from the funding account. + * + * Once the specified amount is spent, the allowance SHALL be consumed + * and a new allowance SHALL be required before that spending account + * may spend additional HBAR from the funding account. + */ +message GrantedCryptoAllowance { + /** + * The identifier for the spending account associated with this allowance. + *

+ * This account SHALL be permitted to sign transactions to spend + * HBAR from the funding/allowing account.
+ * This permission SHALL be limited to no more than the specified `amount`. + */ + AccountID spender = 1; + + /** + * The maximum amount that the spender account may transfer within + * the scope of this allowance. + *

+ * This allowance SHALL be consumed if any combination of transfers + * authorized via this allowance meet this value in total.
+ * This value MUST be specified in tinybar (i.e. 10-8 HBAR). + */ + int64 amount = 2; +} + +/** + * Permission granted by one account (the "funding" account) to another + * account (the "spender" account) that allows the spender to transfer + * all serial numbers of a specific non-fungible/unique token (NFT) + * collection owned by the funding account.
+ * This is a broad permission, as it does not matter how many NFTs of the + * specified collection the funding account owns, the spender MAY dispose + * of any or all of them with this allowance.
+ * Each token type (typically a collection of NFTs) SHALL require + * a separate allowance.
+ * Allowances for a specific serial number MUST be directly associated + * with that specific non-fungible/unique token, rather than + * the holding account. + * + * An allowance SHALL NOT transfer any tokens directly, it only permits + * transactions signed only by the spender account to transfer any + * non-fungible/unique tokens of the specified type owned by + * the funding account. + */ +message GrantedNftAllowance { + /** + * The identifier for the token associated with this allowance. + *

+ * This token MUST be a non-fungible/unique token. + */ + TokenID token_id = 1; + + /** + * The identifier for the spending account associated with this allowance. + *

+ * This account SHALL be permitted to sign transactions to spend + * tokens of the associated token type from the funding/allowing account. + */ + AccountID spender = 2; +} + +/** + * Permission granted by one account (the "funding" account) to another + * account (the "spender" account) that allows the spender to spend a + * specified amount of a specific non-HBAR fungible token from the + * balance owned by the funding account. + * + * An allowance SHALL NOT transfer any tokens directly, it only permits + * transactions signed only by the spender account to transfer tokens + * of the specified type, up to the amount specified, from the funding account. + * + * Once the specified amount is spent, the allowance SHALL be consumed + * and a new allowance SHALL be required before that spending account + * may spend additional tokens from the funding account. + */ +message GrantedTokenAllowance { + /** + * The identifier for the token associated with this allowance. + *

+ * This token MUST be a fungible/common token. + */ + TokenID token_id = 1; + + /** + * The identifier for the spending account associated with this allowance. + *

+ * This account SHALL be permitted to sign transactions to spend tokens + * of the associated token type from the funding/allowing account.
+ * This permission SHALL be limited to no more than the specified `amount`. + */ + AccountID spender = 2; + + /* + * The maximum amount that the spender account may transfer within + * the scope of this allowance. + *

+ * This allowance SHALL be consumed if any combination of transfers + * authorized via this allowance meet this value in total.
+ * This value MUST be specified in the smallest units of the relevant + * token (i.e. 10-decimals whole tokens). + */ + int64 amount = 3; +} diff --git a/proto/get_by_key.proto b/proto/get_by_key.proto new file mode 100644 index 000000000..9d061aee9 --- /dev/null +++ b/proto/get_by_key.proto @@ -0,0 +1,128 @@ +/** + * # Get By Key + * An obsolete query to obtain a list of entities that refer to + * a given Key object.
+ * Returned entities may be accounts, files, smart contracts, and/or + * live hash entries. + * + * > Important + * >> This query is obsolete and not supported.
+ * >> Any query of this type that is submitted SHALL fail with a `PRE_CHECK` + * >> result of `NOT_SUPPORTED`. + * + * > Implementation Note + * >> This query is not defined for any service, and while it is implemented + * >> in the "Network Admin" service, it may be unnecessary to do so. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; +import "query_header.proto"; +import "response_header.proto"; +import "crypto_add_live_hash.proto"; + +/** + * Query all accounts, claims, files, and smart contract instances whose + * associated keys include the given Key. + * + * > This query is no longer supported. + */ +message GetByKeyQuery { + option deprecated = true; + + /** + * Standard information sent with every query operation.
+ * This includes the signed payment and what kind of response is requested + * (cost, state proof, both, or neither). + */ + QueryHeader header = 1; + + /** + * The key to search for. It MUST NOT contain a contractID nor + * a ThresholdKey. + */ + Key key = 2; +} + +/** + * The ID for a single entity (account, livehash, file, or smart contract) + * + * > The query that defines this message is no longer supported. + */ +message EntityID { + option deprecated = true; + + oneof entity { + /** + * The Account ID for the cryptocurrency account + */ + AccountID accountID = 1; + + /** + * A uniquely identifying livehash of an account + */ + LiveHash liveHash = 2; + + /** + * The file ID of the file + */ + FileID fileID = 3; + + /** + * The smart contract ID that identifies instance + */ + ContractID contractID = 4; + + } +} + +/** + * Response when the client sends the node GetByKeyQuery + * + * > This query is no longer supported. + */ +message GetByKeyResponse { + option deprecated = true; + + /** + * The standard response information for queries.
+ * This includes the values requested in the `QueryHeader` + * (cost, state proof, both, or neither). + */ + ResponseHeader header = 1; + + /** + * The list of entities that include this public key in their + * associated Key list + */ + repeated EntityID entities = 2; +} diff --git a/proto/get_by_solidity_id.proto b/proto/get_by_solidity_id.proto new file mode 100644 index 000000000..64619624f --- /dev/null +++ b/proto/get_by_solidity_id.proto @@ -0,0 +1,103 @@ +/** + * # Get By Solidity + * A standard query to obtain account and contract identifiers for a smart + * contract, given the Solidity identifier for that contract. + * + * > Important + * >> This query is obsolete and not supported.
+ * >> Any query of this type that is submitted SHALL fail with a `PRE_CHECK` + * >> result of `NOT_SUPPORTED`. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; +import "query_header.proto"; +import "response_header.proto"; + +/** + * Query to read Contract, Account, and File identifiers for a smart + * contract given a Solidity identifier. + */ +message GetBySolidityIDQuery { + option deprecated = true; + /** + * Standard information sent with every query operation.
+ * This includes the signed payment and what kind of response is requested + * (cost, state proof, both, or neither). + */ + QueryHeader header = 1; + + /** + * A contract ID in the format used by Solidity. + *

+ * This field is REQUIRED. + */ + string solidityID = 2; +} + +/** + * Response to a getBySolidityId query. + * + * This message returns the account, contract, and file identifiers for + * a smart contract. + */ +message GetBySolidityIDResponse { + option deprecated = true; + /** + * The standard response information for queries.
+ * This includes the values requested in the `QueryHeader` + * (cost, state proof, both, or neither). + */ + ResponseHeader header = 1; + + /** + * An account identifier. + *

+ * This SHALL identify an account that backs the requested smart contract. + */ + AccountID accountID = 2; + + /** + * A file identifier. + *

+ * This SHALL identify a file, the contents of which are the EVM + * bytecode for the requested smart contract. + */ + FileID fileID = 3; + + /** + * A contract identifier. + *

+ * This SHALL identify the requested smart contract. + */ + ContractID contractID = 4; +} diff --git a/proto/network_get_execution_time.proto b/proto/network_get_execution_time.proto new file mode 100644 index 000000000..3fe399ec1 --- /dev/null +++ b/proto/network_get_execution_time.proto @@ -0,0 +1,101 @@ +/** + * # Get Execution Time + * Given a list of transaction identifiers, return the time required to + * process each transaction, excluding pre-consensus processing, consensus, + * and post-processing (e.g. record stream generation). + * + * > Important + * >> This query is obsolete and not supported.
+ * >> Any query of this type that is submitted SHALL fail with a `PRE_CHECK` + * >> result of `NOT_SUPPORTED`. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; +import "query_header.proto"; +import "response_header.proto"; + +/** + * Retrieve the time, in nanoseconds, spent in direct processing for one + * or more recent transactions. + * + * For each transaction identifier provided, if that transaction is + * sufficiently recent (that is, it is within the range of the configuration + * value `stats.executionTimesToTrack`), the node SHALL return the time, in + * nanoseconds, spent to directly process that transaction.
+ * This time will generally correspond to the time spent in a `handle` call + * within the workflow. + * + * Note that because each node processes every transaction for the Hedera + * network, this query MAY be sent to any node, and results MAY be different + * between different nodes. + * + */ +message NetworkGetExecutionTimeQuery { + option deprecated = true; + /** + * Standard information sent with every query operation.
+ * This includes the signed payment and what kind of response is requested + * (cost, state proof, both, or neither). + */ + QueryHeader header = 1; + + /** + * A list of transaction identifiers to query. + *

+ * All of the queried transaction identifiers MUST have execution time + * available. If any identifier does not have available execution time, + * the query SHALL fail with an `INVALID_TRANSACTION_ID` response. + */ + repeated TransactionID transaction_ids = 2; +} + +/** + * A response to a `networkGetExecutionTime` query. + */ +message NetworkGetExecutionTimeResponse { + option deprecated = true; + /** + * The standard response information for queries.
+ * This includes the values requested in the `QueryHeader` + * (cost, state proof, both, or neither). + */ + ResponseHeader header = 1; + + /** + * A list of execution times, in nanoseconds. + *

+ * This list SHALL be in the same order as the transaction + * identifiers were presented in the query. + */ + repeated uint64 execution_times = 2; +} diff --git a/proto/network_get_version_info.proto b/proto/network_get_version_info.proto new file mode 100644 index 000000000..eb98e3d24 --- /dev/null +++ b/proto/network_get_version_info.proto @@ -0,0 +1,82 @@ +/** + * # Get Version + * Standard query for services and API message versions. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; +import "query_header.proto"; +import "response_header.proto"; + +/** + * Query the deployed versions of Hedera Services and the API definitions in + * semantic version format + */ +message NetworkGetVersionInfoQuery { + /** + * Standard information sent with every query operation.
+ * This includes the signed payment and what kind of response is requested + * (cost, state proof, both, or neither). + */ + QueryHeader header = 1; +} + +/** + * A response to a `NetworkGetVersionInfoQuery`. + * + * This SHALL return `SemanticVersion` information for both Hedera API (HAPI) + * and Hedera Services. + */ +message NetworkGetVersionInfoResponse { + /** + * The standard response information for queries.
+ * This includes the values requested in the `QueryHeader` + * (cost, state proof, both, or neither). + */ + ResponseHeader header = 1; + + /** + * An API version. + *

+ * This SHALL be the current Hedera API (HAPI) protobuf message version + * accepted by the network. + */ + SemanticVersion hapiProtoVersion = 2; + + /** + * A Services version. + *

+ * This SHALL be the current version of the Hedera Services software + * operating the network. + */ + SemanticVersion hederaServicesVersion = 3; +} diff --git a/proto/network_service.proto b/proto/network_service.proto new file mode 100644 index 000000000..9710ab021 --- /dev/null +++ b/proto/network_service.proto @@ -0,0 +1,88 @@ +/** + * # Network Service + * This service offers some basic "network information" queries. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package + +import "query.proto"; +import "response.proto"; +import "transaction_response.proto"; +import "transaction.proto"; + +/** + * Basic "network information" queries. + * + * This service supports queries for the active services and API versions, + * and a query for account details. + */ +service NetworkService { + /** + * Retrieve the active versions of Hedera Services and API messages. + */ + rpc getVersionInfo (Query) returns (Response); + + /** + * Request detail information about an account. + *

+ * The returned information SHALL include balance and allowances.
+ * The returned information SHALL NOT include a list of account records. + */ + rpc getAccountDetails (Query) returns (Response); + + /** + * Retrieve the time, in nanoseconds, spent in direct processing for one or + * more recent transactions. + *

+ * For each transaction identifier provided, if that transaction is + * sufficiently recent (that is, it is within the range of the + * configuration value `stats.executionTimesToTrack`), the node SHALL + * return the time, in nanoseconds, spent to directly process that + * transaction (that is, excluding time to reach consensus).
+ * Note that because each node processes every transaction for the Hedera + * network, this query MAY be sent to any node. + *

+ *

Important
+ * This query is obsolete, not supported, and SHALL fail with a pre-check + * result of `NOT_SUPPORTED`.
+ */ + rpc getExecutionTime (Query) returns (Response) {option deprecated = true;}; + + /** + * Submit a transaction that wraps another transaction which will + * skip most validation. + *

+ *

Important
+ * This query is obsolete, not supported, and SHALL fail with a pre-check + * result of `NOT_SUPPORTED`. + *
+ */ + rpc uncheckedSubmit (Transaction) returns (TransactionResponse) {option deprecated = true;}; +} diff --git a/proto/node_create.proto b/proto/node_create.proto new file mode 100644 index 000000000..cf2a02d99 --- /dev/null +++ b/proto/node_create.proto @@ -0,0 +1,165 @@ +syntax = "proto3"; + +package com.hedera.hapi.node.addressbook; + +/* + * Copyright (C) 2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; + +/** + * A transaction body to add a new consensus node to the network address book. + * + * This transaction body SHALL be considered a "privileged transaction". + * + * This message supports a transaction to create a new node in the network + * address book. The transaction, once complete, enables a new consensus node + * to join the network, and requires governing council authorization. + * + * - A `NodeCreateTransactionBody` MUST be signed by the `Key` assigned to the + * `admin_key` field and one of those keys: treasure account (2) key, + * systemAdmin(50) key, or addressBookAdmin(55) key. + * - The newly created node information SHALL be added to the network address + * book information in the network state. + * - The new entry SHALL be created in "state" but SHALL NOT participate in + * network consensus and SHALL NOT be present in network "configuration" + * until the next "upgrade" transaction (as noted below). + * - All new address book entries SHALL be added to the active network + * configuration during the next `freeze` transaction with the field + * `freeze_type` set to `PREPARE_UPGRADE`. + * + * ### Block Stream Effects + * Upon completion the newly assigned `node_id` SHALL be recorded in + * the transaction receipt.
+ * This value SHALL be the next available node identifier.
+ * Node identifiers SHALL NOT be reused. + */ +message NodeCreateTransactionBody { + /** + * A Node account identifier. + *

+ * This account identifier MUST be in the "account number" form.
+ * This account identifier MUST NOT use the alias field.
+ * If the identified account does not exist, this transaction SHALL fail.
+ * Multiple nodes MAY share the same node account.
+ * This field is REQUIRED. + */ + proto.AccountID account_id = 1; + + /** + * A short description of the node. + *

+ * This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes` + * (default 100) bytes when encoded as UTF-8.
+ * This field is OPTIONAL. + */ + string description = 2; + + /** + * A list of service endpoints for gossip. + *

+ * These endpoints SHALL represent the published endpoints to which other + * consensus nodes may _gossip_ transactions.
+ * These endpoints MUST specify a port.
+ * This list MUST NOT be empty.
+ * This list MUST NOT contain more than `10` entries.
+ * The first two entries in this list SHALL be the endpoints published to + * all consensus nodes.
+ * All other entries SHALL be reserved for future use. + *

+ * Each network may have additional requirements for these endpoints. + * A client MUST check network-specific documentation for those + * details.
+ * If the network configuration value `gossipFqdnRestricted` is set, then + * all endpoints in this list MUST supply only IP address.
+ * If the network configuration value `gossipFqdnRestricted` is _not_ set, + * then endpoints in this list MAY supply either IP address or FQDN, but + * MUST NOT supply both values for the same endpoint. + */ + repeated proto.ServiceEndpoint gossip_endpoint = 3; + + /** + * A list of service endpoints for gRPC calls. + *

+ * These endpoints SHALL represent the published gRPC endpoints to which + * clients may submit transactions.
+ * These endpoints MUST specify a port.
+ * Endpoints in this list MAY supply either IP address or FQDN, but MUST + * NOT supply both values for the same endpoint.
+ * This list MUST NOT be empty.
+ * This list MUST NOT contain more than `8` entries. + */ + repeated proto.ServiceEndpoint service_endpoint = 4; + + /** + * A certificate used to sign gossip events. + *

+ * This value MUST be a certificate of a type permitted for gossip + * signatures.
+ * This value MUST be the DER encoding of the certificate presented.
+ * This field is REQUIRED and MUST NOT be empty. + */ + bytes gossip_ca_certificate = 5; + + /** + * A hash of the node gRPC TLS certificate. + *

+ * This value MAY be used to verify the certificate presented by the node + * during TLS negotiation for gRPC.
+ * This value MUST be a SHA-384 hash.
+ * The TLS certificate to be hashed MUST first be in PEM format and MUST be + * encoded with UTF-8 NFKD encoding to a stream of bytes provided to + * the hash algorithm.
+ * This field is OPTIONAL. + */ + bytes grpc_certificate_hash = 6; + + /** + * An administrative key controlled by the node operator. + *

+ * This key MUST sign this transaction.
+ * This key MUST sign each transaction to update this node.
+ * This field MUST contain a valid `Key` value.
+ * This field is REQUIRED and MUST NOT be set to an empty `KeyList`. + */ + proto.Key admin_key = 7; + + /** + * A boolean flag indicating whether the node operator declines to receive + * node rewards. + *

+ * If this flag is set to `true`, the node operator declines to receive + * node rewards.
+ */ + bool decline_reward = 8; + + /** + * A web proxy for gRPC from non-gRPC clients. + *

+ * This endpoint SHALL be a Fully Qualified Domain Name (FQDN) using the HTTPS + * protocol, and SHALL support gRPC-Web for use by browser-based clients.
+ * This endpoint MUST be signed by a trusted certificate authority.
+ * This endpoint MUST use a valid port and SHALL be reachable over TLS.
+ * This field MAY be omitted if the node does not support gRPC-Web access.
+ * This field MUST be updated if the gRPC-Web endpoint changes.
+ * This field SHALL enable frontend clients to avoid hard-coded proxy endpoints. + */ + proto.ServiceEndpoint grpc_proxy_endpoint = 9; +} diff --git a/proto/node_delete.proto b/proto/node_delete.proto new file mode 100644 index 000000000..22832ad61 --- /dev/null +++ b/proto/node_delete.proto @@ -0,0 +1,51 @@ +syntax = "proto3"; + +package com.hedera.hapi.node.addressbook; + +/* + * Copyright (C) 2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +/** + * A transaction body to delete a node from the network address book. + * + * - A `NodeDeleteTransactionBody` MUST be signed by one of those keys: + * adminKey, treasure account (2) key, systemAdmin(50) key, or + * addressBookAdmin(55) key. + * - Upon success, the address book entry SHALL enter a "pending delete" + * state. + * - All address book entries pending deletion SHALL be removed from the + * active network configuration during the next `freeze` transaction with + * the field `freeze_type` set to `PREPARE_UPGRADE`.
+ * - A deleted address book node SHALL be removed entirely from network state. + * - A deleted address book node identifier SHALL NOT be reused. + * + * ### Block Stream Effects + * None. + */ +message NodeDeleteTransactionBody { + /** + * A consensus node identifier in the network state. + *

+ * The node identified MUST exist in the network address book.
+ * The node identified MUST NOT be deleted.
+ * This value is REQUIRED. + */ + uint64 node_id = 1; +} diff --git a/proto/node_stake_update.proto b/proto/node_stake_update.proto new file mode 100644 index 000000000..f63b65c8e --- /dev/null +++ b/proto/node_stake_update.proto @@ -0,0 +1,276 @@ +/** + * # Node Stake Updates + * A system-initiated (i.e. internal) transaction to update stake information + * for nodes at the end of a staking period. + * + * Note that staking rewards are not paid immediately. The rewards are + * calculated, and the amount to be paid is reserved in the reward account, + * at the end of each staking period. The actual recipient accounts are then + * paid rewards when that account participates in any transaction that + * changes staking information or the account balance. This reduces the + * resources for calculating the staking rewards, quite dramatically, + * and provides an incentive for account owners to engage with the network, + * in at least a minor fashion, occasionally (typically annually).
+ * The unexpected change in balances, however, can be surprising to the + * account holder. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; +import "timestamp.proto"; + +/** + * A system initiated transaction to update staking information. + * + * This transaction SHALL be issued at the end of each staking period to update + * node stakes and reward limits.
+ * This transaction SHALL be a child of the first transaction to reach + * consensus following the end of the previous staking period.
+ * This transaction MUST NOT be sent by a client and SHALL be rejected if + * received by any node.
+ * This transaction SHALL be present in the record stream or block stream. + * + * ### Block Stream Effects + * None + */ +message NodeStakeUpdateTransactionBody { + /** + * A timestamp indicating the end of the staking period. + *

+ * This value SHALL be one nanosecond prior to midnight prior to the + * consensus time of the parent transaction. + */ + Timestamp end_of_staking_period = 1; + + /** + * A list of `NodeStake` entries for each node at the beginning of the new + * staking period. + *

+ * This list SHALL have one entry for each node participating in network + * consensus. + */ + repeated NodeStake node_stake = 2; + + /** + * A maximum reward rate for this staking period. + *

+ * This SHALL be a ratio of tinybar to HBAR.
+ * An account SHALL NOT receive a reward greater than the product of this + * ratio and the total number of HBAR staked by that account. + */ + int64 max_staking_reward_rate_per_hbar = 3; + + /** + * A fraction of network and service fees paid to + * the "node" reward account.
+ * The node staking rewards are paid from the designated reward account + * `0.0.801`, which receives a fraction of network and service fees for + * each transaction. This field is the value of that fraction for the + * last staking period. + */ + Fraction node_reward_fee_fraction = 4; + + /** + * A limit to the number of staking periods held for inactive accounts.
+ * This is the maximum number of trailing staking periods for which an + * account can collect staking rewards.
+ * #### Example + * If this value is 365 with a calendar day period, then each account must + * collect rewards at least once per calendar year to receive the full + * amount of staking rewards earned. + *

+ * Staking rewards SHALL be stored in network state for no more than + * `staking_periods_stored` staking periods.
+ * Each account MUST participate in at least one transaction that affects + * its balance, staking, or staking metadata within this time limit + * to receive all available staking rewards. + */ + int64 staking_periods_stored = 5; + + /** + * A number of minutes representing a staking period.
+ *

Note
+ * For the special case of `1440` minutes, periods are treated as + * calendar days aligned to midnight UTC, rather than repeating `1440` + * minute periods left-aligned at the epoch.
+ */ + int64 staking_period = 6; + + /** + * A fraction of network and service fees paid to + * the "general" reward account.
+ * The general staking rewards are paid from the designated reward account + * `0.0.800`, which receives a fraction of network and service fees for + * each transaction. This field is the value of that fraction for the + * last staking period. + */ + Fraction staking_reward_fee_fraction = 7; + + /** + * A minimum balance required to pay general staking rewards. + *

+ * If the balance of the staking reward account `0.0.800` is below this + * threshold, staking rewards SHALL NOT be paid in full. + */ + int64 staking_start_threshold = 8; + + /** + * HIP-786 replaced this field with `max_total_reward`.
+ * This was a maximum total number of tinybars to be distributed as staking + * rewards in the staking period that just ended. + */ + int64 staking_reward_rate = 9 [deprecated = true]; + + /** + * An amount reserved in the staking reward account.
+ * This is an amount "reserved" in the balance of account `0.0.800` that + * is already owed for pending rewards that were previously earned but + * have not yet been collected.
+ * This value is further detailed in HIP-786. + */ + int64 reserved_staking_rewards = 10; + + /** + * An available, unreserved, amount in the staking reward account.
+ * This is the balance of the staking reward account `0.0.800` at the close + * of the staking period that just ended, after reduction for all "reserved" + * funds necessary to pay previously earned rewards.
+ * This value is further detailed in HIP-786. + *

+ * This value SHALL be used to calculate the reward ratio according to + * the formula detailed in HIP-782. + */ + int64 unreserved_staking_reward_balance = 11; + + /** + * A minimum balance required for maximum staking rewards.
+ * This value is further detailed in HIP-786. + * The formula to calculate staking rewards is detailed in HIP-782. + *

+ * The value of `unreserved_staking_reward_balance` MUST match or exceed the + * value of this field to support the maximum staking reward ratio.
+ */ + int64 reward_balance_threshold = 12; + + /** + * A maximum network-wide stake that can earn full rewards.
+ * If the network-wide stake, in tinybar, exceeds this value, then staking + * rewards must be reduced to maintain "smooth" reward adjustments as + * defined in HIP-782.
+ * This value is further detailed in HIP-786. + *

+ * If the total network-wide stake exceeds this value, the effective + * staking reward ratio MUST be reduced to maintain solvency of the + * staking reward account. + */ + int64 max_stake_rewarded = 13; + + /** + * A limit amount that could be paid as staking rewards.
+ * In the limit case, the network could pay at most this amount, in tinybar + * as staking rewards for the staking period that just ended, if all other + * conditions were met to perfection.
+ *

+ * This value SHALL reflect the result of a maximum reward calculation that + * takes into account the balance thresholds and maximum stake thresholds + * as defined in HIP-782 and HIP-786.
+ * This value is a convenience. The actual defined calculation SHALL be + * authoritative in the unlikely event this value differs. + */ + int64 max_total_reward = 14; +} + +/** + * Staking information for one node at the end of a staking period. + * + * This SHALL be one entry in a list reported at the end of each + * full staking period. + */ +message NodeStake { + /** + * A limit to the amount of stake considered for consensus weight. + *

+ * The amount of stake (whether accepting rewards or not) assigned to a + * node that exceeds this limit SHALL NOT be considered for + * consensus weight calculation.
+ * If stake to _reward_ for a node exceeds this threshold, then all + * accounts staking to that node SHALL receive a lower reward rate in + * proportion to the excess stake. + */ + int64 max_stake = 1; + + /** + * A minimum amount of HBAR staked to a node to receive rewards. + *

+ * If the amount of stake (whether accepting rewards or not) assigned to + * a node at the start of a staking period is less than this threshold, + * then no rewards SHALL be paid to that node or to any accounts + * staking to that node. + */ + int64 min_stake = 2; + + /** + * A node identifier.
+ * This value uniquely identifies this node within the + * network address book. + */ + int64 node_id = 3; + + /** + * The rate of rewards, in tinybar per HBAR, for the staking reward + * period that just ended. + */ + int64 reward_rate = 4; + + /** + * A consensus weight assigned to this node for the next staking period. + */ + int64 stake = 5; + + /** + * The total amount staked to this node, while declining rewards. + *

+ * This SHALL be the total staked amount, in tinybar, that is staked to + * this node with the value of the `decline_reward` set.
+ * This value MUST be calculated at the beginning of the staking period. + */ + int64 stake_not_rewarded = 6; + + /** + * The total amount staked to this node, while accepting rewards. + *

+ * This SHALL be the total staked amount, in tinybar, that is staked to + * this node with the value of the `decline_reward` not set.
+ * This value MUST be calculated at the beginning of the staking period. + */ + int64 stake_rewarded = 7; +} diff --git a/proto/node_update.proto b/proto/node_update.proto new file mode 100644 index 000000000..0b52707bc --- /dev/null +++ b/proto/node_update.proto @@ -0,0 +1,183 @@ +syntax = "proto3"; + +package com.hedera.hapi.node.addressbook; + +/* + * Copyright (C) 2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "google/protobuf/wrappers.proto"; +import "basic_types.proto"; + +/** + * Transaction body to modify address book node attributes. + * + * - This transaction SHALL enable the node operator, as identified by the + * `admin_key`, to modify operational attributes of the node. + * - This transaction MUST be signed by the active `admin_key` for the node. + * - If this transaction sets a new value for the `admin_key`, then both the + * current `admin_key`, and the new `admin_key` MUST sign this transaction. + * - This transaction SHALL NOT change any field that is not set (is null) in + * this transaction body. + * - This SHALL create a pending update to the node, but the change SHALL NOT + * be immediately applied to the active configuration. + * - All pending node updates SHALL be applied to the active network + * configuration during the next `freeze` transaction with the field + * `freeze_type` set to `PREPARE_UPGRADE`. + * + * ### Block Stream Effects + * None. + */ +message NodeUpdateTransactionBody { + /** + * A consensus node identifier in the network state. + *

+ * The node identified MUST exist in the network address book.
+ * The node identified MUST NOT be deleted.
+ * This value is REQUIRED. + */ + uint64 node_id = 1; + + /** + * An account identifier. + *

+ * If set, this SHALL replace the node account identifier.
+ * If set, this transaction MUST be signed by the active `key` for _both_ + * the current node account _and_ the identified new node account. + */ + proto.AccountID account_id = 2; + + /** + * A short description of the node. + *

+ * This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes` + * (default 100) bytes when encoded as UTF-8.
+ * If set, this value SHALL replace the previous value. + */ + google.protobuf.StringValue description = 3; + + /** + * A list of service endpoints for gossip. + *

+ * If set, this list MUST meet the following requirements. + *


+ * These endpoints SHALL represent the published endpoints to which other + * consensus nodes may _gossip_ transactions.
+ * These endpoints SHOULD NOT specify both address and DNS name.
+ * This list MUST NOT be empty.
+ * This list MUST NOT contain more than `10` entries.
+ * The first two entries in this list SHALL be the endpoints published to + * all consensus nodes.
+ * All other entries SHALL be reserved for future use. + *

+ * Each network may have additional requirements for these endpoints. + * A client MUST check network-specific documentation for those + * details.
+ *

Example
+ * Hedera Mainnet _requires_ that address be specified, and does not + * permit DNS name (FQDN) to be specified. + *
+ *
+ * Solo, however, _requires_ DNS name (FQDN) but also permits + * address. + *
+ *

+ * If set, the new list SHALL replace the existing list. + */ + repeated proto.ServiceEndpoint gossip_endpoint = 4; + + /** + * A list of service endpoints for gRPC calls. + *

+ * If set, this list MUST meet the following requirements. + *


+ * These endpoints SHALL represent the published endpoints to which clients + * may submit transactions.
+ * These endpoints SHOULD specify address and port.
+ * These endpoints MAY specify a DNS name.
+ * These endpoints SHOULD NOT specify both address and DNS name.
+ * This list MUST NOT be empty.
+ * This list MUST NOT contain more than `8` entries. + *

+ * Each network may have additional requirements for these endpoints. + * A client MUST check network-specific documentation for those + * details. + *

+ * If set, the new list SHALL replace the existing list. + */ + repeated proto.ServiceEndpoint service_endpoint = 5; + + /** + * A certificate used to sign gossip events. + *

+ * This value MUST be a certificate of a type permitted for gossip + * signatures.
+ * This value MUST be the DER encoding of the certificate presented. + *

+ * If set, the new value SHALL replace the existing bytes value. + */ + google.protobuf.BytesValue gossip_ca_certificate = 6; + + /** + * A hash of the node gRPC TLS certificate. + *

+ * This value MAY be used to verify the certificate presented by the node + * during TLS negotiation for gRPC.
+ * This value MUST be a SHA-384 hash.
+ * The TLS certificate to be hashed MUST first be in PEM format and MUST be + * encoded with UTF-8 NFKD encoding to a stream of bytes provided to + * the hash algorithm.
+ *

+ * If set, the new value SHALL replace the existing hash value. + */ + google.protobuf.BytesValue grpc_certificate_hash = 7; + + /** + * An administrative key controlled by the node operator. + *

+ * This field is OPTIONAL.
+ * If set, this key MUST sign this transaction.
+ * If set, this key MUST sign each subsequent transaction to + * update this node.
+ * If set, this field MUST contain a valid `Key` value.
+ * If set, this field MUST NOT be set to an empty `KeyList`. + */ + proto.Key admin_key = 8; + + /** + * A boolean indicating that this node has chosen to decline node rewards + * distributed at the end of staking period. + *

+ * This node SHALL NOT receive reward if this value is set, and `true`. + */ + google.protobuf.BoolValue decline_reward = 9; + + /** + * A web proxy for gRPC from non-gRPC clients. + *

+ * This endpoint SHALL be a Fully Qualified Domain Name (FQDN) using the HTTPS + * protocol, and SHALL support gRPC-Web for use by browser-based clients.
+ * This endpoint MUST be signed by a trusted certificate authority.
+ * This endpoint MUST use a valid port and SHALL be reachable over TLS.
+ * This field MAY be omitted if the node does not support gRPC-Web access.
+ * This field MUST be updated if the gRPC-Web endpoint changes.
+ * This field SHALL enable frontend clients to avoid hard-coded proxy endpoints. + */ + proto.ServiceEndpoint grpc_proxy_endpoint = 10; +} diff --git a/proto/query.proto b/proto/query.proto new file mode 100644 index 000000000..97a02c3c7 --- /dev/null +++ b/proto/query.proto @@ -0,0 +1,246 @@ +/** + * # Query + * This is the parent message for all queries, and this message is + * serialized and signed, with the signature included in the QueryHeader. + * + * All of the entries in the `query` `oneof` are fully specified elsewhere; + * we only include a short summary here. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "get_by_key.proto"; +import "get_by_solidity_id.proto"; + +import "contract_call_local.proto"; +import "contract_get_info.proto"; +import "contract_get_bytecode.proto"; +import "contract_get_records.proto"; + +import "crypto_get_account_balance.proto"; +import "crypto_get_account_records.proto"; +import "crypto_get_info.proto"; +import "crypto_get_live_hash.proto"; +import "crypto_get_stakers.proto"; + +import "file_get_contents.proto"; +import "file_get_info.proto"; + +import "transaction_get_receipt.proto"; +import "transaction_get_record.proto"; +import "transaction_get_fast_record.proto"; + +import "consensus_get_topic_info.proto"; + +import "network_get_version_info.proto"; +import "network_get_execution_time.proto"; + +import "token_get_info.proto"; +import "schedule_get_info.proto"; + +import "token_get_account_nft_infos.proto"; +import "token_get_nft_info.proto"; +import "token_get_nft_infos.proto"; + +import "get_account_details.proto"; + +/** + * A query transaction.
+ * This message is serialized to bytes and those bytes are signed by the + * submitter, with the signature included in the QueryHeader for the query + * request. + */ +message Query { + oneof query { + /** + * Get all entities associated with a given key. + */ + GetByKeyQuery getByKey = 1; + + /** + * Get an Hedera identifier associated with an identifier in EVM + * "Solidity" form.
+ * Most often used in smart contracts to find an Hedera account, + * file, or contract identifier to pass to a system contract or + * precompile. + */ + GetBySolidityIDQuery getBySolidityID = 2; + + /** + * Call a function of a smart contract.
+ * This call is executed exclusively on the node to which it is + * submitted, and is much less expensive than a `contractCall` + * transaction. + */ + ContractCallLocalQuery contractCallLocal = 3; + + /** + * Get information about a smart contract. + */ + ContractGetInfoQuery contractGetInfo = 4; + + /** + * Get runtime bytecode used by a smart contract. + */ + ContractGetBytecodeQuery contractGetBytecode = 5; + + /** + * This query is unsupported and SHALL fail.
+ * Requests for this information MUST be directed to a mirror node. + *

+ * Get Records of a smart contract. + */ + ContractGetRecordsQuery ContractGetRecords = 6 [deprecated = true]; + + /** + * Get the current HBAR balance of an Hedera account or smart contract. + */ + CryptoGetAccountBalanceQuery cryptogetAccountBalance = 7; + + /** + * Get records of all "recent" transactions for which a specified + * account is the effective payer. + */ + CryptoGetAccountRecordsQuery cryptoGetAccountRecords = 8; + + /** + * Get information about an account, including the balance.
+ * This does not get the list of account records. + */ + CryptoGetInfoQuery cryptoGetInfo = 9; + + /** + * This query is unsupported and SHALL fail.
+ * Requests for this information MUST be directed to a mirror node. + *

+ * Get a single livehash from a single account, if present. + */ + CryptoGetLiveHashQuery cryptoGetLiveHash = 10 [deprecated = true]; + + /** + * This query is unsupported and SHALL fail.
+ * Requests for this information MUST be directed to a mirror node. + *

+ * Get all the accounts that are proxy staking to this account. + */ + CryptoGetStakersQuery cryptoGetProxyStakers = 11 [deprecated = true]; + + /** + * Get the content of a file. + */ + FileGetContentsQuery fileGetContents = 12; + + /** + * Get metadata for a file. + */ + FileGetInfoQuery fileGetInfo = 13; + + /** + * Get a receipt for a transaction.
+ * This only returns a receipt if the transaction is "recent", which + * is typically within the previous 180 seconds (3 minutes). + */ + TransactionGetReceiptQuery transactionGetReceipt = 14; + + /** + * Get a record for a transaction. + * This only returns a record if the transaction is "available", which + * is typically within the previous 1 hour. + */ + TransactionGetRecordQuery transactionGetRecord = 15; + + /** + * Get a record for a transaction. + * This only returns a record if the transaction is "recent", which + * is typically within the previous 180 seconds (3 minutes). + */ + TransactionGetFastRecordQuery transactionGetFastRecord = 16; + + /** + * Get metadata for a consensus topic. + */ + ConsensusGetTopicInfoQuery consensusGetTopicInfo = 50; + + /** + * Get the versions of Hedera Services and the HAPI API deployed on + * the responding consensus node. + */ + NetworkGetVersionInfoQuery networkGetVersionInfo = 51; + + /** + * Get metadata for a token. + */ + TokenGetInfoQuery tokenGetInfo = 52; + + /** + * Get metadata for a schedule.
+ * A schedule is a request to execute a transaction at a future + * time. + */ + ScheduleGetInfoQuery scheduleGetInfo = 53; + + /** + * This query is unsupported and SHALL fail.
+ * Requests for this information MUST be directed to a mirror node. + *

+ * Get a list of non-fungible/unique tokens associated with an account. + */ + TokenGetAccountNftInfosQuery tokenGetAccountNftInfos = 54 [deprecated = true]; + + /** + * Get metadata for a specific, serial numbered, non-fungible/unique + * token (NFT). + */ + TokenGetNftInfoQuery tokenGetNftInfo = 55; + + /** + * This query is unsupported and SHALL fail.
+ * Requests for this information MUST be directed to a mirror node. + *

+ * Get metadata for all non-fungible/unique tokens (NFTs) of a single + * type within a range of indices (0-based count of minted tokens). + */ + TokenGetNftInfosQuery tokenGetNftInfos = 56 [deprecated = true]; + + /** + * This query is unsupported and SHALL fail.
+ * Requests for this information MUST be directed to a mirror node. + *

+ * Get the execution time for a recent transaction. + */ + NetworkGetExecutionTimeQuery networkGetExecutionTime = 57 [deprecated = true]; + + /** + * Get detail metadata for an account. + */ + GetAccountDetailsQuery accountDetails = 58; + } +} diff --git a/proto/query_header.proto b/proto/query_header.proto new file mode 100644 index 000000000..b86be60b9 --- /dev/null +++ b/proto/query_header.proto @@ -0,0 +1,96 @@ +/** + * # Query Header + * Messages that comprise a header sent with each query request. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "transaction.proto"; + +/** + * The type of query response.
+ * + * This SHALL be answer-only as a default.
+ * This value SHALL support an "estimated cost" type.
+ * This value SHOULD support a "state proof" type, when available. + */ +enum ResponseType { + /** + * A response with the query answer. + */ + ANSWER_ONLY = 0; + + /** + * A response with both the query answer and a state proof. + */ + ANSWER_STATE_PROOF = 1; + + /** + * A response with the estimated cost to answer the query. + */ + COST_ANSWER = 2; + + /** + * A response with the estimated cost to answer and a state proof. + */ + COST_ANSWER_STATE_PROOF = 3; +} + +/** + * A standard query header.
+ * Each query from the client to the node must contain a QueryHeader, which + * specifies the desired response type, and includes a payment transaction + * that will compensate the network for responding to the query. + * The payment may be blank if the query is free. + * + * The payment transaction MUST be a `cryptoTransfer` from the payer account + * to the account of the node where the query is submitted.
+ * If the payment is sufficient, the network SHALL respond with the response + * type requested.
+ * If the response type is `COST_ANSWER` the payment MUST be unset. + * A state proof SHALL be available for some types of information.
+ * A state proof SHALL be available for a Record, but not a receipt, and the + * response entry for each supported "get info" query. + */ +message QueryHeader { + /** + * A signed `CryptoTransferTransaction` to pay query fees. + *

+ * This MUST transfer HBAR from the "payer" to the responding node account + * sufficient to pay the query fees. + */ + Transaction payment = 1; + + /** + * A type of query response requested. + */ + ResponseType responseType = 2; +} diff --git a/proto/response.proto b/proto/response.proto new file mode 100644 index 000000000..7bcc6dc38 --- /dev/null +++ b/proto/response.proto @@ -0,0 +1,252 @@ +/** + * # Query Response + * The `Response` message is returned from a query transaction. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "get_by_key.proto"; +import "get_by_solidity_id.proto"; + +import "contract_call_local.proto"; +import "contract_get_bytecode.proto"; +import "contract_get_info.proto"; +import "contract_get_records.proto"; + +import "crypto_get_account_balance.proto"; +import "crypto_get_account_records.proto"; +import "crypto_get_info.proto"; +import "crypto_get_live_hash.proto"; +import "crypto_get_stakers.proto"; + +import "file_get_contents.proto"; +import "file_get_info.proto"; + +import "transaction_get_receipt.proto"; +import "transaction_get_record.proto"; +import "transaction_get_fast_record.proto"; + +import "consensus_get_topic_info.proto"; + +import "network_get_version_info.proto"; +import "network_get_execution_time.proto"; + +import "token_get_account_nft_infos.proto"; +import "token_get_info.proto"; +import "token_get_nft_info.proto"; +import "token_get_nft_infos.proto"; + +import "schedule_get_info.proto"; + +import "get_account_details.proto"; + +/** + * A single query response. + * + * Each query MUST define its specific response type.
+ * Each query response MUST include both the information request and a + * `ResponseHeader`.
+ * All possible query response types MUST be listed here in a `oneof`. + */ +message Response { + oneof response { + /** + * A response for a query requesting all accounts, claims, files, and + * smart contract instances whose associated keys include the given Key. + *

+ * > This query is no longer supported. + */ + GetByKeyResponse getByKey = 1; + + /** + * A response for a query requesting Contract, Account, and File + * identifiers for a smart contract, given a Solidity identifier. + */ + GetBySolidityIDResponse getBySolidityID = 2; + + /** + * A response for a _local_ call to a query function of a given smart + * contract, providing function parameter inputs as needed. + *

+ * > This call is only performed on the local node. It is _not_ a + * > network consensus result. + */ + ContractCallLocalResponse contractCallLocal = 3; + + /** + * A response for a query requesting the current bytecode for + * a smart contract. + */ + ContractGetBytecodeResponse contractGetBytecodeResponse = 5; + + /** + * A response for a query requesting detailed information about + * a smart contract. + */ + ContractGetInfoResponse contractGetInfo = 4; + + /** + * A response for a query requesting records of all transactions + * against the given contract in the last 25 hours. + *

+ * > This query is no longer supported. + */ + ContractGetRecordsResponse contractGetRecordsResponse = 6; + + /** + * A response for a query requesting the HBAR balance of an account + * or contract. + */ + CryptoGetAccountBalanceResponse cryptogetAccountBalance = 7; + + /** + * A response for a query requesting records of all "recent" + * transactions for which the specified account is the effective payer. + */ + CryptoGetAccountRecordsResponse cryptoGetAccountRecords = 8; + + /** + * A response for a query requesting information for an account.
+ * This query includes balance, but not allowances or token + * relationships. + */ + CryptoGetInfoResponse cryptoGetInfo = 9; + + /** + * A response for a query requesting detail for a specific live hash + * associated to a specific account. + *

+ * > This query is no longer supported. + */ + CryptoGetLiveHashResponse cryptoGetLiveHash = 10; + + /** + * A response for a query requesting all the accounts that are proxy + * staking to this account. + *

+ * > This query is no longer supported. + */ + CryptoGetStakersResponse cryptoGetProxyStakers = 11; + + /** + * A response for a query requesting the content of a file in the + * Hedera File Service (HFS). + */ + FileGetContentsResponse fileGetContents = 12; + + /** + * A response for a query requesting file metadata from the + * Hedera File Service (HFS). + */ + FileGetInfoResponse fileGetInfo = 13; + + /** + * A response for a query requesting the post-consensus (final) + * result of a transaction. + */ + TransactionGetReceiptResponse transactionGetReceipt = 14; + + /** + * A response for a query requesting a transaction record; the detail + * changes completed in response to a transaction. + */ + TransactionGetRecordResponse transactionGetRecord = 15; + + /** + * A response for a query requesting a very recent transaction record. + *

+ * > This query is no longer supported. + */ + TransactionGetFastRecordResponse transactionGetFastRecord = 16; + + /** + * A response for a query requesting the current state of a topic for + * the Hedera Consensus Service (HCS). + */ + ConsensusGetTopicInfoResponse consensusGetTopicInfo = 150; + + /** + * A response for a query requesting the deployed versions of Hedera + * Services and the API definitions in semantic version format + */ + NetworkGetVersionInfoResponse networkGetVersionInfo = 151; + + /** + * A response for a query requesting metadata for a specific Token. + */ + TokenGetInfoResponse tokenGetInfo = 152; + + /** + * A response for a query requesting detail for a scheduled transaction. + */ + ScheduleGetInfoResponse scheduleGetInfo = 153; + + /** + * A response for a query requesting detail for a subset of individual + * non-fungible/unique tokens owned by an account.
+ * The requested tokens are selected by a list index, which is based + * on the order in which the tokens were added to the account. + */ + TokenGetAccountNftInfosResponse tokenGetAccountNftInfos = 154; + + /** + * A response for a query requesting detail for a specific + * non-fungible/unique token selected by both token identifier and + * serial number. + */ + TokenGetNftInfoResponse tokenGetNftInfo = 155; + + /** + * A response for a query requesting detail for a subset of individual + * non-fungible/unique tokens.
+ * The requested tokens are selected by a list index, which is based + * on the order in which the tokens were minted. + */ + TokenGetNftInfosResponse tokenGetNftInfos = 156; + + /** + * A response for a query requesting the time, in nanoseconds, spent + * in direct processing for one or more recent transactions. + *

+ * > This query is no longer supported. + */ + NetworkGetExecutionTimeResponse networkGetExecutionTime = 157; + + /** + * A response for a query requesting detail information + * about an account. + *

+ * This query is a privileged query and "system" account authorization + * is REQUIRED for this query. + */ + GetAccountDetailsResponse accountDetails = 158; + } +} diff --git a/proto/response_code.proto b/proto/response_code.proto new file mode 100644 index 000000000..64c9fb1c3 --- /dev/null +++ b/proto/response_code.proto @@ -0,0 +1,1778 @@ +/** + * # Response Code Enumeration + * An enumeration of possible response codes. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +/** + * An enumeration of possible response codes. + */ +enum ResponseCodeEnum { + /** + * The transaction passed the precheck validations. + */ + OK = 0; + + /** + * For any error not handled by specific error codes listed below. + */ + INVALID_TRANSACTION = 1; + + /** + * Payer account does not exist. + */ + PAYER_ACCOUNT_NOT_FOUND = 2; + + /** + * Node Account provided does not match the node account of the node the transaction was submitted + * to. + */ + INVALID_NODE_ACCOUNT = 3; + + /** + * Pre-Check error when TransactionValidStart + transactionValidDuration is less than current + * consensus time. + */ + TRANSACTION_EXPIRED = 4; + + /** + * Transaction start time is greater than current consensus time + */ + INVALID_TRANSACTION_START = 5; + + /** + * The given transactionValidDuration was either non-positive, or greater than the maximum + * valid duration of 180 secs. + * + */ + INVALID_TRANSACTION_DURATION = 6; + + /** + * The transaction signature is not valid + */ + INVALID_SIGNATURE = 7; + + /** + * Transaction memo size exceeded 100 bytes + */ + MEMO_TOO_LONG = 8; + + /** + * The fee provided in the transaction is insufficient for this type of transaction + */ + INSUFFICIENT_TX_FEE = 9; + + /** + * The payer account has insufficient cryptocurrency to pay the transaction fee + */ + INSUFFICIENT_PAYER_BALANCE = 10; + + /** + * This transaction ID is a duplicate of one that was submitted to this node or reached consensus + * in the last 180 seconds (receipt period) + */ + DUPLICATE_TRANSACTION = 11; + + /** + * If API is throttled out + */ + BUSY = 12; + + /** + * The API is not currently supported + */ + NOT_SUPPORTED = 13; + + /** + * The file id is invalid or does not exist + */ + INVALID_FILE_ID = 14; + + /** + * The account id is invalid or does not exist + */ + INVALID_ACCOUNT_ID = 15; + + /** + * The contract id is invalid or does not exist + */ + INVALID_CONTRACT_ID = 16; + + /** + * Transaction id is not valid + */ + INVALID_TRANSACTION_ID = 17; + + /** + * Receipt for given transaction id does not exist + */ + RECEIPT_NOT_FOUND = 18; + + /** + * Record for given transaction id does not exist + */ + RECORD_NOT_FOUND = 19; + + /** + * The solidity id is invalid or entity with this solidity id does not exist + */ + INVALID_SOLIDITY_ID = 20; + + /** + * The responding node has submitted the transaction to the network. Its final status is still + * unknown. + */ + UNKNOWN = 21; + + /** + * The transaction succeeded + */ + SUCCESS = 22; + + /** + * There was a system error and the transaction failed because of invalid request parameters. + */ + FAIL_INVALID = 23; + + /** + * There was a system error while performing fee calculation, reserved for future. + */ + FAIL_FEE = 24; + + /** + * There was a system error while performing balance checks, reserved for future. + */ + FAIL_BALANCE = 25; + + /** + * Key not provided in the transaction body + */ + KEY_REQUIRED = 26; + + /** + * Unsupported algorithm/encoding used for keys in the transaction + */ + BAD_ENCODING = 27; + + /** + * When the account balance is not sufficient for the transfer + */ + INSUFFICIENT_ACCOUNT_BALANCE = 28; + + /** + * During an update transaction when the system is not able to find the Users Solidity address + */ + INVALID_SOLIDITY_ADDRESS = 29; + + /** + * Not enough gas was supplied to execute transaction + */ + INSUFFICIENT_GAS = 30; + + /** + * contract byte code size is over the limit + */ + CONTRACT_SIZE_LIMIT_EXCEEDED = 31; + + /** + * local execution (query) is requested for a function which changes state + */ + LOCAL_CALL_MODIFICATION_EXCEPTION = 32; + + /** + * Contract REVERT OPCODE executed + */ + CONTRACT_REVERT_EXECUTED = 33; + + /** + * For any contract execution related error not handled by specific error codes listed above. + */ + CONTRACT_EXECUTION_EXCEPTION = 34; + + /** + * In Query validation, account with +ve(amount) value should be Receiving node account, the + * receiver account should be only one account in the list + */ + INVALID_RECEIVING_NODE_ACCOUNT = 35; + + /** + * Header is missing in Query request + */ + MISSING_QUERY_HEADER = 36; + + /** + * The update of the account failed + */ + ACCOUNT_UPDATE_FAILED = 37; + + /** + * Provided key encoding was not supported by the system + */ + INVALID_KEY_ENCODING = 38; + + /** + * null solidity address + */ + NULL_SOLIDITY_ADDRESS = 39; + + /** + * update of the contract failed + */ + CONTRACT_UPDATE_FAILED = 40; + + /** + * the query header is invalid + */ + INVALID_QUERY_HEADER = 41; + + /** + * Invalid fee submitted + */ + INVALID_FEE_SUBMITTED = 42; + + /** + * Payer signature is invalid + */ + INVALID_PAYER_SIGNATURE = 43; + + /** + * The keys were not provided in the request. + */ + KEY_NOT_PROVIDED = 44; + + /** + * Expiration time provided in the transaction was invalid. + */ + INVALID_EXPIRATION_TIME = 45; + + /** + * WriteAccess Control Keys are not provided for the file + */ + NO_WACL_KEY = 46; + + /** + * The contents of file are provided as empty. + */ + FILE_CONTENT_EMPTY = 47; + + /** + * The crypto transfer credit and debit do not sum equal to 0 + */ + INVALID_ACCOUNT_AMOUNTS = 48; + + /** + * Transaction body provided is empty + */ + EMPTY_TRANSACTION_BODY = 49; + + /** + * Invalid transaction body provided + */ + INVALID_TRANSACTION_BODY = 50; + + /** + * 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_TYPE_MISMATCHING_KEY = 51; + + /** + * 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. + */ + INVALID_SIGNATURE_COUNT_MISMATCHING_KEY = 52; + + /** + * the livehash body is empty + */ + EMPTY_LIVE_HASH_BODY = 53; + + /** + * the livehash data is missing + */ + EMPTY_LIVE_HASH = 54; + + /** + * the keys for a livehash are missing + */ + EMPTY_LIVE_HASH_KEYS = 55; + + /** + * the livehash data is not the output of a SHA-384 digest + */ + INVALID_LIVE_HASH_SIZE = 56; + + /** + * the query body is empty + */ + EMPTY_QUERY_BODY = 57; + + /** + * the crypto livehash query is empty + */ + EMPTY_LIVE_HASH_QUERY = 58; + + /** + * the livehash is not present + */ + LIVE_HASH_NOT_FOUND = 59; + + /** + * the account id passed has not yet been created. + */ + ACCOUNT_ID_DOES_NOT_EXIST = 60; + + /** + * the livehash already exists for a given account + */ + LIVE_HASH_ALREADY_EXISTS = 61; + + /** + * File WACL keys are invalid + */ + INVALID_FILE_WACL = 62; + + /** + * Serialization failure + */ + SERIALIZATION_FAILED = 63; + + /** + * The size of the Transaction is greater than transactionMaxBytes + */ + TRANSACTION_OVERSIZE = 64; + + /** + * The Transaction has more than 50 levels + */ + TRANSACTION_TOO_MANY_LAYERS = 65; + + /** + * Contract is marked as deleted + */ + CONTRACT_DELETED = 66; + + /** + * the platform node is either disconnected or lagging behind. + */ + PLATFORM_NOT_ACTIVE = 67; + + /** + * one public key matches more than one prefixes on the signature map + */ + KEY_PREFIX_MISMATCH = 68; + + /** + * transaction not created by platform due to large backlog + */ + PLATFORM_TRANSACTION_NOT_CREATED = 69; + + /** + * auto renewal period is not a positive number of seconds + */ + INVALID_RENEWAL_PERIOD = 70; + + /** + * the response code when a smart contract id is passed for a crypto API request + */ + INVALID_PAYER_ACCOUNT_ID = 71; + + /** + * the account has been marked as deleted + */ + ACCOUNT_DELETED = 72; + + /** + * the file has been marked as deleted + */ + FILE_DELETED = 73; + + /** + * same accounts repeated in the transfer account list + */ + ACCOUNT_REPEATED_IN_ACCOUNT_AMOUNTS = 74; + + /** + * attempting to set negative balance value for crypto account + */ + SETTING_NEGATIVE_ACCOUNT_BALANCE = 75; + + /** + * when deleting smart contract that has crypto balance either transfer account or transfer smart + * contract is required + */ + OBTAINER_REQUIRED = 76; + + /** + * when deleting smart contract that has crypto balance you can not use the same contract id as + * transferContractId as the one being deleted + */ + OBTAINER_SAME_CONTRACT_ID = 77; + + /** + * transferAccountId or transferContractId specified for contract delete does not exist + */ + OBTAINER_DOES_NOT_EXIST = 78; + + /** + * attempting to modify (update or delete a immutable smart contract, i.e. one created without a + * admin key) + */ + MODIFYING_IMMUTABLE_CONTRACT = 79; + + /** + * Unexpected exception thrown by file system functions + */ + FILE_SYSTEM_EXCEPTION = 80; + + /** + * the duration is not a subset of [MINIMUM_AUTORENEW_DURATION,MAXIMUM_AUTORENEW_DURATION] + */ + AUTORENEW_DURATION_NOT_IN_RANGE = 81; + + /** + * Decoding the smart contract binary to a byte array failed. Check that the input is a valid hex + * string. + */ + ERROR_DECODING_BYTESTRING = 82; + + /** + * File to create a smart contract was of length zero + */ + CONTRACT_FILE_EMPTY = 83; + + /** + * Bytecode for smart contract is of length zero + */ + CONTRACT_BYTECODE_EMPTY = 84; + + /** + * Attempt to set negative initial balance + */ + INVALID_INITIAL_BALANCE = 85; + + /** + * Attempt to set negative receive record threshold + */ + INVALID_RECEIVE_RECORD_THRESHOLD = 86 [deprecated = true]; + + /** + * Attempt to set negative send record threshold + */ + INVALID_SEND_RECORD_THRESHOLD = 87 [deprecated = true]; + + /** + * Special Account Operations should be performed by only Genesis account, return this code if it + * is not Genesis Account + */ + ACCOUNT_IS_NOT_GENESIS_ACCOUNT = 88; + + /** + * The fee payer account doesn't have permission to submit such Transaction + */ + PAYER_ACCOUNT_UNAUTHORIZED = 89; + + /** + * FreezeTransactionBody is invalid + */ + INVALID_FREEZE_TRANSACTION_BODY = 90; + + /** + * FreezeTransactionBody does not exist + */ + FREEZE_TRANSACTION_BODY_NOT_FOUND = 91; + + /** + * Exceeded the number of accounts (both from and to) allowed for crypto transfer list + */ + TRANSFER_LIST_SIZE_LIMIT_EXCEEDED = 92; + + /** + * Smart contract result size greater than specified maxResultSize + */ + RESULT_SIZE_LIMIT_EXCEEDED = 93; + + /** + * The payer account is not a special account(account 0.0.55) + */ + NOT_SPECIAL_ACCOUNT = 94; + + /** + * Negative gas was offered in smart contract call + */ + CONTRACT_NEGATIVE_GAS = 95; + + /** + * Negative value / initial balance was specified in a smart contract call / create + */ + CONTRACT_NEGATIVE_VALUE = 96; + + /** + * Failed to update fee file + */ + INVALID_FEE_FILE = 97; + + /** + * Failed to update exchange rate file + */ + INVALID_EXCHANGE_RATE_FILE = 98; + + /** + * Payment tendered for contract local call cannot cover both the fee and the gas + */ + INSUFFICIENT_LOCAL_CALL_GAS = 99; + + /** + * Entities with Entity ID below 1000 are not allowed to be deleted + */ + ENTITY_NOT_ALLOWED_TO_DELETE = 100; + + /** + * 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). + */ + AUTHORIZATION_FAILED = 101; + + /** + * Fee Schedule Proto uploaded but not valid (append or update is required) + */ + 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 File Part uploaded + */ + FEE_SCHEDULE_FILE_PART_UPLOADED = 104; + + /** + * The change on Exchange Rate exceeds Exchange_Rate_Allowed_Percentage + */ + EXCHANGE_RATE_CHANGE_LIMIT_EXCEEDED = 105; + + /** + * Contract permanent storage exceeded the currently allowable limit + */ + MAX_CONTRACT_STORAGE_EXCEEDED = 106; + + /** + * Transfer Account should not be same as Account to be deleted + */ + TRANSFER_ACCOUNT_SAME_AS_DELETE_ACCOUNT = 107; + + TOTAL_LEDGER_BALANCE_INVALID = 108; + /** + * The expiration date/time on a smart contract may not be reduced + */ + EXPIRATION_REDUCTION_NOT_ALLOWED = 110; + + /** + * Gas exceeded currently allowable gas limit per transaction + */ + MAX_GAS_LIMIT_EXCEEDED = 111; + + /** + * File size exceeded the currently allowable limit + */ + MAX_FILE_SIZE_EXCEEDED = 112; + + /** + * When a valid signature is not provided for operations on account with receiverSigRequired=true + */ + RECEIVER_SIG_REQUIRED = 113; + + /** + * The Topic ID specified is not in the system. + */ + INVALID_TOPIC_ID = 150; + + /** + * A provided admin key was invalid. Verify the bytes for an Ed25519 public key are exactly 32 bytes; and the bytes for a compressed ECDSA(secp256k1) key are exactly 33 bytes, with the first byte either 0x02 or 0x03.. + */ + INVALID_ADMIN_KEY = 155; + + /** + * A provided submit key was invalid. + */ + INVALID_SUBMIT_KEY = 156; + + /** + * An attempted operation was not authorized (ie - a deleteTopic for a topic with no adminKey). + */ + UNAUTHORIZED = 157; + + /** + * A ConsensusService message is empty. + */ + INVALID_TOPIC_MESSAGE = 158; + + /** + * The autoRenewAccount specified is not a valid, active account. + */ + INVALID_AUTORENEW_ACCOUNT = 159; + + /** + * An adminKey was not specified on the topic, so there must not be an autoRenewAccount. + */ + AUTORENEW_ACCOUNT_NOT_ALLOWED = 160; + + /** + * 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 + + /** + * The Scheduled entity does not exist; or has now expired, been deleted, or been executed + */ + INVALID_SCHEDULE_ID = 201; + + /** + * The Scheduled entity cannot be modified. Admin key not set + */ + SCHEDULE_IS_IMMUTABLE = 202; + + /** + * The provided Scheduled Payer does not exist + */ + INVALID_SCHEDULE_PAYER_ID = 203; + + /** + * The Schedule Create Transaction TransactionID account does not exist + */ + INVALID_SCHEDULE_ACCOUNT_ID = 204; + + /** + * The provided sig map did not contain any new valid signatures from required signers of the scheduled transaction + */ + NO_NEW_VALID_SIGNATURES = 205; + + /** + * The required signers for a scheduled transaction cannot be resolved, for example because they do not exist or have been deleted + */ + UNRESOLVABLE_REQUIRED_SIGNERS = 206; + + /** + * Only whitelisted transaction types may be scheduled + */ + SCHEDULED_TRANSACTION_NOT_IN_WHITELIST = 207; + + /** + * At least one of the signatures in the provided sig map did not represent a valid signature for any required signer + */ + SOME_SIGNATURES_WERE_INVALID = 208; + + /** + * The scheduled field in the TransactionID may not be set to true + */ + TRANSACTION_ID_FIELD_NOT_ALLOWED = 209; + + /** + * A schedule already exists with the same identifying fields of an attempted ScheduleCreate (that is, all fields other than scheduledPayerAccountID) + */ + IDENTICAL_SCHEDULE_ALREADY_CREATED = 210; + + /** + * A string field in the transaction has a UTF-8 encoding with the prohibited zero byte + */ + INVALID_ZERO_BYTE_IN_STRING = 211; + + /** + * A schedule being signed or deleted has already been deleted + */ + SCHEDULE_ALREADY_DELETED = 212; + + /** + * A schedule being signed or deleted has already been executed + */ + SCHEDULE_ALREADY_EXECUTED = 213; + + /** + * ConsensusSubmitMessage request's message size is larger than allowed. + */ + MESSAGE_SIZE_TOO_LARGE = 214; + + /** + * An operation was assigned to more than one throttle group in a given bucket + */ + OPERATION_REPEATED_IN_BUCKET_GROUPS = 215; + + /** + * The capacity needed to satisfy all opsPerSec groups in a bucket overflowed a signed 8-byte integral type + */ + BUCKET_CAPACITY_OVERFLOW = 216; + + /** + * 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 + */ + NODE_CAPACITY_NOT_SUFFICIENT_FOR_OPERATION = 217; + + /** + * A bucket was defined without any throttle groups + */ + BUCKET_HAS_NO_THROTTLE_GROUPS = 218; + + /** + * A throttle group was granted zero opsPerSec + */ + THROTTLE_GROUP_HAS_ZERO_OPS_PER_SEC = 219; + + /** + * The throttle definitions file was updated, but some supported operations were not assigned a bucket + */ + SUCCESS_BUT_MISSING_EXPECTED_OPERATION = 220; + + /** + * The new contents for the throttle definitions system file were not valid protobuf + */ + UNPARSEABLE_THROTTLE_DEFINITIONS = 221; + + /** + * The new throttle definitions system file were invalid, and no more specific error could be divined + */ + INVALID_THROTTLE_DEFINITIONS = 222; + + /** + * The transaction references an account which has passed its expiration without renewal funds available, and currently remains in the ledger only because of the grace period given to expired entities + */ + ACCOUNT_EXPIRED_AND_PENDING_REMOVAL = 223; + + /** + * Invalid token max supply + */ + INVALID_TOKEN_MAX_SUPPLY = 224; + + /** + * Invalid token nft serial number + */ + INVALID_TOKEN_NFT_SERIAL_NUMBER = 225; + + /** + * Invalid nft id + */ + INVALID_NFT_ID = 226; + + /** + * Nft metadata is too long + */ + METADATA_TOO_LONG = 227; + + /** + * Repeated operations count exceeds the limit + */ + BATCH_SIZE_LIMIT_EXCEEDED = 228; + + /** + * The range of data to be gathered is out of the set boundaries + */ + INVALID_QUERY_RANGE = 229; + + /** + * A custom fractional fee set a denominator of zero + */ + FRACTION_DIVIDES_BY_ZERO = 230; + + /** + * The transaction payer could not afford a custom fee + */ + INSUFFICIENT_PAYER_BALANCE_FOR_CUSTOM_FEE = 231 [deprecated = true]; + + /** + * More than 10 custom fees were specified + */ + CUSTOM_FEES_LIST_TOO_LONG = 232; + + /** + * Any of the feeCollector accounts for customFees is invalid + */ + INVALID_CUSTOM_FEE_COLLECTOR = 233; + + /** + * Any of the token Ids in customFees is invalid + */ + INVALID_TOKEN_ID_IN_CUSTOM_FEES = 234; + + /** + * Any of the token Ids in customFees are not associated to feeCollector + */ + TOKEN_NOT_ASSOCIATED_TO_FEE_COLLECTOR = 235; + + /** + * A token cannot have more units minted due to its configured supply ceiling + */ + TOKEN_MAX_SUPPLY_REACHED = 236; + + /** + * The transaction attempted to move an NFT serial number from an account other than its owner + */ + SENDER_DOES_NOT_OWN_NFT_SERIAL_NO = 237; + + /** + * A custom fee schedule entry did not specify either a fixed or fractional fee + */ + CUSTOM_FEE_NOT_FULLY_SPECIFIED = 238; + + /** + * Only positive fees may be assessed at this time + */ + CUSTOM_FEE_MUST_BE_POSITIVE = 239; + + /** + * Fee schedule key is not set on token + */ + TOKEN_HAS_NO_FEE_SCHEDULE_KEY = 240; + + /** + * A fractional custom fee exceeded the range of a 64-bit signed integer + */ + CUSTOM_FEE_OUTSIDE_NUMERIC_RANGE = 241; + + /** + * A royalty cannot exceed the total fungible value exchanged for an NFT + */ + ROYALTY_FRACTION_CANNOT_EXCEED_ONE = 242; + + /** + * Each fractional custom fee must have its maximum_amount, if specified, at least its minimum_amount + */ + FRACTIONAL_FEE_MAX_AMOUNT_LESS_THAN_MIN_AMOUNT = 243; + + /** + * A fee schedule update tried to clear the custom fees from a token whose fee schedule was already empty + */ + CUSTOM_SCHEDULE_ALREADY_HAS_NO_FEES = 244; + + /** + * Only tokens of type FUNGIBLE_COMMON can be used to as fee schedule denominations + */ + CUSTOM_FEE_DENOMINATION_MUST_BE_FUNGIBLE_COMMON = 245; + + /** + * Only tokens of type FUNGIBLE_COMMON can have fractional fees + */ + CUSTOM_FRACTIONAL_FEE_ONLY_ALLOWED_FOR_FUNGIBLE_COMMON = 246; + + /** + * The provided custom fee schedule key was invalid + */ + INVALID_CUSTOM_FEE_SCHEDULE_KEY = 247; + + /** + * The requested token mint metadata was invalid + */ + INVALID_TOKEN_MINT_METADATA = 248; + + /** + * The requested token burn metadata was invalid + */ + INVALID_TOKEN_BURN_METADATA = 249; + + /** + * The treasury for a unique token cannot be changed until it owns no NFTs + */ + CURRENT_TREASURY_STILL_OWNS_NFTS = 250; + + /** + * An account cannot be dissociated from a unique token if it owns NFTs for the token + */ + ACCOUNT_STILL_OWNS_NFTS = 251; + + /** + * A NFT can only be burned when owned by the unique token's treasury + */ + TREASURY_MUST_OWN_BURNED_NFT = 252; + + /** + * An account did not own the NFT to be wiped + */ + ACCOUNT_DOES_NOT_OWN_WIPED_NFT = 253; + + /** + * An AccountAmount token transfers list referenced a token type other than FUNGIBLE_COMMON + */ + ACCOUNT_AMOUNT_TRANSFERS_ONLY_ALLOWED_FOR_FUNGIBLE_COMMON = 254; + + /** + * All the NFTs allowed in the current price regime have already been minted + */ + MAX_NFTS_IN_PRICE_REGIME_HAVE_BEEN_MINTED = 255; + + /** + * The payer account has been marked as deleted + */ + PAYER_ACCOUNT_DELETED = 256; + + /** + * The reference chain of custom fees for a transferred token exceeded the maximum length of 2 + */ + CUSTOM_FEE_CHARGING_EXCEEDED_MAX_RECURSION_DEPTH = 257; + + /** + * More than 20 balance adjustments were to satisfy a CryptoTransfer and its implied custom fee payments + */ + CUSTOM_FEE_CHARGING_EXCEEDED_MAX_ACCOUNT_AMOUNTS = 258; + + /** + * The sender account in the token transfer transaction could not afford a custom fee + */ + INSUFFICIENT_SENDER_ACCOUNT_BALANCE_FOR_CUSTOM_FEE = 259; + + /** + * Currently no more than 4,294,967,295 NFTs may be minted for a given unique token type + */ + SERIAL_NUMBER_LIMIT_REACHED = 260; + + /** + * Only tokens of type NON_FUNGIBLE_UNIQUE can have royalty fees + */ + CUSTOM_ROYALTY_FEE_ONLY_ALLOWED_FOR_NON_FUNGIBLE_UNIQUE = 261; + + /** + * The account has reached the limit on the automatic associations count. + */ + NO_REMAINING_AUTOMATIC_ASSOCIATIONS = 262; + + /** + * Already existing automatic associations are more than the new maximum automatic associations. + */ + EXISTING_AUTOMATIC_ASSOCIATIONS_EXCEED_GIVEN_LIMIT = 263; + + /** + * Cannot set the number of automatic associations for an account more than the maximum allowed + * token associations tokens.maxPerAccount. + */ + REQUESTED_NUM_AUTOMATIC_ASSOCIATIONS_EXCEEDS_ASSOCIATION_LIMIT = 264; + + /** + * Token is paused. This Token cannot be a part of any kind of Transaction until unpaused. + */ + TOKEN_IS_PAUSED = 265; + + /** + * Pause key is not set on token + */ + TOKEN_HAS_NO_PAUSE_KEY = 266; + + /** + * The provided pause key was invalid + */ + INVALID_PAUSE_KEY = 267; + + /** + * The update file in a freeze transaction body must exist. + */ + FREEZE_UPDATE_FILE_DOES_NOT_EXIST = 268; + + /** + * The hash of the update file in a freeze transaction body must match the in-memory hash. + */ + FREEZE_UPDATE_FILE_HASH_DOES_NOT_MATCH = 269; + + /** + * A FREEZE_UPGRADE transaction was handled with no previous update prepared. + */ + NO_UPGRADE_HAS_BEEN_PREPARED = 270; + + /** + * A FREEZE_ABORT transaction was handled with no scheduled freeze. + */ + NO_FREEZE_IS_SCHEDULED = 271; + + /** + * The update file hash when handling a FREEZE_UPGRADE transaction differs from the file + * hash at the time of handling the PREPARE_UPGRADE transaction. + */ + UPDATE_FILE_HASH_CHANGED_SINCE_PREPARE_UPGRADE = 272; + + /** + * The given freeze start time was in the (consensus) past. + */ + FREEZE_START_TIME_MUST_BE_FUTURE = 273; + + /** + * The prepared update file cannot be updated or appended until either the upgrade has + * been completed, or a FREEZE_ABORT has been handled. + */ + PREPARED_UPDATE_FILE_IS_IMMUTABLE = 274; + + /** + * Once a freeze is scheduled, it must be aborted before any other type of freeze can + * can be performed. + */ + FREEZE_ALREADY_SCHEDULED = 275; + + /** + * If an NMT upgrade has been prepared, the following operation must be a FREEZE_UPGRADE. + * (To issue a FREEZE_ONLY, submit a FREEZE_ABORT first.) + */ + FREEZE_UPGRADE_IN_PROGRESS = 276; + + /** + * If an NMT upgrade has been prepared, the subsequent FREEZE_UPGRADE transaction must + * confirm the id of the file to be used in the upgrade. + */ + UPDATE_FILE_ID_DOES_NOT_MATCH_PREPARED = 277; + + /** + * If an NMT upgrade has been prepared, the subsequent FREEZE_UPGRADE transaction must + * confirm the hash of the file to be used in the upgrade. + */ + UPDATE_FILE_HASH_DOES_NOT_MATCH_PREPARED = 278; + + /** + * Consensus throttle did not allow execution of this transaction. System is throttled at + * consensus level. + */ + CONSENSUS_GAS_EXHAUSTED = 279; + + /** + * A precompiled contract succeeded, but was later reverted. + */ + REVERTED_SUCCESS = 280; + + /** + * All contract storage allocated to the current price regime has been consumed. + */ + MAX_STORAGE_IN_PRICE_REGIME_HAS_BEEN_USED = 281; + + /** + * An alias used in a CryptoTransfer transaction is not the serialization of a primitive Key + * message--that is, a Key with a single Ed25519 or ECDSA(secp256k1) public key and no + * unknown protobuf fields. + */ + INVALID_ALIAS_KEY = 282; + + /** + * A fungible token transfer expected a different number of decimals than the involved + * type actually has. + */ + UNEXPECTED_TOKEN_DECIMALS = 283; + + /** + * The proxy account id is invalid or does not exist. + */ + INVALID_PROXY_ACCOUNT_ID = 284 [deprecated = true]; + + /** + * The transfer account id in CryptoDelete transaction is invalid or does not exist. + */ + INVALID_TRANSFER_ACCOUNT_ID = 285; + + /** + * The fee collector account id in TokenFeeScheduleUpdate is invalid or does not exist. + */ + INVALID_FEE_COLLECTOR_ACCOUNT_ID = 286; + + /** + * The alias already set on an account cannot be updated using CryptoUpdate transaction. + */ + ALIAS_IS_IMMUTABLE = 287; + + /** + * An approved allowance specifies a spender account that is the same as the hbar/token + * owner account. + */ + SPENDER_ACCOUNT_SAME_AS_OWNER = 288; + + /** + * The establishment or adjustment of an approved allowance cause the token allowance + * to exceed the token maximum supply. + */ + AMOUNT_EXCEEDS_TOKEN_MAX_SUPPLY = 289; + + /** + * The specified amount for an approved allowance cannot be negative. + */ + NEGATIVE_ALLOWANCE_AMOUNT = 290; + + /** + * The approveForAll flag cannot be set for a fungible token. + */ + CANNOT_APPROVE_FOR_ALL_FUNGIBLE_COMMON = 291 [deprecated = true]; + + /** + * The spender does not have an existing approved allowance with the hbar/token owner. + */ + SPENDER_DOES_NOT_HAVE_ALLOWANCE = 292; + + /** + * The transfer amount exceeds the current approved allowance for the spender account. + */ + AMOUNT_EXCEEDS_ALLOWANCE = 293; + + /** + * The payer account of an approveAllowances or adjustAllowance transaction is attempting + * to go beyond the maximum allowed number of allowances. + */ + MAX_ALLOWANCES_EXCEEDED = 294; + + /** + * No allowances have been specified in the approval transaction. + */ + EMPTY_ALLOWANCES = 295; + + /** + * Spender is repeated more than once in Crypto or Token or NFT allowance lists in a single + * CryptoApproveAllowance transaction. + */ + SPENDER_ACCOUNT_REPEATED_IN_ALLOWANCES = 296 [deprecated = true]; + + /** + * Serial numbers are repeated in nft allowance for a single spender account + */ + REPEATED_SERIAL_NUMS_IN_NFT_ALLOWANCES = 297 [deprecated = true]; + + /** + * Fungible common token used in NFT allowances + */ + FUNGIBLE_TOKEN_IN_NFT_ALLOWANCES = 298; + + /** + * Non fungible token used in fungible token allowances + */ + NFT_IN_FUNGIBLE_TOKEN_ALLOWANCES = 299; + + /** + * The account id specified as the owner is invalid or does not exist. + */ + INVALID_ALLOWANCE_OWNER_ID = 300; + + /** + * The account id specified as the spender is invalid or does not exist. + */ + INVALID_ALLOWANCE_SPENDER_ID = 301; + + /** + * [Deprecated] If the CryptoDeleteAllowance transaction has repeated crypto or token or Nft allowances to delete. + */ + REPEATED_ALLOWANCES_TO_DELETE = 302 [deprecated = true]; + + /** + * If the account Id specified as the delegating spender is invalid or does not exist. + */ + INVALID_DELEGATING_SPENDER = 303; + + /** + * The delegating Spender cannot grant approveForAll allowance on a NFT token type for another spender. + */ + DELEGATING_SPENDER_CANNOT_GRANT_APPROVE_FOR_ALL = 304; + + /** + * The delegating Spender cannot grant allowance on a NFT serial for another spender as it doesnt not have approveForAll + * granted on token-owner. + */ + DELEGATING_SPENDER_DOES_NOT_HAVE_APPROVE_FOR_ALL = 305; + + /** + * The scheduled transaction could not be created because it's expiration_time was too far in the future. + */ + SCHEDULE_EXPIRATION_TIME_TOO_FAR_IN_FUTURE = 306; + + /** + * The scheduled transaction could not be created because it's expiration_time was less than or equal to the consensus time. + */ + SCHEDULE_EXPIRATION_TIME_MUST_BE_HIGHER_THAN_CONSENSUS_TIME = 307; + + /** + * The scheduled transaction could not be created because it would cause throttles to be violated on the specified expiration_time. + */ + SCHEDULE_FUTURE_THROTTLE_EXCEEDED = 308; + + /** + * The scheduled transaction could not be created because it would cause the gas limit to be violated on the specified expiration_time. + */ + SCHEDULE_FUTURE_GAS_LIMIT_EXCEEDED = 309; + + /** + * The ethereum transaction either failed parsing or failed signature validation, or some other EthereumTransaction error not covered by another response code. + */ + INVALID_ETHEREUM_TRANSACTION = 310; + + /** + * EthereumTransaction was signed against a chainId that this network does not support. + */ + WRONG_CHAIN_ID = 311; + + /** + * This transaction specified an ethereumNonce that is not the current ethereumNonce of the account. + */ + WRONG_NONCE = 312; + + /** + * The ethereum transaction specified an access list, which the network does not support. + */ + ACCESS_LIST_UNSUPPORTED = 313; + + /** + * A schedule being signed or deleted has passed it's expiration date and is pending execution if needed and then expiration. + */ + SCHEDULE_PENDING_EXPIRATION = 314; + + /** + * A selfdestruct or ContractDelete targeted a contract that is a token treasury. + */ + CONTRACT_IS_TOKEN_TREASURY = 315; + + /** + * A selfdestruct or ContractDelete targeted a contract with non-zero token balances. + */ + CONTRACT_HAS_NON_ZERO_TOKEN_BALANCES = 316; + + /** + * A contract referenced by a transaction is "detached"; that is, expired and lacking any + * hbar funds for auto-renewal payment---but still within its post-expiry grace period. + */ + CONTRACT_EXPIRED_AND_PENDING_REMOVAL = 317; + + /** + * A ContractUpdate requested removal of a contract's auto-renew account, but that contract has + * no auto-renew account. + */ + CONTRACT_HAS_NO_AUTO_RENEW_ACCOUNT = 318; + + /** + * A delete transaction submitted via HAPI set permanent_removal=true + */ + PERMANENT_REMOVAL_REQUIRES_SYSTEM_INITIATION = 319; + + /* + * A CryptoCreate or ContractCreate used the deprecated proxyAccountID field. + */ + PROXY_ACCOUNT_ID_FIELD_IS_DEPRECATED = 320; + + /** + * An account set the staked_account_id to itself in CryptoUpdate or ContractUpdate transactions. + */ + SELF_STAKING_IS_NOT_ALLOWED = 321; + + /** + * The staking account id or staking node id given is invalid or does not exist. + */ + INVALID_STAKING_ID = 322; + + /** + * Native staking, while implemented, has not yet enabled by the council. + */ + STAKING_NOT_ENABLED = 323; + + /** + * The range provided in UtilPrng transaction is negative. + */ + INVALID_PRNG_RANGE = 324; + + /** + * The maximum number of entities allowed in the current price regime have been created. + */ + MAX_ENTITIES_IN_PRICE_REGIME_HAVE_BEEN_CREATED = 325; + + /** + * The full prefix signature for precompile is not valid + */ + INVALID_FULL_PREFIX_SIGNATURE_FOR_PRECOMPILE = 326; + + /** + * The combined balances of a contract and its auto-renew account (if any) did not cover + * the rent charged for net new storage used in a transaction. + */ + INSUFFICIENT_BALANCES_FOR_STORAGE_RENT = 327; + + /** + * A contract transaction tried to use more than the allowed number of child records, via + * either system contract records or internal contract creations. + */ + MAX_CHILD_RECORDS_EXCEEDED = 328; + + /** + * The combined balances of a contract and its auto-renew account (if any) or balance of an account did not cover + * the auto-renewal fees in a transaction. + */ + INSUFFICIENT_BALANCES_FOR_RENEWAL_FEES = 329; + + /** + * A transaction's protobuf message includes unknown fields; could mean that a client + * expects not-yet-released functionality to be available. + */ + TRANSACTION_HAS_UNKNOWN_FIELDS = 330; + + /** + * The account cannot be modified. Account's key is not set + */ + ACCOUNT_IS_IMMUTABLE = 331; + + /** + * An alias that is assigned to an account or contract cannot be assigned to another account or contract. + */ + ALIAS_ALREADY_ASSIGNED = 332; + + /** + * A provided metadata key was invalid. Verification includes, for example, checking the size of Ed25519 and ECDSA(secp256k1) public keys. + */ + INVALID_METADATA_KEY = 333; + + /** + * Metadata key is not set on token + */ + TOKEN_HAS_NO_METADATA_KEY = 334; + + /** + * Token Metadata is not provided + */ + MISSING_TOKEN_METADATA = 335; + /** + * NFT serial numbers are missing in the TokenUpdateNftsTransactionBody + */ + MISSING_SERIAL_NUMBERS = 336; + + /** + * Admin key is not set on token + */ + TOKEN_HAS_NO_ADMIN_KEY = 337; + + /** + * A transaction failed because the consensus node identified is + * deleted from the address book. + */ + NODE_DELETED = 338; + + /** + * A transaction failed because the consensus node identified is not valid or + * does not exist in state. + */ + INVALID_NODE_ID = 339; + + /** + * A transaction failed because one or more entries in the list of + * service endpoints for the `gossip_endpoint` field is invalid.
+ * The most common cause for this response is a service endpoint that has + * the domain name (DNS) set rather than address and port. + */ + INVALID_GOSSIP_ENDPOINT = 340; + + /** + * A transaction failed because the node account identifier provided + * does not exist or is not valid.
+ * One common source of this error is providing a node account identifier + * using the "alias" form rather than "numeric" form. + * It is also used for atomic batch transaction for child transaction if the node account id is not 0.0.0. + */ + INVALID_NODE_ACCOUNT_ID = 341; + + /** + * A transaction failed because the description field cannot be encoded + * as UTF-8 or is more than 100 bytes when encoded. + */ + INVALID_NODE_DESCRIPTION = 342; + + /** + * A transaction failed because one or more entries in the list of + * service endpoints for the `service_endpoint` field is invalid.
+ * The most common cause for this response is a service endpoint that has + * the domain name (DNS) set rather than address and port. + */ + INVALID_SERVICE_ENDPOINT = 343; + + /** + * A transaction failed because the TLS certificate provided for the + * node is missing or invalid. + *

+ * #### Probable Causes + * The certificate MUST be a TLS certificate of a type permitted for gossip + * signatures.
+ * The value presented MUST be a UTF-8 NFKD encoding of the TLS + * certificate.
+ * The certificate encoded MUST be in PEM format.
+ * The `gossip_ca_certificate` field is REQUIRED and MUST NOT be empty. + */ + INVALID_GOSSIP_CA_CERTIFICATE = 344; + + /** + * A transaction failed because the hash provided for the gRPC certificate + * is present but invalid. + *

+ * #### Probable Causes + * The `grpc_certificate_hash` MUST be a SHA-384 hash.
+ * The input hashed MUST be a UTF-8 NFKD encoding of the actual TLS + * certificate.
+ * The certificate to be encoded MUST be in PEM format. + */ + INVALID_GRPC_CERTIFICATE = 345; + + /** + * The maximum automatic associations value is not valid.
+ * The most common cause for this error is a value less than `-1`. + */ + INVALID_MAX_AUTO_ASSOCIATIONS = 346; + + /** + * The maximum number of nodes allowed in the address book have been created. + */ + MAX_NODES_CREATED = 347; + + /** + * In ServiceEndpoint, domain_name and ipAddressV4 are mutually exclusive + */ + IP_FQDN_CANNOT_BE_SET_FOR_SAME_ENDPOINT = 348; + + /** + * Fully qualified domain name is not allowed in gossip_endpoint + */ + GOSSIP_ENDPOINT_CANNOT_HAVE_FQDN = 349; + + /** + * In ServiceEndpoint, domain_name size too large + */ + FQDN_SIZE_TOO_LARGE = 350; + + /** + * ServiceEndpoint is invalid + */ + INVALID_ENDPOINT = 351; + + /** + * The number of gossip endpoints exceeds the limit + */ + GOSSIP_ENDPOINTS_EXCEEDED_LIMIT = 352; + + /** + * The transaction attempted to use duplicate `TokenReference`.
+ * This affects `TokenReject` attempting to reject same token reference more than once. + */ + TOKEN_REFERENCE_REPEATED = 353; + + /** + * The account id specified as the owner in `TokenReject` is invalid or does not exist. + */ + INVALID_OWNER_ID = 354; + + /** + * The transaction attempted to use more than the allowed number of `TokenReference`. + */ + TOKEN_REFERENCE_LIST_SIZE_LIMIT_EXCEEDED = 355; + + /** + * The number of service endpoints exceeds the limit + */ + SERVICE_ENDPOINTS_EXCEEDED_LIMIT = 356; + + /* + * The IPv4 address is invalid + */ + INVALID_IPV4_ADDRESS = 357; + + /** + * The transaction attempted to use empty `TokenReference` list. + */ + EMPTY_TOKEN_REFERENCE_LIST = 358; + + /* + * The node account is not allowed to be updated + */ + UPDATE_NODE_ACCOUNT_NOT_ALLOWED = 359; + + /* + * The token has no metadata or supply key + */ + TOKEN_HAS_NO_METADATA_OR_SUPPLY_KEY = 360; + + /** + * The list of `PendingAirdropId`s is empty and MUST NOT be empty. + */ + EMPTY_PENDING_AIRDROP_ID_LIST = 361; + + /** + * A `PendingAirdropId` is repeated in a `claim` or `cancel` transaction. + */ + PENDING_AIRDROP_ID_REPEATED = 362; + + /** + * The number of `PendingAirdropId` values in the list exceeds the maximum + * allowable number. + */ + PENDING_AIRDROP_ID_LIST_TOO_LONG = 363; + + /* + * A pending airdrop already exists for the specified NFT. + */ + PENDING_NFT_AIRDROP_ALREADY_EXISTS = 364; + + /* + * The identified account is sender for one or more pending airdrop(s) + * and cannot be deleted. + *

+ * The requester SHOULD cancel all pending airdrops before resending + * this transaction. + */ + ACCOUNT_HAS_PENDING_AIRDROPS = 365; + + /** + * Consensus throttle did not allow execution of this transaction.
+ * The transaction should be retried after a modest delay. + */ + THROTTLED_AT_CONSENSUS = 366; + + /** + * The provided pending airdrop id is invalid.
+ * This pending airdrop MAY already be claimed or cancelled. + *

+ * The client SHOULD query a mirror node to determine the current status of + * the pending airdrop. + */ + INVALID_PENDING_AIRDROP_ID = 367; + + /** + * The token to be airdropped has a fallback royalty fee and cannot be + * sent or claimed via an airdrop transaction. + */ + TOKEN_AIRDROP_WITH_FALLBACK_ROYALTY = 368; + + /** + * This airdrop claim is for a pending airdrop with an invalid token.
+ * The token might be deleted, or the sender may not have enough tokens + * to fulfill the offer. + *

+ * The client SHOULD query mirror node to determine the status of the + * pending airdrop and whether the sender can fulfill the offer. + */ + INVALID_TOKEN_IN_PENDING_AIRDROP = 369; + + /** + * A scheduled transaction configured to wait for expiry to execute was given + * an expiry time at which there is already too many transactions scheduled to + * expire; its creation must be retried with a different expiry. + */ + SCHEDULE_EXPIRY_IS_BUSY = 370; + + /** + * The provided gRPC certificate hash is invalid. + */ + INVALID_GRPC_CERTIFICATE_HASH = 371; + + /** + * A scheduled transaction configured to wait for expiry to execute was not + * given an explicit expiration time. + */ + MISSING_EXPIRY_TIME = 372; + + /** + * A contract operation attempted to schedule another transaction after it + * had already scheduled a recursive contract call. + */ + NO_SCHEDULING_ALLOWED_AFTER_SCHEDULED_RECURSION = 373; + + /** + * A contract can schedule recursive calls a finite number of times (this is + * approximately four million times with typical network configuration.) + */ + RECURSIVE_SCHEDULING_LIMIT_REACHED = 374; + + /** + * The target network is waiting for the ledger ID to be set, which is a + * side effect of finishing the network's TSS construction. + */ + WAITING_FOR_LEDGER_ID = 375; + + /** + * The provided fee exempt key list size exceeded the limit. + */ + MAX_ENTRIES_FOR_FEE_EXEMPT_KEY_LIST_EXCEEDED = 376; + + /** + * The provided fee exempt key list contains duplicated keys. + */ + FEE_EXEMPT_KEY_LIST_CONTAINS_DUPLICATED_KEYS = 377; + + /** + * The provided fee exempt key list contains an invalid key. + */ + INVALID_KEY_IN_FEE_EXEMPT_KEY_LIST = 378; + + /** + * The provided fee schedule key contains an invalid key. + */ + INVALID_FEE_SCHEDULE_KEY = 379; + + /** + * If a fee schedule key is not set when we create a topic + * we cannot add it on update. + */ + FEE_SCHEDULE_KEY_CANNOT_BE_UPDATED = 380; + + /** + * If the topic's custom fees are updated the topic SHOULD have a + * fee schedule key + */ + FEE_SCHEDULE_KEY_NOT_SET = 381; + + /** + * The fee amount is exceeding the amount that the payer + * is willing to pay. + */ + MAX_CUSTOM_FEE_LIMIT_EXCEEDED = 382; + + /** + * There are no corresponding custom fees. + */ + NO_VALID_MAX_CUSTOM_FEE = 383; + + /** + * The provided list contains invalid max custom fee. + */ + INVALID_MAX_CUSTOM_FEES = 384; + + /** + * The provided max custom fee list contains fees with + * duplicate denominations. + */ + DUPLICATE_DENOMINATION_IN_MAX_CUSTOM_FEE_LIST = 385; + + /** + * The provided max custom fee list contains fees with + * duplicate account id. + */ + DUPLICATE_ACCOUNT_ID_IN_MAX_CUSTOM_FEE_LIST = 386; + + /** + * Max custom fees list is not supported for this operation. + */ + MAX_CUSTOM_FEES_IS_NOT_SUPPORTED = 387; + + /** + * The list of batch transactions is empty + */ + BATCH_LIST_EMPTY = 388; + + /** + * The list of batch transactions contains duplicated transactions + */ + BATCH_LIST_CONTAINS_DUPLICATES = 389; + + /** + * The list of batch transactions contains a transaction type that is + * in the AtomicBatch blacklist as configured in the network. + */ + BATCH_TRANSACTION_IN_BLACKLIST = 390; + + /** + * The inner transaction of a batch transaction failed + */ + INNER_TRANSACTION_FAILED = 391; + + /** + * The inner transaction of a batch transaction is missing a batch key + */ + MISSING_BATCH_KEY = 392; + + /** + * The batch key is set for a non batch transaction + */ + BATCH_KEY_SET_ON_NON_INNER_TRANSACTION = 393; + + /** + * The batch key is not valid + */ + INVALID_BATCH_KEY = 394; + + /** + * The provided schedule expiry time is not configurable. + */ + SCHEDULE_EXPIRY_NOT_CONFIGURABLE = 395; + + /** + * The network just started at genesis and is creating system entities. + */ + CREATING_SYSTEM_ENTITIES = 396; + + /** + * The least common multiple of the throttle group's milliOpsPerSec is + * too large and it's overflowing. + */ + THROTTLE_GROUP_LCM_OVERFLOW = 397; + + /** + * Token airdrop transactions can not contain multiple senders for a single token. + */ + AIRDROP_CONTAINS_MULTIPLE_SENDERS_FOR_A_TOKEN = 398; + + /** + * The GRPC proxy endpoint is set in the NodeCreate or NodeUpdate transaction, + * which the network does not support. + */ + GRPC_WEB_PROXY_NOT_SUPPORTED = 399; +} diff --git a/proto/response_header.proto b/proto/response_header.proto new file mode 100644 index 000000000..6ee70d5c7 --- /dev/null +++ b/proto/response_header.proto @@ -0,0 +1,85 @@ +/** + * # Response Header + * A standard header for all query responses. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "query_header.proto"; +import "response_code.proto"; + +/** + * A standard header returned with every query response. + * + * The fields for `cost` or `stateProof` MAY be unset if the requested + * `ResponseType` does not request those values.
+ * The `responseType` SHALL match the request response type.
+ * The `nodeTransactionPrecheckCode` field SHALL contain the result code + * for the query. + */ +message ResponseHeader { + /** + * The result code for this query. + *

+ * This value SHALL indicate either success or the reason for failure. + */ + ResponseCodeEnum nodeTransactionPrecheckCode = 1; + + /** + * The response type requested for this query. + *

+ * This SHALL be the response type requested in the query header. + */ + ResponseType responseType = 2; + + /** + * Requested cost estimate.
+ * This is the fee that _would be_ charged if the query was executed. + *

+ * This value SHALL be set if the response type requested requires cost + * information, and SHALL NOT be set otherwise.
+ * This value SHALL include the query fee, but SHALL NOT include the + * transfer fee required to execute the fee payment transaction. + */ + uint64 cost = 3; + + /** + * A state proof for the information requested. + * + * This field SHALL NOT be set if the response type does not require + * a state proof.
+ * This field SHALL NOT be set if a state proof is not available for + * the query type.
+ * This field SHALL be set if the response type requested a state proof + * and a state proof is available. + */ + bytes stateProof = 4; +} diff --git a/proto/schedulable_transaction_body.proto b/proto/schedulable_transaction_body.proto new file mode 100644 index 000000000..2766dbb2f --- /dev/null +++ b/proto/schedulable_transaction_body.proto @@ -0,0 +1,421 @@ +/** + * # Schedulable Transaction Body + * A message that replicates the `TransactionBody` message, with slight + * changes to exclude fields that cannot be scheduled via a `scheduleCreate` + * transaction. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "system_delete.proto"; +import "system_undelete.proto"; +import "freeze.proto"; + +import "contract_call.proto"; +import "contract_create.proto"; +import "contract_update.proto"; + +import "crypto_create.proto"; +import "crypto_delete.proto"; +import "crypto_transfer.proto"; +import "crypto_update.proto"; +import "crypto_approve_allowance.proto"; +import "crypto_delete_allowance.proto"; + +import "file_append.proto"; +import "file_create.proto"; +import "file_delete.proto"; +import "file_update.proto"; + +import "contract_delete.proto"; + +import "consensus_create_topic.proto"; +import "consensus_update_topic.proto"; +import "consensus_delete_topic.proto"; +import "consensus_submit_message.proto"; + +import "token_create.proto"; +import "token_freeze_account.proto"; +import "token_unfreeze_account.proto"; +import "token_grant_kyc.proto"; +import "token_revoke_kyc.proto"; +import "token_delete.proto"; +import "token_update.proto"; +import "token_mint.proto"; +import "token_burn.proto"; +import "token_wipe_account.proto"; +import "token_associate.proto"; +import "token_dissociate.proto"; +import "token_fee_schedule_update.proto"; +import "token_pause.proto"; +import "token_unpause.proto"; +import "token_update_nfts.proto"; +import "token_reject.proto"; +import "token_cancel_airdrop.proto"; +import "token_claim_airdrop.proto"; +import "token_airdrop.proto"; + +import "schedule_delete.proto"; +import "util_prng.proto"; + +import "node_create.proto"; +import "node_update.proto"; +import "node_delete.proto"; + +/** + * A schedulable transaction. + * + * The network configuration `scheduling.whitelist` limits which of these + * transaction types may actually be scheduled. As of version `0.50.0` of the + * consensus node software this list contains only `CryptoTransfer`, + * `ConsensusSubmitMessage`, `TokenBurn`, `TokenMint`, + * and `CryptoApproveAllowance`. + */ +message SchedulableTransactionBody { + /** + * A limit for the transaction fee the client is willing to pay. + *

+ * The network SHALL NOT charge fees greater than this value. + */ + uint64 transactionFee = 1; + + /** + * A short description of the schedulable transaction. + *

+ * This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes` + * (default 100) bytes when encoded as UTF-8. + */ + string memo = 2; + + oneof data { + /** + * Call a function defined on a smart contract. + */ + ContractCallTransactionBody contractCall = 3; + + /** + * Create a smart contract. + */ + ContractCreateTransactionBody contractCreateInstance = 4; + + /** + * Update a smart contract. + */ + ContractUpdateTransactionBody contractUpdateInstance = 5; + + /** + * Delete a smart contract and transfer remaining balance + * to a specified account. + */ + ContractDeleteTransactionBody contractDeleteInstance = 6; + + /** + * Create a new Hedera account. + */ + CryptoCreateTransactionBody cryptoCreateAccount = 7; + + /** + * Delete an Hedera account.
+ * This will mark the account as deleted, and transfer all remaining + * HBAR to a receiver account. + */ + CryptoDeleteTransactionBody cryptoDelete = 8; + + /** + * Transfer HBAR between accounts. + */ + CryptoTransferTransactionBody cryptoTransfer = 9; + + /** + * Modify an Hedera account. + */ + CryptoUpdateTransactionBody cryptoUpdateAccount = 10; + + /** + * Append data to the end of a file. + */ + FileAppendTransactionBody fileAppend = 11; + + /** + * Create a new file. + */ + FileCreateTransactionBody fileCreate = 12; + + /** + * Delete a file.
+ * This will remove the content of the file, and mark the file as + * deleted. + */ + FileDeleteTransactionBody fileDelete = 13; + + /** + * Modify a file.
+ * This may modify any metadata, and/or _replace_ the content. + */ + FileUpdateTransactionBody fileUpdate = 14; + + /** + * Delete a file as an Hedera administrative function.
+ * This is a privileged operation. + */ + SystemDeleteTransactionBody systemDelete = 15; + + /** + * Restore a file deleted via `systemDelete`.
+ * This is a privileged operation. + */ + SystemUndeleteTransactionBody systemUndelete = 16; + + /** + * Freeze the network.
+ * This is actually several possible operations, and the caller + * should examine the "freeze service" for more detail.
+ * This is a privileged operation. + */ + FreezeTransactionBody freeze = 17; + + /** + * Create a topic. + */ + ConsensusCreateTopicTransactionBody consensusCreateTopic = 18; + + /** + * Update a topic. + */ + ConsensusUpdateTopicTransactionBody consensusUpdateTopic = 19; + + /** + * Delete a topic. + */ + ConsensusDeleteTopicTransactionBody consensusDeleteTopic = 20; + + /** + * Submit a message to a topic.
+ * A message may be "chunked", and submitted in parts, if the total + * message size exceeds the limit for a single transaction. + */ + ConsensusSubmitMessageTransactionBody consensusSubmitMessage = 21; + + /** + * Create a new Hedera token. + */ + TokenCreateTransactionBody tokenCreation = 22; + + /** + * Freeze an account with respect to a token.
+ * A frozen account cannot transact in that token until unfrozen. + */ + TokenFreezeAccountTransactionBody tokenFreeze = 23; + + /** + * Unfreeze an account with respect to a token. + */ + TokenUnfreezeAccountTransactionBody tokenUnfreeze = 24; + + /** + * Grant KYC to an account with respect to a token.
+ * KYC is generally a "know your customer" assertion that a + * responsible entity has sufficient information to positively + * identify the account holder to relevant authorities. + */ + TokenGrantKycTransactionBody tokenGrantKyc = 25; + + /** + * Revoke KYC from an account with respect to a token. + */ + TokenRevokeKycTransactionBody tokenRevokeKyc = 26; + + /** + * Deletes an Hedera token.
+ * The token will be marked deleted. + */ + TokenDeleteTransactionBody tokenDeletion = 27; + + /** + * Update an Hedera token.
+ * Depending on what fields are to be modified, the signature + * requirements will vary. See `TokenUpdateTransactionBody` for + * further detail. + */ + TokenUpdateTransactionBody tokenUpdate = 28; + + /** + * Mint new tokens.
+ * All minted tokens will be delivered to the treasury account for + * the token type. The "mint key" for the token must sign this + * transaction. + */ + TokenMintTransactionBody tokenMint = 29; + + /** + * Burn tokens from the treasury account.
+ * The "burn key" for the token must sign this transaction. + */ + TokenBurnTransactionBody tokenBurn = 30; + + /** + * Wipe tokens from an account.
+ * This will remove a specified amount of fungible/common tokens or + * a specified list of non-fungible/unique serial numbered tokens + * of a given token type from an Hedera account. The removed tokens + * are _burned_ as if by a `tokenBurn` transaction.
+ * The "wipe key" for the token must sign this transaction. + */ + TokenWipeAccountTransactionBody tokenWipe = 31; + + /** + * Associate tokens to an account. + */ + TokenAssociateTransactionBody tokenAssociate = 32; + + /** + * Dissociate tokens from an account. + */ + TokenDissociateTransactionBody tokenDissociate = 33; + + /** + * Delete a schedule.
+ * The schedule will be marked as deleted. + */ + ScheduleDeleteTransactionBody scheduleDelete = 34; + + /** + * Pause a Token.
+ * This transaction must be signed by the "pause key" for the token. + */ + TokenPauseTransactionBody token_pause = 35; + + /** + * Unpause a Token.
+ * This transaction must be signed by the "pause key" for the token. + */ + TokenUnpauseTransactionBody token_unpause = 36; + + /** + * Add one or more approved allowances for spenders to transfer the + * paying account's hbar or tokens. + */ + CryptoApproveAllowanceTransactionBody cryptoApproveAllowance = 37; + + /** + * Delete one or more approvals for spenders to transfer the + * paying account's hbar or tokens. + */ + CryptoDeleteAllowanceTransactionBody cryptoDeleteAllowance = 38; + + /** + * Update the custom fee schedule for a token.
+ * This transaction must be signed by the "fee schedule key" + * for the token. + */ + TokenFeeScheduleUpdateTransactionBody token_fee_schedule_update = 39; + + /** + * Provide a deterministic pseudorandom number based on network state. + */ + UtilPrngTransactionBody util_prng = 40; + + /** + * Update one or more non-fungible/unique tokens.
+ * This will update metadata for one or more serial numbers within + * a collection (token type). + */ + TokenUpdateNftsTransactionBody token_update_nfts = 41; + + /** + * Create a new node in the network address book.
+ * This is a privileged operation. + */ + com.hedera.hapi.node.addressbook.NodeCreateTransactionBody nodeCreate = 42; + + /** + * Update a node in the network address book.
+ * This is a privileged operation. + */ + com.hedera.hapi.node.addressbook.NodeUpdateTransactionBody nodeUpdate = 43; + + /** + * Delete a node from the network address book.
+ * This will mark the node as deleted.
+ * This is a privileged operation. + */ + com.hedera.hapi.node.addressbook.NodeDeleteTransactionBody nodeDelete = 44; + + /** + * "Reject" undesired tokens.
+ * This transaction will transfer one or more tokens or token + * balances held by the requesting account to the treasury + * for each token type. + *

+ * Each transfer MUST be one of the following: + *

    + *
  • A single non-fungible/unique token.
  • + *
  • The full balance held for a fungible/common + * token type.
  • + *
+ * When complete, the requesting account SHALL NOT hold the + * rejected tokens.
+ * Custom fees and royalties defined for the tokens rejected + * SHALL NOT be charged for this transaction. + */ + TokenRejectTransactionBody tokenReject = 45; + + /** + * Cancel an "airdrop".
+ * This transaction cancels a pending airdrop for one or more + * recipients. + *

+ * The airdrop(s) to cancel MUST be pending, and not claimed.
+ */ + TokenCancelAirdropTransactionBody tokenCancelAirdrop = 46; + + /** + * Claim an "airdrop". + * This transaction "claims" one or more pending "airdrops". + *

+ * The airdrop(s) to claim MUST be pending, and not + * already claimed.
+ */ + TokenClaimAirdropTransactionBody tokenClaimAirdrop = 47; + + /** + * Send an "airdrop" of tokens to one or more recipients. + *

+ * This transaction unilaterally "gifts" tokens by transferring them + * from a "sender" account to the "recipient" account(s). If any + * recipient is not already associated to the token to airdrop, or + * has set a "reciever signature required" flag, then that recipient + * is recorded as a "pending" airdrop which must be "claimed". All + * other recipients receive the "airdropped" tokens immediately. + */ + TokenAirdropTransactionBody tokenAirdrop = 48; + } +} diff --git a/proto/schedule_create.proto b/proto/schedule_create.proto new file mode 100644 index 000000000..4785a89a1 --- /dev/null +++ b/proto/schedule_create.proto @@ -0,0 +1,181 @@ +/** + * # Schedule Create + * Message to create a schedule, which is an instruction to execute some other + * transaction (the scheduled transaction) at a future time, either when + * enough signatures are gathered (short term) or when the schedule expires + * (long term). In all cases the scheduled transaction is not executed if + * signature requirements are not met before the schedule expires. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; +import "timestamp.proto"; +import "schedulable_transaction_body.proto"; + +/** + * Create a new Schedule. + * + * #### Requirements + * This transaction SHALL create a new _schedule_ entity in network state.
+ * The schedule created SHALL contain the `scheduledTransactionBody` to be + * executed.
+ * If successful the receipt SHALL contain a `scheduleID` with the full + * identifier of the schedule created.
+ * When a schedule _executes_ successfully, the receipt SHALL include a + * `scheduledTransactionID` with the `TransactionID` of the transaction that + * executed.
+ * When a scheduled transaction is executed the network SHALL charge the + * regular _service_ fee for the transaction to the `payerAccountID` for + * that schedule, but SHALL NOT charge node or network fees.
+ * If the `payerAccountID` field is not set, the effective `payerAccountID` + * SHALL be the `payer` for this create transaction.
+ * If an `adminKey` is not specified, or is an empty `KeyList`, the schedule + * created SHALL be immutable.
+ * An immutable schedule MAY be signed, and MAY execute, but SHALL NOT be + * deleted.
+ * If two schedules have the same values for all fields except `payerAccountID` + * then those two schedules SHALL be deemed "identical".
+ * If a `scheduleCreate` requests a new schedule that is identical to an + * existing schedule, the transaction SHALL fail and SHALL return a status + * code of `IDENTICAL_SCHEDULE_ALREADY_CREATED` in the receipt.
+ * The receipt for a duplicate schedule SHALL include the `ScheduleID` of the + * existing schedule and the `TransactionID` of the earlier `scheduleCreate` + * so that the earlier schedule may be queried and/or referred to in a + * subsequent `scheduleSign`. + * + * #### Signature Requirements + * A `scheduleSign` transaction SHALL be used to add additional signatures + * to an existing schedule.
+ * Each signature SHALL "activate" the corresponding cryptographic("primitive") + * key for that schedule.
+ * Signature requirements SHALL be met when the set of active keys includes + * all keys required by the scheduled transaction.
+ * A scheduled transaction for a "long term" schedule SHALL NOT execute if + * the signature requirements for that transaction are not met when the + * network consensus time reaches the schedule `expiration_time`.
+ * A "short term" schedule SHALL execute immediately once signature + * requirements are met. This MAY be immediately when created. + * + * #### Long Term Schedules + * A "short term" schedule SHALL have the flag `wait_for_expiry` _unset_.
+ * A "long term" schedule SHALL have the flag `wait_for_expiry` _set_.
+ * A "long term" schedule SHALL NOT be accepted if the network configuration + * `scheduling.longTermEnabled` is not enabled.
+ * A "long term" schedule SHALL execute when the current consensus time + * matches or exceeds the `expiration_time` for that schedule, if the + * signature requirements for the scheduled transaction + * are met at that instant.
+ * A "long term" schedule SHALL NOT execute before the current consensus time + * matches or exceeds the `expiration_time` for that schedule.
+ * A "long term" schedule SHALL expire, and be removed from state, after the + * network consensus time exceeds the schedule `expiration_time`.
+ * A short term schedule SHALL expire, and be removed from state, + * after the network consensus time exceeds the current network + * configuration for `ledger.scheduleTxExpiryTimeSecs`. + * + * > Note + * >> Long term schedules are not (as of release 0.56.0) enabled. Any schedule + * >> created currently MUST NOT set the `wait_for_expiry` flag.
+ * >> When long term schedules are not enabled, schedules SHALL NOT be + * >> executed at expiration, and MUST meet signature requirements strictly + * >> before expiration to be executed. + * + * ### Block Stream Effects + * If the scheduled transaction is executed immediately, the transaction + * record SHALL include a `scheduleRef` with the schedule identifier of the + * schedule created. + */ +message ScheduleCreateTransactionBody { + /** + * A scheduled transaction. + *

+ * This value is REQUIRED.
+ * This transaction body MUST be one of the types enabled in the + * network configuration value `scheduling.whitelist`. + */ + SchedulableTransactionBody scheduledTransactionBody = 1; + + /** + * A short description of the schedule. + *

+ * This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes` + * (default 100) bytes when encoded as UTF-8. + */ + string memo = 2; + + /** + * A `Key` required to delete this schedule. + *

+ * If this is not set, or is an empty `KeyList`, this schedule SHALL be + * immutable and SHALL NOT be deleted. + */ + Key adminKey = 3; + + /** + * An account identifier of a `payer` for the scheduled transaction. + *

+ * This value MAY be unset. If unset, the `payer` for this `scheduleCreate` + * transaction SHALL be the `payer` for the scheduled transaction.
+ * If this is set, the identified account SHALL be charged the fees + * required for the scheduled transaction when it is executed.
+ * If the actual `payer` for the _scheduled_ transaction lacks + * sufficient HBAR balance to pay service fees for the scheduled + * transaction _when it executes_, the scheduled transaction + * SHALL fail with `INSUFFICIENT_PAYER_BALANCE`.
+ */ + AccountID payerAccountID = 4; + + /** + * An expiration time. + *

+ * If not set, the expiration SHALL default to the current consensus time + * advanced by either the network configuration value + * `scheduling.maxExpirationFutureSeconds`, if `wait_for_expiry` is set and + * "long term" schedules are enabled, or the network configuration value + * `ledger.scheduleTxExpiryTimeSecs` otherwise. + */ + Timestamp expiration_time = 5; + + /** + * A flag to delay execution until expiration. + *

+ * If this flag is set the scheduled transaction SHALL NOT be evaluated for + * execution before the network consensus time matches or exceeds the + * `expiration_time`.
+ * If this flag is not set, the scheduled transaction SHALL be executed + * immediately when all required signatures are received, whether in this + * `scheduleCreate` transaction or a later `scheduleSign` transaction.
+ * This value SHALL NOT be used and MUST NOT be set when the network + * configuration value `scheduling.longTermEnabled` is not enabled. + */ + bool wait_for_expiry = 13; +} diff --git a/proto/schedule_delete.proto b/proto/schedule_delete.proto new file mode 100644 index 000000000..fe100d64a --- /dev/null +++ b/proto/schedule_delete.proto @@ -0,0 +1,59 @@ +/** + * # Schedule Delete + * A transaction body for a `scheduleDelete` transaction. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; + +/** + * Mark a schedule in the network state as deleted. + * + * This transaction MUST be signed by the `adminKey` for the + * identified schedule.
+ * If a schedule does not have `adminKey` set or if `adminKey` is an empty + * `KeyList`, that schedule SHALL be immutable and MUST NOT be deleted.
+ * A deleted schedule SHALL not be executed.
+ * A deleted schedule MUST NOT be the subject of a subsequent + * `scheduleSign` transaction. + * + * ### Block Stream Effects + * None + */ +message ScheduleDeleteTransactionBody { + /** + * A schedule identifier. + *

+ * This MUST identify the schedule which SHALL be deleted. + */ + ScheduleID scheduleID = 1; +} diff --git a/proto/schedule_get_info.proto b/proto/schedule_get_info.proto new file mode 100644 index 000000000..ff1bcdfd1 --- /dev/null +++ b/proto/schedule_get_info.proto @@ -0,0 +1,239 @@ +/** + * # Schedule Get Information + * Query body and response to retrieve information about a scheduled + * transaction. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; +import "timestamp.proto"; +import "query_header.proto"; +import "response_header.proto"; +import "schedulable_transaction_body.proto"; + +/** + * Request for information about a scheduled transaction. + * + * If the requested schedule does not exist, the network SHALL respond + * with `INVALID_SCHEDULE_ID`. + */ +message ScheduleGetInfoQuery { + /** + * Standard information sent with every query operation.
+ * This includes the signed payment and what kind of response is requested + * (cost, state proof, both, or neither). + */ + QueryHeader header = 1; + + /** + * A schedule identifier. + *

+ * This SHALL identify the schedule to retrieve.
+ * This field is REQUIRED. + */ + ScheduleID scheduleID = 2; +} + +/** + * Information summarizing schedule state + */ +message ScheduleInfo { + /** + * A schedule identifier. + *

+ * This SHALL identify the schedule retrieved. + */ + ScheduleID scheduleID = 1; + + oneof data { + /** + * A deletion timestamp. + *

+ * If the schedule was deleted, this SHALL be set to the consensus + * timestamp of the `deleteSchedule` transaction.
+ * If the schedule is _not_ deleted, this field SHALL NOT be set. + */ + Timestamp deletion_time = 2; + + /** + * An execution timestamp. + *

+ * If the schedule was completed, and the _scheduled_ transaction + * executed, this SHALL be set to the consensus timestamp of the + * transaction that initiated that execution.
+ * If the schedule is _not_ complete, this field SHALL NOT be set. + */ + Timestamp execution_time = 3; + } + + /** + * An expiration timestamp.
+ * This represents the time at which the schedule will expire. For a + * long-term schedule (if enabled) this is when the schedule will be + * executed, assuming it meets signature requirements at that time. + * For a short-term schedule, this is the deadline to complete the + * signature requirements for the scheduled transaction to execute. + * Regardless of schedule type, the schedule will be removed from + * state when it expires. + *

+ * A schedule SHALL be removed from state when it expires.
+ * A short-term schedule MUST meet signature requirements strictly + * before expiration or it SHALL NOT be executed.
+ * A long-term schedule SHALL be executed if, and only if, all signature + * requirements for the scheduled transaction are met at expiration.
+ * A long-term schedule SHALL NOT be executed if any signature requirement + * for the scheduled transaction are not met at expiration.
+ */ + Timestamp expirationTime = 4; + + /** + * A scheduled transaction. + *

+ * This SHALL be a transaction type enabled in the network property + * `scheduling.whitelist`, and SHALL NOT be any other + * transaction type.
+ * This transaction SHALL be executed if the schedule meets all signature + * and execution time requirements for this transaction.
+ * The signature requirements for this transaction SHALL be evaluated + * at schedule creation, SHALL be reevaluated with each `signSchedule` + * transaction, and, for long-term schedules, SHALL be reevaluated when + * the schedule expires.
+ */ + SchedulableTransactionBody scheduledTransactionBody = 5; + + /** + * A short description for this schedule. + *

+ * This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes` + * (default 100) bytes when encoded as UTF-8. + */ + string memo = 6; + + /** + * The key used to delete the schedule from state + */ + Key adminKey = 7; + + /** + * A list of "valid" signatures for this schedule.
+ * This list contains only "primitive" (i.e. cryptographic or contract) + * signatures. The full signature requirements for the scheduled + * transaction are evaluated as if this list of keys had signed the + * scheduled transaction directly. + *

+ * This list SHALL contain every "primitive" key that has signed the + * original `createSchedule`, or any subsequent + * `signSchedule` transaction.
+ * This list MAY elide any signature not likely to be required by the + * scheduled transaction. Such requirement SHOULD be evaluated when the + * signature is presented (i.e. during evaluation of a `createSchedule` or + * `signSchedule` transaction). + */ + KeyList signers = 8; + + /** + * An account identifier. + *

+ * This SHALL identify the account that created this schedule. + */ + AccountID creatorAccountID = 9; + + /** + * An account identifier. + *

+ * The identified account SHALL pay the full transaction fee for the + * scheduled transaction _when it executes_. + */ + AccountID payerAccountID = 10; + + /** + * A transaction identifier. + *

+ * This SHALL be recorded as the transaction identifier for the + * _scheduled_ transaction, if (and when) it is executed. + */ + TransactionID scheduledTransactionID = 11; + + /** + * The ledger ID of the network that generated this response. + *

+ * This value SHALL identify the distributed ledger that responded to + * this query. + */ + bytes ledger_id = 12; + + /** + * A flag indicating this schedule will execute when it expires. + *

+ * If this field is set + *

    + *
  • This schedule SHALL be considered a "long-term" schedule.
  • + *
  • This schedule SHALL be evaluated when the network consensus time + * reaches the `expirationTime`, and if the signature requirements + * for the scheduled transaction are met at that time, the + * scheduled transaction SHALL be executed.
  • + *
  • This schedule SHALL NOT be executed before the network consensus + * time reaches the `expirationTime`.
  • + *
+ * If this field is not set + *
    + *
  • This schedule SHALL be considered a "short-term" schedule.
  • + *
  • This schedule SHALL be evaluated when created, and reevaluated + * with each `signSchedule` transaction, and if the signature + * requirements for the scheduled transaction are met at that time, + * the scheduled transaction SHALL be executed immediately.
  • + *
  • This schedule SHALL be executed as soon as the signature + * requirements are met, and MUST be executed before the network + * consensus time reaches the `expirationTime`, if at all.
  • + *
+ */ + bool wait_for_expiry = 13; +} + +/** + * A response message for a `getScheduleInfo` query. + */ +message ScheduleGetInfoResponse { + /** + * The standard response information for queries.
+ * This includes the values requested in the `QueryHeader` + * (cost, state proof, both, or neither). + */ + ResponseHeader header = 1; + + /** + * Detail information for a schedule. + *

+ * This field SHALL contain all available schedule detail. + */ + ScheduleInfo scheduleInfo = 2; +} diff --git a/proto/schedule_service.proto b/proto/schedule_service.proto new file mode 100644 index 000000000..f8d6457c4 --- /dev/null +++ b/proto/schedule_service.proto @@ -0,0 +1,119 @@ +/** + * # Schedule Service + * gRPC service definitions for the Schedule Service. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package + +import "query.proto"; +import "response.proto"; +import "transaction_response.proto"; +import "transaction.proto"; + +/** + * Transactions and queries for the Schedule Service.
+ * The Schedule Service enables transactions to be submitted without all + * required signatures and offers a `scheduleSign` transaction to provide + * additional signatures independently after the schedule is created. The + * scheduled transaction may be executed immediately when all required + * signatures are present, or at expiration if "long term" schedules + * are enabled in network configuration. + * + * ### Execution + * Scheduled transactions SHALL be executed under the following conditions. + * 1. If "long term" schedules are enabled and `wait_for_expiry` is set for + * that schedule then the transaction SHALL NOT be executed before the + * network consensus time matches or exceeds the `expiration_time` field + * for that schedule. + * 1. If "long term" schedules are enabled and `wait_for_expiry` is _not_ set + * for that schedule, then the transaction SHALL be executed when all + * signatures required by the scheduled transaction are active for that + * schedule. This MAY be immediately after the `scheduleCreate` or a + * subsequent `scheduleSign` transaction, or MAY be at expiration if + * the signature requirements are met at that time. + * 1. If "long term" schedules are _disabled_, then the scheduled transaction + * SHALL be executed immediately after all signature requirements for the + * scheduled transaction are met during the `scheduleCreate` or a subsequent + * `scheduleSign` transaction. The scheduled transaction SHALL NOT be + * on expiration when "long term" schedules are disabled. + * + * A schedule SHALL remain in state and MAY be queried with a `getScheduleInfo` + * transaction after execution, until the schedule expires.
+ * When network consensus time matches or exceeds the `expiration_time` for + * a schedule, that schedule SHALL be removed from state, whether it has + * executed or not.
+ * If "long term" schedules are _disabled_, the maximum expiration time SHALL + * be the consensus time of the `scheduleCreate` transaction extended by + * the network configuration value `ledger.scheduleTxExpiryTimeSecs`. + * + * ### Block Stream Effects + * When a scheduled transaction is executed, the timestamp in the transaction + * identifier for that transaction SHALL be 1 nanosecond after the consensus + * timestamp for the transaction that resulted in its execution. If execution + * occurred at expiration, that transaction may be almost any transaction, + * including another scheduled transaction that executed at expiration.
+ * The transaction identifier for a scheduled transaction that is executed + * SHALL have the `scheduled` flag set and SHALL inherit the `accountID` and + * `transactionValidStart` values from the `scheduleCreate` that created the + * schedule.
+ * The `scheduleRef` property of the record for a scheduled transaction SHALL + * be populated with the schedule identifier of the schedule that executed. + */ +service ScheduleService { + /** + * Create a new Schedule. + *

+ * If all signature requirements are met with this transaction, the + * scheduled transaction MAY execute immediately. + */ + rpc createSchedule (Transaction) returns (TransactionResponse); + + /** + * Add signatures to an existing schedule. + *

+ * Signatures on this transaction SHALL be added to the set of active + * signatures on the schedule, and MAY result in execution of the + * scheduled transaction if all signature requirements are met. + */ + rpc signSchedule (Transaction) returns (TransactionResponse); + + /** + * Mark an existing schedule deleted. + *

+ * Once deleted a schedule SHALL NOT be executed and any subsequent + * `scheduleSign` transaction SHALL fail. + */ + rpc deleteSchedule (Transaction) returns (TransactionResponse); + + /** + * Retrieve the metadata for a schedule. + */ + rpc getScheduleInfo (Query) returns (Response); +} diff --git a/proto/schedule_sign.proto b/proto/schedule_sign.proto new file mode 100644 index 000000000..50a36e68d --- /dev/null +++ b/proto/schedule_sign.proto @@ -0,0 +1,72 @@ +/** + * # Schedule Sign + * Transaction body for a `scheduleSign` transaction to add signatures + * to an existing scheduled transaction. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; + +/** + * Add signatures to an existing scheduled transaction. + * + * When a schedule _executes_ successfully, the receipt SHALL include a + * `scheduledTransactionID` with the `TransactionID` of the transaction that + * executed.
+ * When a scheduled transaction is executed the network SHALL charge the + * regular _service_ fee for the transaction to the `payerAccountID` for + * that schedule, but SHALL NOT charge node or network fees.
+ * If the `payerAccountID` field is not set, the effective `payerAccountID` + * SHALL be the `payer` for this create transaction.
+ * Each signature on this transaction SHALL "activate" the corresponding + * cryptographic("primitive") key for the schedule identified.
+ * Signature requirements SHALL be met when the set of active keys includes + * all keys required by the scheduled transaction.
+ * A scheduled transaction for a "long term" schedule SHALL NOT execute if + * the signature requirements for that transaction are not met when the + * network consensus time reaches the schedule `expiration_time`.
+ * A "short term" schedule SHALL execute immediately once signature + * requirements are met. This MAY be immediately when created.
+ * + * ### Block Stream Effects + * If the scheduled transaction is executed immediately following this + * `scheduleSign` transaction, the transaction record SHALL include a + * `scheduleRef` with the schedule identifier `scheduleID`. + */ +message ScheduleSignTransactionBody { + /** + * A schedule identifier. + *

+ * This MUST identify the schedule to which signatures SHALL be added. + */ + ScheduleID scheduleID = 1; +} diff --git a/proto/smart_contract_service.proto b/proto/smart_contract_service.proto new file mode 100644 index 000000000..fb6f87096 --- /dev/null +++ b/proto/smart_contract_service.proto @@ -0,0 +1,189 @@ +/** + * # Smart Contract Service + * gRPC service definitions for calls to the Hedera EVM-compatible + * Smart Contract service. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package + +import "transaction_response.proto"; +import "query.proto"; +import "response.proto"; +import "transaction.proto"; + +/** + * The Hedera Smart Contract Service (HSCS) provides an interface to an EVM + * compatible environment to create, store, manage, and execute smart contract + * calls. Smart Contracts implement useful and often highly complex + * interactions between individuals, systems, and the distributed ledger. + */ +service SmartContractService { + /** + * Create a new smart contract. + *

+ * If this transaction succeeds, the `ContractID` for the new smart + * contract SHALL be set in the transaction receipt.
+ * The contract is defined by the initial bytecode (or `initcode`). + * The `initcode` SHALL be provided either in a previously created file, + * or in the transaction body itself for very small contracts.
+ * As part of contract creation, the constructor defined for the new + * smart contract SHALL run with the parameters provided in + * the `constructorParameters` field.
+ * The gas to "power" that constructor MUST be provided via the `gas` + * field, and SHALL be charged to the payer for this transaction.
+ * If the contract _constructor_ stores information, it is charged gas for + * that storage. There is a separate fee in HBAR to maintain that storage + * until the expiration, and that fee SHALL be added to this transaction + * as part of the _transaction fee_, rather than gas. + */ + rpc createContract (Transaction) returns (TransactionResponse); + + /** + * Modify a smart contract.
+ * Any change other than updating the expiration time requires that the + * contract be modifiable (has a valid `adminKey`) and that the + * transaction be signed by the `adminKey` + *

+ * Fields _not set_ on the request SHALL NOT be modified. + */ + rpc updateContract (Transaction) returns (TransactionResponse); + + /** + * Call a function of a given smart contract, providing function parameter + * inputs as needed. + *

+ * Resource ("gas") charges SHALL include all relevant fees incurred by + * the contract execution, including any storage required.
+ * The total transaction fee SHALL incorporate all of the "gas" actually + * consumed as well as the standard fees for transaction handling, + * data transfers, signature verification, etc... + */ + rpc contractCallMethod (Transaction) returns (TransactionResponse); + + /** + * Call a query function of a given smart contract, providing + * function parameter inputs as needed.
+ * This is performed locally on the particular node that the client is + * communicating with. Executing the call locally is faster and less + * costly, but imposes certain restrictions. + *

+ * The call MUST NOT change the state of the contract instance. This also + * precludes any expenditure or transfer of HBAR or other tokens.
+ * The call SHALL NOT have a separate consensus timestamp.
+ * The call SHALL NOT generate a record nor a receipt.
+ * The response SHALL contain the output returned by the function call.
+ *

+ * This is generally useful for calling accessor functions which read + * (query) state without changes or side effects. Any contract call that + * would use the `STATICCALL` opcode MAY be called via contract call local + * with performance and cost benefits. + *

+ * Unlike a ContractCall transaction, the node SHALL always consume the + * _entire_ amount of offered "gas" in determining the fee for this query, + * so accurate gas estimation is important. + */ + rpc contractCallLocalMethod (Query) returns (Response); + + /** + * A standard query to obtain detailed information for a smart contract. + */ + rpc getContractInfo (Query) returns (Response); + + /** + * A standard query to read the current bytecode for a smart contract. + */ + rpc ContractGetBytecode (Query) returns (Response); + + /** + * A standard query to obtain account and contract identifiers for a smart + * contract, given the Solidity identifier for that contract. + */ + rpc getBySolidityID (Query) returns (Response) {option deprecated = true;}; + + /** + *

This query is no longer supported.
+ * This query always returned an empty record list. + */ + rpc getTxRecordByContractID (Query) returns (Response) {option deprecated = true;}; + + /** + * Delete a smart contract, and transfer any remaining HBAR balance + * to a designated account. + *

+ * If this call succeeds then all subsequent calls to that smart + * contract SHALL fail.
+ */ + rpc deleteContract (Transaction) returns (TransactionResponse); + + /** + * Delete a smart contract, as a system-initiated deletion, this + * SHALL NOT transfer balances. + *

+ * This call is an administrative function of the Hedera network, and + * SHALL require network administration authorization.
+ * This transaction MUST be signed by one of the network administration + * accounts (typically `0.0.2` through `0.0.59`, as defined in the + * `api-permission.properties` file). + *
+ * If this call succeeds then all subsequent calls to that smart + * contract SHALL fail.
+ */ + rpc systemDelete (Transaction) returns (TransactionResponse) {option deprecated = true;}; + + /** + * Un-Delete a smart contract, returning it (mostly) to its state + * prior to deletion. + *

+ * The contract to be restored MUST have been deleted via `systemDelete`. + * If the contract was deleted via `deleteContract`, it + * SHALL NOT be recoverable. + *

+ * This call is an administrative function of the Hedera network, and + * SHALL require network administration authorization.
+ * This transaction MUST be signed by one of the network administration + * accounts (typically `0.0.2` through `0.0.59`, as defined in the + * `api-permission.properties` file). + *
+ * If this call succeeds then subsequent calls to that smart + * contract MAY succeed.
+ */ + rpc systemUndelete (Transaction) returns (TransactionResponse) {option deprecated = true;}; + + /** + * Make an Ethereum transaction "call" with all data in Ethereum formats, + * including the contract alias. + *

+ * Call data MAY be in the transaction, or stored within a "File".
+ * The caller MAY offer additional gas above what is offered in the call + * data, but MAY be charged up to 80% of that value if the amount required + * is less than this "floor" amount. + */ + rpc callEthereum (Transaction) returns (TransactionResponse); +} diff --git a/proto/system_delete.proto b/proto/system_delete.proto new file mode 100644 index 000000000..2a16cb47a --- /dev/null +++ b/proto/system_delete.proto @@ -0,0 +1,104 @@ +/** + * # System Delete + * A system transaction to remove a file from the Hedera File + * Service (HFS).
+ * This transaction is a privileged operation restricted to "system" + * accounts. + * + * > Note + * >> System delete is defined here for a smart contract (to delete + * >> the bytecode), but was never implemented. + * > + * >> Currently, system delete and system undelete specifying a smart + * >> contract identifier SHALL return `INVALID_FILE_ID` + * >> or `MISSING_ENTITY_ID`. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; +import "timestamp.proto"; + +/** + * Delete a file or contract bytecode as an administrative transaction. + * + * > Note + * >> A system delete/undelete for a `contractID` is not supported and + * >> SHALL return `INVALID_FILE_ID` or `MISSING_ENTITY_ID`. + * + * This transaction MAY be reversed by the `systemUndelete` transaction. + * A file deleted via `fileDelete`, however SHALL be irrecoverable.
+ * This transaction MUST specify an expiration timestamp (with seconds + * precision). The file SHALL be permanently removed from state when + * network consensus time exceeds the specified expiration time.
+ * This transaction MUST be signed by an Hedera administrative ("system") + * account. + * + * ### What is a "system" file + * A "system" file is any file with a file number less than or equal to the + * current configuration value for `ledger.numReservedSystemEntities`, + * typically `750`. + * + * ### Block Stream Effects + * None + */ +message SystemDeleteTransactionBody { + oneof id { + /** + * A file identifier. + *

+ * The identified file MUST exist in the HFS.
+ * The identified file MUST NOT be deleted.
+ * The identified file MUST NOT be a "system" file.
+ * This field is REQUIRED. + */ + FileID fileID = 1; + + /** + * A contract identifier. + *

+ * The identified contract MUST exist in network state.
+ * The identified contract bytecode MUST NOT be deleted.
+ *

+ * This option is _unsupported_. + */ + ContractID contractID = 2; + } + + /** + * A timestamp indicating when the file will be removed from state. + *

+ * This value SHALL be expressed in seconds since the `epoch`. The `epoch` + * SHALL be the UNIX epoch with 0 at `1970-01-01T00:00:00.000Z`.
+ * This field is REQUIRED. + */ + TimestampSeconds expirationTime = 3; +} diff --git a/proto/system_undelete.proto b/proto/system_undelete.proto new file mode 100644 index 000000000..afbebbceb --- /dev/null +++ b/proto/system_undelete.proto @@ -0,0 +1,95 @@ +/** + * # System Undelete + * A system transaction to "undo" a `systemDelete` transaction.
+ * This transaction is a privileged operation restricted to "system" + * accounts. + * + * > Note + * >> System undelete is defined here for a smart contract (to delete + * >> the bytecode), but was never implemented. + * > + * >> Currently, system delete and system undelete specifying a smart + * >> contract identifier SHALL return `INVALID_FILE_ID` + * >> or `MISSING_ENTITY_ID`. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; + +/** + * Recover a file or contract bytecode deleted from the Hedera File + * System (HFS) by a `systemDelete` transaction. + * + * > Note + * >> A system delete/undelete for a `contractID` is not supported and + * >> SHALL return `INVALID_FILE_ID` or `MISSING_ENTITY_ID`. + * + * This transaction can _only_ recover a file removed with the `systemDelete` + * transaction. A file deleted via `fileDelete` SHALL be irrecoverable.
+ * This transaction MUST be signed by an Hedera administrative ("system") + * account. + * + * ### What is a "system" file + * A "system" file is any file with a file number less than or equal to the + * current configuration value for `ledger.numReservedSystemEntities`, + * typically `750`. + * + * ### Block Stream Effects + * None + */ +message SystemUndeleteTransactionBody { + oneof id { + /** + * A file identifier. + *

+ * The identified file MUST exist in the HFS.
+ * The identified file MUST be deleted.
+ * The identified file deletion MUST be a result of a + * `systemDelete` transaction.
+ * The identified file MUST NOT be a "system" file.
+ * This field is REQUIRED. + */ + FileID fileID = 1; + + /** + * A contract identifier. + *

+ * The identified contract MUST exist in network state.
+ * The identified contract bytecode MUST be deleted.
+ * The identified contract deletion MUST be a result of a + * `systemDelete` transaction. + *

+ * This option is _unsupported_. + */ + ContractID contractID = 2; + } +} diff --git a/proto/throttle_definitions.proto b/proto/throttle_definitions.proto new file mode 100644 index 000000000..953cfb4e4 --- /dev/null +++ b/proto/throttle_definitions.proto @@ -0,0 +1,149 @@ +/** + * # Throttle Definitions + * A set of messages that support maintaining throttling limits on network + * transactions to ensure no one transaction type consumes the entirety of + * network resources. Also used to charge congestion fees when network load + * is exceptionally high, as an incentive to delay transactions that are + * not time-sensitive. + * + * For details behind this throttling design, please see the + * `docs/throttle-design.md` document in the + * [Hedera Services](https://github.com/hashgraph/hedera-services) repository. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; + +/** + * A single throttle limit applied to one or more operations. + * + * The list of operations MUST contain at least one entry.
+ * The throttle limit SHALL be specified in thousandths of an operation + * per second; one operation per second for the network would be `1000`.
+ * The throttle limit MUST be greater than zero (`0`). + */ +message ThrottleGroup { + /** + * A list of operations to be throttled. + *

+ * This list MUST contain at least one item.
+ * This list SHOULD NOT contain any item included in any other + * active `ThrottleGroup`. + */ + repeated HederaFunctionality operations = 1; + + /** + * A throttle limit for this group.
+ * This is a total number of operations, in thousandths, the network may + * perform each second for this group. Every node executes every transaction, + * so this limit effectively applies individually to each node as well.
+ *

+ * This value MUST be greater than zero (`0`).
+ * This value SHOULD be less than `9,223,372`.
+ */ + uint64 milliOpsPerSec = 2; +} + +/** + * A "bucket" of performance allocated across one or more throttle groups.
+ * This entry combines one or more throttle groups into a single unit to + * calculate limitations and congestion. Each "bucket" "fills" as operations + * are completed, then "drains" over a period of time defined for each bucket. + * This fill-and-drain characteristic enables the network to process sudden + * bursts of heavy traffic while still observing throttle limits over longer + * timeframes. + * + * The value of `burstPeriodMs` is combined with the `milliOpsPerSec` + * values for the individual throttle groups to determine the total + * bucket "capacity". This combination MUST be less than the maximum + * value of a signed long integer (`9223372036854775807`), when scaled to + * a nanosecond measurement resolution. + * + * > Note + * >> There is some question regarding the mechanism of calculating the + * >> combination of `burstPeriodMs` and `milliOpsPerSec`. The calculation + * >> Is implemented in difficult-to-find code, and very likely does not + * >> match the approach described here. + */ +message ThrottleBucket { + /** + * A name for this bucket.
+ * This is used for log entries. + *

+ * This value SHOULD NOT exceed 20 characters. + */ + string name = 1; + + /** + * A burst duration limit, in milliseconds.
+ * This value determines the total "capacity" of the bucket. The rate + * at which the bucket "drains" is set by the throttles, and this duration + * sets how long that rate must be sustained to empty a "full" bucket. + * That combination (calculated as the product of this value and the least + * common multiple of the `milliOpsPerSec` values for all throttle groups) + * determines the maximum amount of operations this bucket can "hold". + *

+ * The calculated capacity of this bucket MUST NOT exceed `9,223,372,036,854`. + */ + uint64 burstPeriodMs = 2; + + /** + * A list of throttle groups.
+ * These throttle groups combined define the effective throttle + * rate for the bucket. + *

+ * This list MUST contain at least one entry. + */ + repeated ThrottleGroup throttleGroups = 3; +} + +/** + * A list of throttle buckets.
+ * This list, simultaneously enforced, defines a complete throttling policy. + * + * 1. When an operation appears in more than one throttling bucket, + * that operation SHALL be throttled unless all of the buckets where + * the operation appears have "capacity" available. + * 1. An operation assigned to no buckets is SHALL be throttled in every + * instance. The _effective_ throttle for this case is `0`. + */ +message ThrottleDefinitions { + /** + * A list of throttle buckets. + *

+ * This list MUST be set, and SHOULD NOT be empty.
+ * An empty list SHALL have the effect of setting all operations to + * a single group with throttle limit of `0` operations per second for the + * entire network. + */ + repeated ThrottleBucket throttleBuckets = 1; +} diff --git a/proto/timestamp.proto b/proto/timestamp.proto new file mode 100644 index 000000000..d65a14c31 --- /dev/null +++ b/proto/timestamp.proto @@ -0,0 +1,79 @@ +/** + * # Timestamp + * Messages to describe exact date-time values, with resolution of seconds or + * nanoseconds, referenced to the UNIX epoch. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +/** + * An exact date and time.
+ * This is the same data structure as the Google protobuf Timestamp.proto. + * + * #### Additional Notes + * Useful information is present in comments on the + * [Google version](https://github.com/google/protobuf/blob/master/src/google/protobuf/timestamp.proto). + */ +message Timestamp { + /** + * The number of complete seconds since the start of the epoch. + *

+ * For this purpose, `epoch` SHALL be the UNIX epoch with 0 + * at `1970-01-01T00:00:00.000Z`.
+ * This value MUST be greater than 0.
+ * This value SHOULD be strictly greater than `946684800`. + */ + int64 seconds = 1; + + /** + * The number of nanoseconds after the start of the second referenced + * in `seconds`. + *

+ * This value MUST be greater than or equal to 0.
+ * This value MUST be strictly less than 1,000,000,000. + */ + int32 nanos = 2; +} + +/** + * An exact date and time, with a resolution of one second. + */ +message TimestampSeconds { + /** + * The number of complete seconds since the start of the epoch. + *

+ * For this purpose, `epoch` SHALL be the UNIX epoch with 0 + * at `1970-01-01T00:00:00.000Z`.
+ * This value MUST be greater than 0.
+ * This value SHOULD be strictly greater than `946684800`. + */ + int64 seconds = 1; +} diff --git a/proto/token_airdrop.proto b/proto/token_airdrop.proto new file mode 100644 index 000000000..c302dcdf1 --- /dev/null +++ b/proto/token_airdrop.proto @@ -0,0 +1,117 @@ +/** + * # Token Airdrop + * Messages used to implement a transaction to "airdrop" tokens.
+ * An "airdrop" is a distribution of tokens from a funding account + * to one or more recipient accounts, ideally with no action required + * by the recipient account(s). + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; + +/** + * Airdrop one or more tokens to one or more accounts. + * + * ### Effects + * This distributes tokens from the balance of one or more sending account(s) + * to the balance of one or more recipient accounts. Accounts MAY receive the + * tokens in one of four ways. + * + * - An account already associated to the token to be distributed SHALL + * receive the airdropped tokens immediately to the recipient account + * balance.
+ * The fee for this transfer SHALL include the transfer, the airdrop fee, + * and any custom fees. + * - An account with available automatic association slots SHALL be + * automatically associated to the token, and SHALL immediately receive + * the airdropped tokens to the recipient account balance.
+ * The fee for this transfer SHALL include the transfer, the association, + * the cost to renew that association once, the airdrop fee, and + * any custom fees. + * - An account with "receiver signature required" set SHALL have a + * "Pending Airdrop" created and must claim that airdrop with a + * `claimAirdrop` transaction.
+ * The fee for this transfer SHALL include the transfer, the association, + * the cost to renew that association once, the airdrop fee, and + * any custom fees.
+ * If the pending airdrop is not claimed immediately, the `sender` SHALL + * pay the cost to renew the token association, and the cost to maintain + * the pending airdrop, until the pending airdrop is claimed or cancelled. + * - An account with no available automatic association slots SHALL have a + * "Pending Airdrop" created and must claim that airdrop with a + * `claimAirdrop` transaction.
+ * The fee for this transfer SHALL include the transfer, the association, + * the cost to renew that association once, the airdrop fee, and any custom + * fees.
+ * If the pending airdrop is not claimed immediately, the `sender` SHALL + * pay the cost to renew the token association, and the cost to maintain + * the pending airdrop, until the pending airdrop is claimed or cancelled. + * + * If an airdrop would create a pending airdrop for a fungible/common token, + * and a pending airdrop for the same sender, receiver, and token already + * exists, the existing pending airdrop SHALL be updated to add the new + * amount to the existing airdrop, rather than creating + * a new pending airdrop.
+ * Any airdrop that completes immediately SHALL be irreversible. Any airdrop + * that results in a "Pending Airdrop" MAY be canceled via a `cancelAirdrop` + * transaction.
+ * All transfer fees (including custom fees and royalties), as well as the + * rent cost for the first auto-renewal period for any automatic-association + * slot occupied by the airdropped tokens, SHALL be charged to the account + * paying for this transaction.
+ * + * ### Block Stream Effects + * - Each successful transfer SHALL be recorded in `token_transfer_list` + * for the transaction record. + * - Each successful transfer that consumes an automatic association slot + * SHALL populate the `automatic_association` field for the record. + * - Each pending transfer _created_ SHALL be added to the + * `pending_airdrops` field for the record. + * - Each pending transfer _updated_ SHALL be added to the + * `pending_airdrops` field for the record. + */ +message TokenAirdropTransactionBody { + /** + * A list of token transfers representing one or more airdrops. + *

+ * The sender for each transfer MUST have sufficient balance to complete + * the transfers.
+ * All token transfers MUST successfully transfer tokens or create a + * pending airdrop for this transaction to succeed.
+ * This list MUST contain between 1 and 10 transfers, inclusive. + *

+ * Note that each transfer of fungible/common tokens requires both a debit + * and a credit, so each _fungible_ token transfer MUST have _balanced_ + * entries in the TokenTransferList for that transfer. + */ + repeated TokenTransferList token_transfers = 1; +} diff --git a/proto/token_associate.proto b/proto/token_associate.proto new file mode 100644 index 000000000..1136f65a9 --- /dev/null +++ b/proto/token_associate.proto @@ -0,0 +1,94 @@ +/** + * # Token Associate + * Transaction to associate an Hedera Token Service (HTS) token with an + * account.
+ * Accounts cannot transact in a token (send or receive) until the account + * and token are associated. + * + * > Note + * >> An "airdrop" transaction MAY initiate sending tokens to an + * >> unassociated account, but the transfer remains in a "pending" + * >> state until the recipient executes a "claim" transaction + * >> that both accepts the tokens and associates that account + * >> with the token type. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; + +/** + * Associate an Hedera Token Service (HTS) token and an account. + * + * An association MUST exist between an account and a token before that + * account may transfer or receive that token.
+ * If the identified account is not found, + * the transaction SHALL return `INVALID_ACCOUNT_ID`.
+ * If the identified account has been deleted, + * the transaction SHALL return `ACCOUNT_DELETED`.
+ * If any of the identified tokens is not found, + * the transaction SHALL return `INVALID_TOKEN_REF`.
+ * If any of the identified tokens has been deleted, + * the transaction SHALL return `TOKEN_WAS_DELETED`.
+ * If an association already exists for any of the identified tokens, + * the transaction SHALL return `TOKEN_ALREADY_ASSOCIATED_TO_ACCOUNT`.
+ * The identified account MUST sign this transaction. + * + * ### Block Stream Effects + * None + */ +message TokenAssociateTransactionBody { + /** + * An account identifier. + *

+ * The identified account SHALL be associated to each of the + * tokens identified in the `tokens` field.
+ * This field is REQUIRED and MUST be a valid account identifier.
+ * The identified account MUST exist in state.
+ * The identified account MUST NOT be deleted.
+ * The identified account MUST NOT be expired. + */ + AccountID account = 1; + + /** + * A list of token identifiers. + *

+ * Each token identified in this list SHALL be separately associated with + * the account identified in the `account` field.
+ * This list MUST NOT be empty. + * Each entry in this list MUST be a valid token identifier.
+ * Each entry in this list MUST NOT be currently associated to the + * account identified in `account`.
+ * Each entry in this list MUST NOT be expired.
+ * Each entry in this list MUST NOT be deleted. + */ + repeated TokenID tokens = 2; +} diff --git a/proto/token_burn.proto b/proto/token_burn.proto new file mode 100644 index 000000000..2f783093e --- /dev/null +++ b/proto/token_burn.proto @@ -0,0 +1,94 @@ +/** + * # Token Burn + * Permanently remove tokens from circulation, akin to how a fiat treasury + * will physically burn worn out bank notes. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; + +/** + * Burns tokens from the Token's treasury Account. + * + * The token MUST have a `supply_key` set and that key MUST NOT + * be an empty `KeyList`.
+ * The token `supply_key` MUST sign this transaction.
+ * This operation SHALL decrease the total supply for the token type by + * the number of tokens "burned".
+ * The total supply for the token type MUST NOT be reduced below zero (`0`) + * by this transaction.
+ * The tokens to burn SHALL be deducted from the token treasury account.
+ * If the token is a fungible/common type, the amount MUST be specified.
+ * If the token is a non-fungible/unique type, the specific serial numbers + * MUST be specified.
+ * The global batch size limit (`tokens.nfts.maxBatchSizeBurn`) SHALL set + * the maximum number of individual NFT serial numbers permitted in a single + * `tokenBurn` transaction. + * + * ### Block Stream Effects + * None + */ +message TokenBurnTransactionBody { + /** + * A token identifier. + *

+ * This SHALL identify the token type to "burn".
+ * The identified token MUST exist, and MUST NOT be deleted. + */ + TokenID token = 1; + + /** + * An amount to burn from the Treasury Account. + *

+ * This is interpreted as an amount in the smallest possible denomination + * for the token (10-decimals whole tokens).
+ * The balance for the token treasury account MUST contain sufficient + * tokens to complete this transaction with a non-negative balance.
+ * If this value is equal to zero (`0`), the token SHOULD be a + * non-fungible/unique type.
+ * If this value is non-zero, the token MUST be a fungible/common type. + */ + uint64 amount = 2; + + /** + * A list of serial numbers to burn from the Treasury Account. + *

+ * This list MUST NOT contain more entries than the current limit set by + * the network configuration value `tokens.nfts.maxBatchSizeBurn`.
+ * The treasury account for the token MUST hold each unique token + * identified in this list.
+ * If this list is not empty, the token MUST be a + * non-fungible/unique type.
+ * If this list is empty, the token MUST be a fungible/common type. + */ + repeated int64 serialNumbers = 3; +} diff --git a/proto/token_cancel_airdrop.proto b/proto/token_cancel_airdrop.proto new file mode 100644 index 000000000..5632d0e42 --- /dev/null +++ b/proto/token_cancel_airdrop.proto @@ -0,0 +1,65 @@ +/** + * # Token Cancel Airdrop + * Messages used to implement a transaction to cancel a pending airdrop. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; + +/** + * Token cancel airdrop
+ * Remove one or more pending airdrops from state on behalf of the + * sender(s) for each airdrop. + * + * Each pending airdrop canceled SHALL be removed from state and + * SHALL NOT be available to claim.
+ * Each cancellation SHALL be represented in the transaction body and + * SHALL NOT be restated in the record file.
+ * All cancellations MUST succeed for this transaction to succeed. + * + * ### Block Stream Effects + * None + */ +message TokenCancelAirdropTransactionBody { + /** + * A list of one or more pending airdrop identifiers.
+ * This list declares the set of pending airdrop entries that the client + * wishes to cancel; on success all listed pending airdrop entries + * will be removed. + *

+ * This transaction MUST be signed by the account identified by a + * `sender_id` for each entry in this list.
+ * This list MUST NOT have any duplicate entries.
+ * This list MUST contain between 1 and 10 entries, inclusive. + */ + repeated PendingAirdropId pending_airdrops = 1; +} diff --git a/proto/token_claim_airdrop.proto b/proto/token_claim_airdrop.proto new file mode 100644 index 000000000..4d02203fd --- /dev/null +++ b/proto/token_claim_airdrop.proto @@ -0,0 +1,65 @@ +/** + * # Token Claim Airdrop + * Messages used to implement a transaction to claim a pending airdrop. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; + +/** + * Token claim airdrop
+ * Complete one or more pending transfers on behalf of the + * recipient(s) for an airdrop. + * + * The sender MUST have sufficient balance to fulfill the airdrop at the + * time of claim. If the sender does not have sufficient balance, the + * claim SHALL fail.
+ * Each pending airdrop successfully claimed SHALL be removed from state and + * SHALL NOT be available to claim again.
+ * Each claim SHALL be represented in the transaction body and + * SHALL NOT be restated in the record file.
+ * All claims MUST succeed for this transaction to succeed. + * + * ### Block Stream Effects + * The completed transfers SHALL be present in the transfer list. + */ +message TokenClaimAirdropTransactionBody { + /** + * A list of one or more pending airdrop identifiers. + *

+ * This transaction MUST be signed by the account identified by + * the `receiver_id` for each entry in this list.
+ * This list MUST contain between 1 and 10 entries, inclusive.
+ * This list MUST NOT have any duplicate entries. + */ + repeated PendingAirdropId pending_airdrops = 1; +} diff --git a/proto/token_create.proto b/proto/token_create.proto new file mode 100644 index 000000000..0d26fbbf7 --- /dev/null +++ b/proto/token_create.proto @@ -0,0 +1,357 @@ +/** + * # Token Create + * Create an Hedera Token Service (HTS) token. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "duration.proto"; +import "basic_types.proto"; +import "custom_fees.proto"; +import "timestamp.proto"; + +/** + * Create an HTS token. + * + * #### Keys + * Each token has several keys that, separately, control different functions + * for that token. It is *_strongly_* recommended that each key assigned to + * a token be unique, or disabled by assigning an empty `KeyList`. + * Keys and purpose + * - `adminKey` is a general access and may authorize a token update + * transaction as well as _update the other keys_. Even the admin key + * cannot authorize _adding_ a key that is not present, however.
+ * The admin key may also delete the token entirely. + * - `fee_schedule` may authorize updating the token custom fees. If this + * key is not present, the custom fees for the token are fixed and immutable. + * - `freeze` may authorize a token freeze or unfreeze transaction. + * If this key is not present, accounts holding this token cannot have + * their tokens frozen or unfrozen. + * - `kyc` may authorize a token grant KYC or revoke KYC transaction. + * If this key is not present, accounts holding this token cannot have + * KYC status granted or revoked. + * - `metadata` may authorize token update nfts transactions. + * If this key is not present, the token metadata values for that + * non-fungible/unique token _type_ will be immutable. + * - `pause` may authorize a token pause or token unpause transaction. + * If this key is not present, the token cannot be paused (preventing any + * account from transacting in that token) or resumed. + * - `supply` may authorize a token mint or burn transaction. + * If this key is not present, the token cannot mint additional supply and + * existing tokens cannot be "burned" from the treasury (but _might_ still be + * "burned" from individual accounts, c.f. `wipeKey` and `tokenWipe`). + * - `wipe` may authorize a token wipe account transaction. + * If this key is not present, accounts holding this token cannot have + * their balance or NFTs wiped (effectively burned). + * + * #### Requirements + * If `tokenType` is fungible/common, the `initialSupply` MUST be strictly + * greater than zero(`0`).
+ * If `tokenType` is non-fungible/unique, the `initialSupply` MUST + * be zero(`0`).
+ * If `tokenSupplyType` is "infinite", the `maxSupply` MUST be zero(`0`).
+ * If `tokenSupplyType` is "finite", the `maxSupply` MUST be strictly + * greater than zero(`0`).
+ * + * ### Block Stream Effects + * If the token is created, the Token Identifier SHALL be in the receipt.
+ */ +message TokenCreateTransactionBody { + /** + * A name for the token.
+ * This is generally the "full name" displayed in wallet software. + *

+ * This field is REQUIRED.
+ * This value MUST NOT exceed 100 bytes when encoded as UTF-8.
+ * This value MUST NOT contain the Unicode NUL codepoint. + */ + string name = 1; + + /** + * A symbol to use for the token. + *

+ * This field is REQUIRED.
+ * This value MUST NOT exceed 100 bytes when encoded as UTF-8.
+ * This value MUST NOT contain the Unicode NUL codepoint. + */ + string symbol = 2; + + /** + * A decimal precision of the token's smallest denomination.
+ * Most values are described in terms of this smallest denomination, + * so the token initial supply, for instance, must be divided by + * 10decimals to get whole tokens. + *

+ * This MUST be zero(`0`) for non-fungible/unique tokens. + */ + uint32 decimals = 3; + + /** + * An initial supply, in the smallest denomination for the token. + *

+ * This amount SHALL be transferred to the treasury account as part + * of this transaction.
+ * This amount MUST be specified in the smallest denomination for the + * token (i.e. 10-decimals whole tokens).
+ * This MUST be zero(`0`) for a non-fungible/unique token. + */ + uint64 initialSupply = 4; + + /** + * A treasury account identifier. + *

+ * This field is REQUIRED.
+ * The identified account SHALL be designated the "treasury" for the + * new token, and all tokens "minted" SHALL be delivered to that account, + * including the initial supply, if any.
+ * The identified account MUST exist, MUST NOT be expired, and SHOULD + * have a non-zero HBAR balance.
+ * The identified account SHALL be associated to the new token. + */ + AccountID treasury = 5; + + /** + * An Hedera key for token administration. + *

+ * This key, if set, SHALL have administrative authority for this token and + * MAY authorize token update and/or token delete transactions.
+ * If this key is not set, or is an empty `KeyList`, this token SHALL be + * immutable, except for expiration and renewal. + */ + Key adminKey = 6; + + /** + * An Hedera key for managing account KYC. + *

+ * This key, if set, SHALL have KYC authority for this token and + * MAY authorize transactions to grant or revoke KYC for accounts.
+ * If this key is not set, or is an empty `KeyList`, KYC status for this + * token SHALL NOT be granted or revoked for any account.
+ * If this key is removed after granting KYC, those grants SHALL remain + * and cannot be revoked. + */ + Key kycKey = 7; + + /** + * An Hedera key for managing asset "freeze". + *

+ * This key, if set, SHALL have "freeze" authority for this token and + * MAY authorize transactions to freeze or unfreeze accounts + * with respect to this token.
+ * If this key is not set, or is an empty `KeyList`, this token + * SHALL NOT be frozen or unfrozen for any account.
+ * If this key is removed after freezing accounts, those accounts + * SHALL remain frozen and cannot be unfrozen. + */ + Key freezeKey = 8; + + /** + * An Hedera key for wiping tokens from accounts. + *

+ * This key, if set, SHALL have "wipe" authority for this token and + * MAY authorize transactions to "wipe" any amount of this token from + * any account, effectively burning the tokens "wiped".
+ * If this key is not set, or is an empty `KeyList`, it SHALL NOT be + * possible to "wipe" this token from an account. + */ + Key wipeKey = 9; + + /** + * An Hedera key for "minting" and "burning" tokens. + *

+ * This key, if set, MAY authorize transactions to "mint" new tokens to + * be delivered to the token treasury or "burn" tokens held by the + * token treasury.
+ * If this key is not set, or is an empty `KeyList`, it SHALL NOT be + * possible to change the supply of tokens and neither "mint" nor "burn" + * transactions SHALL be permitted. + */ + Key supplyKey = 10; + + /** + * An initial Freeze status for accounts associated to this token. + *

+ * If this value is set, an account MUST be the subject of a + * `tokenUnfreeze` transaction after associating to the token before + * that account can send or receive this token.
+ * If this value is set, the `freezeKey` SHOULD be set.
+ * If the `freezeKey` is not set, any account associated to this token + * while this value is set SHALL be permanently frozen. + *

+ *

REVIEW NOTE
+ * Should we prevent setting this value true for tokens with no freeze + * key?
+ * Should we set this value to false if a freeze key is removed? + *
+ */ + bool freezeDefault = 11; + + /** + * An expiration timestamp. + *

+ * If the `autoRenewAccount` and `autoRenewPeriod` fields are set, this + * value SHALL be replaced with the current consensus time extended + * by the `autoRenewPeriod` duration.
+ * If this value is set and token expiration is enabled in network + * configuration, this token SHALL expire when consensus time exceeds + * this value, and MAY be subsequently removed from the network state.
+ * If this value is not set, and the automatic renewal account is also not + * set, then this value SHALL default to the current consensus time + * extended by the "default" expiration period from network configuration. + */ + Timestamp expiry = 13; + + /** + * An identifier for the account to be charged renewal fees at the token's + * expiry to extend the lifetime of the token. + *

+ * If this value is set, the token lifetime SHALL be extended by the + * _smallest_ of the following: + *

    + *
  • The current `autoRenewPeriod` duration.
  • + *
  • The maximum duration that this account has funds to purchase.
  • + *
  • The configured MAX_AUTORENEW_PERIOD at the time of automatic + * renewal.
  • + *
+ * If this account's HBAR balance is `0` when the token must be + * renewed, then the token SHALL be expired, and MAY be subsequently + * removed from state.
+ * If this value is set, the referenced account MUST sign this + * transaction. + */ + AccountID autoRenewAccount = 14; + + /** + * A duration between token automatic renewals.
+ * All entities in state may be charged "rent" occasionally (typically + * every 90 days) to prevent unnecessary growth of the ledger. This value + * sets the interval between such events for this token. + *

+ * This value MUST be set.
+ * This value MUST be greater than the configured + * MIN_AUTORENEW_PERIOD.
+ * This value MUST be less than the configured MAX_AUTORENEW_PERIOD. + */ + Duration autoRenewPeriod = 15; + + /** + * A short description for this token. + *

+ * This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes` + * (default 100) bytes when encoded as UTF-8. + */ + string memo = 16; + + /** + * A type for this token, according to IWA classification. + *

+ * If this value is not set, the token SHALL have the default type of + * fungible/common.
+ * This field SHALL be immutable. + */ + TokenType tokenType = 17; + + /** + * A supply type for this token, according to IWA classification. + *

+ * If this value is not set, the token SHALL have the default supply + * type of "infinite" (which is, as a practical matter, + * (263-1)/10decimals).
+ * This field SHALL be immutable. + */ + TokenSupplyType supplyType = 18; + + /** + * A maximum supply for this token. + *

+ * This SHALL be interpreted in terms of the smallest fractional unit for + * this token.
+ * If `supplyType` is "infinite", this MUST be `0`.
+ * This field SHALL be immutable. + */ + int64 maxSupply = 19; + + /** + * An Hedera key for managing the token custom fee schedule. + *

+ * This key, if set, MAY authorize transactions to modify the + * `custom_fees` for this token.
+ * If this key is not set, or is an empty `KeyList`, the `custom_fees` + * for this token SHALL NOT be modified. + */ + Key fee_schedule_key = 20; + + /** + * A list of custom fees representing a fee schedule. + *

+ * This list MAY be empty, which SHALL mean that there + * are no custom fees for this token.
+ * If this token is a non-fungible/unique type, the entries + * in this list MUST NOT declare a `fractional_fee`.
+ * If this token is a fungible/common type, the entries in this + * list MUST NOT declare a `royalty_fee`.
+ * Any token type MAY include entries that declare a `fixed_fee`. + */ + repeated CustomFee custom_fees = 21; + + /** + * An Hedera key for managing token "pause". + *

+ * This key, if set, SHALL have "pause" authority for this token and + * MAY authorize transactions to pause or unpause this token.
+ * If this key is not set, or is an empty `KeyList`, this token + * SHALL NOT be paused or unpaused.
+ * If this key is removed while the token is paused, the token cannot + * be unpaused and SHALL remain paused. + */ + Key pause_key = 22; + + /** + * Token "Metadata". + *

+ * The value, if set, MUST NOT exceed 100 bytes.
+ *

Examples
+ *
hcs://1/0.0.4896575
+ *
ipfs://bafkreifd7tcjjuwxxf4qkaibkj62pj4mhfuud7plwrc3pfoygt55al6syi
+ *
+ */ + bytes metadata = 23; + + /** + * An Hedera key for managing the token `metadata`. + *

+ * This key, if set, MAY authorize transactions to modify the + * `metadata` for this token.
+ * If this key is not set, or is an empty `KeyList`, the `metadata` + * for this token SHALL NOT be modified. + */ + Key metadata_key = 24; +} diff --git a/proto/token_delete.proto b/proto/token_delete.proto new file mode 100644 index 000000000..dfdfc6637 --- /dev/null +++ b/proto/token_delete.proto @@ -0,0 +1,73 @@ +/** + * # Token Delete + * Delete an Hedera Token Service (HTS) token. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; + +/** + * Mark a token as deleted.
+ * A deleted token remains present in the network state, but is no longer + * active, cannot be held in a balance, and all operations on that token + * fail. A deleted token is removed from network state when it expires. + * + * #### Operations on a deleted token + * All operations on a deleted token SHALL fail with a + * status code `TOKEN_WAS_DELETED`.
+ * Any attempt to transfer a deleted token between accounts SHALL fail with + * a status code `TOKEN_WAS_DELETED`. + * + * > QUESTIONS + * >> What happens to existing balances/NFTs? + * >> Are these removed; are they stuck on the accounts? + * > + * >> If balances/NFTs remain, can a `tokenReject` remove them? + * + * #### Requirements + * The `admin_key` for the token MUST be set, and MUST + * sign this transaction.
+ * If the `admin_key` for the token is not set, this transaction SHALL + * fail with a status code `TOKEN_IS_IMMUTABlE`. + * + * ### Block Stream Effects + * None + */ +message TokenDeleteTransactionBody { + /** + * A token identifier. + *

+ * This SHALL identify the token type to delete.
+ * The identified token MUST exist, and MUST NOT be deleted. + */ + TokenID token = 1; +} diff --git a/proto/token_dissociate.proto b/proto/token_dissociate.proto new file mode 100644 index 000000000..78141480f --- /dev/null +++ b/proto/token_dissociate.proto @@ -0,0 +1,94 @@ +/** + * # Token Dissociate + * Remove association between an account and one or more Hedera Token + * Service (HTS) tokens. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; + +/** + * Dissociate an account from one or more HTS tokens. + * + * If the identified account is not found, + * the transaction SHALL return `INVALID_ACCOUNT_ID`.
+ * If the identified account has been deleted, + * the transaction SHALL return `ACCOUNT_DELETED`.
+ * If any of the identified tokens is not found, + * the transaction SHALL return `INVALID_TOKEN_REF`.
+ * If any of the identified tokens has been deleted, + * the transaction SHALL return `TOKEN_WAS_DELETED`.
+ * If an association does not exist for any of the identified tokens, + * the transaction SHALL return `TOKEN_NOT_ASSOCIATED_TO_ACCOUNT`.
+ * If the identified account has a nonzero balance for any of the identified + * tokens, and that token is neither deleted nor expired, the + * transaction SHALL return `TRANSACTION_REQUIRES_ZERO_TOKEN_BALANCES`.
+ * If one of the identified tokens is a fungible/common token that is expired, + * the account MAY disassociate from that token, even if that token balance is + * not zero for that account.
+ * If one of the identified tokens is a non-fungible/unique token that is + * expired, the account MUST NOT disassociate if that account holds any + * individual NFT of that token. In this situation the transaction SHALL + * return `TRANSACTION_REQUIRED_ZERO_TOKEN_BALANCES`.
+ * The identified account MUST sign this transaction. + * + * ### Block Stream Effects + * None + */ +message TokenDissociateTransactionBody { + /** + * An account identifier. + *

+ * The identified account SHALL be dissociated from each of the + * tokens identified in the `tokens` field. + * This field is REQUIRED and MUST be a valid account identifier.
+ * The identified account MUST exist in state.
+ * The identified account MUST NOT be deleted.
+ * The identified account MUST NOT be expired. + */ + AccountID account = 1; + + /** + * A list of token identifiers. + *

+ * Each token identified in this list SHALL be dissociated from + * the account identified in the `account` field.
+ * This list MUST NOT be empty. + * Each entry in this list MUST be a valid token identifier.
+ * Each entry in this list MUST be currently associated to the + * account identified in `account`.
+ * Entries in this list MAY be expired, if the token type is + * fungible/common.
+ * Each entry in this list MUST NOT be deleted. + */ + repeated TokenID tokens = 2; +} diff --git a/proto/token_fee_schedule_update.proto b/proto/token_fee_schedule_update.proto new file mode 100644 index 000000000..fbb2ec4fa --- /dev/null +++ b/proto/token_fee_schedule_update.proto @@ -0,0 +1,77 @@ +/** + * # Fee Schedule Update + * Transaction to update the fee schedule for a token. A token creator may + * wish to charge custom transaction fees for a token type, and if a + * `fee_schedule_key` is assigned, this transaction enables adding, removing, + * or updating those custom transaction fees. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; +import "custom_fees.proto"; + +/** + * Update the custom fee schedule for a token type. + * + * The token MUST have a `fee_schedule_key` set and that key MUST NOT + * be an empty `KeyList`.
+ * The token `fee_schedule_key` MUST sign this transaction.
+ * The token MUST exist, MUST NOT be deleted, and MUST NOT be expired.
+ * + * If the custom_fees list is empty, clears the fee schedule or resolves to + * CUSTOM_SCHEDULE_ALREADY_HAS_NO_FEES if the fee schedule was already empty. + * + * ### Block Stream Effects + * None + */ +message TokenFeeScheduleUpdateTransactionBody { + /** + * A token identifier. + *

+ * This SHALL identify the token type to modify with an updated + * custom fee schedule.
+ * The identified token MUST exist, and MUST NOT be deleted. + */ + TokenID token_id = 1; + + /** + * A list of custom fees representing a fee schedule. + *

+ * This list MAY be empty to remove custom fees from a token.
+ * If the identified token is a non-fungible/unique type, the entries + * in this list MUST NOT declare a `fractional_fee`.
+ * If the identified token is a fungible/common type, the entries in this + * list MUST NOT declare a `royalty_fee`.
+ * Any token type MAY include entries that declare a `fixed_fee`. + */ + repeated CustomFee custom_fees = 2; +} diff --git a/proto/token_freeze_account.proto b/proto/token_freeze_account.proto new file mode 100644 index 000000000..0f3a8fb6f --- /dev/null +++ b/proto/token_freeze_account.proto @@ -0,0 +1,79 @@ +/** + * # Token Freeze Account + * Freeze all tokens of an identified type for an identified account. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; + +/** + * Block transfers of a token type for an account.
+ * This, effectively, freezes assets of one account with respect to + * one token type. While frozen, that account cannot send or receive tokens + * of the identified type. + * + * The token MUST have a `freeze_key` set and that key MUST NOT + * be an empty `KeyList`.
+ * The token `freeze_key` MUST sign this transaction.
+ * The identified token MUST exist, MUST NOT be deleted, MUST NOT be paused, + * and MUST NOT be expired.
+ * The identified account MUST exist, MUST NOT be deleted, and + * MUST NOT be expired.
+ * If the identified account is already frozen with respect to the identified + * token, the transaction SHALL succeed, but no change SHALL be made.
+ * An association between the identified account and the identified + * token MUST exist. + * + * ### Block Stream Effects + * None + */ +message TokenFreezeAccountTransactionBody { + /** + * A token identifier. + *

+ * This SHALL identify the token type to "freeze".
+ * The identified token MUST exist, MUST NOT be deleted, and MUST be + * associated to the identified account. + */ + TokenID token = 1; + + /** + * An account identifier. + *

+ * This shall identify the account to "freeze".
+ * The identified account MUST exist, MUST NOT be deleted, MUST NOT be + * expired, and MUST be associated to the identified token.
+ * The identified account SHOULD NOT be "frozen" with respect to the + * identified token. + */ + AccountID account = 2; +} diff --git a/proto/token_get_account_nft_infos.proto b/proto/token_get_account_nft_infos.proto new file mode 100644 index 000000000..8ef2e67ec --- /dev/null +++ b/proto/token_get_account_nft_infos.proto @@ -0,0 +1,88 @@ +/** + * # Get Account NFT Infos + * Deprecated and permanently disabled + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; +import "token_get_nft_info.proto"; +import "query_header.proto"; +import "response_header.proto"; + +/** + * Deleted and unsupported. + * + * This query is not implemented and any query of this type submitted + * SHALL return a `NOT_SUPPORTED` response code. + */ +message TokenGetAccountNftInfosQuery { + /** + * Standard information sent with every query operation.
+ * This includes the signed payment and what kind of response is requested + * (cost, state proof, both, or neither). + */ + QueryHeader header = 1; + + /** + * The Account for which information is requested + */ + AccountID accountID = 2; + + /** + * Specifies the start index (inclusive) of the range of NFTs to query for. + * Value must be in the range [0; ownedNFTs-1] + */ + int64 start = 3; + + /** + * Specifies the end index (exclusive) of the range of NFTs to query for. + * Value must be in the range (start; ownedNFTs] + */ + int64 end = 4; +} + +/** + * Deleted and unsupported. + */ +message TokenGetAccountNftInfosResponse { + /** + * The standard response information for queries.
+ * This includes the values requested in the `QueryHeader` + * (cost, state proof, both, or neither). + */ + ResponseHeader header = 1; + + /** + * List of NFTs associated to the account + */ + repeated TokenNftInfo nfts = 2; +} diff --git a/proto/token_get_info.proto b/proto/token_get_info.proto new file mode 100644 index 000000000..3b9993594 --- /dev/null +++ b/proto/token_get_info.proto @@ -0,0 +1,407 @@ +/** + * # Get Token Info + * Query to retrieve information for a single token. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; +import "custom_fees.proto"; +import "query_header.proto"; +import "response_header.proto"; +import "timestamp.proto"; +import "duration.proto"; + +/** + * Request information for a token. + */ +message TokenGetInfoQuery { + /** + * Standard information sent with every query operation.
+ * This includes the signed payment and what kind of response is requested + * (cost, state proof, both, or neither). + */ + QueryHeader header = 1; + + /** + * A token identifier. + *

+ * This SHALL identify the token to query.
+ * The identified token MUST exist, and MUST NOT be deleted. + */ + TokenID token = 2; +} + +/** + * An Hedera Token Service(HTS) token. + * + * A token SHALL represent a fungible or non-fungible unit of exchange.
+ * The specified Treasury Account SHALL receive the initial supply of tokens and + * SHALL determine distribution of all tokens once minted. + */ +message TokenInfo { + /** + * A unique identifier for this token. + */ + TokenID tokenId = 1; + + /** + * A human-readable name for this token. + *

+ * This value MAY NOT be unique.
+ * This value SHALL NOT exceed 100 bytes when encoded as UTF-8. + */ + string name = 2; + + /** + * A human-readable symbol for the token. + *

+ * This value SHALL NOT be unique.
+ * This value SHALL NOT exceed 100 bytes when encoded as UTF-8. + */ + string symbol = 3; + + /** + * A number of decimal places for this token. + *

+ * If decimals are 8 or 11, then the number of whole tokens can be at most + * billions or millions, respectively. More decimals allows for a more + * finely-divided token, but also limits the maximum total supply. + *

+ * Examples + *

    + *
  • Bitcoin satoshis (21 million whole tokens with 8 decimals).
  • + *
  • Hedera tinybar (50 billion whole tokens with 8 decimals).
  • + *
  • Bitcoin milli-satoshis (21 million whole tokens with 11 + * decimals).
  • + *
  • Theoretical limit is roughly 92.2 billion with 8 decimals, or + * 92.2 million with 11 decimals.
  • + *
+ * All token amounts in the network are stored as integer amounts, with + * each unit representing 10-decimals whole tokens. + *

+ * For tokens with `token_type` set to `NON_FUNGIBLE_UNIQUE` this MUST be 0. + */ + uint32 decimals = 4; + + /** + * A _current_ total supply of this token, expressed in the smallest unit + * of the token. + *

+ * The number of _whole_ tokens this represents is (total_supply / + * 10decimals). The value of total supply, MUST be within the + * positive range of a twos-compliment signed 64-bit integer. + * The `total_supply`, therefore MUST be between 1, and + * 9,223,372,036,854,775,807, inclusive. + *

+ * This value SHALL be reduced when a `token_burn` or `token_wipe_account` + * operation is executed, and SHALL be increased when a `token_mint` + * operation is executed. + */ + uint64 totalSupply = 5; + + /** + * A treasury account identifier for this token. + *

+ * When the token is created, the initial supply given in the token create + * transaction SHALL be minted and deposited in the treasury account.
+ * All token mint transactions for this token SHALL deposit the new minted + * tokens in the treasury account.
+ * All token burn transactions for this token SHALL remove the tokens to be + * burned from the treasury account. + */ + AccountID treasury = 6; + + /** + * Access control for general modification of this token. + *

+ * This key MUST sign any `token_update` transaction that + * changes any attribute of the token other than expiration_time. + * Other attributes of this token MAY be changed by transactions other than + * `token_update`, and MUST be signed by one of the other purpose-specific + * keys assigned to the token.
+ * This value can be set during token creation, and SHALL NOT be + * modified thereafter, unless the update transaction is signed by both + * the existing `admin_key` and the new `admin_key`.
+ * If the `admin_key` is not set for a token, that token SHALL be immutable. + */ + Key adminKey = 7; + + /** + * Access control for KYC for this token. + *

+ * Know Your Customer (KYC) status may be granted for an account by a token + * grant kyc transaction signed by this key.
+ * If this key is not set, then KYC status cannot be granted to an account + * for this token, and any `TokenGrantKyc` transaction attempting to grant + * kyc to an account for this token SHALL NOT succeed.
+ * This key MAY be set when the token is created, and MAY be set or modified + * via a token update transaction signed by the `admin_key`.
+ * If `admin_key` is not set, this value, whether set or unset, + * SHALL be immutable. + */ + Key kycKey = 8; + + /** + * Access control to freeze this token. + *

+ * A token may be frozen for an account, preventing any transaction from + * transferring that token for that specified account, by a token freeze + * account transaction signed by this key.
+ * If this key is not set, the token cannot be frozen, and any transaction + * attempting to freeze the token for an account SHALL NOT succeed.
+ * This key MAY be set when the token is created, and MAY be set or modified + * via a token update transaction signed by the `admin_key`.
+ * If `admin_key` is not set, this value, whether set or unset, + * SHALL be immutable. + */ + Key freezeKey = 9; + + /** + * Access control of account wipe for this token. + *

+ * A token may be wiped, removing and burning tokens from a specific + * account, by a token wipe transaction, which MUST be signed by this key. + * The `treasury_account` cannot be subjected to a token wipe. A token burn + * transaction, signed by the `supply_key`, serves to burn tokens held by + * the `treasury_account` instead.
+ * If this key is not set, the token cannot be wiped, and any transaction + * attempting to wipe the token from an account SHALL NOT succeed.
+ * This key MAY be set when the token is created, and MAY be set or modified + * via a token update transaction signed by the `admin_key`.
+ * If `admin_key` is not set, this value, whether set or unset, + * SHALL be immutable. + */ + Key wipeKey = 10; + + /** + * Access control of token mint/burn for this token. + *

+ * A token mint transaction MUST be signed by this key, and any token mint + * transaction not signed by the current `supply_key` for that token + * SHALL NOT succeed.
+ * A token burn transaction MUST be signed by this key, and any token burn + * transaction not signed by the current `supply_key` for that token + * SHALL NOT succeed.
+ * This key MAY be set when the token is created, and MAY be set or modified + * via a token update transaction signed by the `admin_key`.
+ * If `admin_key` is not set, this value, whether set or unset, + * SHALL be immutable. + */ + Key supplyKey = 11; + + /** + * A flag indicating if accounts associated to this token are frozen by + * default, not frozen, or freeze is not applicable. + *

+ * Accounts frozen by default and newly associated with this token CANNOT + * transact in the token until unfrozen.
+ * This SHALL NOT prevent a `tokenReject` transaction to return the tokens + * from an account to the treasury account. + */ + TokenFreezeStatus defaultFreezeStatus = 12; + + /** + * A flag indicating if accounts associated with this token are granted + * KYC by default, revoked by default, or KYC is not applicable. + */ + TokenKycStatus defaultKycStatus = 13; + + /** + * A flag indicating that this token is deleted. + *

+ * A transaction involving a deleted token MUST NOT succeed. + */ + bool deleted = 14; + + /** + * An identifier for the account (if any) that the network will attempt + * to charge for this token's auto-renewal upon expiration. + *

+ * This field is OPTIONAL. If it is not set then renewal fees SHALL be + * charged to the account identified by `treasury`. + */ + AccountID autoRenewAccount = 15; + + /** + * A duration by which the network should automatically extend + * this token's expiration. + *

+ * If the token has a valid auto-renew account, and is not deleted upon + * expiration, the network SHALL attempt to automatically renew this + * token.
+ * The default values for the minimum period and maximum period are 30 days + * and 90 days, respectively. + */ + Duration autoRenewPeriod = 16; + + /** + * An expiration time for this token, in seconds since the epoch. + *

+ * For this purpose, `epoch` SHALL be the + * UNIX epoch with 0 at `1970-01-01T00:00:00.000Z`. + */ + Timestamp expiry = 17; + + /** + * A short description of this token. + *

+ * This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes` + * (default 100) bytes when encoded as UTF-8. + */ + string memo = 18; + + /** + * A type for this token. + *

+ * A token SHALL be either `FUNGIBLE_COMMON` or `NON_FUNGIBLE_UNIQUE`.
+ * If this value was omitted during token creation, `FUNGIBLE_COMMON` + * SHALL be used.
+ * The value `FUNGIBLE_COMMON` SHALL represent a fungible/common token. + * The value `NON_FUNGIBLE_UNIQUE` SHALL represent a + * non-fungible/unique token. + */ + TokenType tokenType = 19; + + /** + * A supply type for this token. + *

+ * A token SHALL have either `INFINITE` or `FINITE` supply type.
+ * If this value was omitted during token creation, the value `INFINITE` + * SHALL be used. + */ + TokenSupplyType supplyType = 20; + + /** + * A maximum supply of this token.
+ * This is the maximum number of tokens of this type that may be issued. + *

+ * This limit SHALL apply regardless of `token_type`.
+ * If `supply_type` is `INFINITE` then this value MUST be 0.
+ * If `supply_type` is `FINITE`, then this value MUST be greater than 0. + */ + int64 maxSupply = 21; + + /** + * Access control of the `custom_fees` field for this token. + *

+ * The token custom fee schedule may be changed, modifying the fees charged + * for transferring that token, by a token update transaction, which MUST + * be signed by this key.
+ * If this key is not set, the token custom fee schedule cannot be changed, + * and any transaction attempting to change the custom fee schedule for + * this token SHALL NOT succeed.
+ * This key MAY be set when the token is created, and MAY be set or modified + * via a token update transaction signed by the `admin_key`.
+ * If `admin_key` is not set, this value, whether set or unset, + * SHALL be immutable. + */ + Key fee_schedule_key = 22; + + /** + * A custom fee schedule for this token. + */ + repeated CustomFee custom_fees = 23; + + /** + * Access control of pause/unpause for this token. + *

+ * A token may be paused, preventing any transaction from transferring that + * token, by a token update transaction signed by this key.
+ * If this key is not set, the token cannot be paused, and any transaction + * attempting to pause the token SHALL NOT succeed.
+ * This key MAY be set when the token is created, and MAY be set or modified + * via a token update transaction signed by the `admin_key`.
+ * If `admin_key` is not set, this value, whether set or unset, + * SHALL be immutable. + */ + Key pause_key = 24; + + /** + * A flag indicating that this token is paused.
+ * A token may be paused, unpaused, or pause not applicable. + *

+ * A transaction involving a paused token, other than token_unpause, + * MUST NOT succeed. + */ + TokenPauseStatus pause_status = 25; + + /** + * The ledger ID of the network that generated this response. + *

+ * This value SHALL identify the distributed ledger that responded to + * this query. + */ + bytes ledger_id = 26; + + /** + * A Token "Metadata". + *

+ * This value, if set, SHALL NOT exceed 100 bytes. + */ + bytes metadata = 27; + + /** + * Access Control of metadata update for this token. + *

+ * A transaction to update the `metadata` field of this token MUST be + * signed by this key.
+ * If this token is a non-fungible/unique token type, a transaction to + * update the `metadata` field of any individual serialized unique token + * of this type MUST be signed by this key.
+ * If this key is not set, the token metadata SHALL NOT be changed after it + * is created.
+ * If this key is not set, the metadata for any individual serialized token + * of this type SHALL NOT be changed after it is created.
+ * This key MAY be set when the token is created, and MAY be set or modified + * via a token update transaction signed by the `admin_key`.
+ * If `admin_key` is not set, this value, whether set or unset, + * SHALL be immutable. + */ + Key metadata_key = 28; +} + +/** + * A response message for the `getTokenInfo` query. + */ +message TokenGetInfoResponse { + /** + * The standard response information for queries.
+ * This includes the values requested in the `QueryHeader` + * (cost, state proof, both, or neither). + */ + ResponseHeader header = 1; + + /** + * The information requested for the identified token. + */ + TokenInfo tokenInfo = 2; +} diff --git a/proto/token_get_nft_info.proto b/proto/token_get_nft_info.proto new file mode 100644 index 000000000..b949505cc --- /dev/null +++ b/proto/token_get_nft_info.proto @@ -0,0 +1,117 @@ +/** + * # Get NFT Info Query + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; +import "query_header.proto"; +import "response_header.proto"; +import "timestamp.proto"; + +/** + * Applicable only to tokens of type NON_FUNGIBLE_UNIQUE. Gets info on a NFT for a given TokenID (of + * type NON_FUNGIBLE_UNIQUE) and serial number + */ +message TokenGetNftInfoQuery { + /** + * Standard information sent with every query operation.
+ * This includes the signed payment and what kind of response is requested + * (cost, state proof, both, or neither). + */ + QueryHeader header = 1; + + /** + * A non-fungible/unique token (NFT) identifier. + *

+ * This SHALL identify the NFT to query.
+ * The identified NFT MUST exist, and MUST NOT be deleted. + */ + NftID nftID = 2; +} + +/** + * Information for one non-fungible/unique token (NFT). + * + */ +message TokenNftInfo { + /** + * A non-fungible/unique token (NFT) identifier. + *

+ * This SHALL match the NFT requested.
+ */ + NftID nftID = 1; + + /** + * The current owner of the NFT + */ + AccountID accountID = 2; + + /** + * The effective consensus timestamp at which the NFT was minted + */ + Timestamp creationTime = 3; + + /** + * Represents the unique metadata of the NFT + */ + bytes metadata = 4; + + /** + * The ledger ID of the network that generated this response. + *

+ * This value SHALL identify the distributed ledger that responded to + * this query. + */ + bytes ledger_id = 5; + + /** + * If an allowance is granted for the NFT, its corresponding spender account + */ + AccountID spender_id = 6; +} + +/** + * UNDOCUMENTED + */ +message TokenGetNftInfoResponse { + /** + * The standard response information for queries.
+ * This includes the values requested in the `QueryHeader` + * (cost, state proof, both, or neither). + */ + ResponseHeader header = 1; + + /** + * The information about this NFT + */ + TokenNftInfo nft = 2; +} diff --git a/proto/token_get_nft_infos.proto b/proto/token_get_nft_infos.proto new file mode 100644 index 000000000..7f371867f --- /dev/null +++ b/proto/token_get_nft_infos.proto @@ -0,0 +1,101 @@ +/** + * # Token Get NFT Infos + * Deprecated and permanently disabled + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; +import "token_get_nft_info.proto"; +import "query_header.proto"; +import "response_header.proto"; + +/** + * Deleted and unsupported. + * + * This query is not implemented and any query of this type submitted + * SHALL return a `NOT_SUPPORTED` response code. + */ +message TokenGetNftInfosQuery { + /** + * Standard information sent with every query operation.
+ * This includes the signed payment and what kind of response is requested + * (cost, state proof, both, or neither). + */ + QueryHeader header = 1; + + /** + * A token identifier. + *

+ * This SHALL identify the token to query.
+ * The identified token MUST exist, MUST NOT be deleted, and MUST be + * a non-fungible/unique type. + */ + TokenID tokenID = 2; + + /** + * Specifies the start index (inclusive) of the range of NFTs to query for. + * Value must be in the range [0; mintedNFTs-1] + */ + int64 start = 3; + + /** + * Specifies the end index (exclusive) of the range of NFTs to query for. + * Value must be in the range (start; mintedNFTs] + */ + int64 end = 4; +} + +/** + * Deleted and unsupported. + */ +message TokenGetNftInfosResponse { + /** + * The standard response information for queries.
+ * This includes the values requested in the `QueryHeader` + * (cost, state proof, both, or neither). + */ + ResponseHeader header = 1; + + /** + * A token identifier. + *

+ * This SHALL identify the token type to query.
+ * The identified token MUST exist, and MUST NOT be deleted. + * The identified token MUST be a non-fungible/unique type. + */ + TokenID tokenID = 2; + + /** + * A list of messages, each of which describes one NFT. + */ + repeated TokenNftInfo nfts = 3; +} diff --git a/proto/token_grant_kyc.proto b/proto/token_grant_kyc.proto new file mode 100644 index 000000000..eabf09bc7 --- /dev/null +++ b/proto/token_grant_kyc.proto @@ -0,0 +1,82 @@ +/** + * # Token Grant KYC + * Grant "KYC" status to an account with respect to a token. + * + * The "KYC' property is named for the "Know Your Customer" requirements in + * US federal regulations (FINRA 2090 and related US Code) that was subsequently + * incorporated into laws and regulations for many worldwide jurisdictions. + * The process requires a regulated financial entity to positively identify + * customers and certain other entities. + * + * This transaction enables a token administrator to track whether KYC + * requirements are met for a given account transacting in that token. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; + +/** + * Grant "Know Your Customer"(KYC) for one account for a single token. + * + * This transaction MUST be signed by the `kyc_key` for the token.
+ * The identified token MUST have a `kyc_key` set to a valid `Key` value.
+ * The token `kyc_key` MUST NOT be an empty `KeyList`.
+ * The identified token MUST exist and MUST NOT be deleted.
+ * The identified account MUST exist and MUST NOT be deleted.
+ * The identified account MUST have an association to the identified token.
+ * On success the association between the identified account and the identified + * token SHALL be marked as "KYC granted". + * + * ### Block Stream Effects + * None + */ +message TokenGrantKycTransactionBody { + /** + * A token identifier. + *

+ * The identified token SHALL grant "KYC" for the account + * identified by the `account` field.
+ * The identified token MUST be associated to the account identified + * by the `account` field. + */ + TokenID token = 1; + + /** + * An account identifier. + *

+ * The token identified by the `token` field SHALL grant "KYC" for the + * identified account.
+ * This account MUST be associated to the token identified + * by the `token` field. + */ + AccountID account = 2; +} diff --git a/proto/token_mint.proto b/proto/token_mint.proto new file mode 100644 index 000000000..981c73602 --- /dev/null +++ b/proto/token_mint.proto @@ -0,0 +1,98 @@ +/** + * # Token Mint + * Mint new tokens and deliver them to the token treasury. This is akin + * to how a fiat treasury will mint new coinage for circulation. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; + +/** + * Mint tokens and deliver the new tokens to the token treasury account. + * + * The token MUST have a `supply_key` set and that key MUST NOT + * be an empty `KeyList`.
+ * The token `supply_key` MUST sign this transaction.
+ * This operation SHALL increase the total supply for the token type by + * the number of tokens "minted".
+ * The total supply for the token type MUST NOT be increased above the + * maximum supply limit (2^63-1) by this transaction.
+ * The tokens minted SHALL be credited to the token treasury account.
+ * If the token is a fungible/common type, the amount MUST be specified.
+ * If the token is a non-fungible/unique type, the metadata bytes for each + * unique token MUST be specified in the `metadata` list.
+ * Each unique metadata MUST not exceed the global metadata size limit defined + * by the network configuration value `tokens.maxMetadataBytes`.
+ * The global batch size limit (`tokens.nfts.maxBatchSizeMint`) SHALL set + * the maximum number of individual NFT metadata permitted in a single + * `tokenMint` transaction. + * + * ### Block Stream Effects + * None + */ +message TokenMintTransactionBody { + /** + * A token identifier. + *

+ * This SHALL identify the token type to "mint".
+ * The identified token MUST exist, and MUST NOT be deleted. + */ + TokenID token = 1; + + /** + * An amount to mint to the Treasury Account. + *

+ * This is interpreted as an amount in the smallest possible denomination + * for the token (10-decimals whole tokens).
+ * The balance for the token treasury account SHALL receive the newly + * minted tokens.
+ * If this value is equal to zero (`0`), the token SHOULD be a + * non-fungible/unique type.
+ * If this value is non-zero, the token MUST be a fungible/common type. + */ + uint64 amount = 2; + + /** + * A list of metadata bytes.
+ *

+ * One non-fungible/unique token SHALL be minted for each entry + * in this list.
+ * Each entry in this list MUST NOT be larger than the limit set by the + * current network configuration value `tokens.maxMetadataBytes`.
+ * This list MUST NOT contain more entries than the current limit set by + * the network configuration value `tokens.nfts.maxBatchSizeMint`.
+ * If this list is not empty, the token MUST be a + * non-fungible/unique type.
+ * If this list is empty, the token MUST be a fungible/common type. + */ + repeated bytes metadata = 3; +} diff --git a/proto/token_pause.proto b/proto/token_pause.proto new file mode 100644 index 000000000..8b9742565 --- /dev/null +++ b/proto/token_pause.proto @@ -0,0 +1,63 @@ +/** + * # Token Pause + * A transaction to "pause" all activity for a token. While a token is paused + * it cannot be transferred between accounts by any transaction other than + * `rejectToken`. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; + +/** + * Pause transaction activity for a token. + * + * This transaction MUST be signed by the Token `pause_key`.
+ * The `token` identified MUST exist, and MUST NOT be deleted.
+ * The `token` identified MAY be paused; if the token is already paused, + * this transaction SHALL have no effect. + * The `token` identified MUST have a `pause_key` set, the `pause_key` MUST be + * a valid `Key`, and the `pause_key` MUST NOT be an empty `KeyList`.
+ * A `paused` token SHALL NOT be transferred or otherwise modified except to + * "up-pause" the token with `unpauseToken` or in a `rejectToken` transaction. + * + * ### Block Stream Effects + * None + */ +message TokenPauseTransactionBody { + /** + * A token identifier. + *

+ * The identified token SHALL be paused. Subsequent transactions + * involving that token SHALL fail until the token is "unpaused". + */ + TokenID token = 1; +} diff --git a/proto/token_reject.proto b/proto/token_reject.proto new file mode 100644 index 000000000..24f785ef3 --- /dev/null +++ b/proto/token_reject.proto @@ -0,0 +1,105 @@ +/** + * # Token Reject + * Messages used to implement a transaction to reject a token type from an + * account. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; + +/** + * Reject undesired token(s).
+ * Transfer one or more token balances held by the requesting account to the + * treasury for each token type. + * + * Each transfer SHALL be one of the following + * - A single non-fungible/unique token. + * - The full balance held for a fungible/common token. + * A single `tokenReject` transaction SHALL support a maximum + * of 10 transfers.
+ * A token that is `pause`d MUST NOT be rejected.
+ * If the `owner` account is `frozen` with respect to the identified token(s) + * the token(s) MUST NOT be rejected.
+ * The `payer` for this transaction, and `owner` if set, SHALL NOT be charged + * any custom fees or other fees beyond the `tokenReject` transaction fee. + * + * ### Block Stream Effects + * - Each successful transfer from `payer` to `treasury` SHALL be recorded in + * the `token_transfer_list` for the transaction record. + */ +message TokenRejectTransactionBody { + /** + * An account identifier.
+ * This OPTIONAL field identifies the account holding the + * tokens to be rejected. + *

+ * If set, this account MUST sign this transaction. + * If not set, the `payer` for this transaction SHALL be the effective + * `owner` for this transaction. + */ + AccountID owner = 1; + + /** + * A list of one or more token rejections. + *

+ * On success each rejected token serial number or balance SHALL be + * transferred from the requesting account to the treasury account for + * that token type.
+ * After rejection the requesting account SHALL continue to be associated + * with the token.
+ * If dissociation is desired then a separate `TokenDissociate` transaction + * MUST be submitted to remove the association.
+ * This list MUST contain at least one (1) entry and MUST NOT contain more + * than ten (10) entries. + */ + repeated TokenReference rejections = 2; +} + +/** + * A union token identifier. + * + * Identify a fungible/common token type, or a single + * non-fungible/unique token serial. + */ +message TokenReference { + oneof token_identifier { + /** + * A fungible/common token type. + */ + TokenID fungible_token = 1; + + /** + * A single specific serialized non-fungible/unique token. + */ + NftID nft = 2; + } +} diff --git a/proto/token_revoke_kyc.proto b/proto/token_revoke_kyc.proto new file mode 100644 index 000000000..e197b4a5b --- /dev/null +++ b/proto/token_revoke_kyc.proto @@ -0,0 +1,82 @@ +/** + * # Token Revoke KYC + * Revoke "KYC" status from an account with respect to a token. + * + * The "KYC' property is named for the "Know Your Customer" requirements in + * US federal regulations (FINRA 2090 and related US Code) that was subsequently + * incorporated into laws and regulations for many worldwide jurisdictions. + * The process requires a regulated financial entity to positively identify + * customers and certain other entities. + * + * This transaction enables a token administrator to track whether KYC + * requirements are met for a given account transacting in that token. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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; +// <<>> This comment is special code for setting PBJ Compiler java package + +import "basic_types.proto"; + +/** + * Revoke "Know Your Customer"(KYC) from one account for a single token. + * + * This transaction MUST be signed by the `kyc_key` for the token.
+ * The identified token MUST have a `kyc_key` set to a valid `Key` value.
+ * The token `kyc_key` MUST NOT be an empty `KeyList`.
+ * The identified token MUST exist and MUST NOT be deleted.
+ * The identified account MUST exist and MUST NOT be deleted.
+ * The identified account MUST have an association to the identified token.
+ * On success the association between the identified account and the identified + * token SHALL NOT be marked as "KYC granted". + * + * ### Block Stream Effects + * None + */ +message TokenRevokeKycTransactionBody { + /** + * A token identifier. + *

+ * The identified token SHALL revoke "KYC" for the account + * identified by the `account` field.
+ * The identified token MUST be associated to the account identified + * by the `account` field. + */ + TokenID token = 1; + + /** + * An account identifier. + *

+ * The token identified by the `token` field SHALL revoke "KYC" for the + * identified account.
+ * This account MUST be associated to the token identified + * by the `token` field. + */ + AccountID account = 2; +} diff --git a/proto/token_service.proto b/proto/token_service.proto new file mode 100644 index 000000000..a0a484ef9 --- /dev/null +++ b/proto/token_service.proto @@ -0,0 +1,235 @@ +/** + * # Token Service + * gRPC definitions for token service transactions. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package + +import "query.proto"; +import "response.proto"; +import "transaction_response.proto"; +import "transaction.proto"; + +/** + * Transactions and queries for the Token Service + */ +service TokenService { + // The following queries are permanently removed + // getAccountNftInfos, getTokenNftInfos + + /** + * Create a new token. + */ + rpc createToken (Transaction) returns (TransactionResponse); + + /** + * Update a token. + */ + rpc updateToken (Transaction) returns (TransactionResponse); + + /** + * Mint one or more tokens to the treasury account. + *

+ * This MAY specify a quantity of fungible/common tokens or + * a list of specific non-fungible/unique tokes, but + * MUST NOT specify both. + */ + rpc mintToken (Transaction) returns (TransactionResponse); + + /** + * Burn one or more tokens from the treasury account. + *

+ * This MAY specify a quantity of fungible/common tokens or + * a list of specific non-fungible/unique tokes, but + * MUST NOT specify both. + */ + rpc burnToken (Transaction) returns (TransactionResponse); + + /** + * Delete a token. + */ + rpc deleteToken (Transaction) returns (TransactionResponse); + + /** + * Wipe one or more tokens from an identified Account. + *

+ * This MAY specify a quantity of fungible/common tokens or + * a list of specific non-fungible/unique tokes, but + * MUST NOT specify both. + */ + rpc wipeTokenAccount (Transaction) returns (TransactionResponse); + + /** + * Freeze the transfer of tokens to or from an identified Account. + */ + rpc freezeTokenAccount (Transaction) returns (TransactionResponse); + + /** + * Unfreeze the transfer of tokens to or from an identified Account. + */ + rpc unfreezeTokenAccount (Transaction) returns (TransactionResponse); + + /** + * Assert that KYC requirements are met for a specific account with + * respect to a specific token. + */ + rpc grantKycToTokenAccount (Transaction) returns (TransactionResponse); + + /** + * Assert that KYC requirements are _not_ met for a specific account with + * respect to a specific token. + */ + rpc revokeKycFromTokenAccount (Transaction) returns (TransactionResponse); + + /** + * Associate one or more tokens to an account. + */ + rpc associateTokens (Transaction) returns (TransactionResponse); + + /** + * Dissociate one or more tokens from an account. + */ + rpc dissociateTokens (Transaction) returns (TransactionResponse); + + /** + * Update the custom fee schedule for a token. + */ + rpc updateTokenFeeSchedule (Transaction) returns (TransactionResponse); + + /** + * Retrieve the detail characteristics for a token. + *

+ * This query SHALL return information for the token type as a whole.
+ * This query SHALL NOT return information for individual tokens. + */ + rpc getTokenInfo (Query) returns (Response); + + /** + * Retrieve the metadata for a specific non-fungible/unique token.
+ * The NFT to query is identified by token identifier and serial number. + *

+ * This query SHALL return token metadata and, if an allowance is defined, + * the designated "spender" account for the queried NFT. + */ + rpc getTokenNftInfo (Query) returns (Response); + + /** + * Pause a token. + */ + rpc pauseToken (Transaction) returns (TransactionResponse); + + /** + * Unpause (resume) a token. + */ + rpc unpauseToken (Transaction) returns (TransactionResponse); + + /** + * Update multiple non-fungible/unique tokens (NFTs) in a collection.
+ * The NFTs are identified by token identifier and one or more + * serial numbers. + *

+ * This transaction SHALL update NFT metadata only.
+ * This transaction MUST be signed by the token `metadata_key`. + */ + rpc updateNfts (Transaction) returns (TransactionResponse); + + /** + * Reject one or more tokens. + *

+ * This transaction SHALL transfer the full balance of one or more tokens + * from the requesting account to the treasury for each token.
+ * This transfer SHALL NOT charge any custom fee or royalty defined for + * the token(s) to be rejected.
+ * ### Effects on success + *

    + *
  • If the rejected token is fungible/common, the requesting account + * SHALL have a balance of 0 for the rejected token.
    + * The treasury balance SHALL increase by the amount that the + * requesting account decreased.
  • + *
  • If the rejected token is non-fungible/unique the requesting + * account SHALL NOT hold the specific serialized token that + * is rejected.
    + * The treasury account SHALL hold each specific serialized token + * that was rejected.
  • + * + */ + rpc rejectToken (Transaction) returns (TransactionResponse); + + /** + * Airdrop one or more tokens to one or more accounts. + *

    + * This transaction SHALL distribute tokens from the balance of one or + * more sending account(s) to the balance of one or more + * recipient accounts.
    + * Accounts SHALL receive the tokens in one of four ways. + *

      + *
    • An account already associated to the token to be distributed + * SHALL receive the airdropped tokens immediately to the + * recipient account balance.
    • + *
    • An account with available automatic association slots SHALL + * be automatically associated to the token, and SHALL + * immediately receive the airdropped tokens to the recipient + * account balance.
    • + *
    • An account with "receiver signature required" set SHALL have + * a "Pending Airdrop" created and MUST claim that airdrop with + * a `claimAirdrop` transaction.
    • + *
    • An account with no available automatic association slots SHALL + * have a "Pending Airdrop" created and MUST claim that airdrop + * with a `claimAirdrop` transaction.
    • + *
    + * Any airdrop that completes immediately SHALL be irreversible.
    + * Any airdrop that results in a "Pending Airdrop" MAY be canceled via + * a `cancelAirdrop` transaction.
    + * All transfer fees (including custom fees and royalties), as well as + * the rent cost for the first auto-renewal period for any + * automatic-association slot occupied by the airdropped tokens, + * SHALL be charged to the account submitting this transaction. + */ + rpc airdropTokens (Transaction) returns (TransactionResponse); + + /** + * Cancel one or more pending airdrops. + *

    + * This transaction MUST be signed by _each_ account *sending* an + * airdrop to be canceled. + */ + rpc cancelAirdrop (Transaction) returns (TransactionResponse); + + /** + * Claim one or more pending airdrops. + *

    + * This transaction MUST be signed by _each_ account **receiving** + * an airdrop to be claimed.
    + * If a "Sender" lacks sufficient balance to fulfill the airdrop at + * the time the claim is made, that claim SHALL fail. + */ + rpc claimAirdrop (Transaction) returns (TransactionResponse); + +} diff --git a/proto/token_unfreeze_account.proto b/proto/token_unfreeze_account.proto new file mode 100644 index 000000000..0523cdf5d --- /dev/null +++ b/proto/token_unfreeze_account.proto @@ -0,0 +1,79 @@ +/** + * # Token Unfreeze + * Release a freeze on tokens of an identified type for an identified account. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; + +/** + * Resume transfers of a token type for an account.
    + * This releases previously frozen assets of one account with respect to + * one token type. Once unfrozen, that account can once again send or + * receive tokens of the identified type. + * + * The token MUST have a `freeze_key` set and that key MUST NOT + * be an empty `KeyList`.
    + * The token `freeze_key` MUST sign this transaction.
    + * The identified token MUST exist, MUST NOT be deleted, MUST NOT be paused, + * and MUST NOT be expired.
    + * The identified account MUST exist, MUST NOT be deleted, and + * MUST NOT be expired.
    + * If the identified account is not frozen with respect to the identified + * token, the transaction SHALL succeed, but no change SHALL be made.
    + * An association between the identified account and the identified + * token MUST exist. + * + * ### Block Stream Effects + * None + */ +message TokenUnfreezeAccountTransactionBody { + /** + * A token identifier. + *

    + * This SHALL identify the token type to "unfreeze".
    + * The identified token MUST exist, MUST NOT be deleted, and MUST be + * associated to the identified account. + */ + TokenID token = 1; + + /** + * An account identifier. + *

    + * This shall identify the account to "unfreeze".
    + * The identified account MUST exist, MUST NOT be deleted, MUST NOT be + * expired, and MUST be associated to the identified token.
    + * The identified account SHOULD be "frozen" with respect to the + * identified token. + */ + AccountID account = 2; +} diff --git a/proto/token_unpause.proto b/proto/token_unpause.proto new file mode 100644 index 000000000..c9727f5db --- /dev/null +++ b/proto/token_unpause.proto @@ -0,0 +1,63 @@ +/** + * # Token Un-Pause + * A transaction to "unpause" (i.e. resume) all activity for a token. While + * a token is "paused" it cannot be transferred between accounts by any + * transaction other than `rejectToken`. Once "unpaused", transactions involving + * that token may resume. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; + +/** + * Resume transaction activity for a token. + * + * This transaction MUST be signed by the Token `pause_key`.
    + * The `token` identified MUST exist, and MUST NOT be deleted.
    + * The `token` identified MAY not be paused; if the token is not paused, + * this transaction SHALL have no effect. + * The `token` identified MUST have a `pause_key` set, the `pause_key` MUST be + * a valid `Key`, and the `pause_key` MUST NOT be an empty `KeyList`.
    + * An `unpaused` token MAY be transferred or otherwise modified. + * + * ### Block Stream Effects + * None + */ +message TokenUnpauseTransactionBody { + /** + * A token identifier. + *

    + * The identified token SHALL be "unpaused". Subsequent transactions + * involving that token MAY succeed. + */ + TokenID token = 1; +} diff --git a/proto/token_update.proto b/proto/token_update.proto new file mode 100644 index 000000000..d6336c9a1 --- /dev/null +++ b/proto/token_update.proto @@ -0,0 +1,319 @@ +/** + * # Token Update + * Modify the characteristics of an existing token. Most changes require that + * the transaction be signed by an `admin_key`, and if that key is not valid + * the only change permitted is to extend the token expiration. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; +import "duration.proto"; +import "timestamp.proto"; +import "google/protobuf/wrappers.proto"; + +/** + * Update an existing token. + * + * This transaction SHALL NOT update any field that is not set.
    + * Most changes MUST be signed by the current `admin_key` of the token. If the + * token does not currently have a valid `admin_key`, then this transaction + * MUST NOT set any value other than `expiry` or a non-admin key.
    + * If the `treasury` is set to a new account, the new account MUST sign this + * transaction.
    + * If the `treasury` is set to a new account for a _non-fungible/unique_ token, + * The current treasury MUST NOT hold any tokens, or the network configuration + * property `tokens.nfts.useTreasuryWildcards` MUST be set. + * + * #### Requirements for Keys + * Any of the key values may be changed, even without an admin key, but the + * key to be changed MUST have an existing valid key assigned, and both the + * current key and the new key MUST sign the transaction.
    + * A key value MAY be set to an empty `KeyList`. In this case the existing + * key MUST sign this transaction, but the new value is not a valid key, and the + * update SHALL effectively remove the existing key. + * + * ### Block Stream Effects + * None + */ +message TokenUpdateTransactionBody { + /** + * A token identifier. + *

    + * This SHALL identify the token type to delete.
    + * The identified token MUST exist, and MUST NOT be deleted.
    + * If any field other than `expiry` is set, the identified token MUST + * have a valid `admin_key`. + */ + TokenID token = 1; + + /** + * A new symbol to use for the token. + *

    + * This value, if set, MUST NOT exceed 100 bytes when encoded as UTF-8.
    + * This value, if set, MUST NOT contain the Unicode NUL codepoint. + */ + string symbol = 2; + + /** + * A new name for the token.
    + * This is generally the "full name" displayed in wallet software. + *

    + * This value, if set, MUST NOT exceed 100 bytes when encoded as UTF-8.
    + * This value, if set, MUST NOT contain the Unicode NUL codepoint. + */ + string name = 3; + + /** + * A new treasury account identifier. + *

    + * If set, + * - The identified account SHALL be designated the "treasury" for the + * token, and all tokens "minted" SHALL be delivered to that account + * following this transaction.
    + * - The identified account MUST exist, MUST NOT be expired, MUST NOT be + * deleted, and SHOULD have a non-zero HBAR balance.
    + * - The identified account SHALL be associated to this token. + * - The full balance of this token held by the prior treasury account + * SHALL be transferred to the new treasury account, if the token type + * is fungible/common. + * - If the token type is non-fungible/unique, the previous treasury + * account MUST NOT hold any tokens of this type. + * - The new treasury account key MUST sign this transaction. + */ + AccountID treasury = 4; + + /** + * An Hedera key for token administration. + *

    + * This key, if set, SHALL have administrative authority for this token and + * MAY authorize token update and/or token delete transactions.
    + * If this key is set to an empty `KeyList`, this token SHALL be + * immutable thereafter, except for expiration and renewal.
    + * If set, this key MUST be a valid key or an empty `KeyList`.
    + * If set to a valid key, the previous key and new key MUST both + * sign this transaction. + */ + Key adminKey = 5; + + /** + * An Hedera key for managing account KYC. + *

    + * This key, if set, SHALL have KYC authority for this token and + * MAY authorize transactions to grant or revoke KYC for accounts.
    + * If this key is not set, or is an empty `KeyList`, KYC status for this + * token SHALL NOT be granted or revoked for any account.
    + * If this key is removed after granting KYC, those grants SHALL remain + * and cannot be revoked.
    + * If set, this key MUST be a valid key or an empty `KeyList`.
    + * If set to a valid key, the previous key and new key MUST both + * sign this transaction. + */ + Key kycKey = 6; + + /** + * An Hedera key for managing asset "freeze". + *

    + * This key, if set, SHALL have "freeze" authority for this token and + * MAY authorize transactions to freeze or unfreeze accounts + * with respect to this token.
    + * If this key is set to an empty `KeyList`, this token + * SHALL NOT be frozen or unfrozen for any account.
    + * If this key is removed after freezing accounts, those accounts + * SHALL remain frozen and cannot be unfrozen.
    + * If set, this key MUST be a valid key or an empty `KeyList`.
    + * If set to a valid key, the previous key and new key MUST both + * sign this transaction. + */ + Key freezeKey = 7; + + /** + * An Hedera key for wiping tokens from accounts. + *

    + * This key, if set, SHALL have "wipe" authority for this token and + * MAY authorize transactions to "wipe" any amount of this token from + * any account, effectively burning the tokens "wiped".
    + * If this key is set to an empty `KeyList`, it SHALL NOT be + * possible to "wipe" this token from an account.
    + * If set, this key MUST be a valid key or an empty `KeyList`.
    + * If set to a valid key, the previous key and new key MUST both + * sign this transaction. + */ + Key wipeKey = 8; + + /** + * An Hedera key for "minting" and "burning" tokens. + *

    + * This key, if set, MAY authorize transactions to "mint" new tokens to + * be delivered to the token treasury or "burn" tokens held by the + * token treasury.
    + * If this key is set to an empty `KeyList`, it SHALL NOT be + * possible to change the supply of tokens and neither "mint" nor "burn" + * transactions SHALL be permitted.
    + * If set, this key MUST be a valid key or an empty `KeyList`.
    + * If set to a valid key, the previous key and new key MUST both + * sign this transaction. + */ + Key supplyKey = 9; + + /** + * An identifier for the account to be charged renewal fees at the token's + * expiry to extend the lifetime of the token. + *

    + * If this value is set for the identified token, the token lifetime SHALL + * be extended by the _smallest_ of the following at expiration: + *

      + *
    • The current `autoRenewPeriod` duration.
    • + *
    • The maximum duration that this account has funds to purchase.
    • + *
    • The configured MAX_AUTORENEW_PERIOD at the time of automatic + * renewal.
    • + *
    + * If this account's HBAR balance is `0` when the token must be + * renewed, then the token SHALL be expired, and MAY be subsequently + * removed from state.
    + * If this value is set, the referenced account MUST sign this + * transaction. + *

    + *

    Note
    + * It is not currently possible to remove an automatic renewal account. + * Once set, it can only be replaced by a valid account. + *
    + */ + AccountID autoRenewAccount = 10; + + /** + * A duration between token automatic renewals.
    + * All entities in state may be charged "rent" occasionally (typically + * every 90 days) to prevent unnecessary growth of the ledger. This value + * sets the interval between such events for this token. + *

    + * If set, this value MUST be greater than the configured + * `MIN_AUTORENEW_PERIOD`.
    + * If set, this value MUST be less than the configured + * `MAX_AUTORENEW_PERIOD`. + */ + Duration autoRenewPeriod = 11; + + /** + * An expiration timestamp. + *

    + * If this value is set, the automatic renewal account is not set for the + * identified token, and token expiration is enabled in network + * configuration, this token SHALL expire when the consensus time exceeds + * this value, and MAY be subsequently removed from the network state.
    + * If `autoRenewAccount` is set or the `auto_renew_account_id` is set for + * the identified token, the token SHALL be subject to automatic renewal + * when the consensus time exceeds this value. + */ + Timestamp expiry = 12; + + /** + * A short description for this token. + *

    + * This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes` + * (default 100) bytes when encoded as UTF-8. + */ + google.protobuf.StringValue memo = 13; + + /** + * An Hedera key for managing the token custom fee schedule. + *

    + * This key, if set, MAY authorize transactions to modify the + * `custom_fees` for this token.
    + * If this key is set to an empty `KeyList`, the `custom_fees` + * for this token SHALL NOT be modified.
    + * If set, this key MUST be a valid key or an empty `KeyList`.
    + * If set to a valid key, the previous key and new key MUST both + * sign this transaction. + */ + Key fee_schedule_key = 14; + + /** + * An Hedera key for managing token "pause". + *

    + * This key, if set, SHALL have "pause" authority for this token and + * MAY authorize transactions to pause or unpause this token.
    + * If this key is set to an empty `KeyList`, this token + * SHALL NOT be paused or unpaused.
    + * If this key is removed while the token is paused, the token cannot + * be unpaused and SHALL remain paused.
    + * If set, this key MUST be a valid key or an empty `KeyList`.
    + * If set to a valid key, the previous key and new key MUST both + * sign this transaction. + */ + Key pause_key = 15; + + /** + * Token "Metadata". + *

    + * The value, if set, MUST NOT exceed 100 bytes.
    + *

    Examples
    + *
    hcs://1/0.0.4896575
    + *
    ipfs://bafkreifd7tcjjuwxxf4qkaibkj62pj4mhfuud7plwrc3pfoygt55al6syi
    + *
    + */ + google.protobuf.BytesValue metadata = 16; + + /** + * An Hedera key for managing the token `metadata`. + *

    + * This key, if set, MAY authorize transactions to modify the + * `metadata` for this token.
    + * If this key is set to an empty `KeyList`, the `metadata` + * for this token SHALL NOT be modified.
    + * If set, this key MUST be a valid key or an empty `KeyList`.
    + * If set to a valid key, the previous key and new key MUST both + * sign this transaction. + */ + Key metadata_key = 17; + + /** + * Set a key validation mode.
    + * Any key may be updated by a transaction signed by the token `admin_key`. + * Each role key may _also_ sign a transaction to update that key. + * If a role key signs an update to change that role key both old + * and new key must sign the transaction, _unless_ this field is set + * to `NO_VALIDATION`, in which case the _new_ key is not required to + * sign the transaction (the existing key is still required).
    + * The primary intent for this field is to allow a role key (e.g. a + * `pause_key`) holder to "remove" that key from the token by signing + * a transaction to set that role key to an empty `KeyList`. + *

    + * If set to `FULL_VALIDATION`, either the `admin_key` or _both_ current + * and new key MUST sign this transaction to update a "key" field for the + * identified token.
    + * If set to `NO_VALIDATION`, either the `admin_key` or the current + * key MUST sign this transaction to update a "key" field for the + * identified token.
    + * This field SHALL be treated as `FULL_VALIDATION` if not set. + */ + TokenKeyValidation key_verification_mode = 18; +} diff --git a/proto/token_update_nfts.proto b/proto/token_update_nfts.proto new file mode 100644 index 000000000..1190a78e5 --- /dev/null +++ b/proto/token_update_nfts.proto @@ -0,0 +1,82 @@ +/** + * # Token Update NFTs + * Given a token identifier and a metadata block, change the metadata for + * one or more non-fungible/unique token instances. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; +import "google/protobuf/wrappers.proto"; + +/** + * Modify the metadata field for an individual non-fungible/unique token (NFT). + * + * Updating the metadata of an NFT SHALL NOT affect ownership or + * the ability to transfer that NFT.
    + * This transaction SHALL affect only the specific serial numbered tokens + * identified. + * This transaction SHALL modify individual token metadata.
    + * This transaction MUST be signed by the token `metadata_key`.
    + * The token `metadata_key` MUST be a valid `Key`.
    + * The token `metadata_key` MUST NOT be an empty `KeyList`. + * + * ### Block Stream Effects + * None + */ +message TokenUpdateNftsTransactionBody { + /** + * A token identifier.
    + * This is the token type (i.e. collection) for which to update NFTs. + *

    + * This field is REQUIRED.
    + * The identified token MUST exist, MUST NOT be paused, MUST have the type + * non-fungible/unique, and MUST have a valid `metadata_key`. + */ + TokenID token = 1; + + /** + * A list of serial numbers to be updated. + *

    + * This field is REQUIRED.
    + * This list MUST have at least one(1) entry.
    + * This list MUST NOT have more than ten(10) entries. + */ + repeated int64 serial_numbers = 2; + + /** + * A new value for the metadata. + *

    + * If this field is not set, the metadata SHALL NOT change.
    + * This value, if set, MUST NOT exceed 100 bytes. + */ + google.protobuf.BytesValue metadata = 3; +} diff --git a/proto/token_wipe_account.proto b/proto/token_wipe_account.proto new file mode 100644 index 000000000..16e3ac6f7 --- /dev/null +++ b/proto/token_wipe_account.proto @@ -0,0 +1,124 @@ +/** + * # Token Wipe Account + * Administratively burn tokens owned by a single, non-treasury, account. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; + +/** + * Wipe (administratively burn) tokens held by a non-treasury account.
    + * On success, the requested tokens will be removed from the identified account + * and the token supply will be reduced by the amount "wiped". + * + * This transaction MUST be signed by the token `wipe_key`.
    + * The identified token MUST exist, MUST NOT be deleted, + * and MUST NOT be paused.
    + * The identified token MUST have a valid `Key` set for the `wipe_key` field, + * and that key MUST NOT be an empty `KeyList`.
    + * The identified account MUST exist, MUST NOT be deleted, MUST be + * associated to the identified token, MUST NOT be frozen for the identified + * token, MUST NOT be the token `treasury`, and MUST hold a balance for the + * token or the specific serial numbers provided.
    + * This transaction SHOULD provide a value for `amount` or `serialNumbers`, + * but MUST NOT set both fields. + * + * ### Block Stream Effects + * The new total supply for the wiped token type SHALL be recorded. + */ +message TokenWipeAccountTransactionBody { + /** + * A token identifier. + *

    + * This field is REQUIRED.
    + * The identified token MUST exist, MUST NOT be paused, MUST NOT be + * deleted, and MUST NOT be expired. + */ + TokenID token = 1; + + /** + * An account identifier.
    + * This identifies the account from which tokens will be wiped. + *

    + * This field is REQUIRED.
    + * The identified account MUST NOT be deleted or expired.
    + * If the identified token `kyc_key` is set to a valid key, the + * identified account MUST have "KYC" granted.
    + * The identified account MUST NOT be the `treasury` account for the + * identified token. + */ + AccountID account = 2; + + /** + * An amount of fungible/common tokens to wipe. + *

    + * If the identified token is a non-fungible/unique token type, + * this value MUST be exactly zero(`0`).
    + * If the identified token type is fungible/common: + *

      + *
    • This value SHALL be specified in units of the smallest + * denomination possible for the identified token + * (10-decimals whole tokens).
    • + *
    • This value MUST be strictly less than `Long.MAX_VALUE`.
    • + *
    • This value MUST be less than or equal to the current total + * supply for the identified token.
    • + *
    • This value MUST be less than or equal to the current balance + * held by the identified account.
    • + *
    • This value MAY be zero(`0`).
    • + *
    + */ + uint64 amount = 3; + + /** + * A list of serial numbers to wipe.
    + * The non-fungible/unique tokens with these serial numbers will be + * destroyed and cannot be recovered or reused. + *

    + * If the identified token type is a fungible/common type, this + * list MUST be empty.
    + * If the identified token type is non-fungible/unique: + *

      + *
    • This list MUST contain at least one entry if the identified token + * type is non-fungible/unique.>/li> + *
    • This list MUST NOT contain more entries than the current total + * supply for the identified token.
    • + *
    • Every entry in this list MUST be a valid serial number for the + * identified token (i.e. "collection").
    • + *
    • Every entry in this list MUST be owned by the + * identified account
    • + *
    • + *
    + * This list MUST NOT contain more entries than the network configuration + * value for batch size limit, typically ten(`10`). + */ + repeated int64 serialNumbers = 4; +} diff --git a/proto/transaction.proto b/proto/transaction.proto new file mode 100644 index 000000000..e90e4c9e5 --- /dev/null +++ b/proto/transaction.proto @@ -0,0 +1,686 @@ +/** + * # Transaction + * A (mostly legacy) wrapper around the bytes of a + * serialized `SignedTransaction` message. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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 "basic_types.proto"; + +import "system_delete.proto"; +import "system_undelete.proto"; +import "freeze.proto"; + +import "contract_call.proto"; +import "contract_create.proto"; +import "contract_update.proto"; + +import "crypto_add_live_hash.proto"; +import "crypto_create.proto"; +import "crypto_delete.proto"; +import "crypto_delete_live_hash.proto"; +import "crypto_transfer.proto"; +import "crypto_update.proto"; +import "crypto_approve_allowance.proto"; +import "crypto_delete_allowance.proto"; + +import "ethereum_transaction.proto"; + +import "file_append.proto"; +import "file_create.proto"; +import "file_delete.proto"; +import "file_update.proto"; + +import "duration.proto"; +import "contract_delete.proto"; + +import "consensus_create_topic.proto"; +import "consensus_update_topic.proto"; +import "consensus_delete_topic.proto"; +import "consensus_submit_message.proto"; + +import "unchecked_submit.proto"; + +import "token_create.proto"; +import "token_freeze_account.proto"; +import "token_unfreeze_account.proto"; +import "token_grant_kyc.proto"; +import "token_revoke_kyc.proto"; +import "token_delete.proto"; +import "token_update.proto"; +import "token_mint.proto"; +import "token_burn.proto"; +import "token_wipe_account.proto"; +import "token_associate.proto"; +import "token_dissociate.proto"; +import "token_fee_schedule_update.proto"; +import "token_pause.proto"; +import "token_unpause.proto"; +import "token_update_nfts.proto"; +import "token_reject.proto"; +import "token_airdrop.proto"; +import "token_cancel_airdrop.proto"; +import "token_claim_airdrop.proto"; + +import "schedule_create.proto"; +import "schedule_delete.proto"; +import "schedule_sign.proto"; + +import "node_stake_update.proto"; +import "util_prng.proto"; + +import "node_create.proto"; +import "node_update.proto"; +import "node_delete.proto"; + +import "custom_fees.proto"; +import "event/state_signature_transaction.proto"; +import "auxiliary/hints/hints_key_publication.proto"; +import "auxiliary/hints/hints_preprocessing_vote.proto"; +import "auxiliary/hints/hints_partial_signature.proto"; +import "auxiliary/hints/crs_publication.proto"; + +import "auxiliary/history/history_proof_signature.proto"; +import "auxiliary/history/history_proof_key_publication.proto"; +import "auxiliary/history/history_proof_vote.proto"; + +/** + * A wrapper around signed transaction bytes.
    + * This was originally a transaction with body, signatures, and/or bytes, + * but is not only a wrapper around a byte array containing signed transction + * bytes. + * + * The `signedTransactionBytes` field is REQUIRED and MUST contain a valid, + * serialized, `SignedTransaction` message.
    + * All other fields are deprecated and MUST NOT be set. + * + * #### Additional Notes + * The four deprecated fields will be removed and reserved in a future release. + */ +message Transaction { + // <<>> This comment is special code for setting PBJ Compiler java package + /** + * Replaced with `signedTransactionBytes`.
    + * The body of the transaction. + */ + TransactionBody body = 1 [deprecated = true]; + + /** + * Replaced with `signedTransactionBytes`.
    + * The signatures on the body. + */ + SignatureList sigs = 2 [deprecated = true]; + + /** + * Replaced with `signedTransactionBytes`.
    + * The signatures on the body with a newer format. + */ + SignatureMap sigMap = 3 [deprecated = true]; + + /** + * Replaced with `signedTransactionBytes`.
    + * TransactionBody serialized into bytes. + */ + bytes bodyBytes = 4 [deprecated = true]; + + /** + * A valid, serialized, `SignedTransaction` message. + *

    + * This field MUST be present. + * This field MUST NOT exceed the current network transaction size limit + * (currently 6144 bytes). + */ + bytes signedTransactionBytes = 5; +} + +/** + * A transaction body. + * + * Every transaction is structured as a signed byte array. That byte array + * is a serialized `TransactionBody`. The transaction body contains the full + * content of the transaction, while the `SignedTransaction` includes a + * signature map for signatures authenticating that byte array, and that is + * serialized and transmitted wrapped in a `Transaction` message.
    + * The bulk of this message is a `oneof` block which offers the option for + * any one of the transaction messages for the network. + * This message also includes several additional fields to specify + * various parameters required to process a transaction. + */ +message TransactionBody { + // <<>> This comment is special code for setting PBJ Compiler java package + reserved 30, 61, 62, 63, 64; + + reserved "tssMessage", "tssVote", "tssShareSignature", "tssEncryptionKey"; + + /** + * A transaction identifier.
    + * Each transaction is uniquely identified by its transaction + * identifier. + *

    + * Each transaction identifier MUST be unique.
    + * Multiple transactions MAY be submitted with the same transaction + * identifier, but all except the first SHALL be rejected as duplicate + * transactions.
    + * This identifier MUST specify a `payer` account to be charged + * all fees associated with the transaction.
    + * This identifier MUST specify a "valid start time".
    + * The "valid start time" MUST be strictly _earlier_ than the current + * network consensus time.
    + * The "valid start time" MUST NOT be more than the current network + * configuration value for `transaction.maxValidDuration` seconds + * before the current network consensus time.
    + * This identifier MUST NOT set the `scheduled` flag.
    + * This identifier MUST NOT set a nonce value. + */ + TransactionID transactionID = 1; + + /** + * A node account identifier. + *

    + * This MUST identify the account of the consensus node to which + * this transaction is submitted. + */ + AccountID nodeAccountID = 2; + + /** + * A maximum transaction fee, in tinybar. + *

    + * The network SHALL NOT charge a transaction fee that exceeds this + * amount.
    + * The network MAY charge up to this amount, and reject the transaction, + * if the amount offered is insufficient to cover the required fees.
    + * The network MAY charge a minimum fee equal to 80% of the amount offered + * if the amount offered is much larger than the required fees. + */ + uint64 transactionFee = 3; + + /** + * A maximum duration in which to execute this transaction. + *

    + * This transaction SHALL be rejected as expired if the valid start time, + * extended by this duration, is less than the current network consensus + * time when the transaction is submitted.
    + * This transaction SHALL be rejected with an invalid duration if this + * value is greater than the current network configuration value for + * `transaction.maxValidDuration`. + */ + Duration transactionValidDuration = 4; + + /** + * Records are always generated.
    + * Obsolete option to not generate a record. + *

    + * This flag SHALL be ignored. Every transaction SHALL generate a record, + * or block stream equivalent. + */ + bool generateRecord = 5 [deprecated = true]; + + /** + * A short description for this transaction. + *

    + * This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes` + * (default 100) bytes when encoded as UTF-8. + */ + string memo = 6; + + /** + * The public key of the trusted batch assembler. + */ + Key batch_key = 73; + + // The fields here are ordered in strictly ascending field ordinal + // order due to limitations in PBJ. + oneof data { + /** + * Call a function defined on a smart contract. + */ + ContractCallTransactionBody contractCall = 7; + + /** + * Create a smart contract. + */ + ContractCreateTransactionBody contractCreateInstance = 8; + + /** + * Update a smart contract. + */ + ContractUpdateTransactionBody contractUpdateInstance = 9; + + /** + * An obsolete, and unsupported, operation to add a "live hash" to + * an account. + */ + CryptoAddLiveHashTransactionBody cryptoAddLiveHash = 10 [deprecated = true]; + + /** + * Create a new Hedera account. + */ + CryptoCreateTransactionBody cryptoCreateAccount = 11; + + /** + * Delete an Hedera account.
    + * This will mark the account as deleted, and transfer all remaining + * HBAR to a receiver account. + */ + CryptoDeleteTransactionBody cryptoDelete = 12; + + /** + * An obsolete, and unsupported, operation to remove a "live hash" from + * an account. + */ + CryptoDeleteLiveHashTransactionBody cryptoDeleteLiveHash = 13 [deprecated = true]; + + /** + * Transfer HBAR between accounts. + */ + CryptoTransferTransactionBody cryptoTransfer = 14; + + /** + * Modify an Hedera account. + */ + CryptoUpdateTransactionBody cryptoUpdateAccount = 15; + + /** + * Append data to the end of a file. + */ + FileAppendTransactionBody fileAppend = 16; + + /** + * Create a new file. + */ + FileCreateTransactionBody fileCreate = 17; + + /** + * Delete a file.
    + * This will remove the content of the file, and mark the file as + * deleted. + */ + FileDeleteTransactionBody fileDelete = 18; + + /** + * Modify a file.
    + * This may modify any metadata, and/or _replace_ the content. + */ + FileUpdateTransactionBody fileUpdate = 19; + + /** + * Delete a file as an Hedera administrative function.
    + * This is a privileged operation. + */ + SystemDeleteTransactionBody systemDelete = 20; + + /** + * Restore a file deleted via `systemDelete`.
    + * This is a privileged operation. + */ + SystemUndeleteTransactionBody systemUndelete = 21; + + /** + * Delete a smart contract and transfer remaining balance + * to a specified account. + */ + ContractDeleteTransactionBody contractDeleteInstance = 22; + + /** + * Freeze the network.
    + * This is actually several possible operations, and the caller + * should examine the "freeze service" for more detail.
    + * This is a privileged operation. + */ + FreezeTransactionBody freeze = 23; + + /** + * Create a topic. + */ + ConsensusCreateTopicTransactionBody consensusCreateTopic = 24; + + /** + * Update a topic. + */ + ConsensusUpdateTopicTransactionBody consensusUpdateTopic = 25; + + /** + * Delete a topic. + */ + ConsensusDeleteTopicTransactionBody consensusDeleteTopic = 26; + + /** + * Submit a message to a topic.
    + * A message may be "chunked", and submitted in parts, if the total + * message size exceeds the limit for a single transaction. + */ + ConsensusSubmitMessageTransactionBody consensusSubmitMessage = 27; + + /** + * Unsupported system transaction. + *

    + * This transaction MAY be implemented in testing networks, but + * SHALL NOT be enabled or supported in production environments.
    + * Clients MUST NOT call this method, and any such transaction SHALL + * be rejected.
    + * A network MAY choose to charge punitive fees for attempting to + * execute an `uncheckedSubmit`. + */ + UncheckedSubmitBody uncheckedSubmit = 28; + + /** + * Create a new Hedera token. + */ + TokenCreateTransactionBody tokenCreation = 29; + + /** + * Freeze an account with respect to a token.
    + * A frozen account cannot transact in that token until unfrozen. + */ + TokenFreezeAccountTransactionBody tokenFreeze = 31; + + /** + * Unfreeze an account with respect to a token. + */ + TokenUnfreezeAccountTransactionBody tokenUnfreeze = 32; + + /** + * Grant KYC to an account with respect to a token.
    + * KYC is generally a "know your customer" assertion that a + * responsible entity has sufficient information to positively + * identify the account holder to relevant authorities. + */ + TokenGrantKycTransactionBody tokenGrantKyc = 33; + + /** + * Revoke KYC from an account with respect to a token. + */ + TokenRevokeKycTransactionBody tokenRevokeKyc = 34; + + /** + * Delete an Hedera token.
    + * The token will be marked deleted. + */ + TokenDeleteTransactionBody tokenDeletion = 35; + + /** + * Update an Hedera token.
    + * Depending on what fields are to be modified, the signature + * requirements will vary. See `TokenUpdateTransactionBody` for + * further detail. + */ + TokenUpdateTransactionBody tokenUpdate = 36; + + /** + * Mint new tokens.
    + * All minted tokens will be delivered to the treasury account for + * the token type. The "mint key" for the token must sign this + * transaction. + */ + TokenMintTransactionBody tokenMint = 37; + + /** + * Burn tokens from the treasury account.
    + * The "burn key" for the token must sign this transaction. + */ + TokenBurnTransactionBody tokenBurn = 38; + + /** + * Wipe tokens from an account.
    + * This will remove a specified amount of fungible/common tokens or + * a specified list of non-fungible/unique serial numbered tokens + * of a given token type from an Hedera account. The removed tokens + * are _burned_ as if by a `tokenBurn` transaction.
    + * The "wipe key" for the token must sign this transaction. + */ + TokenWipeAccountTransactionBody tokenWipe = 39; + + /** + * Associate tokens to an account. + */ + TokenAssociateTransactionBody tokenAssociate = 40; + + /** + * Dissociate tokens from an account. + */ + TokenDissociateTransactionBody tokenDissociate = 41; + + /** + * Create a schedule.
    + * A schedule is a request to execute a specific transaction, included + * in the create body, in the future. The scheduled transaction may + * execute as soon as all signature requirements are met with the + * schedule create or a subsequent schedule sign transaction. + * A schedule may, alternatively, execute on expiration if + * long-term schedules are enabled and the schedule meets signature + * requirements at that time. + */ + ScheduleCreateTransactionBody scheduleCreate = 42; + + /** + * Delete a schedule.
    + * The schedule will be marked as deleted. + */ + ScheduleDeleteTransactionBody scheduleDelete = 43; + + /** + * Sign a schedule.
    + * Add one or more cryptographic keys to the list of keys that have + * signed a schedule, and which may serve to meet the signature + * requirements for the scheduled transaction. + */ + ScheduleSignTransactionBody scheduleSign = 44; + + /** + * Update the custom fee schedule for a token.
    + * This transaction must be signed by the "fee schedule key" + * for the token. + */ + TokenFeeScheduleUpdateTransactionBody token_fee_schedule_update = 45; + + /** + * Pause a Token. + *

    + * This transaction MUST be signed by the "pause key" for the token. + */ + TokenPauseTransactionBody token_pause = 46; + + /** + * Unpause a Token. + *

    + * This transaction MUST be signed by the "pause key" for the token. + */ + TokenUnpauseTransactionBody token_unpause = 47; + + /** + * Add one or more approved allowances for spenders to transfer the + * paying account's hbar or tokens. + */ + CryptoApproveAllowanceTransactionBody cryptoApproveAllowance = 48; + + /** + * Delete one or more approvals for spenders to transfer the + * paying account's hbar or tokens. + */ + CryptoDeleteAllowanceTransactionBody cryptoDeleteAllowance = 49; + + /** + * Perform an Ethereum encoded transaction. + */ + EthereumTransactionBody ethereumTransaction = 50; + + /** + * Update the staking information.
    + * This internal transaction is performed at the end of a staking + * period to complete staking calculations and indicate that new + * staking period has started. + */ + NodeStakeUpdateTransactionBody node_stake_update = 51; + + /** + * Provide a deterministic pseudorandom number based on network state. + */ + UtilPrngTransactionBody util_prng = 52; + + /** + * Update one or more non-fungible/unique tokens.
    + * This will update metadata for one or more serial numbers within + * a collection (token type). + */ + TokenUpdateNftsTransactionBody token_update_nfts = 53; + + /** + * Create a new node in the network address book.
    + * This is a privileged operation. + *

    + * This transaction SHALL create a new consensus node record and add + * that record to the network address book. + */ + com.hedera.hapi.node.addressbook.NodeCreateTransactionBody nodeCreate = 54; + + /** + * Update a node in the network address book.
    + * This is a privileged operation. + *

    + * This transaction SHALL update an existing consensus node record in + * the network address book. + */ + com.hedera.hapi.node.addressbook.NodeUpdateTransactionBody nodeUpdate = 55; + + /** + * Delete a node from the network address book.
    + * This is a privileged operation. + *

    + * This transaction SHALL mark an existing consensus node record as + * deleted and remove that node from the network address book. + */ + com.hedera.hapi.node.addressbook.NodeDeleteTransactionBody nodeDelete = 56; + + /** + * Reject and return a token to treasury.
    + * This transaction will transfer one or more tokens or token + * balances held by the requesting account to the treasury + * for each token type. + *

    + * Each transfer MUST be one of the following: + *

      + *
    • A single non-fungible/unique token.
    • + *
    • The full balance held for a fungible/common + * token type.
    • + *
    + * When complete, the requesting account SHALL NOT hold the + * rejected tokens.
    + * Custom fees and royalties defined for the tokens rejected + * SHALL NOT be charged for this transaction. + */ + TokenRejectTransactionBody tokenReject = 57; + + /** + * "Airdrop" tokens.
    + * This transaction sends tokens from one or more "sender" accounts + * to one or more "recipient" accounts. + *

    + * If a recipient account cannot immediately receive the token(s) sent, + * a "pending" airdrop SHALL be created and MUST be claimed. + */ + TokenAirdropTransactionBody tokenAirdrop = 58; + + /** + * Cancel one or more "pending" airdrops that are not yet claimed. + */ + TokenCancelAirdropTransactionBody tokenCancelAirdrop = 59; + + /** + * Claim one or more "pending" airdrops. + */ + TokenClaimAirdropTransactionBody tokenClaimAirdrop = 60; + + /** + * A transaction body for signature of a state root hash gossiped to other nodes + */ + com.hedera.hapi.platform.event.StateSignatureTransaction state_signature_transaction = 65; + + /** + * A transaction body for voting on hinTS aggregation keys. + */ + com.hedera.hapi.services.auxiliary.hints.HintsPreprocessingVoteTransactionBody hints_preprocessing_vote = 66; + + /** + * A transaction body for publishing a node's hintTS key. + */ + com.hedera.hapi.services.auxiliary.hints.HintsKeyPublicationTransactionBody hints_key_publication = 67; + + /** + * A transaction body for broadcasting a node's hintTS partial signature on a message. + */ + com.hedera.hapi.services.auxiliary.hints.HintsPartialSignatureTransactionBody hints_partial_signature = 68; + + /** + * A transaction body for contributed a signature with a node's proof key to a history proof. + */ + com.hedera.hapi.services.auxiliary.history.HistoryProofSignatureTransactionBody history_proof_signature = 69; + + /** + * A transaction body for publishing a node's metadata proof key. + */ + com.hedera.hapi.services.auxiliary.history.HistoryProofKeyPublicationTransactionBody history_proof_key_publication = 70; + + /** + * A transaction body for voting on a metadata proof descending from the ledger id. + */ + com.hedera.hapi.services.auxiliary.history.HistoryProofVoteTransactionBody history_proof_vote = 71; + + /** + * A transaction body for broadcasting a node's crs publication + */ + com.hedera.hapi.services.auxiliary.hints.CrsPublicationTransactionBody crs_publication = 72; + + /** + * A transaction body for handling a set of transactions atomically. + */ + AtomicBatchTransactionBody atomic_batch = 74; + } + + /** + * A list of maximum custom fees that the users are willing to pay. + *

    + * This field is OPTIONAL.
    + * If left empty, the users are accepting to pay any custom fee.
    + * If used with a transaction type that does not support custom fee limits, the transaction will fail. + */ + repeated CustomFeeLimit max_custom_fees = 1001; +} + +/** + * A transaction body for handling a set of transactions atomically. + */ +message AtomicBatchTransactionBody { + // <<>> This comment is special code for setting PBJ Compiler java package + /** + * A list of signed bytes that represent the batch transactions. + */ + repeated bytes transactions = 1; +} diff --git a/proto/transaction_contents.proto b/proto/transaction_contents.proto new file mode 100644 index 000000000..0bc03e26a --- /dev/null +++ b/proto/transaction_contents.proto @@ -0,0 +1,65 @@ +/** + * # Transaction Contents + * The Signed Transaction message which forms the content of a transaction + * `signedTransactionBytes`. This message is the result of several changes + * to transaction message structure over time. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; + +/** + * A combination transaction bytes and a map of signatures.
    + * This message contains a serialized `TransactionBody` in a byte array + * and a `SignatureMap` that contains all of the signatures offered to + * authenticate the transaction. + * + * ### Block Stream Effects + * This content is recorded in the record stream exactly as received. + */ +message SignedTransaction { + /** + * A byte array containing a serialized `TransactionBody`. + *

    + * This content is what the signatures in `sigMap` MUST sign. + */ + bytes bodyBytes = 1; + + /** + * A set of cryptographic signatures. + *

    + * This set MUST contain all signatures required to authenticate + * and authorize the transaction.
    + * This set MAY contain additional signatures. + */ + SignatureMap sigMap = 2; +} diff --git a/proto/transaction_get_fast_record.proto b/proto/transaction_get_fast_record.proto new file mode 100644 index 000000000..08e262f6a --- /dev/null +++ b/proto/transaction_get_fast_record.proto @@ -0,0 +1,95 @@ +/** + * # Get Fast Record + * Get a recent transaction record "fast". + * + * > Important + * >> This query is obsolete and not supported.
    + * >> Any query of this type that is submitted SHALL fail with a `PRE_CHECK` + * >> result of `NOT_SUPPORTED`. + * + * > Implementation Note + * >> This query is _defined_ for "Crypto" service, but is _implemented_ by + * >> the "Network Admin" service. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "transaction_record.proto"; +import "basic_types.proto"; +import "query_header.proto"; +import "response_header.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 { + option deprecated = true; + /** + * Standard information sent with every query operation.
    + * This includes the signed payment and what kind of response is requested + * (cost, state proof, both, or neither). + */ + QueryHeader header = 1; + + /** + * The ID of the transaction for which the record is requested. + */ + TransactionID transactionID = 2; +} + +/** + * 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 { + option deprecated = true; + /** + * The standard response information for queries.
    + * This includes the values requested in the `QueryHeader` + * (cost, state proof, both, or neither). + */ + ResponseHeader header = 1; + + /** + * The requested transaction records + */ + TransactionRecord transactionRecord = 2; +} diff --git a/proto/transaction_get_receipt.proto b/proto/transaction_get_receipt.proto new file mode 100644 index 000000000..44000f2a1 --- /dev/null +++ b/proto/transaction_get_receipt.proto @@ -0,0 +1,199 @@ +/** + * # Get Transaction Receipt + * This query is central to client interactions. A client must query + * the network for the "receipt" after a transaction is submitted to know + * whether the transaction succeeded and the consensus result. + * + * > Implementation Note + * >> This query is _defined_ for "Crypto" service, but is _implemented_ by + * >> the "Network Admin" service. + * + * > Note + * >> The mechanism for transaction receipts and results is subject to + * >> considerable change in the near future. Clients heavily dependent + * >> on direct network queries for transaction receipts may consider + * >> changes needed to query a mirror node for transaction receipts + * >> and results instead. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "transaction_receipt.proto"; +import "basic_types.proto"; +import "query_header.proto"; +import "response_header.proto"; + +/** + * A query to retrieve a transaction receipt. + * This query retrieves the post-consensus (final) result of a transaction. + * A transaction receipt may not be available if queried too early + * (less than 5-10 seconds), or too late (more than 3 minutes). If a receipt + * is available, it contains basic transaction results. A query to a mirror + * node (or other archival system) is required to obtain full detail for a + * transaction, or any result after the basic receipt time period. + * + * This query is "free". The payment field in the header MUST be empty.
    + * If a receipt is not available, the response SHALL be `UNKNOWN`.
    + * A transaction receipt SHALL be available after the network reaches + * consensus for a transaction.
    + * A transaction receipt SHALL NOT be available after the end of the network + * configured "receipt period", typically three(3) minutes. + * + *

    + *
    What is the "first" transaction?
    + *
    The "first" transaction SHALL be the the transaction with + * the earliest consensus time and a status that is neither + * `INVALID_NODE_ACCOUNT` nor `INVALID_PAYER_SIGNATURE`.
    + * If no transaction is found meeting this status criteria, the + * "first" transaction SHALL be the transaction with the earliest + * consensus time.
    + *
    What is a "child" transaction?
    + *
    A "child" transaction is any transaction created in the process of + * completing another transaction. These are most common with a smart + * contract call, where a call to a contract may initiate one or more + * additional transactions to complete a complex process.
    + *
    + */ +message TransactionGetReceiptQuery { + /** + * Standard information sent with every query operation.
    + * This includes the signed payment and what kind of response is requested + * (cost, state proof, both, or neither). + */ + QueryHeader header = 1; + + /** + * A transaction identifier. + *

    + * This MUST contain the full identifier, as submitted, for the + * transaction to query. + */ + TransactionID transactionID = 2; + + /** + * A flag to request duplicates. + *

    + * If set, every transaction receipt within the receipt period that + * matches the requested transaction identifier SHALL be returned.
    + * If not set, duplicate transactions SHALL NOT be returned.
    + * If not set, only the receipt for the first matching transaction to + * reach consensus SHALL be returned. + */ + bool includeDuplicates = 3; + + /** + * A flag to request "child" receipts. + *

    + * If set, the response SHALL include receipts for each child transaction + * executed as part of the requested parent transaction.
    + * If not set, the response SHALL NOT include any receipts for child + * transactions. + */ + bool include_child_receipts = 4; +} + +/** + * Response message for a `getTransactionReceipts` query. + * + * The `receipt` field SHALL return the receipt for the "first" transaction + * that matches the transaction identifier requested.
    + * If receipts for duplicate transactions are requested, those duplicate + * receipts SHALL be present in the `duplicateTransactionReceipts` list.
    + * If receipts for child transactions are requested, those child receipts + * SHALL be present in the `child_transaction_receipts` list.
    + * A state proof SHALL NOT be provided for this response; transaction receipts + * are not retained in network state. + * + *

    + *
    What is the "first" transaction?
    + *
    The "first" transaction receipt SHALL be the receipt for the + * first transaction with status that is neither + * `INVALID_NODE_ACCOUNT` nor `INVALID_PAYER_SIGNATURE`.
    + * If no transaction is found meeting the status criteria, the + * "first" transaction SHALL be the first transaction by + * consensus time.
    + *
    What is a "child" transaction?
    + *
    A "child" transaction is any transaction created in the process of + * completing another transaction. These are most common with a smart + * contract call, where a call to a contract may initiate one or more + * additional transactions to complete a complex process.
    + *
    + */ +message TransactionGetReceiptResponse { + /** + * The standard response information for queries.
    + * This includes the values requested in the `QueryHeader` + * (cost, state proof, both, or neither). + */ + ResponseHeader header = 1; + + /** + * A transaction receipt. + *

    + * This SHALL be the receipt for the "first" transaction that matches + * the transaction identifier requested.
    + * If the identified transaction has not reached consensus, this receipt + * SHALL have a `status` of `UNKNOWN`.
    + * If the identified transaction reached consensus prior to the current + * configured receipt period (typically the last 180 seconds), this receipt + * SHALL have a `status` of `UNKNOWN`. + */ + TransactionReceipt receipt = 2; + + /** + * A list of duplicate transaction receipts. + *

    + * If the request set the `includeDuplicates` flat, this list SHALL + * include the receipts for each duplicate transaction associated to the + * requested transaction identifier. + * If the request did not set the `includeDuplicates` flag, this list + * SHALL be empty.
    + * If the `receipt` status is `UNKNOWN`, this list SHALL be empty.
    + * This list SHALL be in order by consensus timestamp. + */ + repeated TransactionReceipt duplicateTransactionReceipts = 4; + + /** + * A list of receipts for all child transactions spawned by the requested + * transaction. + *

    + * If the request set the `include_child_receipts` flag, this list SHALL + * include receipts for each child transaction executed as part of the + * requested parent transaction.
    + * If the request did not set the `include_child_receipts` flag, this + * list SHALL be empty.
    + * If the parent transaction did not initiate any child transactions + * this list SHALL be empty.
    + * If the `receipt` status is `UNKNOWN`, this list SHALL be empty.
    + * This list SHALL be in order by consensus timestamp. + */ + repeated TransactionReceipt child_transaction_receipts = 5; +} diff --git a/proto/transaction_get_record.proto b/proto/transaction_get_record.proto new file mode 100644 index 000000000..b77456b40 --- /dev/null +++ b/proto/transaction_get_record.proto @@ -0,0 +1,193 @@ +/** + * # Get Transaction Record + * Messages for a query to obtain a transaction record. This particular + * query is used by `getTxRecordByTxID` in the "Crypto" service API. + * + * > Note + * >> Much more detailed information for transaction records is available + * >> from a mirror node, and the mirror node retains transaction records + * >> long term, rather than for a short "cache" duration. Clients may + * >> prefer the mirror node graph API to query transaction records, rather + * >> than this query. + * + * > Implementation Note + * >> This query is _defined_ for "Crypto" service, but is _implemented_ by + * >> the "Network Admin" service. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "transaction_record.proto"; +import "basic_types.proto"; +import "query_header.proto"; +import "response_header.proto"; + +/** + * Request for a `TransactionGetRecord` (a.k.a. `getTxRecordByTxID`) query. + *

    + * A transaction record SHALL be available after the network reaches + * consensus and completes execution for a transaction.
    + * A transaction record SHALL NOT be available after the end of the network + * configured "record cache duration". + * + *

    + *
    What is the "first" transaction?
    + *
    The "first" transaction SHALL be the the transaction with + * the earliest consensus time and a status that is neither + * `INVALID_NODE_ACCOUNT` nor `INVALID_PAYER_SIGNATURE`.
    + * If no transaction is found meeting this status criteria, the + * "first" transaction SHALL be the transaction with the earliest + * consensus time.
    + *
    What is a "child" transaction?
    + *
    A "child" transaction is any transaction created in the process of + * completing another transaction. These are most common with a smart + * contract call, where a call to a contract may initiate one or more + * additional transactions to complete a complex process.
    + *
    + */ +message TransactionGetRecordQuery { + /** + * Standard information sent with every query operation.
    + * This includes the signed payment and what kind of response is requested + * (cost, state proof, both, or neither). + */ + QueryHeader header = 1; + + /** + * A transaction identifier. + *

    + * This MUST contain the full identifier, as submitted, for the + * transaction to query. + */ + TransactionID transactionID = 2; + + /** + * A flag to request duplicates. + *

    + * If set, every transaction record within the record cache duration that + * matches the requested transaction identifier SHALL be returned.
    + * If not set, duplicate transactions SHALL NOT be returned.
    + * If not set, only the record for the first matching transaction to + * reach consensus SHALL be returned. + */ + bool includeDuplicates = 3; + + /** + * A flag to request "child" records. + *

    + * If set, the response SHALL include records for each child transaction + * executed as part of the requested parent transaction.
    + * If not set, the response SHALL NOT include any records for child + * transactions. + */ + bool include_child_records = 4; +} + +/** + * Response message for a `getTxRecordByTxID` query. + * + * The `transactionRecord` field SHALL return the record for the "first" + * transaction that matches the transaction identifier requested.
    + * If records for duplicate transactions are requested, those duplicate + * records SHALL be present in the `duplicateTransactionReceipts` list.
    + * If records for child transactions are requested, those child records SHALL + * be present in the `child_transaction_records` list.
    + * A state proof MAY be provided for this response; provided the record is + * still available from the consensus nodes. + * + *

    + *
    What is the "first" transaction?
    + *
    The "first" transaction receipt SHALL be the receipt for the + * first transaction with status that is neither + * `INVALID_NODE_ACCOUNT` nor `INVALID_PAYER_SIGNATURE`.
    + * If no transaction is found meeting the status criteria, the + * "first" transaction SHALL be the first transaction by + * consensus time.
    + *
    What is a "child" transaction?
    + *
    A "child" transaction is any transaction created in the process of + * completing another transaction. These are most common with a smart + * contract call, where a call to a contract may initiate one or more + * additional transactions to complete a complex process.
    + *
    + * + */ +message TransactionGetRecordResponse { + /** + * The standard response information for queries.
    + * This includes the values requested in the `QueryHeader` + * (cost, state proof, both, or neither). + */ + ResponseHeader header = 1; + + /** + * A transaction record. + *

    + * This SHALL be the record for the "first" transaction that matches + * the transaction identifier requested.
    + * If the identified transaction has not reached consensus, this + * record SHALL have a `status` of `UNKNOWN`.
    + * If the identified transaction reached consensus prior to the + * current configured record cache duration, this record SHALL + * have a `status` of `UNKNOWN`. + */ + TransactionRecord transactionRecord = 3; + + /** + * A list of duplicate transaction records. + *

    + * If the request set the `includeDuplicates` flat, this list SHALL + * include the records for each duplicate transaction associated to the + * requested transaction identifier. + * If the request did not set the `includeDuplicates` flag, this list + * SHALL be empty.
    + * If the `transactionRecord` status is `UNKNOWN`, this list + * SHALL be empty.
    + * This list SHALL be in order by consensus timestamp. + */ + repeated TransactionRecord duplicateTransactionRecords = 4; + + /** + * A list of records for all child transactions spawned by the requested + * transaction. + *

    + * If the request set the `include_child_records` flag, this list SHALL + * include records for each child transaction executed as part of the + * requested parent transaction.
    + * If the request did not set the `include_child_records` flag, this + * list SHALL be empty.
    + * If the parent transaction did not initiate any child transactions + * this list SHALL be empty.
    + * If the `transactionRecord` status is `UNKNOWN`, this list + * SHALL be empty.
    + * This list SHALL be in order by consensus timestamp. + */ + repeated TransactionRecord child_transaction_records = 5; +} diff --git a/proto/transaction_receipt.proto b/proto/transaction_receipt.proto new file mode 100644 index 000000000..64e163c71 --- /dev/null +++ b/proto/transaction_receipt.proto @@ -0,0 +1,212 @@ +/** + * # Transaction Receipt + * The receipt returned when the results of a transaction are requested via + * `TransactionGetReceiptQuery`. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; +import "response_code.proto"; +import "exchange_rate.proto"; + +/** + * The summary of a transaction's result so far.
    + * If the transaction has not reached consensus, this result will + * be necessarily incomplete. + * + * Most items in this object are only set for specific transactions. + * Those values SHALL be unset for all other transactions. + */ +message TransactionReceipt { + /** + * The consensus status of the transaction. + *

    + * This SHALL be `UNKNOWN` if consensus has not been reached.
    + * This SHALL be `UNKNOWN` 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 for 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.
    + *

    + * The inputs to the topic running hash have changed over time.
    + * This 48-byte field is the output of a SHA-384 digest with input data + * determined by the value of the `topicRunningHashVersion` field.
    + * All new transactions SHALL use `topicRunningHashVersion` `3`.
    + * The bytes of each uint64 or uint32 encoded for the hash input MUST be + * in Big-Endian format. + *

    + *


    + *

    + * The most recent version is denoted by `topicRunningHashVersion = 3`. + *

    + * This version SHALL include, in order + *

      + *
    1. The previous running hash of the topic (48 bytes)
    2. + *
    3. The `topic_running_hash_version` field (8 bytes)
    4. + *
    5. The payer account's shard (8 bytes)
    6. + *
    7. The payer account's realm (8 bytes)
    8. + *
    9. The payer account's number (8 bytes)
    10. + *
    11. The topic's shard (8 bytes)
    12. + *
    13. The topic's realm (8 bytes)
    14. + *
    15. The topic's number (8 bytes)
    16. + *
    17. The number of seconds since the epoch when the + * `ConsensusSubmitMessage` reached consensus (8 bytes)
    18. + *
    19. The number of nanoseconds within the second when the + * `ConsensusSubmitMessage` reached consensus (4 bytes)
    20. + *
    21. The `topic_sequence_number` field (8 bytes)
    22. + *
    23. The output of a SHA-384 digest of the message bytes from the + * `ConsensusSubmitMessage` (48 bytes)
    24. + *
    + *
    + *

    + * The next older version is denoted by `topicRunningHashVersion = 2`. + *

    + * This version SHALL include, in order + *

      + *
    1. The previous running hash of the topic (48 bytes)
    2. + *
    3. The `topic_running_hash_version` field (8 bytes)
    4. + *
    5. The topic's shard (8 bytes)
    6. + *
    7. The topic's realm (8 bytes)
    8. + *
    9. The topic's number (8 bytes)
    10. + *
    11. The number of seconds since the epoch when the + * `ConsensusSubmitMessage` reached consensus (8 bytes)
    12. + *
    13. The number of nanoseconds within the second when the + * `ConsensusSubmitMessage` reached consensus (4 bytes)
    14. + *
    15. The `topic_sequence_number` field (8 bytes)
    16. + *
    17. The output of a SHA-384 digest of the message bytes from the + * `ConsensusSubmitMessage` (48 bytes)
    18. + *
    + *
    + *

    + * The original version, used at genesis, is denoted + * by `topicRunningHashVersion = 1` or `topicRunningHashVersion = 0`. + *

    + * This version SHALL include, in order + *

      + *
    1. The previous running hash of the topic (48 bytes)
    2. + *
    3. The topic's shard (8 bytes)
    4. + *
    5. The topic's realm (8 bytes)
    6. + *
    7. The topic's number (8 bytes)
    8. + *
    9. The number of seconds since the epoch when the + * `ConsensusSubmitMessage` reached consensus (8 bytes)
    10. + *
    11. The number of nanoseconds within the second when the + * `ConsensusSubmitMessage` reached consensus (4 bytes)
    12. + *
    13. The `topic_sequence_number` field (8 bytes)
    14. + *
    15. The message bytes from the `ConsensusSubmitMessage` + * (variable)
    16. + *
    + */ + bytes topicRunningHash = 8; + + /** + * In the receipt of a `ConsensusSubmitMessage`, the version of the + * SHA-384 digest inputs 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`, or `TokenBurn`.
    + * For non-unique tokens, the current total supply of that token.
    + * For unique tokens,the total number of NFTs issued for that 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 enables the + * scheduled transaction to execute immediately, the `TransactionID` that + * should be used to query for the receipt or record of the scheduled + * transaction that was executed. + */ + TransactionID scheduledTransactionID = 13; + + /** + * In the receipt of a `TokenMint` for non-fungible/unique tokens, + * the serial numbers of the newly created tokens. + */ + repeated int64 serialNumbers = 14; + + /** + * An affected node identifier.
    + * In the receipt of a NodeCreate, the id of the newly created node. + *

    + * This value SHALL be set following a `createNode` transaction.
    + * This value SHALL NOT be set following any other transaction. + */ + uint64 node_id = 15; +} diff --git a/proto/transaction_record.proto b/proto/transaction_record.proto new file mode 100644 index 000000000..5f966a00a --- /dev/null +++ b/proto/transaction_record.proto @@ -0,0 +1,248 @@ +/** + * # Transaction Record + * The record of a single transaction, including receipt and transaction + * results such as transfer lists, entropy, contract call result, etc...
    + * The record also includes fees, consensus time, EVM information, and + * other result metadata.
    + * Only values appropriate to the requested transaction are populated, all + * other fields will not be set (i.e. null or default values). + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "timestamp.proto"; +import "basic_types.proto"; +import "custom_fees.proto"; +import "transaction_receipt.proto"; +import "contract_types.proto"; + +/** + * Response when the client sends the node TransactionGetRecordResponse + */ +message TransactionRecord { + /** + * A transaction receipt. + *

    + * This SHALL report consensus status (reach consensus, failed, + * unknown) and the ID of any new entity (i.e. account, file, + * contract, schedule, etc...) created. + */ + TransactionReceipt receipt = 1; + + /** + * A transaction hash value. + *

    + * This SHALL be the hash of the Transaction that executed and + * SHALL NOT be the hash of any Transaction that failed for + * having a duplicate TransactionID. + */ + bytes transactionHash = 2; + + /** + * A consensus timestamp. + *

    + * This SHALL be null if the transaction did not reach consensus yet. + */ + Timestamp consensusTimestamp = 3; + + /** + * A transaction identifier to the transaction associated to this record. + */ + TransactionID transactionID = 4; + + /** + * A transaction memo.
    + * This is the memo that was submitted as part of the transaction. + *

    + * This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes` + * (default 100) bytes when encoded as UTF-8. + */ + string memo = 5; + + /** + * A transaction fee charged. + *

    + * This SHALL be the actual transaction fee charged.
    + * This MAY NOT match the original `transactionFee` value + * from the `TransactionBody`. + */ + uint64 transactionFee = 6; + + oneof body { + /** + * A contract call result.
    + * A record of the value returned by the smart contract function (if + * it completed and didn't fail) from a `ContractCallTransaction`. + */ + ContractFunctionResult contractCallResult = 7; + + /** + * A contract creation result.
    + * A record of the value returned by the smart contract constructor (if + * it completed and didn't fail) from a `ContractCreateTransaction`. + */ + ContractFunctionResult contractCreateResult = 8; + } + + /** + * A transfer list for this transaction.
    + * This is a list of all HBAR transfers completed for this transaction. + *

    + * This MAY include fees, transfers performed by the transaction, + * transfers initiated by a smart contract it calls, or the creation + * of threshold records that it triggers. + */ + TransferList transferList = 10; + + /** + * A token transfer list for this transaction.
    + * This is a list of all non-HBAR token transfers + * completed for this transaction.
    + */ + repeated TokenTransferList tokenTransferLists = 11; + + /** + * A schedule reference.
    + * The reference to a schedule ID for the schedule that initiated this + * transaction, if this this transaction record represents a scheduled + * transaction. + */ + ScheduleID scheduleRef = 12; + + /** + * A list of all custom fees that were assessed during a CryptoTransfer. + *

    + * These SHALL be paid if the transaction status resolved to SUCCESS. + */ + repeated AssessedCustomFee assessed_custom_fees = 13; + + /** + * A list of all token associations implicitly or automatically + * created while handling this transaction. + */ + repeated TokenAssociation automatic_token_associations = 14; + + /** + * A consensus timestamp for a child record. + *

    + * This SHALL be the consensus timestamp of a user transaction that + * spawned an internal child transaction. + */ + Timestamp parent_consensus_timestamp = 15; + + /** + * A new account alias.
    + *

    + * This is the new alias assigned to an account created as part + * of a CryptoCreate transaction triggered by a user transaction + * with a (previously unused) alias. + */ + bytes alias = 16; + + /** + * A keccak256 hash of the ethereumData. + *

    + * This field SHALL only be populated for EthereumTransaction. + */ + bytes ethereum_hash = 17; + + /** + * A list of staking rewards paid. + *

    + * This SHALL be a list accounts with the corresponding staking + * rewards paid as a result of this transaction. + */ + repeated AccountAmount paid_staking_rewards = 18; + + oneof entropy { + /** + * A pseudorandom 384-bit sequence. + *

    + * This SHALL be returned in the record of a UtilPrng transaction + * with no output range, + */ + bytes prng_bytes = 19; + + /** + * A pseudorandom 32-bit integer.
    + *

    + * This SHALL be returned in the record of a PRNG transaction with + * an output range specified. + */ + int32 prng_number = 20; + } + + /** + * A new default EVM address for an account created by + * this transaction. + *

    + * This field SHALL be populated only when the EVM address is not + * specified in the related transaction body. + */ + bytes evm_address = 21; + + /** + * A list of pending token airdrops. + *

    + * Each pending airdrop SHALL represent a single requested transfer + * from a sending account to a recipient account.
    + * These pending transfers are issued unilaterally by the sending + * account, and MUST be claimed by the recipient account before + * the transfer SHALL complete.
    + * A sender MAY cancel a pending airdrop before it is claimed.
    + * An airdrop transaction SHALL emit a pending airdrop when the + * recipient has no available automatic association slots available + * or when the recipient has set `receiver_sig_required`. + */ + repeated PendingAirdropRecord new_pending_airdrops = 22; +} + +/** + * A record of a new pending airdrop. + */ +message PendingAirdropRecord { + /** + * A unique, composite, identifier for a pending airdrop. + *

    + * This field is REQUIRED. + */ + PendingAirdropId pending_airdrop_id = 1; + + /** + * A single pending airdrop amount. + *

    + * If the pending airdrop is for a fungible/common token this field + * is REQUIRED and SHALL be the current amount of tokens offered.
    + * If the pending airdrop is for a non-fungible/unique token, + * this field SHALL NOT be set. + */ + PendingAirdropValue pending_airdrop_value = 2; +} diff --git a/proto/transaction_response.proto b/proto/transaction_response.proto new file mode 100644 index 000000000..8ec4e490a --- /dev/null +++ b/proto/transaction_response.proto @@ -0,0 +1,76 @@ +/** + * # Transaction Response + * Message(s) sent in response to submitting a transaction. + * The response(s) detailed here SHALL only represent that the transaction + * was received and checked by the single node to which it was submitted.
    + * To obtain the result from _network consensus_, a client MUST submit a + * `getTransactionReceipts` query. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "response_code.proto"; + +/** + * A message sent by a node in response to a transaction submission.
    + * This message only acknowledges that the individual node has checked + * the transaction, completed pre-check, and checked the fee offered. + * + * If the transaction fee is not sufficient, the `nodeTransactionPrecheckCode` + * value SHALL be `INSUFFICIENT_TX_FEE` and the `cost` field SHALL be the + * actual transaction fee, in tinybar, required.
    + * If the client requires acknowledgement of the network consensus result + * for a transaction, the client SHOULD request a transaction receipt or + * detailed transaction record. A client MAY also obtain network consensus + * results from a mirror node. + */ +message TransactionResponse { + /** + * A pre-consensus response code. + *

    + * This response SHALL represent the response of the individual node, and + * SHALL NOT represent the consensus of the network. + */ + ResponseCodeEnum nodeTransactionPrecheckCode = 1; + + /** + * An approximate transaction fee. + *

    + * This value SHALL be `0` unless the `nodeTransactionPrecheckCode` is + * `INSUFFICIENT_TX_FEE`.
    + * This value SHOULD be an amount, in tinybar, that _would have_ succeeded + * at the time the transaction was submitted.
    + * Note that this amount is not guaranteed to succeed in a future + * transaction due to uncontrolled variables, such as network congestion, + * but should be considered a close approximation. + */ + uint64 cost = 2; +} diff --git a/proto/unchecked_submit.proto b/proto/unchecked_submit.proto new file mode 100644 index 000000000..746c6ff7b --- /dev/null +++ b/proto/unchecked_submit.proto @@ -0,0 +1,61 @@ +/** + * # Unchecked Submit + * Submit a transaction to the network, bypassing all but the most minimal + * validation. + * + * > Important + * >> This transaction is obsolete and not supported.
    + * >> Any transaction of this type that is submitted SHALL fail with a + * >> `PRE_CHECK` result of `NOT_SUPPORTED`. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +/** + * Submit an arbitrary (serialized) Transaction to the network + * without pre-check. + * + * This transaction SHALL require `superuser` privileges + * (e.g. the `treasury` or `systemAdmin` accounts). + */ +message UncheckedSubmitBody { + option deprecated = true; + /** + * The serialized bytes of a `Transaction`. + *

    + * This transaction SHALL be deserialized and submitted for consensus + * with no further validation.
    + * Specifically, the transaction may violate basic limits and + * constraints such as size limits, minimum or maximum values, + * valid start time, fee calculations, etc... + */ + bytes transactionBytes = 1; +} diff --git a/proto/util_prng.proto b/proto/util_prng.proto new file mode 100644 index 000000000..1db5be023 --- /dev/null +++ b/proto/util_prng.proto @@ -0,0 +1,56 @@ +/** + * # Utility PRNG query + * A query to retrieve a deterministic pseudo-random value. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +/** + * Request a deterministic pseudo-random number. + * + * The value returned SHALL be deterministic, but not easily predicted. + * The value returned SHALL NOT be suitable for cryptographic use. + * + * ### Block Stream Effects + * The result of this transaction is reported in a `UtilPrngOutput` message. + */ +message UtilPrngTransactionBody { + /** + * A range for the requested value. + *

    + * If this is greater than `0`, the service SHALL return a 32-bit + * pseudo-random number between 0 and the value provided in the + * transaction record.
    + * If this is unset, zero, or negative; the service SHALL return a + * 384-bit unsigned pseudo-random number in the record. + */ + int32 range = 1; +} diff --git a/proto/util_service.proto b/proto/util_service.proto new file mode 100644 index 000000000..a2be64afb --- /dev/null +++ b/proto/util_service.proto @@ -0,0 +1,67 @@ +/** + * # Utility Service + * This service provides a transaction to generate a deterministic + * pseudo-random value, either a 32-bit integer within a requested range + * or a 384-bit byte array. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package + +import "transaction_response.proto"; +import "transaction.proto"; + +/** + * The Utility Service provides a pseudo-random number generator. + * + * The single gRPC call defined for this service simply reports a single + * pseudo-random number in the transaction record. That value may either + * be a 32-bit integer within a requested range, or a 384-bit byte array. + * + * ### Block Stream Effects + * The requested value is reported exclusively in a `UtilPrngOutput` message. + */ +service UtilService { + /** + * Generate a pseudo-random value. + *

    + * The request body MUST be a + * [UtilPrngTransactionBody](#proto.UtilPrngTransactionBody) + */ + rpc prng (Transaction) returns (TransactionResponse); + + + /** + * Execute a batch of transactions atomically. + *

    + * All transactions in the batch will be executed in order, and if any + * transaction fails, the entire batch will fail. + */ + rpc atomicBatch (Transaction) returns (TransactionResponse); +} diff --git a/proto_src/.github/CODEOWNERS b/proto_src/.github/CODEOWNERS new file mode 100644 index 000000000..1bb79f84e --- /dev/null +++ b/proto_src/.github/CODEOWNERS @@ -0,0 +1,39 @@ +################################### +##### Global Protection Rule ###### +################################### +# NOTE: This rule is overriden by the more specific rules below. This is the catch-all rule for all files not covered by the more specific rules below +* @hashgraph/platform-ci @hashgraph/release-engineering-managers @hashgraph/developer-advocates @hashgraph/platform-base @hashgraph/hedera-services @hashgraph/mirror-node @hashgraph/hedera-smart-contracts @hashgraph/block-node + +#Platform and mirror folder rules +/platform/ @hashgraph/platform-base +/mirror/ @hashgraph/mirror-node + +# Block Node Folder Rules +/block/ @hashgraph/block-node @hashgraph/hedera-services @hashgraph/mirror-node + +# Hedera Services (HAPI) Folder Rules +/services/ @hashgraph/hedera-services @hashgraph/mirror-node + +######################### +##### Core Files ###### +######################### + +# NOTE: Must be placed last to ensure enforcement over all other rules + +# Protection Rules for Github Configuration Files and Actions Workflows +/.github/ @hashgraph/release-engineering-managers @hashgraph/platform-ci +/.github/workflows/ @hashgraph/platform-ci @hashgraph/platform-ci-committers @hashgraph/release-engineering-managers + +# Self-protection for root CODEOWNERS files (this file should not exist and should definitely require approval) +/CODEOWNERS @hashgraph/release-engineering-managers + +# Protect the repository root files +/README.md @hashgraph/platform-ci @hashgraph/release-engineering-managers @hashgraph/developer-advocates @hashgraph/platform-base @hashgraph/hedera-services @hashgraph/mirror-node @hashgraph/hedera-smart-contracts @hashgraph/block-node +**/LICENSE @hashgraph/release-engineering-managers + +# CodeCov configuration +**/codecov.yml @hashgraph/release-engineering-managers @hashgraph/platform-ci + +# Git Ignore definitions +**/.gitignore @hashgraph/platform-ci @hashgraph/release-engineering-managers @hashgraph/developer-advocates @hashgraph/platform-base @hashgraph/hedera-services @hashgraph/mirror-node @hashgraph/hedera-smart-contracts @hashgraph/block-node +**/.gitignore.* @hashgraph/platform-ci @hashgraph/release-engineering-managers @hashgraph/developer-advocates @hashgraph/platform-base @hashgraph/hedera-services @hashgraph/mirror-node @hashgraph/hedera-smart-contracts @hashgraph/block-node diff --git a/proto_src/.gitignore b/proto_src/.gitignore new file mode 100644 index 000000000..c01983fa0 --- /dev/null +++ b/proto_src/.gitignore @@ -0,0 +1,83 @@ +### Linux template +*~ + +# temporary files which can be created if a process still has a handle open of a deleted file +.fuse_hidden* + +# KDE directory preferences +.directory + +# Linux trash folder which might appear on any partition or disk +.Trash-* + +# .nfs files are created when an open file is removed but is still being accessed +.nfs* + +### Windows template +# Windows thumbnail cache files +Thumbs.db +Thumbs.db:encryptable +ehthumbs.db +ehthumbs_vista.db + +# Dump file +*.stackdump + +# Folder config file +[Dd]esktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msix +*.msm +*.msp + +# Windows shortcuts +*.lnk + +### Patch template +*.orig +*.rej + +### macOS template +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +### GPG template +secring.* + + +### Custom items +.idea +**/*.iml +*.sw* +*.iml + diff --git a/proto_src/LICENSE b/proto_src/LICENSE new file mode 100644 index 000000000..261eeb9e9 --- /dev/null +++ b/proto_src/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + 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. diff --git a/proto_src/README.md b/proto_src/README.md new file mode 100644 index 000000000..de62f09eb --- /dev/null +++ b/proto_src/README.md @@ -0,0 +1,66 @@ +# Hedera protobufs +The authoritative repository of [protocol buffers](https://developers.google.com/protocol-buffers) +used by the Hedera Hashgraph public network, especially to define its gRPC API. Other repositories +are used to deploy language-specific libraries generated +from the _*.proto_ files in the following repositories: + - [Java](https://github.com/hashgraph/hedera-protobufs-java) + - [Go](https://github.com/hashgraph/hedera-protobufs-go) + - [JS & Typescript](https://github.com/hashgraph/protobuf.js) + - [C++](https://github.com/hashgraph/hedera-protobufs-cpp) + - [Swift](https://github.com/hashgraph/hedera-protobufs-swift) + +## Overview of services + +There are five primary service families, which inter-operate on entities +controlled by one (or more) Ed25519 or ECDSA(secp256k1) keypairs: +1. The [cryptocurrency service](services/crypto_service.proto), +for cryptocurrency accounts with transfers denominated +in [hbar (ℏ)](https://help.hedera.com/hc/en-us/articles/360000674317-What-are-the-official-HBAR-cryptocurrency-denominations-). +2. The [consensus service](services/consensus_service.proto), for +fast and unbiased ordering of opaque binary messages exchanged on +arbitrary topics. +3. The [smart contract service](services/smart_contract_service.proto), for +execution of Solidity contract creations and calls; contract may both possess +ℏ themselves and exchange it with non-contract accounts. +4. The [file service](services/file_service.proto), for storage and +retrieval of opaque binary data. +5. The [token service](services/token_service.proto), for token related operations such as create, update, mint, burn, transfer etc. + +There are also four secondary service families: +1. The [network service](services/network_service.proto), for operations scoped +to the network or its constituent nodes rather user-controlled entities as above. +2. The [scheduling service](services/schedule_service.proto), for scheduling a transaction to +be executed when the ledger has received enough prequisite signatures. +3. The [freeze service](services/freeze_service.proto), for use by +privileged accounts to suspend network operations during a maintenance window. +4. The [util service](services/util_service.proto), for utility operations on the network. + +It is important to note that most network services are gated by fees which +must be paid in ℏ from a cryptocurrency account. The payer authorizes a +fee by signing an appropriate transaction with a sufficient subset of the +cryptographic key(s) associated to their account. + +## Overview of state +State directory and its subdirectories contain the protobuf files that define the state of the network. +The state is divided into the following subdirectories, based on the service modules: +1. [Token](services/state/token) - The state of the Token service. +2. [Consensus](services/state/consensus) - The state of the Consensus service. + +The state directory and its subdirectories are in preview and are subject to change. + +# For Developers + +## Branching +This repository uses a simple branching model with only one distinguished branch; +`main` points to the latest protobufs intended for the next deployment to mainnet. +Tags such as `v0.12.0` mark commits used for testnet and mainnet deploys. + +## PBJ Package Support +Proto files in this repo are generated into two kinds of Java files, one using **protoc** and other using +[PBJ](https://github.com/hashgraph/pbj) a custom java code generation library for Hedera. To support PBJ all proto files +need to have an option of the form: +``` +// <<>> This comment is special code for setting PBJ Compiler java package +``` +To specify the Java package for PBJ generated model objects. This option is ignored by **protoc**. PBJ ignores the default +option `option java_package = "com.hederahashgraph.api.proto.java";` which is used by **protoc** to generate Java files. diff --git a/proto_src/block/block_service.proto b/proto_src/block/block_service.proto new file mode 100644 index 000000000..02238b0fc --- /dev/null +++ b/proto_src/block/block_service.proto @@ -0,0 +1,1013 @@ +/** + * # Block Service + * The Service API exposed by the Block Nodes. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package com.hedera.hapi.block; + +/* + * Copyright (C) 2024 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.hapi.block.protoc"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; +import "stream/block.proto"; +import "stream/block_item.proto"; + +/** + * Publish a stream of block items. + * + * Each request in the stream MUST contain at least one `BlockItem`.
    + * Each request MAY contain more than one `BlockItem`.
    + * A single request MUST NOT contain `BlockItem`s from more than one block.
    + * Each request MAY contain a variable number of `BlockItem`s.
    + * Each Block MUST begin with a single `BlockHeader` block item.
    + * If a `BlockHeader` is present in a request, it MUST be the first `BlockItem` + * in the `block_items` list.
    + * The Block-Node SHALL append each `BlockItem` to an internal structure + * to reconstruct full blocks.
    + * The Block-Node MUST verify the block proof for each block before sending a + * response message acknowledging that block.
    + * Each Block MUST end with a single `BlockProof` block item.
    + * If a `BlockProof` is present in a request, it MUST be the last `BlockItem` + * in the `block_items` list.
    + * The Block-Node MUST verify each Block using the `BlockProof` to + * ensure all data was received and processed correctly. + */ +message PublishStreamRequest { + oneof request { + /** + * A stream item containing one or more `BlockItem`s. + *

    + * The full stream SHALL consist of many `block_items` messages + * followed by a single `status` message. + */ + BlockItemSet block_items = 1; + } +} + +/** + * An enumeration indicating why a Publisher ended a stream. + * + * This enumeration describes the reason a block stream + * (sent via `publishBlockStream`) was ended by the Publisher. + */ +enum PublishStreamEndCode { + /** + * An "unset value" flag, this value SHALL NOT be used.
    + * This status indicates the server software failed to set a + * status, and SHALL be considered a software defect. + */ + STREAM_END_UNKNOWN = 0; + + /** + * The Publisher reached a reset point.
    + * No errors occurred and the source Block-Node orderly ended the stream. + * + * Publishers SHOULD use this code to end a stream and restart + * occasionally. Occasionally resetting the stream increases stability and + * allows for routine network configuration changes. + */ + STREAM_END_RESET = 1; + + /** + * The delay between items was too long.
    + * The destination system did not timely acknowledge a block. + *

    + * The source SHALL start a new stream before the failed block. + */ + STREAM_END_TIMEOUT = 2; + + /** + * The Publisher encountered an error.
    + * The Publisher encountered an internal error and must try again later. + *

    + * Publishers that encounter internal logic errors, find themselves + * "behind" the network, or otherwise detect an unexpected situation MUST + * send this code and restart the stream before the failed block. + */ + STREAM_END_ERROR = 3; + + /** + * The Block-Node is too far behind to catch up directly.
    + * The Block-Node responded to a block header with "BEHIND" and is + * too far behind the Publisher. + *

    + * The Block-Node MUST recover and "catch up" from another trustworthy + * Block-Node.
    + * The Publisher MAY stream items to a different Block-Node.
    + * The Publisher MAY resume streaming to this Block-Node later.
    + * The `EndOfStream` message MUST include the earliest and latest blocks + * currently available from the Publisher.
    + * The Block-Node SHOULD attempt to "catch up" to the _latest_ block + * available from the Publisher. + */ + STREAM_END_TOO_FAR_BEHIND = 4; +} + +/** + * A wrapper around a repeated BlockItem.
    + * This message is required so that we can include ordered lists of block + * items as `oneof` alternatives in streams. + * + * Each `BlockItemSet` MUST contain at least one `BlockItem`, + * and MAY contain up to one full block.
    + * A single `BlockItemSet` SHALL NOT contain block items from + * more than one block.
    + * If a `BlockHeader` is present in a `BlockItemSet`, that item + * MUST be the first item in the list.
    + * If a `BlockProof` is present in a `BlockItemSet`, that item + * MUST be the last item in the list. + */ +message BlockItemSet { + /** + * An ordered list of `BlockItem`s.
    + * This list supports sending block items to subscribers in batches + * for greater channel efficiency. + */ + repeated com.hedera.hapi.block.stream.BlockItem block_items = 1; +} + +/** + * A response to writing a block stream. + * + * This message is sent in response to each Block in a block stream sent + * to a Block-Node. The block stream is sent as a stream of messages, and each + * message MAY be acknowledged with a message of this type.
    + * Each `BlockItem` MAY be acknowledged with an `Acknowledgement` + * response. Item acknowledgement is an OPTIONAL feature.
    + * Each completed block SHALL be acknowledged with an `Acknowledgement` + * response. Block acknowledgement is a REQUIRED feature.
    + * A final response SHALL be sent with an `EndOfStream` status result after + * the last block stream item is received, or when the Block-Node must end the + * stream for any reason.
    + * At any time, a Block-Node MAY send a `SkipBlock` response to request that + * the Publisher skip the current block and resume with the next. When a + * Block-Node sends a `SkipBlock`, that Block-Node SHALL subsequently send + * an `Acknowledgement` for the same block, or SHALL send a `ResendBlock` + * message. + * If a failure is detected (which may include a block or block item that + * fails validation) an `EndOfStream` response SHALL be sent with a + * relevant error status. + */ +message PublishStreamResponse { + oneof response { + /** + * A response sent to acknowledge successful receipt of a block. + */ + Acknowledgement acknowledgement = 1; + + /** + * A response sent to request the Publisher end the current stream. + */ + EndOfStream end_stream = 2; + + /** + * A response sent to request the Publisher skip the current block. + */ + SkipBlock skip_block = 3; + + /** + * A response sent to request the Publisher resend a skipped block. + */ + ResendBlock resend_block = 4; + } + + /** + * A response to acknowledge receipt and verification of a single item + * or full block. + */ + message Acknowledgement { + /** + * A response type to acknowledge a full and complete block. + *

    + * All Block-Nodes SHOULD acknowledge each block. + */ + BlockAcknowledgement block_ack = 1; + } + + /** + * Acknowledgement of a full block.
    + * This message is a necessary part of the block streaming protocol. + * + * This response SHALL be sent after a block state proof item is + * received and verified.
    + * The Block-Node SHALL send exactly one `BlockAcknowledgement` for + * each successful block. + */ + message BlockAcknowledgement { + /** + * A block number number of the acknowledged block. + *

    + * A Publisher SHOULD verify that this value matches the block sent. + */ + uint64 block_number = 1; + + /** + * A hash of the virtual merkle root for the block. + *

    + * This SHALL be the hash calculated by the Block-Node for the + * root node of the virtual merkle tree that is signed by the source + * system to validate the block. + */ + bytes block_root_hash = 2; + + /** + * A flag indicating that the received block duplicates an + * existing block. + *

    + * If a Publisher receives acknowledgement with this flag set + * true the Publisher MAY end the stream.
    + * The `block_number` returned SHALL be the last block known and + * verified by the Block-Node.
    + * The Publisher MAY resume publishing immediately after the indicated + * block. + */ + bool block_already_exists = 3; + } + + /** + * Message indicating the Publisher should skip the current block. + * + * Block-Nodes SHOULD only skip a block if that block is currently being + * received from another source.
    + * Publishers MUST stop sending the current block and resume with + * the block header for the next block, or else end the stream.
    + * A Publisher that receives this message SHALL subsequently receive an + * acknowledgement for the skipped block or SHALL receive a `ResendBlock` + * message.
    + * A Publisher asked to skip a block SHOULD NOT delay any subsequent + * block, but should send that block as soon as it is available.
    + * A Publisher MAY be asked to skip multiple blocks in succession, but + * SHOULD interpret that as the presence of another Publisher with a + * lower latency connection.
    + * A Publisher MAY choose to end the stream and send the block to a + * different Block-Node, rather than skip sending the block to the + * current Block-Node. + */ + message SkipBlock { + /** + * The number of the _unverified_ block to skip. + *

    + * This MUST match the block number of the `BlockHeader` most recently + * sent by the Publisher. + */ + uint64 block_number = 2; + } + + /** + * Message indicating the Publisher must resend from a specified block. + * A Publisher might resend the block, if it has that block available, + * or it might choose to end the stream if it has already received + * acknowledgement from a different trustworthy Block-Node. + * + * On receiving this message, a Publisher MUST resume sending blocks at + * the block number indicated, or else end the stream.
    + * This message SHALL only be sent following a `SkipBlock` message for a + * block that has not been acknowledged.
    + * A Block-Node SHALL NOT send a `ResendBlock` message for any block that + * is already acknowledged.
    + * A Publisher MAY choose to end the stream rather than resend the + * the requested block. + */ + message ResendBlock { + /** + * The number of the _unverified_ block to re-send. + *

    + * This SHALL be the block number one greater than the last block + * this Block-Node has successfully stored and verified. + */ + uint64 block_number = 2; + } + + /** + * A message sent to end a stream. + * + * This response message SHALL be sent from a Block-Node to a block + * stream Publisher when a `publishBlockStream` stream ends.
    + * This message SHALL be sent exactly once for each `publishBlockStream` + * call.
    + * The Publisher SHALL cease sending block items upon receiving + * this response, and MAY determine the ending state of the stream from + * the `status` enumeration and the `block_number` returned.
    + * A Publisher SHOULD verify that the `block_number` value matches the + * last block sent, and SHOULD resend one or more blocks if the value + * here does not match the expected value. + */ + message EndOfStream { + /** + * A response code. + *

    + * This code indicates the reason the stream ended.
    + * This value MUST be set to a non-default value. + */ + PublishStreamResponseCode status = 1; + + /** + * The number of the last completed and _verified_ block. + *

    + * Block-Nodes SHOULD only end a stream after a block state proof to avoid + * the need to resend items.
    + * If status is a failure code, the Publisher MUST start a new + * stream at the beginning of the first block _following_ this number + * (e.g. if this is 91827362983, then the new stream must start with + * the _header_ for block 91827362984). + */ + uint64 block_number = 2; + } +} + +/** + * An enumeration indicating the status of this request. + * + * This enumeration SHALL describe the reason a block stream + * (sent via `publishBlockStream`) ended. + */ +enum PublishStreamResponseCode { + /** + * An "unset value" flag, this value SHALL NOT be used.
    + * This status indicates the server software failed to set a + * status, and SHALL be considered a software defect. + */ + STREAM_ITEMS_UNKNOWN = 0; + + /** + * The request succeeded.
    + * No errors occurred and the receiving Block-Node orderly ended the stream. + *

    + * The Publisher MAY start a new stream beginning with the next block. + */ + STREAM_ITEMS_SUCCESS = 1; + + /** + * The delay between items was too long. + *

    + * The source MUST start a new stream before the failed block. + */ + STREAM_ITEMS_TIMEOUT = 2; + + /** + * An item was received out-of-order.
    + * This might be two headers without a proof between them, or similar. + *

    + * The source MUST start a new stream before the failed block. + */ + STREAM_ITEMS_OUT_OF_ORDER = 3; + + /** + * A block state proof item could not be validated.
    + * The source MUST start a new stream before the failed block. + */ + STREAM_ITEMS_BAD_STATE_PROOF = 4; + + /** + * The Block-Node is "behind" the Publisher.
    + * Ths Publisher has sent a block later than this Block-Node + * can process. The Publisher may retry by sending blocks immediately + * following the `block_number` returned, or may connect + * to another Block-Node. + *

    + * Block-Nodes that are "behind" SHOULD attempt to "catch up" by requesting + * blocks from another Block-Node or other source of recent historical + * block stream data. + */ + STREAM_ITEMS_BEHIND = 5; + + /** + * The Block-Node had an internal error and cannot continue processing.
    + * The Publisher may retry again later. + */ + STREAM_ITEMS_INTERNAL_ERROR = 6; + + /** + * The Block-Node failed to store the block persistently. + *

    + * The Publisher SHOULD start a new stream to send the block to + * this Block-Node, or any other reliable Block-Node. + * The Publisher MUST NOT discard the block until it is successfully + * persisted and verified (and acknowledged) by at least one Block-Node. + */ + STREAM_ITEMS_PERSISTENCE_FAILED = 7; +} + +/** + * A request to read a single block. + * + * A client system SHALL send this message to request a single block, + * including the block state proof.
    + * A client MAY request that the block be sent without verification. + * A compliant Block-Node MAY respond to requests that allow unverified + * responses by returning the full requested block before verifying + * the included block proof.
    + * A compliant Block-Node MAY support _only_ requests that allow unverified + * blocks, but MUST clearly document that limitation, and MUST respond to + * a request that does not allow unverified blocks with the + * `ALLOW_UNVERIFIED_REQUIRED` response code. + */ +message SingleBlockRequest { + /** + * The block number of a block to retrieve. + *

    + * The requested block MUST exist on the Block-Node.
    + * This value MUST NOT be set if `retrieve_latest` is set `true`.
    + * This value MUST be set to a valid block number if `retrieve_latest` is + * unset or is set `false`. + */ + uint64 block_number = 1; + + /** + * A flag to indicate that the requested block may be sent without + * verifying its `BlockProof`.
    + * This might be set by a client that expects to perform its own + * verification and wishes lower latency or, potentially, lower cost. + *

    + * If this value is set, then the responding Block-Node MAY respond with a + * block that has not completed verification of its `BlockProof`.
    + * If this is _not_ set then the Block-Node MUST respond with either a + * fully verified and validated block, or `VERIFIED_BLOCK_UNAVAILABLE` if + * the requested block is not yet verified.
    + * The default value is _not set_. + */ + bool allow_unverified = 2; + + /** + * A flag to request the latest available block. + *

    + * This value MAY be set `true` to request the last block available.
    + * If this value is set to `true` then `block_number` MUST NOT be set and + * SHALL be ignored. + */ + bool retrieve_latest = 3; +} + +/** + * A response to a `singleBlock` request. + * + * This message SHALL be sent in response to a request, and SHALL contain at + * least a valid `status`.
    + * If `status` is `READ_BLOCK_SUCCESS`, the response SHALL contain the + * requested block in the `block` field. + * + * > Note + * >> A block can become quite large. A client MUST be prepared to receive the + * >> full content of the block, perhaps many megabytes of data. + */ +message SingleBlockResponse { + /** + * A response status. + *

    + * The reported status SHALL reflect the success of the request, or + * a detailed reason the request failed. + */ + SingleBlockResponseCode status = 1; + + /** + * The requested block. + *

    + * This container object SHALL hold the entire sequence of block items + * for the requested block.
    + * The block items in this message SHALL be in the same order + * as received.
    + * The items in this message SHALL begin with a `BlockHeader` and end with + * a `BlockStateProof` applicable to this block. + */ + com.hedera.hapi.block.stream.Block block = 2; +} + +/** + * An enumeration indicating the status of this request. + */ +enum SingleBlockResponseCode { + /** + * An "unset value" flag, this value SHALL NOT be used.
    + * This status indicates the server software failed to set a status, + * and SHALL be considered a software defect. + */ + READ_BLOCK_UNKNOWN = 0; + + /** + * The requesting client account lacks sufficient HBAR to pay the + * service fee for this request.
    + * The client MAY retry the request, but MUST increase the client + * account balance with this Block-Node before doing so. + */ + READ_BLOCK_INSUFFICIENT_BALANCE = 1; + + /** + * The request succeeded.
    + * The requested block SHALL be returned in the `block` field. + */ + READ_BLOCK_SUCCESS = 2; + + /** + * The requested block was not found.
    + * Something failed and a block that should be available was + * not found. + *

    + * The client MAY retry the request; if this result is repeated the + * request SHOULD be directed to a different Block-Node. + */ + READ_BLOCK_NOT_FOUND = 3; + + /** + * The requested block is not available on this Block-Node. + *

    + * The client SHOULD send a `serverStatus` request to determine the + * lowest and highest block numbers available at this Block-Node. + */ + READ_BLOCK_NOT_AVAILABLE = 4; + + /** + * The request for a verified block cannot be fulfilled.
    + * The client requested a verified block from a Block-Node that does not + * offer verified blocks. + *

    + * The client MAY retry the request with the `allow_unverified` flag set. + */ + ALLOW_UNVERIFIED_REQUIRED = 5; + + /** + * The request for a verified block cannot be fulfilled.
    + * The client requested a verified block from a Block-Node but the + * requested block is not yet verified. + *

    + * The client MAY retry the request after a short delay + * (typically 2 seconds or more). + */ + VERIFIED_BLOCK_UNAVAILABLE = 6; +} + +/** + * A request to stream block items from Block-Node to a client. + * + * The Block-Node SHALL respond to this request with a stream of + * `SubscribeStreamResponse` messages.
    + * The Block-Node SHALL stream the full contents of the blocks requested.
    + * The block items SHALL be streamed in order originally produced within + * a block.
    + * The blocks SHALL be streamed in ascending order by `block_number`.
    + * The Block-Node SHALL end the stream when the last requested block has + * been sent.
    + * The Block-Node SHALL end the stream with a response code status of SUCCESS + * when the stream is complete.
    + * The client SHOULD call the `serverStatus` rpc prior to constructing this + * request to determine the available start and end blocks. + */ +message SubscribeStreamRequest { + /** + * A block number to start the stream. + *

    + * This SHALL be the block number of the first block returned.
    + * This field MUST be less than or equal to the latest available + * block number. + */ + uint64 start_block_number = 1; + + /** + * A block number to end the stream.
    + * This is optional, and if not set (0), the stream will be "infinite". + *

    + * This field MAY be zero (`0`) to indicate the stream SHOULD continue + * indefinitely, streaming new blocks as each becomes available.
    + * If this value is greater than zero (`0`) + *

      + *
    • This value SHALL be the number of the last block returned.
    • + *
    • This field MUST NOT be less than `start_block_number`.
    • + *
    • This SHOULD be a block number that is immediately available + * from the Block-Node.
    • + *
    • A Block-Node SHALL continue to stream blocks until the last + * requested block is transmitted.
    • + *
    • A Block-Node MAY reject a request for a block + * that is not yet available.
    • + *
    • A Block-Node MAY accept future block numbers.
    • + *
    • Block-Node implementations MAY charge increased fees for such + * "future" streams.
    • + *
    + */ + uint64 end_block_number = 2; + + /** + * A flag to indicate that the requested block(s) may be sent before + * verifying each block's `BlockProof`.
    + * This might be set by a client that expects to perform its own + * verification and wishes lower latency or, potentially, lower cost. + *

    + * If this value is set, then the responding Block-Node MAY respond with + * blocks that have not (yet) completed block proof verification.
    + * If this is _not set_ then the Block-Node MUST respond with only + * fully verified and validated block(s).
    + * If this is _set_, then a Block-Node MAY stream items from + * blocks that have not yet been verified or do not yet have + * a block proof available.
    + * The default value is _not set_. + */ + bool allow_unverified = 3; +} + +/** + * One item in a stream of `subscribeBlockStream` responses. + * + * The Block-Node SHALL respond to a `subscribeBlockStream` request with a + * stream of `SubscribeStreamResponse` messages.
    + * The Block-Node SHALL stream the full contents of the blocks requested.
    + * The block items SHALL be streamed in order originally produced within + * a block.
    + * The blocks SHALL be streamed in ascending order by `block_number`.
    + * The Block-Node SHALL end the stream when the last requested block has + * been sent.
    + * The Block-Node SHALL end the stream with a response code status of SUCCESS + * when the stream is complete.
    + * The Block-Node SHALL end the stream with a response code status of + * `READ_STREAM_INVALID_START_BLOCK_NUMBER` if the start block number is + * greater than the end block number.
    + * The Block-Node SHALL end the stream with a response code status of + * `READ_STREAM_INSUFFICIENT_BALANCE` if insufficient balance remains to + * complete the requested stream. + * The Block-Node SHALL make every reasonable effort to fulfill as much of the + * request as available balance supports, in the event balance is not + * sufficient to complete the request. + */ +message SubscribeStreamResponse { + oneof response { + /** + * A final response item describing the terminal status of this stream. + *

    + * The Block-Node SHALL end the stream following this message. + */ + SubscribeStreamResponseCode status = 1; + + /** + * A stream response item containing one or more `BlockItem`s. + *

    + * The full stream SHALL consist of many `block_items` messages + * followed by a single `status` message. + */ + BlockItemSet block_items = 2; + } +} + +/** +* An enumeration indicating the status of this request. +* +* This response code SHALL be the last message in the stream of responses. +* This code SHALL represent the final status of the full request. +*/ +enum SubscribeStreamResponseCode { + /** + * An "unset value" flag, this value SHALL NOT be used.
    + * This status indicates the server software failed to set a status, + * and SHALL be considered a software defect. + */ + READ_STREAM_UNKNOWN = 0; + + /** + * The requesting client account lacks sufficient HBAR to pay the + * service fee for this request. + *

    + * The client MAY retry the request, but MUST increase the client + * account balance with this Block-Node before doing so. + */ + READ_STREAM_INSUFFICIENT_BALANCE = 1; + + /** + * The request succeeded. + *

    + * The requested block(s) SHALL precede the status response + * with this value. + */ + READ_STREAM_SUCCESS = 2; + + /** + * The requested start block number is not valid.
    + * The start block number is after the end block number, less + * than `0`, or otherwise invalid.
    + * The client MAY retry this request, but MUST change the + * `start_block_number` field to a valid start block. + */ + READ_STREAM_INVALID_START_BLOCK_NUMBER = 3; + + /** + * The requested end block number is not valid.
    + * The end block number is greater than the highest current block + * number, less than `0`, or otherwise invalid.
    + * The client MAY retry this request, but MUST change the + * `end_block_number` field to a valid end block. + */ + READ_STREAM_INVALID_END_BLOCK_NUMBER = 4; + + /** + * The requested stream is not available.
    + * The client MAY retry again later. + */ + READ_STREAM_NOT_AVAILABLE = 5; +} + +/** + * A request to read a state snapshot. + * + * A state snapshot is a full copy of the network state at the completion of a + * particular block. + * + * This request MUST contain a block number that has already reached this + * Block-Node and completed verification, or request the "latest" snapshot.
    + * This request MAY specify the "latest" snapshot, and the Block-Node SHALL + * respond with a reference to a snapshot containing the most recent contents + * of the network state known to that Block-Node. + */ +message StateSnapshotRequest { + /** + * A block number. + *

    + * This SHALL be the last block number present in the snapshot + * returned.
    + * If `retrieve_latest` is set `true` this field SHOULD NOT be set + * and SHALL be ignored.
    + * A Block-Node MAY reject any request with a non-default + * value for this field, but MUST clearly document that behavior. + */ + uint64 last_block_number = 2; + + /** + * A boolean to request the latest available snapshot. + *

    + * This value MAY be set `true` to request the most recent state snapshot + * available.
    + * If this value is set to `true` then `last_block_number` SHOULD NOT be + * set and SHALL be ignored.
    + * A Block-Node MAY reject any request with that does _not_ + * set this field `true`, but MUST clearly document that behavior. + */ + bool retrieve_latest = 3; +} + +/** + * A response to a request for a state snapshot. + * + * This message SHALL deliver a _reference_ to the requested snapshot + * data if successful.
    + * This message SHALL deliver a code indicating the reason for failure + * if unsuccessful. + */ +message StateSnapshotResponse { + /** + * A status response. + *

    + * This code SHALL indicate a successful call, or the detailed + * reason for failure. + */ + StateSnapshotResponseCode status = 1; + + /** + * A block number. + *

    + * This SHALL be the number of the last block included in this + * state snapshot. + */ + uint64 last_block_number = 2; + + /** + * A reference to where the requested state snapshot may be obtained. + *

    + *

    REVIEW NOTE
    + * This is TEMPORARY. We have not yet designed how state snapshots may + * be sent. One idea is to use `Any` and let implementations decide; + * another is to use a time limited URL (with the same login as the + * Block-Node server); another is to use a customer-pays cloud + * storage bucket. + *
    + */ + string snapshot_reference = 3; +} + +/** + * An enumeration indicating the status of a StateSnapshotResponse request. + */ +enum StateSnapshotResponseCode { + /** + * An "unset value" flag, this value SHALL NOT be used.
    + * This status indicates the server software failed to set a status, + * and SHALL be considered a software defect. + */ + STATE_SNAPSHOT_UNKNOWN = 0; + + /** + * The requesting client account lacks sufficient HBAR to pay the + * service fee for this request. + *

    + * The client MAY retry the request, but MUST increase the client + * account balance with this Block-Node before doing so. + */ + STATE_SNAPSHOT_INSUFFICIENT_BALANCE = 1; + + /** + * The request succeeded. + *

    + * The full snapshot data MAY be read via the endpoint provided in the + * `snapshot_reference` field for the duration specified. + */ + STATE_SNAPSHOT_SUCCESS = 2; +} + +/** + * A request for the status of a Block-Node. + */ +message ServerStatusRequest {} + +/** + * A response to a server status request. + * + * This message SHALL provide a client with information needed to successfully + * query this Block-Node for a block, stream of blocks, or + * state snapshot.
    + * A request for blocks between `first_available_block` and + * `last_available_block`, inclusive, SHOULD succeed. Any request for blocks + * outside that range SHOULD fail. + */ +message ServerStatusResponse { + /** + * The lowest numbered block available on this Block-Node. + *

    + * Any request for a block with lower number than this value SHALL fail + * with a status value indicating and invalid start block number. + */ + uint64 first_available_block = 1; + + /** + * The greatest block number available from this Block-Node. + *

    + * Any request for a block with a block number higher than this + * value MAY fail. + */ + uint64 last_available_block = 2; + + /** + * A flag indicating this Block-Node only offers the latest state snapshot. + *

    + * If this value is `true` the client MUST set `retrieve_latest` `true` + * in any `StateSnapshotRequest` sent to this Block-Node. + */ + bool only_latest_state = 3; + + /** + * Version information.
    + * Versions for the block network address book, block stream protocol + * buffer schema, and Block-Node software. + */ + BlockNodeVersions version_information = 4; +} + +/** + * Version information for a Block-Node. + * + * The `stream_proto_version` SHOULD be an officially released Block Stream + * version. + * The `address_book_version` SHALL be determined by networks of Block-Nodes. + * The `software_version` SHALL be determined by the implementation of this + * specification. + */ +message BlockNodeVersions { + /** + * A version of the Block-Node network address book.
    + * The address book version describes what version of address book + * this Block-Node holds for discovering and identifying other Block-Nodes. + *

    + * This version SHALL be specific to each "network" of interconnected + * Block-Nodes. + */ + proto.SemanticVersion address_book_version = 1; + + /** + * A version of the Block Stream specification.
    + * This is the Stream version currently supported by this Block-Node. + *

    + * Implementations SHOULD make reasonable effort to ensure the latest + * released Block Stream version is supported.
    + * This version MUST be an officially released Block Stream version if + * the responding Block-Node is not private. + */ + proto.SemanticVersion stream_proto_version = 2; + + /** + * A version of the Block-Node software.
    + * This is the software version that this Block-Node is currently + * running. + *

    + * This value is implementation-defined. + */ + proto.SemanticVersion software_version = 3; +} + +/** + * Remote procedure calls (RPCs) for the Block-Node ancillary services. + */ +service BlockNodeService { + /** + * Read the status of this Block-Node. + *

    + * A client SHOULD request server status prior to requesting block stream + * data or a state snapshot. + */ + rpc serverStatus(ServerStatusRequest) returns (ServerStatusResponse); +} + +/** + * Remote procedure calls (RPCs) for the Block-Node block services. + */ +service BlockAccessService { + /** + * Read a single block from the Block-Node. + *

    + * The request SHALL describe the block number of the block to retrieve. + */ + rpc singleBlock(SingleBlockRequest) returns (SingleBlockResponse); +} + +/** + * Remote procedure calls (RPCs) for the Block-Node state snapshot + * and query services. + */ +service StateService { + /** + * Read a state snapshot from the Block-Node. + *

    + * The request SHALL describe the last block number present in the + * snapshot.
    + * Block-Node implementations MAY decline a request for a snapshot older + * than the latest available, but MUST clearly document this behavior. + */ + rpc stateSnapshot(StateSnapshotRequest) returns (StateSnapshotResponse); +} + +/** + * Remote procedure calls (RPCs) for the Block-Node stream services. + */ +service BlockStreamService { + /** + * Publish a stream of blocks. + *

    + * Each item in the stream MUST contain one `BlockItem`.
    + * Each Block MUST begin with a single `BlockHeader` block item.
    + * The Block-Node SHALL append each `BlockItem` to an internal structure + * to construct full blocks.
    + * Each Block MUST end with a single `BlockStateProof` block item.
    + * It is RECOMMENDED that the implementations verify the Block using the + * `BlockStateProof` to validate all data was received correctly.
    + * This API SHOULD, generally, be restricted based on mTLS authentication + * to a limited set of Publisher (i.e. consensus node) systems. + */ + rpc publishBlockStream (stream PublishStreamRequest) returns (stream PublishStreamResponse); + + /** + * Subscribe to a stream of blocks. + *

    + * Each item in the stream SHALL contain one `BlockItem` or a + * response code.
    + * The request message MUST specify start and end block numbers + * to return/
    + * The Block-Node SHALL stream the full contents of the blocks + * requested.
    + * The block items SHALL be streamed in order originally produced within + * a block.
    + * The blocks shall be streamed in ascending order by `block_number`.
    + * The Block-Node SHALL end the stream when the last requested block, + * if set, has been sent.
    + * A request with an end block of `0` SHALL be interpreted to indicate the + * stream has no end. The Block-Node SHALL continue to stream new blocks + * as soon as each becomes available.
    + * The Block-Node SHALL end the stream with response code containing a + * status of SUCCESS when the stream is complete.
    + * The Block-Node SHALL end the stream with a response code containing a + * status of `READ_STREAM_INVALID_START_BLOCK_NUMBER` if the start block + * number is greater than the end block number.
    + * The Block-Node SHALL end the stream with a response code containing a + * status of `READ_STREAM_PAYMENT_INSUFFICIENT` if insufficient payment + * remains to complete the requested stream.
    + * The Block-Node SHALL make every reasonable effort to fulfill as much + * of the request as possible in the event payment is not sufficient to + * complete the request. + */ + rpc subscribeBlockStream(SubscribeStreamRequest) returns (stream SubscribeStreamResponse); +} diff --git a/proto_src/block/stream/block.proto b/proto_src/block/stream/block.proto new file mode 100644 index 000000000..336b3dffa --- /dev/null +++ b/proto_src/block/stream/block.proto @@ -0,0 +1,71 @@ +/** + * # Block Stream + * The base element of the block stream _at rest_. + * A `Block` contains a record of all transactions, results, and outputs for + * a block in the chain. Each `Block` also contains a state proof for + * validation and a header with version and algorithm information. + * + * Block entries are not designed for streaming, but for storing blocks in + * persistent storage, verifying block stream data, and as query responses + * when a block is requested from a block node. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package com.hedera.hapi.block.stream; + +/* + * Copyright (C) 2024 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.hapi.block.stream.protoc"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "stream/block_item.proto"; + +/** + * A single complete Hedera block chain block. + * + * This is a single block structure and SHALL NOT represent the primary + * mechanism to transmit a block stream.
    + * The primary mechanism for transmitting block stream data SHALL be to + * stream individual block items to the block node(s).
    + * The only delimiter between blocks when streamed SHALL be the `BlockHeader` + * item and `BlockProof` item. + * + * This block SHALL be verifiable as correct using only data in the block, + * including the `BlockProof`, and public keys for the consensus nodes. + */ +message Block { + /** + * A list of items that, together, make up this block. + *

    + * This list SHALL begin with a `BlockHeader`.
    + * This list SHALL end with a `BlockProof`.
    + * Items in this list SHALL be in exactly the same order produced by + * consensus.
    + * Items in this list MAY be filtered, if so requested.
    + * If this list is filtered, removed items SHALL be replaced with + * `FilteredBlockItem` entries.
    + */ + repeated BlockItem items = 1; +} diff --git a/proto_src/block/stream/block_item.proto b/proto_src/block/stream/block_item.proto new file mode 100644 index 000000000..d877f14e8 --- /dev/null +++ b/proto_src/block/stream/block_item.proto @@ -0,0 +1,290 @@ +/** + * # Block Item + * A single item in the block stream, such as transaction data, event metadata, + * or a a system transaction.
    + * Each block consists of a block header, one or more block items, + * and a block state proof. Within the block are a series of events delimited + * by start_event block items. + * + * This structure here MUST support a stream of block items with no enclosing + * message.
    + * Implementations SHOULD behave in a reasonable manner if used in a gRPC + * bidirectional streaming RPC similar to + * `rpc processBlocks(stream BlockItem) returns (stream Acknowledgement);`. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package com.hedera.hapi.block.stream; + +/* + * Copyright (C) 2024 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.hapi.block.stream.protoc"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "event/event_transaction.proto"; +import "stream/block_proof.proto"; +import "stream/record_file_item.proto"; +import "stream/input/event_metadata.proto"; +import "stream/input/round_header.proto"; +import "stream/output/block_header.proto"; +import "stream/output/state_changes.proto"; +import "stream/output/transaction_output.proto"; +import "stream/output/transaction_result.proto"; + +/** + * A single item within a block stream. + * + * Each item in the block stream SHALL be self-contained and independent, + * with the following constraints applicable to the _unfiltered_ stream. + * - A block SHALL start with a `header`. + * - A block SHALL end with a `state_proof`. + * - A `block_header` SHALL be followed by an `event_header`. + * - An `event_header` SHALL be followed by one or more + * `event_transaction` items. + * - An `event_transaction` SHALL be followed by a `transaction_result`. + * - A `transaction_result` MAY be followed by a `transaction_output`. + * - A `transaction_result` (or a `transaction_output`, if present) MAY be + * followed by one or more `state_changes`. + * + * This forms the following required sequence for each block, which is then + * repeated within the block stream, indefinitely. Note that there is no + * container structure in the stream, the indentation below is only to + * highlight repeated subsequences.
    + * The order of items within each block below is REQUIRED and SHALL NOT change. + * + * ```text + * header + * repeated { + * start_event + * repeated { + * event_transaction + * transaction_result + * (optional) transaction_output + * (optional) repeated state_changes + * } + * } + * state_proof + * ``` + * A filtered stream may exclude some items above, depending on filter + * criteria. A filtered item is replaced with a merkle path and hash value + * to maintain block stream verifiability. + * + * A BlockItem SHALL be individually and directly processed to create the + * item hash.
    + * Items to be hashed MUST NOT be contained within another item.
    + * Items which might be filtered out of the stream MUST NOT be + * contained in other items. + * + * ### Forward Compatibility + * In order to maximize forward compatibility, and minimize the need to + * coordinate deployments of different systems creating and processing + * block streams in the future, the following rules SHALL be followed + * for field numbering in this message. + * - The first 15 field numbers SHALL be assigned to the fields present + * in the first release. Unused fields in this range SHALL remain reserved + * until needed for additional options that do not fit into "input" or + * "output" categories. + * - Fields numbered 16 and above MUST be numbered as follows. + * - "input" items MUST use `odd` field numbers. + * - "output" items MUST use `even` field numbers. + * + * #### Forward Compatibility Example + * A future update adding three new items. A "BlockTrailer" item which is + * neither input nor output, a new "ConsensusTransom" which is an input, + * and a new "BridgeTransform" which is an output. + * - The "BlockTrailer" is field 11, which is removed from the `reserved` list. + * - The "ConsensusTransom" is an input, so it is field `17` (the first unused + * `odd` field greater than or equal to 16). + * - The "BridgeTransform" is an output, so it is field `16` (the first unused + * even field greater than or equal to 16). + * + * #### Initial Field assignment to "input", "output", and "other" categories. + * - Inputs + * - `event_header` + * - `round_header` + * - `event_transaction` + * - Outputs + * - `block_header` + * - `transaction_result` + * - `transaction_output` + * - `state_changes` + * - Any subtree (depending on what was filtered). + * This item details it's path in the tree. + * - `filtered_item_hash` + * - Neither input nor output (and not part of the "proof" merkle tree) + * - `block_proof` + * - `record_file` + */ +message BlockItem { + // Reserved for future items that are neither "input" nor "output". + reserved 11,12,13,14,15; + + oneof item { + /** + * An header for the block, marking the start of a new block. + */ + com.hedera.hapi.block.stream.output.BlockHeader block_header = 1; + + /** + * An header emitted at the start of a new network "event". + *

    + * This item SHALL contain the properties relevant to a single + * gossip event. + */ + com.hedera.hapi.block.stream.input.EventHeader event_header = 2; + + /** + * An header emitted at the start of a new consensus "round". + *

    + * This item SHALL contain the properties relevant to a single + * consensus round. + */ + com.hedera.hapi.block.stream.input.RoundHeader round_header = 3; + + /** + * A single transaction. + *

    + * This item SHALL contain the serialized bytes of a + * single transaction.
    + * Each event transaction SHALL be either a `SignedTransaction` or + * an internal system-generated transaction.
    + * This item MUST NOT contain data for more than one + * `SignedTransaction` or system-generated transaction. + */ + com.hedera.hapi.platform.event.EventTransaction event_transaction = 4; + + /** + * The result of running a transaction. + *

    + * This item SHALL be present immediately after an + * `event_transaction` item.
    + * This item MAY be redacted in some circumstances, and SHALL be + * replaced with a `filtered_item` if removed. + */ + com.hedera.hapi.block.stream.output.TransactionResult transaction_result = 5; + + /** + * A transaction output. + *

    + * This item MAY not be present if a transaction does not produce + * an output.
    + * If a transaction does produce an output that is not reflected + * in state changes, then this item MUST be present after the + * `transaction_result` for that transaction. + */ + com.hedera.hapi.block.stream.output.TransactionOutput transaction_output = 6; + + /** + * A set of state changes. + *

    + * All changes to values in network state SHALL be described by + * stream items of this type.
    + * The source of these state changes SHALL be described by the + * `reason` enumeration. + */ + com.hedera.hapi.block.stream.output.StateChanges state_changes = 7; + + /** + * Verification data for an item filtered from the stream.
    + * This is a hash for a merkle tree node where the contents of that + * part of the merkle tree have been removed from this stream. + *

    + * Items of this type SHALL NOT be present in the full (unfiltered) + * block stream.
    + * Items of this type SHALL replace any item removed from a partial + * (filtered) block stream.
    + * Presence of `filtered_item` entries SHALL NOT prevent verification + * of a block, but MAY preclude verification or reconstruction of + * consensus state.
    + */ + FilteredItemHash filtered_item_hash = 8; + + /** + * A signed block proof.
    + * The signed merkle proof for this block. This will validate + * a "virtual" merkle tree containing the previous block "virtual" + * root, an "input" subtree, an "output" subtree, and + * a "state changes" subtree. + *

    + * This item is not part of the block stream hash chain/tree, and + * MUST follow after the end of a block. + */ + BlockProof block_proof = 9; + + /** + * A record file and associated data. + *

    + * This MUST contain a single Record file, associated Sidecar files, + * and data from related Signature files. + * If this item is present, special treatment is + * REQUIRED for this block. + *

      + *
    • The block SHALL NOT have a `BlockHeader`.
    • + *
    • The block SHALL NOT have a `BlockProof`.
    • + *
    • The block SHALL contain _exactly one_ `RecordFileItem`.
    • + *
    • The block SHALL NOT contain any item other than a + * `RecordFileItem`.
    • + *
    • The content of the `RecordFileItem` MUST be validated using + * the signature data and content provided within according to + * the process used for Record Files prior to the creation + * of Block Stream.
    • + *
    + */ + RecordFileItem record_file = 10; + } +} + +/** + * Verification data for an item filtered from the stream. + * + * Items of this type SHALL NOT be present in the full (unfiltered) block + * stream.
    + * Items of this type SHALL replace any item removed from a partial (filtered) + * block stream.
    + * Presence of `filtered_item` entries SHALL NOT prevent verification + * of a block, but MAY preclude verification or reconstruction + * of consensus state.
    + */ +message FilteredItemHash { + /** + * A hash of an item filtered from the stream. + *

    + * The hash algorithm used MUST match the hash algorithm specified in + * the block header for the containing block.
    + * This field is REQUIRED. + */ + bytes item_hash = 1; + + /** + * A record of the merkle path to the item that was filtered + * from the stream.
    + * This path begins at the root of the block proof merkle tree. + *

    + * This REQUIRED field SHALL describe the full path in the virtual + * merkle tree constructed for the block proof that contained the + * item filtered from the stream. + */ + uint64 filtered_path = 3; +} diff --git a/proto_src/block/stream/block_proof.proto b/proto_src/block/stream/block_proof.proto new file mode 100644 index 000000000..7b594dcb2 --- /dev/null +++ b/proto_src/block/stream/block_proof.proto @@ -0,0 +1,227 @@ +/** + * # Block Proof + * A proof for the block streamed from a consensus node. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package com.hedera.hapi.block.stream; + +/* + * Copyright (C) 2024 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.hapi.block.stream.protoc"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +/** + * A cryptographic proof for the "Block Merkle Tree". + * + * This message SHALL offer a proof for the "Block Merkle Tree". + * The information in the "Block Merkle Tree" SHALL be used to validate the + * full content of the most recent block, and, with chained validation, + * all prior blocks. + * + * ### Block Merkle Tree + * The Block Hash of any block is a merkle root hash comprised of a 4 leaf + * binary merkle tree. The 4 leaves represent + * 1. Previous block proof hash + * 1. Merkle root of transaction inputs tree + * 1. Merkle root of transaction outputs tree + * 1. Merkle rook of state tree + * + * #### Computing the hash + * The process for computing a block hash is somewhat complex, and involves + * creating a "virtual" merkle tree to obtain the root merkle hash of + * that virtual tree.
    + * The merkle tree SHALL have a 4 part structure with 2 internal nodes, + * structured in a strictly binary tree. + * - The merkle tree root SHALL be the parent of both + * internal nodes. + * 1. The first "internal" node SHALL be the parent of the + * two "left-most" nodes. + * 1. The first leaf MUST be the previous block hash, and is a + * single 48-byte value. + * 1. The second leaf MUST be the root of a, strictly binary, merkle tree + * composed of all "input" block items in the block.
    + * Input items SHALL be transactions, system transactions, + * and events.
    + * Leaf nodes in this subtree SHALL be ordered in the same order + * that the block items are encountered in the stream. + * 1. The second "internal" node SHALL be the parent of the two + * "right-most" nodes. + * 1. The third leaf MUST be the root of a, strictly binary, merkle tree + * composed of all "output" block items in the block.
    + * Output items SHALL be transaction result, transaction + * output, and state changes.
    + * Leaf nodes in this subtree SHALL be ordered in the same order that + * the block items are encountered in the stream. + * 1. The fourth leaf MUST be the merkle tree root hash for network state + * at the start of the block, and is a single 48-byte value. + * - The block hash SHALL be the hash calculated for the root of this merkle + * tree. + * - The hash algorithm used SHALL be the algorithm specified in the + * corresponding block header. + * + * The "inputs" and "outputs" subtrees SHALL be "complete" binary merkle trees, + * with nodes that would otherwise be missing replaced by a "null" hash + * leaf. + */ +message BlockProof { + /** + * The block this proof secures.
    + * We provide this because a proof for a future block can be used to prove + * the state of the ledger at that block and the blocks before it.
    + *

    + * This value SHOULD match the block number of the current block, + * under normal operation. + */ + uint64 block = 1; + + /** + * A merkle root hash of the previous block. + *

    + * This MUST contain a hash of the "block" merkle tree root for the + * previous block.
    + * The hash algorithm used MUST match the algorithm declared in the + * block header _for that block_. + */ + bytes previous_block_root_hash = 2; + + /** + * A merkle root hash of the network state.
    + * This is present to support validation of this block proof by clients + * that do not maintain a full copy of the network state. + *

    + * This MUST contain a hash of the "state" merkle tree root at the start + * of the current block (which this block proof verifies).
    + * State processing clients SHOULD calculate the state root hash + * independently and SHOULD NOT rely on this value.
    + * State processing clients MUST validate the application of state changes + * for a block using the value present in the Block Proof of the + * _following_ block. + * Compliant consensus nodes MUST produce an "empty" block (containing + * only `BlockHeader` and `BlockProof` as the last block prior to a + * network "freeze" to ensure the final state hash is incorporated into + * the Block Stream correctly. + * Stateless (non-state-processing) clients MUST use this value to + * construct the block merkle tree. + */ + bytes start_of_block_state_root_hash = 3; + + /** + * A TSS signature for one block.
    + * This is a single signature representing the collection of partial + * signatures from nodes holding strictly greater than 2/3 of the + * current network "weight" in aggregate. The signature is produced by + * cryptographic "aggregation" of the partial signatures to produce a + * single signature that can be verified with the network public key, + * but could not be produced by fewer nodes than required to meet the + * threshold for network stake "weight". + *

    + * This message MUST make use of a threshold signature scheme like `BLS` + * which provides the necessary cryptographic guarantees.
    + * This signature SHALL use a TSS signature to provide a single signature + * that represents the consensus signature of consensus nodes.
    + * The exact subset of nodes that signed SHALL neither be known nor + * tracked, but it SHALL be cryptographically verifiable that the + * threshold was met if the signature itself can be validated with + * the network public key (a.k.a `LedgerID`). + */ + bytes block_signature = 4; + + /** + * A set of hash values along with ordering information.
    + * This list of hash values form the set of sibling hash values needed to + * correctly reconstruct the parent hash, and all hash values "above" that + * hash in the merkle tree. + *

    + * A Block proof can be constructed by combining the sibling hashes for + * a previous block hash and sibling hashes for each entry "above" that + * node in the merkle tree of a block proof that incorporates that previous + * block hash. This form of block proof may be used to prove a chain of + * blocks when one or more older blocks is missing the original block + * proof that signed the block's merkle root directly. + *

    + * This list MUST be ordered from the sibling of the node that contains + * this block's root node hash, and continues up the merkle tree to the + * root hash of the signed block proof. + *

    + * If this block proof has a "direct" signature, then this list MUST be + * empty.
    + * If this list is not empty, then this block proof MUST be verified by + * first constructing the "block" merkle tree and computing the root hash + * of that tree, then combining that hash with the values in this list, + * paying attention to the first/second sibling ordering, until the root + * merkle hash is produced from the last pair of sibling hashes. That + * "secondary" root hash MUST then be verified using + * the value of `block_signature`. + */ + repeated MerkleSiblingHash sibling_hashes = 5; + + oneof verification_reference { + /** + * The id of the hinTS scheme this signature verifies under. + */ + uint64 scheme_id = 6; + + /** + * The explicit hinTS key this signature verifies under; useful when + * the verifier can easily check whether a chain-of-trust proof + * exists for a key, but does does not have any context of the + * latest hinTS schemes published in the block stream. + */ + bytes verification_key = 7; + } +} + +/** + * A hash of a "sibling" to an entry in a Merkle tree. + * + * When constructing a binary merkle tree, each internal node is a hash + * constructed from the hash of two "descendant" nodes. Those two nodes + * are "siblings" and the order (first, second) in which the two hash values + * are combined affects the parent hash.
    + * This may be used to reconstruct a portion of a merkle tree starting from + * a node of interest up to the root of the tree. + */ +message MerkleSiblingHash { + /** + * A flag for the position of this sibling. + *

    + * If this is set then this sibling MUST be the first hash in the pair of + * sibling hashes of a binary merkle tree.
    + * If this is unset, then this sibling MUST be the second hash in the pair + * of sibling hashes of a binary merkle tree. + */ + bool is_first = 1; + + /** + * A byte array of a sibling hash.
    + * This is the hash for the sibling at this point in the merkle tree. + *

    + * The algorithm for this hash SHALL match the algorithm for the block that + * contains this sibling.
    + * This SHALL contain the raw (e.g.) 384 bits (48 bytes) of the hash value. + */ + bytes sibling_hash = 2; +} diff --git a/proto_src/block/stream/input/event_metadata.proto b/proto_src/block/stream/input/event_metadata.proto new file mode 100644 index 000000000..62731654d --- /dev/null +++ b/proto_src/block/stream/input/event_metadata.proto @@ -0,0 +1,76 @@ +/** + * # Event Header + * This header precedes the event messages that contain transactions. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package com.hedera.hapi.block.stream.input; + +/* + * Copyright (C) 2024 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.hapi.block.stream.input.protoc"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "event/event_core.proto"; +import "event/event_descriptor.proto"; + +/** + * A header for a single event.
    + * This message delivers information about an event and its parents. + */ +message EventHeader { + /** + * An event core value.
    + */ + com.hedera.hapi.platform.event.EventCore event_core = 1; + + /** + * A list of references to parent events.
    + */ + repeated ParentEventReference parents = 2; + + /** + * The middle bit of the node's signature on the event.
    + */ + bool signature_middle_bit = 3; +} + +/* + * A reference to a parent event. + */ +message ParentEventReference { + + oneof parent { + /** + * An EventDescriptor for the parent event outside of the containing block. + */ + com.hedera.hapi.platform.event.EventDescriptor event_descriptor = 1; + + /** + * An index of the parent event within the containing block. + */ + uint32 index = 2; + } +} \ No newline at end of file diff --git a/proto_src/block/stream/input/round_header.proto b/proto_src/block/stream/input/round_header.proto new file mode 100644 index 000000000..d215d718a --- /dev/null +++ b/proto_src/block/stream/input/round_header.proto @@ -0,0 +1,46 @@ +/** + * # Round Header + * This header delineates the start of a single consensus round. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package com.hedera.hapi.block.stream.input; + +/* + * Copyright (C) 2024 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.hapi.block.stream.input.protoc"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +/** + * A header for a single round.
    + * This message delivers information about a consensus round. + */ +message RoundHeader { + /** + * A round number.
    + * This is the number assigned to the round for consensus. + */ + uint64 round_number = 1; +} diff --git a/proto_src/block/stream/output/block_header.proto b/proto_src/block/stream/output/block_header.proto new file mode 100644 index 000000000..09eebec18 --- /dev/null +++ b/proto_src/block/stream/output/block_header.proto @@ -0,0 +1,110 @@ +/** + * # Block Header + * The block header reports information required to correctly process a block. + * This includes versions, block number, and algorithms used. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package com.hedera.hapi.block.stream.output; + +/* + * Copyright (C) 2024 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.hapi.block.stream.output.protoc"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; +import "timestamp.proto"; + +/** + * A Block Header. + * + * Each block in the block stream SHALL begin with a block header.
    + * The block header SHALL provide the base minimum information needed to + * correctly interpret and process that block, or stop processing + * if appropriate.
    + * The block header MUST describe, at minimum, the following items. + * - The version of the block stream data + * - The block number + * - The hash of the previous block + * - The hash algorithm used to generate the block hash + * + * All fields of this message are REQUIRED, with the exception that + * `hash_algorithm` MAY be _transmitted_ as a default value to improve + * data efficiency. + */ +message BlockHeader { + /** + * A version of the HAPI specification.
    + * This is the API version that was used to serialize the block. + */ + proto.SemanticVersion hapi_proto_version = 1; + + /** + * A version of the consensus node software.
    + * This is the software version that executed the transactions + * within this block. + */ + proto.SemanticVersion software_version = 2; + + /** + * A block number for this block. + *

    + * This value MUST be exactly `1` more than the previous block.
    + * Client systems SHOULD optimistically reject any block with a gap or + * reverse in `number` sequence, and MAY assume the block stream has + * encountered data loss, data corruption, or unauthorized modification. + */ + uint64 number = 3; + + /** + * The timestamp for this block.
    + * The block timestamp is the consensus time stamp of the first round + * in the block. + *

    + * This SHALL be a timestamp for the block, determined as follows:
    + * Given the first round within a block + *

      + *
    • If the round contains events and transactions, the + * timestamp SHALL be the timestamp of the last transaction in + * the round.
    • + *
    • If the round has events but no transactions the timestamp + * SHALL be the timestamp of the last event in the round.
    • + *
    • If the round contains no events or transactions, the + * timestamp SHALL be the timestamp of the previous round plus + * 1000 nanoseconds.
    • + *
    • If the round contains no events or transactions and there + * is no previous round, the timestamp SHALL be the median of + * the judge created timestamps for this round.
    • + *
    + */ + proto.Timestamp block_timestamp = 4; + + /** + * A hash algorithm used for this block, including the block proof. + *

    + * This SHOULD always be `SHA2_384`, currently. + */ + proto.BlockHashAlgorithm hash_algorithm = 5; +} diff --git a/proto_src/block/stream/output/consensus_service.proto b/proto_src/block/stream/output/consensus_service.proto new file mode 100644 index 000000000..1e7d53198 --- /dev/null +++ b/proto_src/block/stream/output/consensus_service.proto @@ -0,0 +1,166 @@ +/** + * # Consensus Service + * Block stream messages that report the results of transactions handled + * by the `Consensus` service. + * + * ### Topic Running Hash Calculation + * Submitted messages include a topic running hash. This value has changed + * over time, with the known versions detailed in the `RunningHashVersion` + * enumeration. The running hash version SHALL NOT be transmitted in the + * Block Stream, however, as it is a fixed value that can only be changed + * with a new release of consensus node software following a HIP to update + * the specification, so repeating that fixed value in the block stream is + * wasteful and unnecessary. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package com.hedera.hapi.block.stream.output; + +import "custom_fees.proto"; + +/* + * Copyright (C) 2024 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.hapi.block.stream.output.protoc"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +/** + * Block Stream data for a `createTopic` transaction. + * + * This message SHALL NOT duplicate information already contained in the + * original transaction. + */ +message CreateTopicOutput {} + +/** + * Block Stream data for a `updateTopic` transaction. + * + * This message SHALL NOT duplicate information already contained in the + * original transaction. + */ +message UpdateTopicOutput {} + +/** + * Block Stream data for a `deleteTopic` transaction. + * + * This message SHALL NOT duplicate information already contained in the + * original transaction. + */ +message DeleteTopicOutput {} + +/** + * Block Stream data for a `submitMessage` transaction. + * + * This message SHALL NOT duplicate information already contained in the + * original transaction.
    + * The actual topic running hash SHALL be present in a `StateChanges` block + * item, and is not duplicated here. + */ +message SubmitMessageOutput {} + +/** + * A version of the topic running hash. + * + * The inputs to the topic running hash have changed over time. + * This is tracked in earlier record streams as an integer. For the + * block stream we chose to use an enumeration for both efficiency + * and clarity. Placing the most recent, and most common/highest + * volume, version as `0` reduces the serialized size of this message + * by not serializing that default value. + * + *


    + * + * The topic running hash is a 48-byte value that is the output + * of a hash digest with input data determined by the value of + * the `topic_running_hash_version` field.
    + * All new transactions SHALL use `topic_running_hash_version` + * `WITH_MESSAGE_DIGEST_AND_PAYER`.
    + */ +enum RunningHashVersion { + /** + * The most recent version. + *

    + * This version SHALL include, in order + *

      + *
    1. The previous running hash of the topic (48 bytes)
    2. + *
    3. The `topic_running_hash_version` field (8 bytes)
    4. + *
    5. The payer account's shard (8 bytes)
    6. + *
    7. The payer account's realm (8 bytes)
    8. + *
    9. The payer account's number (8 bytes)
    10. + *
    11. The topic's shard (8 bytes)
    12. + *
    13. The topic's realm (8 bytes)
    14. + *
    15. The topic's number (8 bytes)
    16. + *
    17. The number of seconds since the epoch when the + * `ConsensusSubmitMessage` reached consensus (8 bytes)
    18. + *
    19. The number of nanoseconds within the second when the + * `ConsensusSubmitMessage` reached consensus (4 bytes)
    20. + *
    21. The `topic_sequence_number` field (8 bytes)
    22. + *
    23. The output of a SHA-384 digest of the message bytes from the + * `ConsensusSubmitMessage` (48 bytes)
    24. + *
    + */ + WITH_MESSAGE_DIGEST_AND_PAYER = 0; + + /** + * An earlier version. + *

    + * This version SHALL include, in order + *

      + *
    1. The previous running hash of the topic (48 bytes)
    2. + *
    3. The `topic_running_hash_version` field (8 bytes)
    4. + *
    5. The topic's shard (8 bytes)
    6. + *
    7. The topic's realm (8 bytes)
    8. + *
    9. The topic's number (8 bytes)
    10. + *
    11. The number of seconds since the epoch when the + * `ConsensusSubmitMessage` reached consensus (8 bytes)
    12. + *
    13. The number of nanoseconds within the second when the + * `ConsensusSubmitMessage` reached consensus (4 bytes)
    14. + *
    15. The `topic_sequence_number` field (8 bytes)
    16. + *
    17. The output of a SHA-384 digest of the message bytes from the + * `ConsensusSubmitMessage` (48 bytes)
    18. + *
    + */ + WITH_MESSAGE_DIGEST = 1; + + /** + * The original version, used at genesis. + *

    + * This version SHALL include, in order + *

      + *
    1. The previous running hash of the topic (48 bytes)
    2. + *
    3. The topic's shard (8 bytes)
    4. + *
    5. The topic's realm (8 bytes)
    6. + *
    7. The topic's number (8 bytes)
    8. + *
    9. The number of seconds since the epoch when the + * `ConsensusSubmitMessage` reached consensus (8 bytes)
    10. + *
    11. The number of nanoseconds within the second when the + * `ConsensusSubmitMessage` reached consensus (4 bytes)
    12. + *
    13. The `topic_sequence_number` field (8 bytes)
    14. + *
    15. The message bytes from the `ConsensusSubmitMessage` + * (variable)
    16. + *
    + */ + WITH_FULL_MESSAGE = 2; +} diff --git a/proto_src/block/stream/output/crypto_service.proto b/proto_src/block/stream/output/crypto_service.proto new file mode 100644 index 000000000..99dbe95a0 --- /dev/null +++ b/proto_src/block/stream/output/crypto_service.proto @@ -0,0 +1,103 @@ +/** + * # Crypto Service + * Block stream messages that report the results of transactions handled by + * the `Crypto` service. This service primarily handles account management + * and HBAR transfers. + * + * > Note + * >> Tokens other than HBAR, including all NFTs, are managed by the `Token` Service. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package com.hedera.hapi.block.stream.output; + +/* + * Copyright (C) 2024 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.hapi.block.stream.output.protoc"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "custom_fees.proto"; +import "basic_types.proto"; + +/** + * Block Stream data for a `approveAllowances` transaction. + * + * This message SHALL NOT duplicate information already contained in + * the original transaction. + */ +message ApproveAllowanceOutput {} + +/** + * Block Stream data for a `deleteAllowances` transaction. + * + * This message SHALL NOT duplicate information already contained in + * the original transaction. + */ +message DeleteAllowanceOutput {} + +/** + * Block Stream data for a `createAccount` transaction. + * + * This message SHALL NOT duplicate information already contained in + * the original transaction. + */ +message CreateAccountOutput { + /** + * A newly created account identifier.
    + * This is the account identifier for the account created as part of + * any transaction that creates a new account.
    + * This value is necessary due to the difficulty of otherwise identifying + * created accounts versus the other account updates necessary for every + * transaction (e.g. fee payment). + *

    + * This value SHALL be set for every account creation. + * This value SHALL NOT be set if no account is created. + */ + proto.AccountID created_account_id = 1; +} + +/** + * Block Stream data for a `cryptoDelete` transaction. + * + * This message SHALL NOT duplicate information already contained in + * the original transaction. + */ +message DeleteAccountOutput {} + +/** + * Block Stream data for a `cryptoTransfer` transaction. + * + * This message SHALL NOT duplicate information already contained in + * the original transaction. + */ +message CryptoTransferOutput {} + +/** + * Block Stream data for a `updateAccount` transaction. + * + * This message SHALL NOT duplicate information already contained in + * the original transaction. + */ +message UpdateAccountOutput {} diff --git a/proto_src/block/stream/output/file_service.proto b/proto_src/block/stream/output/file_service.proto new file mode 100644 index 000000000..1ec8d8f38 --- /dev/null +++ b/proto_src/block/stream/output/file_service.proto @@ -0,0 +1,96 @@ +/** + * # File Service + * Block stream messages that report the results of transactions handled + * by the `File` service. + * + * A `file` in Hedera is an arbitrary sequence of bytes and may be up to + * `1048576` total bytes. Files are used anywhere a transaction requires a + * large amount of data (anything that would not fit within the + * transaction size limit). + * + * Examples + * - smart contract bytecode + * - network configuration updates + * - network fee schedules + * - image files for NFTs + * - property title documents + * There are many other uses; these examples are illustrative. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package com.hedera.hapi.block.stream.output; + +/* + * Copyright (C) 2024 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.hapi.block.stream.output.protoc"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +/** + * Block Stream data for a `fileAppend` transaction. + * + * This message SHALL NOT duplicate information already contained + * in the original transaction. + */ +message AppendFileOutput {} + +/** + * Block Stream data for a `fileCreate` transaction. + * + * This message SHALL NOT duplicate information already contained in + * the original transaction. + */ +message CreateFileOutput {} + +/** + * Block Stream data for a `fileDelete` transaction. + * + * This message SHALL NOT duplicate information already contained in + * the original transaction. + */ +message DeleteFileOutput {} + +/** + * Block Stream data for a `fileUpdate` transaction. + * + * This message SHALL NOT duplicate information already contained in + * the original transaction. + */ +message UpdateFileOutput {} + +/** + * Block Stream data for a `systemDelete` transaction. + * + * This message SHALL NOT duplicate information already contained in + * the original transaction. + */ +message SystemDeleteOutput {} + +/** + * Block Stream data for a `systemUndelete` transaction. + * + * This message SHALL NOT duplicate information already contained in + * the original transaction. + */ +message SystemUndeleteOutput {} diff --git a/proto_src/block/stream/output/network_service.proto b/proto_src/block/stream/output/network_service.proto new file mode 100644 index 000000000..134f6aa11 --- /dev/null +++ b/proto_src/block/stream/output/network_service.proto @@ -0,0 +1,48 @@ +/** + * # Network Admin + * Network Admin service transactions. + * + * The network service handles certain critical transactions, but the + * transaction output for those transactions is complex and may be difficult + * to handle, so this file is not yet filled in. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package com.hedera.hapi.block.stream.output; + +/* + * Copyright (C) 2024 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.hapi.block.stream.output.protoc"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +message UpdateNodeStakeOutput {} + +message FreezeOutput {} + +// There is no message for `uncheckedSubmit`; that transaction is handled by +// workflow *before* consensus. Only the wrapped transaction is submitted to +// consensus, and that is what will appear in the block stream. Also, +// `uncheckedSubmit` MUST NOT ever be enabled in any public network +// (i.e. previewnet, testnet, mainnet). diff --git a/proto_src/block/stream/output/schedule_service.proto b/proto_src/block/stream/output/schedule_service.proto new file mode 100644 index 000000000..13eb014d0 --- /dev/null +++ b/proto_src/block/stream/output/schedule_service.proto @@ -0,0 +1,122 @@ +/** + * # Schedule Service + * Block stream messages that report the results of transactions handled by + * the `Schedule` service. + * + * The Schedule service handles delayed execution in two major forms. + * - Transactions that only execute after being signed, via scheduleSign + * transactions, with additional keys beyond the keys that signe the + * scheduleCreate transaction. + * - Transactions that only execute after a specified consensus time. + * + * Some outputs contain a scheduled transaction identifier.
    + * That value SHALL be set if, and only if, the transaction resulted in + * _execution_ of the scheduled child transaction.
    + * Most outputs from this service SHALL NOT set the scheduled transaction + * identifier, because the transaction has not executed yet. Only when the + * schedule has gathered all of the signatures required to execute the + * scheduled child transaction is the network able to execute that child + * transaction, and assign a final transaction identifier. + * + * When a scheduled child transaction is executed, the identifier of the + * schedule that executed that transaction SHALL be included as a + * `schedule_ref` in the _result_ for the _child_ transaction.
    + * The output of the schedule transaction (create or sign) SHALL NOT contain + * the `schedule_ref`. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package com.hedera.hapi.block.stream.output; + +/* + * Copyright (C) 2024 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.hapi.block.stream.output.protoc"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; + +/** + * Block Stream data for a `createSchedule` transaction. + * + * This message SHALL NOT duplicate information already contained in + * the original transaction. + */ +message CreateScheduleOutput { + /** + * A schedule identifier. + *

    + * If the status of the transaction is `SUCCESS`, this value SHALL be + * set to the identifier of the schedule that was created. If the + * transaction status is `IDENTICAL_SCHEDULE_ALREADY_CREATED`, this + * value SHALL be set to the identifier of the existing schedule that + * is identical to the one that was attempted to be created. For any + * other status, this value SHALL NOT be set. + */ + proto.ScheduleID schedule_id = 1; + + /** + * A scheduled transaction identifier. + *

    + * This value SHALL be the transaction identifier for the _scheduled_ + * child transaction executed as a result of gathering sufficient + * signatures to complete the schedule.
    + * This value SHALL NOT be set unless the scheduled transaction was + * executed as a child of this schedule create transaction.
    + * This value SHALL NOT be set unless this schedule create transaction + * was signed by sufficient keys to meet the signature requirements + * for the scheduled child transaction immediately. + */ + proto.TransactionID scheduled_transaction_id = 2; +} + +/** + * Block Stream data for a `deleteSchedule` transaction. + * + * This message SHALL NOT duplicate information already contained in + * the original transaction. + */ +message DeleteScheduleOutput {} + +/** + * Block Stream data for a `signSchedule` transaction. + * + * This message SHALL NOT duplicate information already contained in + * the original transaction. + */ +message SignScheduleOutput { + /** + * A scheduled transaction identifier. + *

    + * This value SHALL be the transaction identifier for the _scheduled_ + * child transaction executed as a result of gathering sufficient + * signatures to complete the schedule.
    + * This value SHALL NOT be set unless the scheduled transaction was + * executed as a child of this schedule sign transaction.
    + * This value SHALL NOT be set unless this schedule sign transaction + * was signed by sufficient additional keys to meet the signature + * requirements for the scheduled child transaction. + */ + proto.TransactionID scheduled_transaction_id = 1; +} diff --git a/proto_src/block/stream/output/smart_contract_service.proto b/proto_src/block/stream/output/smart_contract_service.proto new file mode 100644 index 000000000..193fc3202 --- /dev/null +++ b/proto_src/block/stream/output/smart_contract_service.proto @@ -0,0 +1,179 @@ +/** + * # Service + * Block stream messages that report the results of transactions handled + * by the `smart contract` service. + * + * > REVIEW NOTE + * >> The use of sidecar records is a bit odd here. We may find it more + * >> effective to extract the actual changes into proper output messages + * >> and fields included in the ethereum call output and/or related state + * >> changes items, and remove the whole sidecar concept going forward. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package com.hedera.hapi.block.stream.output; + +/* + * Copyright (C) 2024 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.hapi.block.stream.output.protoc"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "contract_types.proto"; +import "sidecar_file.proto"; + +/** + * Block Stream data for a `contractCallMethod` transaction. + * + * This message SHALL NOT duplicate information already contained in + * the original transaction. + */ +message CallContractOutput { + /** + * A list of additional outputs. + *

    + * This field MAY record one or more additional outputs and smart + * contract state changes produced during the ethereum call + * transaction handling.
    + * This field SHALL NOT be set if the transaction handling did not + * produce additional outputs.
    + * This field is not settled and MAY be removed or modified. + */ + repeated proto.TransactionSidecarRecord sidecars = 1; + + /** + * An EVM contract call result. + *

    + * This field SHALL contain all of the data produced by the contract + * call transaction as well as basic accounting results. + */ + proto.ContractFunctionResult contract_call_result = 2; +} + +/** + * Block Stream data for a `createContract` transaction. + * + * This message SHALL NOT duplicate information already contained in + * the original transaction. + */ +message CreateContractOutput { + /** + * A list of additional outputs. + *

    + * This field MAY record one or more additional outputs and smart + * contract state changes produced during the ethereum call + * transaction handling.
    + * This field SHALL NOT be set if the transaction handling did not + * produce additional outputs.
    + * This field is not settled and MAY be removed or modified. + */ + repeated proto.TransactionSidecarRecord sidecars = 1; + + /** + * An EVM contract call result. + *

    + * This field SHALL contain all of the data produced by the contract + * create transaction as well as basic accounting results. + */ + proto.ContractFunctionResult contract_create_result = 2; +} + +// no evm exec, only modified entity +/** + * Block Stream data for a `updateContract` transaction. + * + * This message SHALL NOT duplicate information already contained in + * the original transaction. + */ +message UpdateContractOutput {} + +// no evm exec, only modified entity +/** + * Block Stream data for a `deleteContract` transaction. + * + * This message SHALL NOT duplicate information already contained in + * the original transaction. + */ +message DeleteContractOutput {} + +/** + * Block Stream data for a contract `systemUndelete` transaction. + * + * This message SHALL NOT duplicate information already contained in + * the original transaction. + */ +message SystemUnDeleteContractOutput {} + +/** + * Block Stream data for a contract `systemDelete` transaction. + * + * This message SHALL NOT duplicate information already contained in + * the original transaction. + */ +message SystemDeleteContractOutput {} + +/** + * Block Stream data for a `callEthereum` transaction. + * + * This message SHALL NOT duplicate information already contained in + * the original transaction. + */ +message EthereumOutput { + /** + * A list of additional outputs. + *

    + * This field MAY record one or more additional outputs and smart + * contract state changes produced during the ethereum call + * transaction handling.
    + * This field SHALL NOT be set if the transaction handling did not + * produce additional outputs.
    + * This field is not settled and MAY be removed or modified. + */ + repeated proto.TransactionSidecarRecord sidecars = 1; + + /** + * An ethereum hash value. + *

    + * This SHALL be a keccak256 hash of the ethereumData. + */ + bytes ethereum_hash = 2; + + oneof eth_result { + /** + * A result for an Ethereum Transaction executed as a call. + *

    + * This field SHALL contain all of the data produced by the contract + * call transaction as well as basic accounting results. + */ + proto.ContractFunctionResult ethereum_call_result = 3; + + /** + * A result for an Ethereum Transaction executed as a create. + *

    + * This field SHALL contain all of the data produced by the contract + * create transaction as well as basic accounting results. + */ + proto.ContractFunctionResult ethereum_create_result = 4; + } +} diff --git a/proto_src/block/stream/output/state_changes.proto b/proto_src/block/stream/output/state_changes.proto new file mode 100644 index 000000000..b121ba4d6 --- /dev/null +++ b/proto_src/block/stream/output/state_changes.proto @@ -0,0 +1,1089 @@ +/** + * # State Changes + * Serialization of change records which describe the mutation of state + * during a block. + * + * The _ordered_ application of all `StateChanges` in a block to an initial + * state that matches network state at the beginning of that block MUST produce + * a resultant state that matches the network state at the end of that block. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package com.hedera.hapi.block.stream.output; + +/* + * Copyright (C) 2024 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.hapi.block.stream.output.protoc"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "google/protobuf/wrappers.proto"; +import "basic_types.proto"; +import "exchange_rate.proto"; +import "state/addressbook/node.proto"; +import "state/blockrecords/block_info.proto"; +import "state/blockrecords/running_hashes.proto"; +import "state/blockstream/block_stream_info.proto"; +import "state/congestion/congestion_level_starts.proto"; +import "state/consensus/topic.proto"; +import "state/contract/bytecode.proto"; +import "state/contract/storage_slot.proto"; +import "state/file/file.proto"; +import "state/recordcache/recordcache.proto"; +import "state/roster/roster.proto"; +import "state/roster/roster_state.proto"; +import "state/schedule/schedule.proto"; +import "state/throttles/throttle_usage_snapshots.proto"; +import "state/token/account.proto"; +import "state/token/account_pending_airdrop.proto"; +import "state/token/network_staking_rewards.proto"; +import "state/token/node_rewards.proto"; +import "state/token/nft.proto"; +import "state/token/staking_node_info.proto"; +import "state/token/token.proto"; +import "state/token/token_relation.proto"; +import "state/platform_state.proto"; +import "timestamp.proto"; +import "auxiliary/tss/tss_message.proto"; +import "auxiliary/tss/tss_vote.proto"; +import "state/tss/tss_encryption_keys.proto"; +import "state/tss/tss_message_map_key.proto"; +import "state/tss/tss_vote_map_key.proto"; +import "state/hints/hints_types.proto"; +import "state/history/history_types.proto"; +import "state/entity/entity_counts.proto"; +import "auxiliary/hints/crs_publication.proto"; + +/** + * A set of state changes. + * + * Each set of changes in the network deterministically mutates the + * current state to a new state, and all nodes MUST apply the same + * changes in the same order.
    + * Each change set described in the block stream SHALL describe an + * ordered set of mutations which mutate the previous valid state to + * produce a new valid state.
    + * The order of state change sets SHALL be determined by the + * `consensus_timestamp`, which is a strictly ascending value + * determined by network consensus. + * + * ### Consensus Timestamp + * This value enables a consumer of the block stream to order state + * changes by a consistent ascending value that is determined by network + * consensus. A primary use case would be to enter state changes in a + * time-series database.
    + * This value depends on the cause of the state change. + * 1. For transactions, this is the transaction consensus timestamp. + * 1. For events without transactions, this is the consensus timestamp of + * the event (round?). + * 1. For changes that are not the result of a transaction, but still follow + * a transaction within an event, this is the consensus timestamp of the + * preceding transaction. + */ +message StateChanges { + /** + * The consensus timestamp of this set of changes. + *

    + * This value SHALL be deterministic with the cause of the state change. + */ + proto.Timestamp consensus_timestamp = 1; + + /** + * An ordered list of individual changes. + *

    + * These changes MUST be applied in the order listed to produce + * a correct modified state. + */ + repeated StateChange state_changes = 2; +} + +/** + * A change to any item in the merkle tree. + * + * A State change SHALL represent one mutation of the network state merkle + * tree. The state changes published in the block stream MAY be combined + * into an ordered set of state mutations that transform the tree from any + * initial state to a destination state.
    + * When the full set of state change items from the block stream for a round + * is applied to the network state at the start of that round the result + * SHALL match the network state at the end of the round. + * TODO: Need documentation for how the merkle tree is constructed. + * Need to reference that document, stored in platform docs?, here. + */ +message StateChange { + /** + * A state identifier.
    + * The reason we use an integer field here, and not an enum field is to + * better support forward compatibility. There will be many cases when a + * block node or other client (such as a dApp) with HAPI version N wants + * to process blocks from HAPI version N+1, for example. If we use a + * protobuf enum then when that is mapped Java or Rust it would not be + * parsed as an enum value because those languages do not support unknown + * enum values. ProtoC has a workaround for this but it is complex and + * requires non-deterministic parsing. Our solution to create an integer + * field and provide an enumeration for mapping that integer is intended + * as an acceptable compromise solution. + *

    + * This number SHALL identify the merkle subtree "state" to be modified and + * often corresponds to a `VirtualMap` identifier. + * This number SHALL be a valid value for the `StateIdentifier` enum. + */ + uint32 state_id = 1; + + oneof change_operation { + /** + * Addition of a new state.
    + * This may be a singleton, virtual map, or queue state. + */ + NewStateChange state_add = 2; + + /** + * Removal of an existing state.
    + * The entire singleton, virtual map, or queue state is removed, + * and not just the contents. + */ + RemovedStateChange state_remove = 3; + + /** + * An add or update to a `Singleton` state. + */ + SingletonUpdateChange singleton_update = 4; + + /** + * An add or update to a single item in a `VirtualMap`. + */ + MapUpdateChange map_update = 5; + + /** + * A removal of a single item from a `VirtualMap`. + */ + MapDeleteChange map_delete = 6; + + /** + * Addition of an item to a `Queue` state. + */ + QueuePushChange queue_push = 7; + + /** + * Removal of an item from a `Queue` state. + */ + QueuePopChange queue_pop = 8; + } +} + +/** + * An informational enumeration of all known states. + * This enumeration is included here So that people know the mapping from + * integer to state "name". + * + * State changes are expressed in terms of changes to named states at the + * high level conceptual model of the state type like map key/values or + * queue appends. To say which state the change is on we will include an + * `integer` number for the state name. This is done for performance and + * efficiency as there will be 10s of thousands of state changes in a block. + * + * We use an integer, and provide this enumeration, for the following reasons. + * - If we have a extra 8-10 bytes per state change at 40-50K state changes + * per second then that is an extra 2.5-4 megabits of bandwidth. Compression + * should help a lot but that is not guaranteed. + * - When the state name is used as part of complex key in the big state + * merkle map. The smaller the key is, in bytes, the more efficient the + * database is, because more keys can fit in a single disk page. + * - When parsing keys, parsing a UTF-8 string to a Java String is a many + * times more expensive than parsing a VARINT to an integer. + * + * Note: This enumeration is never transmitted directly in the block stream. + * This enumeration is provided for clients to _interpret_ the value + * of the `StateChange`.`state_id` field. + */ +enum StateIdentifier { + /** + * A state identifier for the Topics state. + */ + STATE_ID_TOPICS = 0; + + /** + * A state identifier for the next entity Identifier. + */ + STATE_ID_ENTITY_ID = 1; + + /** + * A state identifier for the Accounts state. + */ + STATE_ID_ACCOUNTS = 2; + + /** + * A state identifier for account aliases. + */ + STATE_ID_ALIASES = 3; + + /** + * A state identifier for contract storage slots. + */ + STATE_ID_CONTRACT_STORAGE = 4; + + /** + * A state identifier for contract bytecode. + */ + STATE_ID_CONTRACT_BYTECODE = 5; + + /** + * A state identifier for Hedera File Service (HFS). + */ + STATE_ID_FILES = 6; + + /** + * A state identifier for Hedera Token Service (HTS). + */ + STATE_ID_TOKENS = 7; + + /** + * A state identifier for non-fungible/unique tokens. + */ + STATE_ID_NFTS = 8; + + /** + * A state identifier for token relationships. + */ + STATE_ID_TOKEN_RELATIONS = 9; + + /** + * A state identifier for network staking information. + */ + STATE_ID_STAKING_INFO = 10; + + /** + * A state identifier for network staking rewards. + */ + STATE_ID_NETWORK_REWARDS = 11; + + /** + * A state identifier for throttle usage. + */ + STATE_ID_THROTTLE_USAGE = 12; + + /** + * A state identifier for network congestion start times. + */ + STATE_ID_CONGESTION_STARTS = 13; + + /** + * A state identifier for scheduled transactions. + */ + STATE_ID_SCHEDULES_BY_ID = 14; + + /** + * A state identifier for scheduled transaction expiration. + */ + STATE_ID_SCHEDULES_BY_EXPIRY = 15; + + /** + * A state identifier for scheduled transaction deduplication. + */ + STATE_ID_SCHEDULES_BY_EQUALITY = 16; + + /** + * A state identifier for conversion rate updates. + */ + STATE_ID_MIDNIGHT_RATES = 17; + + /** + * A state identifier for the network running hash(es). + */ + STATE_ID_RUNNING_HASHES = 18; + + /** + * A state identifier for network block information. + */ + STATE_ID_BLOCK_INFO = 19; + + /** + * A state identifier for address book nodes. + */ + STATE_ID_NODES = 20; + + /** + * A state identifier for the next "upgrade" file. + */ + STATE_ID_UPGRADE_FILE = 21; + + /** + * A state identifier for the hash of the next "upgrade" file. + */ + STATE_ID_UPGRADE_FILE_HASH = 22; + + /** + * A state identifier for the next network freeze time. + */ + STATE_ID_FREEZE_TIME = 23; + + /** + * A state identifier for the block stream status singleton. + */ + STATE_ID_BLOCK_STREAM_INFO = 24; + + /** + * A state identifier for pending airdrops. + */ + STATE_ID_PENDING_AIRDROPS = 25; + + /** + * A state identifier for the platform state singleton. + */ + STATE_ID_PLATFORM_STATE = 26; + + /** + * A state identifier for the roster state singleton. + */ + STATE_ID_ROSTER_STATE = 27; + + /** + * A state identifier for the rosters key/value map. + */ + STATE_ID_ROSTERS = 28; + + /** + * A state identifier for counts of transactions scheduled and + * processed in a second. + */ + STATE_ID_SCHEDULED_COUNTS = 29; + + /** + * A state identifier for scheduled transaction deduplication. + */ + STATE_ID_SCHEDULE_ID_BY_EQUALITY = 30; + + /** + * A state identifier for TSS messages. + */ + STATE_ID_TSS_MESSAGES = 31; + + /** + * A state identifier for TSS votes. + */ + STATE_ID_TSS_VOTES = 32; + + /** + * A state identifier for the ordering of scheduled transactions. + */ + STATE_ID_SCHEDULED_ORDERS = 33; + + /** + * A state identifier for scheduled throttle usage snapshots. + */ + STATE_ID_SCHEDULED_USAGES = 34; + + /** + * A state identifier for the TSS encryption keys. + */ + STATE_ID_TSS_ENCRYPTION_KEYS = 35; + + /** + * A state identifier for the TSS status. + */ + STATE_ID_TSS_STATUS = 36; + + /** + * A state identifier for hinTS key sets. + */ + STATE_ID_HINTS_KEY_SETS = 37; + + /** + * A state identifier for the active hinTS construction. + */ + STATE_ID_ACTIVE_HINTS_CONSTRUCTION = 38; + + /** + * A state identifier for the next hinTS construction. + */ + STATE_ID_NEXT_HINTS_CONSTRUCTION = 39; + + /** + * A state identifier for hinTS preprocessing output votes. + */ + STATE_ID_PREPROCESSING_VOTES = 40; + + /** + * A state identifier for the entity counts. + */ + STATE_ID_ENTITY_COUNTS = 41; + + /** + * A state identifier for the ledger id. + */ + STATE_ID_LEDGER_ID = 42; + + /** + * A state identifier for history proof key sets. + */ + STATE_ID_PROOF_KEY_SETS = 43; + + /** + * A state identifier for the active proof construction. + */ + STATE_ID_ACTIVE_PROOF_CONSTRUCTION = 44; + + /** + * A state identifier for the next proof construction. + */ + STATE_ID_NEXT_PROOF_CONSTRUCTION = 45; + + /** + * A state identifier for signatures on roster transition histories. + */ + STATE_ID_HISTORY_SIGNATURES = 46; + + /** + * A state identifier for votes on history proofs. + */ + STATE_ID_PROOF_VOTES = 47; + + /** + * A state identifier for the CRS state. + */ + STATE_ID_CRS_STATE = 48; + + /** + * A state identifier for the CRS publications. + */ + STATE_ID_CRS_PUBLICATIONS = 49; + + /** + * A state identifier for the node rewards + */ + STATE_ID_NODE_REWARDS = 50; + + /** + * A state identifier for the round receipts queue. + */ + STATE_ID_TRANSACTION_RECEIPTS_QUEUE = 126; + + /** + * A state for the `150` upgrade file data + */ + STATE_ID_UPGRADE_DATA_150 = 10001; + + /** + * A state for the `151` upgrade file data + */ + STATE_ID_UPGRADE_DATA_151 = 10002; + + /** + * A state for the `152` upgrade file data + */ + STATE_ID_UPGRADE_DATA_152 = 10003; + + /** + * A state for the `153` upgrade file data + */ + STATE_ID_UPGRADE_DATA_153 = 10004; + + /** + * A state for the `154` upgrade file data + */ + STATE_ID_UPGRADE_DATA_154 = 10005; + + /** + * A state for the `155` upgrade file data + */ + STATE_ID_UPGRADE_DATA_155 = 10006; + + /** + * A state for the `156` upgrade file data + */ + STATE_ID_UPGRADE_DATA_156 = 10007; + + /** + * A state for the `157` upgrade file data + */ + STATE_ID_UPGRADE_DATA_157 = 10008; + + /** + * A state for the `158` upgrade file data + */ + STATE_ID_UPGRADE_DATA_158 = 10009; + + /** + * A state for the `159` upgrade file data + */ + STATE_ID_UPGRADE_DATA_159 = 10010; +} + +/** + * An addition of a new named state. + * + * Adding a new named state SHALL only require the name and type.
    + * The content of the new state SHALL be filled in via subsequent + * state change items specific to the type of state + * (e.g. SingletonUpdateChange or MapUpdateChange). + */ +message NewStateChange { + /** + * The type (e.g. Singleton, Virtual Map, Queue) of state to add. + */ + NewStateType state_type = 1; +} + +/** + * An enumeration of the types of named states.
    + * The default, Singleton, is the type of state most frequently + * added and removed. + */ +enum NewStateType { + SINGLETON = 0; + VIRTUAL_MAP = 1; + QUEUE = 2; +} + +/** + * A removal of a named state. + * + * Removing a named state does not, currently, require additional + * information beyond the state name common to all state changes.
    + * A named state, other than a singleton, SHOULD be empty before it is removed. + */ +message RemovedStateChange { +} + +/** + * An update to a `Singleton` state. + */ +message SingletonUpdateChange { + oneof new_value { + /** + * A change to the block info singleton. + *

    + * The `BlockInfo` SHALL be updated at the end of every block and + * SHALL store, among other fields, the last 256 block hash values. + *

    REVIEW NOTE
    + * The full BlockInfo will be in the state proof, and may not be + * necessary here.
    + */ + proto.BlockInfo block_info_value = 1; + + /** + * A change to the congestion level starts singleton. + *

    + * This change SHALL be present if congestion level pricing for + * general fees or gas fees started during the current block. + */ + proto.CongestionLevelStarts congestion_level_starts_value = 2; + + /** + * A change to the Entity Identifier singleton. + *

    + * The Entity Identifier singleton SHALL track the highest entity + * identifier used for the current shard and realm and SHALL be used + * to issue new entity numbers. + */ + google.protobuf.UInt64Value entity_number_value = 3; + + /** + * A change to the exchange rates singleton. + *

    + * This change SHALL be present if the HBAR<=>USD exchange + * rate, as stored in the "midnight rates" singleton changed + * during the current block. + */ + proto.ExchangeRateSet exchange_rate_set_value = 4; + + /** + * A change to the network staking rewards singleton. + *

    + * Network staking rewards SHALL be updated for every non-empty block. + */ + proto.NetworkStakingRewards network_staking_rewards_value = 5; + + /** + * A change to a raw byte array singleton. + *

    + * This change SHALL present a change made to a raw byte array + * singleton.
    + * The "upgrade file hash" state is an example of a raw byte + * array singleton. + */ + google.protobuf.BytesValue bytes_value = 6; + + /** + * A change to a raw string singleton. + *

    + *

    Note
    There are no current examples of a raw string + * singleton state.
    + */ + google.protobuf.StringValue string_value = 7; + + /** + * A change to the running hashes singleton. + *

    + * Running hashes SHALL be updated for each transaction. + *

    + *

    REVIEW NOTE
    + * Running hashes is a record stream item. Can it be elided from + * the block stream? It's not written to the record stream, as far + * as I can tell. If we do write this it's adding over 144 bytes + * for every transaction. It's also not clear how we'll calculate + * this, as it's a hash of the records currently, so it would have + * to be a hash of the block items, including this one... + *
    + */ + proto.RunningHashes running_hashes_value = 8; + + /** + * A change to the throttle usage snapshots singleton. + *

    + * Throttle usage snapshots SHALL be updated for _every transaction_ + * to reflect the amount used for each tps throttle and + * for the gas throttle. + */ + proto.ThrottleUsageSnapshots throttle_usage_snapshots_value = 9; + + /** + * A change to a raw `Timestamp` singleton.
    + * An example of a raw `Timestamp` singleton is the + * "network freeze time" singleton state, which, if set, stores + * the time for the next scheduled freeze. + */ + proto.Timestamp timestamp_value = 10; + + /** + * A change to the block stream status singleton. + *

    + * This MUST be updated at the beginning of a block, with the + * information for the immediately prior block. + */ + com.hedera.hapi.node.state.blockstream.BlockStreamInfo block_stream_info_value = 11; + + /** + * A change to the platform state singleton. + */ + com.hedera.hapi.platform.state.PlatformState platform_state_value = 12; + + /** + * A change to the roster state singleton. + */ + com.hedera.hapi.node.state.roster.RosterState roster_state_value = 13; + + /** + * A change to a hinTS construction singleton. + */ + com.hedera.hapi.node.state.hints.HintsConstruction hints_construction_value = 14; + + /** + * A change to the Entity counts singleton. + */ + com.hedera.hapi.node.state.entity.EntityCounts entity_counts_value = 15; + + /** + * A change to a hinTS construction singleton. + */ + com.hedera.hapi.node.state.history.HistoryProofConstruction history_proof_construction_value = 16; + + /** + * A change to the CRS State singleton. + */ + com.hedera.hapi.node.state.hints.CRSState crs_state_value = 17; + + /** + * A change to the node rewards singleton. + *

    + * Node rewards SHALL be updated for every non-empty block. + */ + proto.NodeRewards node_rewards_value = 18; + } +} + +/** + * An update to a single item in a `VirtualMap`.
    + * Each update consists of a "key" and a "value". + * Keys are often identifiers or scalar values. + * Values are generally full messages or byte arrays. + * + * The key presented here is not mutable, we do not update map keys.
    + * The value associated to the key provided is updated, or the value is + * added and associated with that key.
    + * A change of key would be expressed as removal of the prior key and + * an addition for the new key. + */ +message MapUpdateChange { + /** + * A key in a virtual map. + *

    + * This key MUST be mapped to the value added or updated.
    + * This field is REQUIRED. + */ + MapChangeKey key = 1; + + /** + * A value in a virtual map. + *

    + * This value MUST correctly represent the state of the map entry + * _after_ the asserted update.
    + * This value MAY be reduced to only transmit fields that differ + * from the prior state.
    + * This field is REQUIRED. + */ + MapChangeValue value = 2; +} + +/** + * A removal of a single item from a `VirtualMap`. + */ +message MapDeleteChange { + /** + * A key in a virtual map. + *

    + * This key SHALL be removed.
    + * The mapped value SHALL also be removed.
    + * This field is REQUIRED. + */ + MapChangeKey key = 1; +} + +/** + * A key identifying a specific entry in a key-value "virtual map". + */ +message MapChangeKey { + oneof key_choice { + /** + * A key for a change affecting a map keyed by an Account identifier. + */ + proto.AccountID account_id_key = 1; + + /** + * A change to the token relationships virtual map.
    + * This map is keyed by the pair of account identifier and + * token identifier. + */ + proto.TokenAssociation token_relationship_key = 2; + + /** + * A change to a map keyed by an EntityNumber (which is a whole number). + *

    + * This SHOULD NOT be used. Virtual maps SHOULD be keyed to + * full identifiers that include shard and realm information. + */ + google.protobuf.UInt64Value entity_number_key = 3; + + /** + * A change to a virtual map keyed by File identifier. + */ + proto.FileID file_id_key = 4; + + /** + * A change to a virtual map keyed by NFT identifier. + */ + proto.NftID nft_id_key = 5; + + /** + * A change to a virtual map keyed by a byte array. + */ + google.protobuf.BytesValue proto_bytes_key = 6; + + /** + * A change to a virtual map keyed by an int64 value. + */ + google.protobuf.Int64Value proto_long_key = 7; + + /** + * A change to a virtual map keyed by a string value. + */ + google.protobuf.StringValue proto_string_key = 8; + + /** + * A change to a virtual map keyed by a Schedule identifier. + */ + proto.ScheduleID schedule_id_key = 9; + + /** + * A change to the EVM storage "slot" virtual map. + */ + proto.SlotKey slot_key_key = 10; + + /** + * A change to a virtual map keyed by a Token identifier. + */ + proto.TokenID token_id_key = 11; + + /** + * A change to a virtual map keyed by a Topic identifier. + */ + proto.TopicID topic_id_key = 12; + + /** + * A change to a virtual map keyed by contract id identifier. + */ + proto.ContractID contract_id_key = 13; + + /** + * A change to a virtual map keyed by pending airdrop id identifier. + */ + proto.PendingAirdropId pending_airdrop_id_key = 14; + + /** + * An exact date and time, with a resolution of one second + */ + proto.TimestampSeconds timestamp_seconds_key = 15; + + /** + * An ordering key mapped to a particular schedule.
    + * This identifies the order in which long term scheduled transactions + * that are requested to execute in the same consensus second will + * be executed. The value will be the `ScheduleID` for the schedule + * to be executed at a particular consensus second and order within + * that second. + */ + proto.ScheduledOrder scheduled_order_key = 16; + + /** + * A TSS Message Map Key key. + */ + com.hedera.hapi.node.state.tss.TssMessageMapKey tss_message_map_key = 17; + + /** + * A TSS Message Map Key key. + */ + com.hedera.hapi.node.state.tss.TssVoteMapKey tss_vote_map_key = 18; + + /** + * A hinTS party id key. + */ + com.hedera.hapi.node.state.hints.HintsPartyId hints_party_id_key = 19; + + /** + * A hinTS preprocessing vote id key. + */ + com.hedera.hapi.node.state.hints.PreprocessingVoteId preprocessing_vote_id_key = 20; + + /** + * An unscoped node id key. + */ + com.hedera.hapi.platform.state.NodeId node_id_key = 21; + + /** + * A construction-scoped node id key. + */ + com.hedera.hapi.node.state.history.ConstructionNodeId construction_node_id_key = 22; + } +} + +/** + * A value updated in, or added to, a virtual map. + * + */ +message MapChangeValue { + oneof value_choice { + /** + * An account value. + */ + proto.Account account_value = 1; + + /** + * An account identifier.
    + * In some cases a map is used to connect a value or identifier + * to another identifier. + */ + proto.AccountID account_id_value = 2; + + /** + * Compiled EVM bytecode. + */ + proto.Bytecode bytecode_value = 3; + + /** + * An Hedera "file" value. + *

    + *

    REVIEW NOTE
    + * A file can become quite large (up to 1048576 bytes).
    + * Do we want to structure file changes separately?
    + * Perhaps a file metadata update and a separate byte array for + * just the bytes appended (or initial bytes on create). We only + * allow create/append/delete, so the separate byte array would work + * and keep the size below 6K per state change. + *
    + */ + proto.File file_value = 4; + + /** + * A non-fungible/unique token value. + */ + proto.Nft nft_value = 5; + + /** + * A string value. + */ + google.protobuf.StringValue proto_string_value = 6; + + /** + * A scheduled transaction value. + */ + proto.Schedule schedule_value = 7; + + /** + * A list of scheduled transactions.
    + * An example for this value is the map of consensus second to + * scheduled transactions that expire at that consensus time. + */ + proto.ScheduleList schedule_list_value = 8; + + /** + * An EVM storage slot value. + */ + proto.SlotValue slot_value_value = 9; + + /** + * An updated set of staking information for all nodes in + * the address book. + */ + proto.StakingNodeInfo staking_node_info_value = 10; + + /** + * An HTS token value. + */ + proto.Token token_value = 11; + + /** + * A token relationship value.
    + * These values track which accounts are willing to transact + * in specific HTS tokens. + */ + proto.TokenRelation token_relation_value = 12; + + /** + * An HCS topic value. + */ + proto.Topic topic_value = 13; + + /** + * An network node value. + */ + com.hedera.hapi.node.state.addressbook.Node node_value = 14; + + /** + * A pending airdrop value. + */ + proto.AccountPendingAirdrop account_pending_airdrop_value = 15; + + /** + * A roster value. + */ + com.hedera.hapi.node.state.roster.Roster roster_value = 16; + + /** + * The value of a map summarizing the counts of scheduled and processed transactions + * within a particular consensus second. + */ + proto.ScheduledCounts scheduled_counts_value = 17; + + /** + * A scheduled id value. + */ + proto.ScheduleID schedule_id_value = 18; + + /** + * A change to the scheduled throttle usage snapshots. + */ + proto.ThrottleUsageSnapshots throttle_usage_snapshots_value = 19; + + /** + * The value of a map that stores tss encryption keys for each node. + */ + com.hedera.hapi.node.state.tss.TssEncryptionKeys tss_encryption_keys_value = 20; + + /** + * The value of a map that stores tss messages submitted for each share of nodes. + */ + com.hedera.hapi.services.auxiliary.tss.TssMessageTransactionBody tss_message_value = 21; + + /** + * The value of a map that stores tss votes submitted by each node to recover the ledger id. + */ + com.hedera.hapi.services.auxiliary.tss.TssVoteTransactionBody tss_vote_value = 22; + + /** + * A hinTS key set. + */ + com.hedera.hapi.node.state.hints.HintsKeySet hints_key_set_value = 23; + + /** + * A hinTS preprocessing vote. + */ + com.hedera.hapi.node.state.hints.PreprocessingVote preprocessing_vote_value = 24; + + /** + * A CRS publication submission. + */ + com.hedera.hapi.services.auxiliary.hints.CrsPublicationTransactionBody crs_publication_value = 25; + + /** + * A history signature. + */ + com.hedera.hapi.node.state.history.RecordedHistorySignature history_signature_value = 26; + + /** + * A history proof vote. + */ + com.hedera.hapi.node.state.history.HistoryProofVote history_proof_vote_value = 27; + + /** + * A proof key set. + */ + com.hedera.hapi.node.state.history.ProofKeySet proof_key_set_value = 28; + } +} + +/** + * Addition of an item to a `Queue` state.
    + * + * The new item SHALL be added after the current "last" element in the + * queue.
    + * The new item MUST be the same type of value as all other items in the queue. + */ +message QueuePushChange { + oneof value { + /** + * A byte array added to the queue state. + */ + google.protobuf.BytesValue proto_bytes_element = 1; + + /** + * A string added to the queue state. + */ + google.protobuf.StringValue proto_string_element = 2; + + /** + * All transaction receipts for a round added to queue state. + */ + proto.TransactionReceiptEntries transaction_receipt_entries_element = 3; + } +} + +/** + * Removal of an item from a `Queue` state.
    + * + * The item removed SHALL be the current "front" (or "head") of the queue.
    + * Removing from a queue "head" does not, currently, require additional + * information beyond the state name common to all state changes. + */ +message QueuePopChange { +} diff --git a/proto_src/block/stream/output/token_service.proto b/proto_src/block/stream/output/token_service.proto new file mode 100644 index 000000000..ac9bf58a4 --- /dev/null +++ b/proto_src/block/stream/output/token_service.proto @@ -0,0 +1,173 @@ +/** + * # Token Service + * Block stream messages that report the results of transactions + * handled by the `Token` service. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package com.hedera.hapi.block.stream.output; + +/* + * Copyright (C) 2024 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.hapi.block.stream.output.protoc"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "custom_fees.proto"; + +/** + * Block Stream data for a `createToken` transaction. + * + * This message SHALL NOT duplicate information already contained in + * the original transaction. + */ +message CreateTokenOutput {} + +/** + * Block Stream data for a `freezeTokenAccount` transaction. + * + * This message SHALL NOT duplicate information already contained in + * the original transaction. + */ +message FreezeTokenAccountOutput {} + +/** + * Block Stream data for an `unfreezeTokenAccount` transaction. + * + * This message SHALL NOT duplicate information already contained in + * the original transaction. + */ +message UnfreezeTokenAccountOutput {} + +/** + * Block Stream data for a `grantKycToTokenAccount` transaction. + * + * This message SHALL NOT duplicate information already contained in + * the original transaction. + */ +message GrantTokenKycOutput {} + +/** + * Block Stream data for a `revokeKycFromTokenAccount` transaction. + * + * This message SHALL NOT duplicate information already contained in + * the original transaction. + */ +message RevokeTokenKycOutput {} + +/** + * Block Stream data for a `deleteToken` transaction. + * + * This message SHALL NOT duplicate information already contained in + * the original transaction. + */ +message DeleteTokenOutput {} + +/** + * Block Stream data for an `updateToken` transaction. + * + * This message SHALL NOT duplicate information already contained in + * the original transaction. + */ +message UpdateTokenOutput {} + +/** + * Block Stream data for a `mintToken` transaction. + * + * This message SHALL NOT duplicate information already contained in + * the original transaction. + */ +message MintTokenOutput {} + +/** + * Block Stream data for a `burnToken` transaction. + * + * This message SHALL NOT duplicate information already contained in + * the original transaction. + */ +message BurnTokenOutput {} + +/** + * Block Stream data for a `wipeTokenAccount` transaction. + * + * This message SHALL NOT duplicate information already contained in + * the original transaction. + */ +message WipeTokenAccountOutput {} + +/** + * Block Stream data for an `associateTokens` transaction. + * + * This message SHALL NOT duplicate information already contained in + * the original transaction. + */ +message AssociateTokenOutput {} + +/** + * Block Stream data for a `dissociateTokens` transaction. + * + * This message SHALL NOT duplicate information already contained in + * the original transaction. + */ +message DissociateTokenOutput {} + +/** + * Block Stream data for an `updateTokenFeeSchedule` transaction. + * + * This message SHALL NOT duplicate information already contained in + * the original transaction. + */ +message UpdateTokenFeeScheduleOutput {} + +/** + * Block Stream data for a `pauseToken` transaction. + * + * This message SHALL NOT duplicate information already contained in + * the original transaction. + */ +message PauseTokenOutput {} + +/** + * Block Stream data for an `unpauseToken` transaction. + * + * This message SHALL NOT duplicate information already contained in + * the original transaction. + */ +message UnpauseTokenOutput {} + +/** + * Block Stream data for an `updateNfts` transaction. + * + * This message SHALL NOT duplicate information already contained in + * the original transaction. + */ +message UpdateTokenNftsOutput {} + +/** + * Block Stream data for a `tokenAirdrop` transaction. + * + * This message SHALL NOT duplicate information already contained in + * the original transaction. + */ +message TokenAirdropOutput {} diff --git a/proto_src/block/stream/output/transaction_output.proto b/proto_src/block/stream/output/transaction_output.proto new file mode 100644 index 000000000..078e182ff --- /dev/null +++ b/proto_src/block/stream/output/transaction_output.proto @@ -0,0 +1,155 @@ +/** + * # Transaction Output + * Messages that describe the output of a transaction; data reported + * in the block stream that is not in the transaction body and is + * not reported in state changes. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package com.hedera.hapi.block.stream.output; + +/* + * Copyright (C) 2024 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.hapi.block.stream.output.protoc"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "stream/output/schedule_service.proto"; +import "stream/output/util_service.proto"; +import "stream/output/crypto_service.proto"; +import "stream/output/token_service.proto"; +import "stream/output/smart_contract_service.proto"; +import "stream/output/consensus_service.proto"; + +/** + * Output from a transaction. + * + * The values in transaction outputs SHALL be data that is neither present + * in the original transaction nor present in state changes. + * + * > Note + * >> Only a few transactions produce output that is not in the transaction + * >> and also not reflected in state changes. All other transaction types + * >> are _currently_ not included here. We have, however, allocated names + * >> for those transaction types to preserve consistency if we + * >> add them later. + * + * + */ +message TransactionOutput { + oneof transaction { + /** + * Output from a utilPrng transaction to request a + * deterministic pseudo-random number. + */ + UtilPrngOutput util_prng = 1; + + /** + * Output from a contract call transaction. + */ + CallContractOutput contract_call = 2; + + /** + * Output from an ethereum call transaction. + */ + EthereumOutput ethereum_call = 3; + + /** + * Output from a contract create transaction. + */ + CreateContractOutput contract_create = 4; + + /** + * Output from a schedule create transaction that executed + * immediately on creation. + */ + CreateScheduleOutput create_schedule = 5; + + /** + * Output from a schedule sign transaction that resulted in + * executing the scheduled transaction. + */ + SignScheduleOutput sign_schedule = 6; + + /** + * Output from a transaction that includes the creation of a new + * CryptoService Account. + */ + CreateAccountOutput account_create = 7; + } +} diff --git a/proto_src/block/stream/output/transaction_result.proto b/proto_src/block/stream/output/transaction_result.proto new file mode 100644 index 000000000..8530829a0 --- /dev/null +++ b/proto_src/block/stream/output/transaction_result.proto @@ -0,0 +1,167 @@ +/** + * # Transaction Result + * The result of a transaction, sometimes called a receipt. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package com.hedera.hapi.block.stream.output; + +/* + * Copyright (C) 2024 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.hapi.block.stream.output.protoc"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; +import "custom_fees.proto"; +import "response_code.proto"; +import "timestamp.proto"; + +/** + * While we have the state changes as part of the block stream, + * we may not have the full data set needed. To surface information + * such as staking rewards, fees, etc. we need to include some of the + * data from the original TransactionRecord. + * + * > REVIEW NOTE + * >> Should we have custom fees here, and remove that from the + * >> CryptoTransfer output message? That would make more sense, as I believe + * >> TokenTransfer output would also need custom fees, and we may wish + * >> to add custom fees to other transactions in the future. + */ +message TransactionResult { + /** + * A response code. + *

    + * This value SHALL indicate the status of this transaction.
    + * This code SHALL indicate success or a specific failure. + */ + proto.ResponseCodeEnum status = 1; + + /** + * A consensus timestamp. + *

    + * The time index, agreed by all network nodes, when this transaction + * reached consensus.
    + * This field SHALL be set for all transactions. + */ + proto.Timestamp consensus_timestamp = 2; + + /** + * A consensus timestamp. + *

    + * The time index, agreed by all network nodes, when the "parent" + * transaction, if any, for this transaction reached consensus.
    + * This SHALL NOT be set on a user-submitted transaction.
    + * This SHALL be set on an internal "child" transaction initiated as + * part of completing a user-submitted transaction. + */ + proto.Timestamp parent_consensus_timestamp = 3; + + /** + * A schedule that executed this transaction, if this transaction + * was scheduled. + *

    + * This value SHALL NOT be set unless this transaction result represents + * the result of a _scheduled_ child transaction. + */ + proto.ScheduleID schedule_ref = 5; + + /** + * An amount, in tinybar, charged for this transaction. + *

    + * This SHALL be the actual transaction fee charged, and SHALL NOT be the + * transactionFee value from TransactionBody. + */ + uint64 transaction_fee_charged = 6; + + /** + * A list of HBAR transfers, in double-entry form. + *

    + * This SHALL include all HBAR transfers completed as a result + * of this transaction.
    + * This MUST include, at least, + *

      + *
    • Each source and recipient of transaction fees
    • + *
    • All transfers directly performed by this transaction
    • + *
    • All transfers due to staking rewards paid as a result of + * this transaction
    • + *
    • Any transfers performed by a smart contract call associated + * with this transaction
    • + *
    • Any transfers caused by the creation of threshold records
    • + *
    + *

    + * This transfer list is exposed in the Mirror Node API (MAPI) and in use + * by clients of the MAPI. Additionally, there are some transfers that + * are mingled with transactions and only split out here. + */ + proto.TransferList transfer_list = 7; + + /** + * A list of _non-HBAR_ token transfers, in single-entry form. + *

    + * This SHALL include all _non-HBAR_ token transfers completed as a + * result of this transaction.
    + * This MUST include, at least, + *

      + *
    • Each source and recipient of custom fees
    • + *
    • All transfers directly performed by this transaction
    • + *
    • Any transfers performed by a smart contract call associated + * with this transaction
    • + *
    + */ + repeated proto.TokenTransferList token_transfer_lists = 8; + + /** + * A list of token associations. + *

    + * This field SHALL list all token associations created automatically + * while handling this transaction. + */ + repeated proto.TokenAssociation automatic_token_associations = 9; + + /** + * A list of accounts and amounts. + *

    + * This SHALL list all accounts paid staking rewards as a result + * of this transaction.
    + * Each entry SHALL contain both the account and the amount paid. + */ + repeated proto.AccountAmount paid_staking_rewards = 10; + + /** + * A congestion pricing multiplier. + *

    + * This SHALL be the multiplier that is applied to the transaction + * fees charged for this transaction. + */ + uint64 congestion_pricing_multiplier = 11; + + /** + * Custom fees assessed during a transaction execution. + *

    + * These fees SHALL be present in the full transfer list for the transaction. + */ + repeated proto.AssessedCustomFee assessed_custom_fees = 12; +} diff --git a/proto_src/block/stream/output/util_service.proto b/proto_src/block/stream/output/util_service.proto new file mode 100644 index 000000000..be5f43bd0 --- /dev/null +++ b/proto_src/block/stream/output/util_service.proto @@ -0,0 +1,67 @@ +/** + * # Util Service + * Block stream messages that report the results of transactions handled by + * the `Util` service. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package com.hedera.hapi.block.stream.output; + +/* + * Copyright (C) 2024 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.hapi.block.stream.output.protoc"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +/** + * Block data produced by `prng` transactions submitted to the `Util` service. + * + * The `entropy` reported in this block stream message is deterministically + * produced, but has high dispersion and is very difficult to predict. + * + * This message SHALL NOT duplicate information already contained in + * the original transaction. + */ +message UtilPrngOutput { + oneof entropy { + /** + * A deterministic pseudo-random sequence of 48 bytes. + *

    + * This value SHALL be the result of a corresponding + * `UtilService` `prng` transaction. + */ + bytes prng_bytes = 1; + + /** + * A deterministic pseudo-random number generated within a + * specified range. + *

    + * This value SHALL be the result of a corresponding `UtilService` + * `prng` transaction.
    + * Note that the transaction only permits a non-negative range, the + * output SHALL always be a whole number. + */ + uint32 prng_number = 2; + } +} diff --git a/proto_src/block/stream/record_file_item.proto b/proto_src/block/stream/record_file_item.proto new file mode 100644 index 000000000..a699ca5e5 --- /dev/null +++ b/proto_src/block/stream/record_file_item.proto @@ -0,0 +1,111 @@ +/** + * # Record File Block + * This block carries the data from "record stream" and "sidecar" + * files that preceded the block stream. Record blocks are full blocks, + * not block items, but do not have a block header or block proof. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package com.hedera.hapi.block.stream; + +/* + * Copyright (C) 2024 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.hapi.block.stream.protoc"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; +import "timestamp.proto"; +import "sidecar_file.proto"; + +/** + * A Block Item for record files. + * + * A `RecordFileItem` contains data produced before the innovation of the + * Block Stream, when data was stored in files and validated by individual + * signature files rather than a block proof.
    + * This item enables a single format, the Block Stream, to carry both + * historical and current data; eliminating the need to search two sources for + * block and block chain data.
    + * Any block containing this item requires special handling. + * - The block SHALL have a `BlockHeader`. + * - Some fields in the `BlockHeader` may be interpreted differently, and + * may depend on when the original record file was created. + * - The block SHALL NOT have a `BlockProof`. + * - The block SHALL end with an `AddressBookProof`, which is only used for + * `RecordFileItem` blocks. + * - The block SHALL contain _exactly one_ `RecordFileItem`. + * - The block SHALL NOT contain any content item other than a `RecordFileItem`. + * - The content of the `RecordFileItem` MUST be validated using the + * signature data and content provided herein according to the + * process used for Record Files prior to the creation of Block Stream. + * - This block item only replaces the requirement to read several + * individual files from cloud storage services. + * - The address book relevant to a particular record file SHALL be available + * separately as an `AddressBookProof` item. + */ +message RecordFileItem { + /** + * The consensus time the record file was produced for.
    + * This comes from the record file name. + */ + proto.Timestamp creation_time = 1; + + /** + * The contents of a record file.
    + * The first 4 bytes are a 32bit int little endian version number. + * The versions that existed are 2,3,5 and 6. + */ + bytes record_file_contents = 2; + + /** + * The contents of sidecar files for this block.
    + * Each block can have zero or more sidecar files. + */ + repeated proto.SidecarFile sidecar_file_contents = 3; + + /** + * A collection of RSA signatures from consensus nodes.
    + * These signatures validate the hash of the record_file_contents field. + */ + repeated RecordFileSignature record_file_signatures = 4; +} + +/** + * A signature by a node on the SHA384 hash of the record file. + */ +message RecordFileSignature { + /** + * A single RSA signature.
    + * This is the RSA signature of the node on the SHA384 hash of + * the record file + */ + bytes signatures_bytes = 1; + + /** + * A unique node identifier.
    + * This is the node id of the consensus node that created this signature. + */ + int32 node_id = 2; +} diff --git a/proto_src/documents/Specification-Format-Style-Guidelines.md b/proto_src/documents/Specification-Format-Style-Guidelines.md new file mode 100644 index 000000000..f2658c43c --- /dev/null +++ b/proto_src/documents/Specification-Format-Style-Guidelines.md @@ -0,0 +1,408 @@ +# Protocol Buffer Style Guidelines +## Style Guidelines for "specification" comments +### General Style +- Wrapping is 80 characters for top-level messages. +- Wrap everything else to 80 characters or 100, depending + - Prefer to wrap lines to 80 characters + - It is OK to go over 80, but less than 100, if it makes the + text clearer and easier to read. + - This SHOULD be rare, however. + - If you have links or tags, wrapping at 100 characters for clarity + is acceptable. + - We choose 80 characters here to work better in reviews because Github + comment boxes are limited to roughly 80 characters width. The primary + "code" interaction with proto files and markdown files is in review. + Also, some markdown processors struggle with longer lines. +- Use HTML tags where appropriate, but stick to markdown as much as possible. +- Use blank lines (with `*` prefix) for paragraph breaks in message or + enum declarations, regardless of where defined. + - Use `

    ` tags for _fields_, and _no_ "empty" lines (it breaks the tables). + - For messages (including `enum` or `service` messages), we prefer to use + blank lines exclusively, and _not_ use a `

    ` tag. +- We use line breaks (`
    `) in several areas of the specification text. + All such line breaks should be placed at the _end_ of the prior line, and + should not be placed alone on a line, in the middle of a line, or at the + beginning of a line. +- Certain elements (headings, code blocks, lists, etc...) are "block" elements + in markdown and HTML. Such elements _should not_ be followed by either + a break (`
    `) or paragraph (`

    `) tag (or equivalent markdown). +- Use formal US-English spelling and grammar to the maximum extent possible. + - Write proper and complete sentences, avoid partial sentences and + unnecessary abbreviations. + - Do not use partial words (e.g. instead of "spec" write "specification"). + - Explain all acronyms on first use in a document. + - Use "Hedera Consensus Service(HCS)" the first time "HCS" is written + but "HCS" may be used thereafter. + - Extremely common acronyms (e.g. RAM or LASER) do not need + to be expanded. + +#### Specification Equivalency +For the purposes of specification document comments, _only_, the following +protocol buffer "types" are considered equivalent. +- Message + - `service` + - `enum` +- Field + - `rpc` +Equivalent types require equivalent specification, so a `service` should be +specified using the same guidelines as a `message` or `enum`. A `rpc` should +be specified using the same guidelines as a "field". + +### Description +- The first line of each document block is "what is this", and should be a + single sentence. Examples: "An identifier for an account." or + "A `tokenTransfer` transaction request body.". + - Avoid "this is a thing" (or shorter "thing") type sentences, + write "A thing" instead. + - This applies for the _first sentence_ only, **not** elsewhere. + The first sentence is a "what is this" answer, not full description + and mostly just translates from "code" syntax to plain English. + - Minimize detail here, qualifiers, usage, etc... belong in the brief + description or requirements, not here. + - A good rule of thumb is that if this first sentence exceeds 60 + characters, then it is trying to describe too much. +- An optional description _may_ be added to any field or message. + - Include a line break (`
    `) after the first line, then a brief + description, if appropriate. + - Not every field needs additional description, + but nearly all `message` blocks do. + - Descriptions may be detailed, but should not include internal + implementation details or requirements. The description _should_ be + detailed enough to explain to an external contributor what the + message or field contains, where it fits within the overall network + system, and why it is needed. + - This is a long-term goal; we have a long way to go to get to this + level of description. Every PR to change `.proto` files should seek + to improve the documentation for that file. + - Avoid describing what must, should, must not, or should not be + sent, or how the field values affect output. Those items belong in the + _requirements_, instead. + +### Requirements +- After a paragraph break (a blank line for messages), one requirement per + line. Use break tags at the end of each requirement except the last. + - In field comments a `

    ` tag is _required_ for paragraph breaks. + Blank lines break the automated documentation generator in **fields** + because fields are output as markdown tables, and markdown tables require + each row to be a single long line. +- Be _prescriptive_ in requirements. Do not _describe_ the behavior. + - Declare what MUST be done for valid inputs, and what SHALL be present in + valid outputs (or in state messages). + - Declare what SHALL happen as a result of a successful, or failed, + transaction. + - The word `will` usually means `SHALL` or `MUST`. + - The word `is` often means `SHALL be`. + - Document both positive (`SHALL` or `MUST`) and negative (`SHALL NOT` or + `MUST NOT`) requirements. + - Avoid "perfect" or "imperfect" verb aspects and "wiggle" words + (might, could, perhaps, etc...). + - The specification items MAY, SHOULD, and RECOMMENDED serve to fill + the _occasional_ need for less imperative requirements. + - Also avoid "progressive" verbs (e.g. working, writing, going, deleting). +- Requirements should be short and focused. + - Better to have three separate lines for three items than one longer + line with three clauses. + - Duplicating text across lines with slightly different requirements + is not only acceptable, but often recommended. + - Well written specification tends to be much more short and clipped + sentences than "normal" prose. Some describe the flow as "staccato". +- Required and Optional fields + - The default state for any field is "optional", and all required fields + should be specified as `REQUIRED`. If the presence or absence of a field + must be clear _separate_ from the default value of that field, that field + should use proto3 "explicit presence" and be marked with + the `optional` keyword. +- Add another blank line after requirements for `message` documents only. + +### Other elements +- Each message that represents a transaction body **must** document the + Block Stream effects with a heading `### Block Stream Effects`. +- General notes go last, for `message` only, with a heading + `#### Additional Notes`. +- There are cases where description text for a message or field is + exceptionally detailed. In these cases it _may_ be appropriate to + separate broad categories of information with a single horizontal line + (i.e. an `


    ` tag, `---` in markdown). These cases _should_ be quite + rare, however; we prefer to avoid the need for such large blocks of + specification text. +- Line oriented comments (i.e. lines prefixed with `//`) may be used for + any comments needed in a proto file that are not intended for API + specification. Examples include explaining an `oneof` block, or describing + why a particular field number or name is reserved. + +## Content Guidelines +### General `proto` File Guidelines +- Protocol buffers are compiled for the `hedera-services` codebase using a + custom processor 'PBJ'. While no other entity is required to use `PBJ`, all + Hiero protocol buffer files MUST be compatible with `PBJ` processing. + +### Field Type Guidelines +- There are some negative patterns present in existing `proto` files. These + SHOULD NOT be replicated in new files, when possible. + - Older files may use `int64` or `int32` when a `uint` is more appropriate, + and document a "non-negative" requirement. This SHOULD NOT be replicated. + in new content (files, messages, fields) we SHOULD use _unsigned_ numeric + types where appropriate. + - We MUST NOT change existing field types without very careful + consideration for binary compatibility and impact to clients. +- Protocol buffer encoding for Hedera MUST be deterministic. + - For this reason `Map' fields CANNOT be used because most protocol buffer + implementations are _intentionally_ non-deterministic in + serializing and parsing those fields. + - Unknown fields are, likewise, not handled deterministically by most + protocol buffer implementations, so unknown fields MUST NOT be used. + - One exception here is forward compatibility, as implemented in the + `PBJ` processor, which is supported in selected scenarios where + deterministic behavior is not strictly required. + +### Package Directive Guidelines +- There are some negative patterns present in existing `proto` files. These + SHOULD NOT be replicated in new files, when possible. + - Older files have a `package proto;` directive. This is leftover from + _sample_ content, and SHOULD NOT be used in new files. + - To avoid major compatibility issues, particularly for SDK authors, we + SHOULD NOT change the `package` directive in _existing_ files. +- For _new_ `proto` files only, the file SHOULD use a `package` directive with + a package that is identical to the value in the + `pbj.java_package` pseudo-directive. + - One exception to this guideline is that gRPC `service` and `rpc` + definitions include the package name in the url path. As a result we + cannot easily use full package names for these. + - Completely new services and gRPC endpoints SHOULD be defined alone in a + separate `thing_service.proto` file _without_ transaction bodies. The + endpoint MAY, then, be defined in a proper package. + - Transaction body messages and any component messages SHOULD be defined + in a proper package, and references in the gRPC service definition may + then use the full package prefix when referring to those messages. + - The "namespace" behavior of package names is not well supported by PBJ at + this time, so packages must be fully specified whenever used. + +## Examples +### General Samples +```protobuf +/** + * A selection of positive and negative examples + * + * ## Summary and optional description. + * A simple Summary.
    + * This example shows recommended structure of summary line and detail + * description, including line length limits. + * + * ## An example for line break placement. + * text ending in a break.
    + * is generally easier to read than + *
    text starting with a break or + * text that contains
    a line break mid-line. + */ +message SampleMessage { + // OneOf does not become an element in the final protobuf, so any + // description needed for oneof blocks must be in "code" comments. + // Such "code" comments are permitted anywhere a comment is permitted, + // but writers should be aware that these comments are not processed and + // remain local to the proto file. + oneof samples { + // We may present "code" level comments, that are not API specification + // wherever needed and appropriate. These comments are not processed + // into documentation, and should be used for information specific to + // the "code" of the protocol buffer definitions, not the API that + // those protocol buffers represent. + /** + * A sample 32-bit integer field. + *

    + * This block MUST NOT contain a blank line, as fields are presented + * using tables in markdown, so we use a paragraph tag instead.
    + * We SHALL separate requirements with a single `
    ` tag as used + * at the end of the line above. + *

    + * ### Headings in fields + * We MAY use headings in fields, but it is important to note + * that Javadoc's exceptionally strict view of headings means that + * headings in fields MAY NOT be rendered correctly and MAY cause + * javadoc errors for "out of order" headings. + */ + int32 field_one = 1; + + // This field does not require description or specific requirements + // so those are not present. Lack of requirements is very rare indeed, + // so most fields should have a bit more than we see here. + /** + * A simple unsigned 64-bit integer field. + */ + uint64 field_two = 2; + } +} +``` + +### A Message Example +```protobuf +/** + * A transaction body to add a new consensus node to the network + * address book.
    + * This transaction, once complete, enables a new consensus node + * to join the network, and requires governing council authorization. + * + * This transaction body SHALL be considered a "privileged transaction".
    + * A `NodeCreateTransactionBody` MUST be signed by the governing council.
    + * A `NodeCreateTransactionBody` MUST be signed by the `Key` assigned to the + * `admin_key` field.
    + * The newly created node information SHALL be added to the network address + * book information in the network state.
    + * The new entry SHALL be created in "state" but SHALL NOT participate in + * network consensus and SHALL NOT be present in network "configuration" + * until the next "upgrade" transaction (as noted below).
    + * All new address book entries SHALL be added to the active network + * configuration during the next `freeze` transaction with the field + * `freeze_type` set to `PREPARE_UPGRADE`. + * + * ### Block Stream Effects + * Upon completion the newly assigned `node_id` SHALL be recorded in + * the transaction receipt.
    + * This value SHALL be the next available node identifier.
    + * Node identifiers SHALL NOT be reused. + */ +``` + +### A Field Example +```protobuf + /** + * A list of service endpoints for gossip. + *

    + * These endpoints SHALL represent the published endpoints to which other + * consensus nodes may _gossip_ transactions.
    + * These endpoints MUST specify a port.
    + * This list MUST NOT be empty.
    + * This list MUST NOT contain more than `10` entries.
    + * The first two entries in this list SHALL be the endpoints published to + * all consensus nodes.
    + * All other entries SHALL be reserved for future use. + *

    + * Each network may have additional requirements for these endpoints. + * A client MUST check network-specific documentation for those + * details.
    + * If the network configuration value `gossipFqdnRestricted` is set, then + * all endpoints in this list MUST supply only IP address.
    + * If the network configuration value `gossipFqdnRestricted` is _not_ set, + * then endpoints in this list MAY supply either IP address or FQDN, but + * MUST NOT supply both values for the same endpoint. + */ +``` + +### An Enum Example +Note that this example is _all_ description, there are no requirements +listed. This is unusual, but does occur. +```protobuf +/** + * An informational enumeration of all known states.
    + * This enumeration is included here So that people know the mapping from + * integer to state "name".
    + * State changes are expressed in terms of changes to named states at the + * high level conceptual model of the state type like map key/values or + * queue appends. To say which state the change is on we will include an + * `integer` number for the state name. This is done for performance and + * efficiency as there will be 10s of thousands of state changes in a block. + * + * We use an integer, and provide this enumeration, for the following reasons. + * - If we have a extra 8-10 bytes per state change at 40-50K state changes + * per second then that is an extra 2.5-4 megabits of bandwidth. Compression + * should help a lot but that is not guaranteed. + * - When the state name is used as part of complex key in the big state + * merkle map. The smaller the key is, in bytes, the more efficient the + * database is, because more keys can fit in a single disk page. + * - When parsing keys, parsing a UTF-8 string to a Java String is a many + * times more expensive than parsing a VARINT to an integer. + * + * Note: This enumeration is never transmitted directly in the block stream. + * This enumeration is provided for clients to _interpret_ the value + * of the `StateChange`.`state_id` field. + */ +``` + +### A Complex Message Example +Note the added block for the "Alias" detail, which specifies some complex +behavior that has, historically, caused much confusion. +```protobuf +/** + * A single Account in the Hedera distributed ledger. + * + * Each Account SHALL have a unique three-part identifier, a Key, and one + * or more token balances.
    + * Each Account SHALL have an alias, which has multiple forms, and MAY be + * set automatically.
    + * Several additional items SHALL be associated with the Account to enable + * full functionality.
    + * Assets SHALL be represented as linked-lists with only the "head" item + * referenced directly in the Account, and the remaining items SHALL be + * accessible via the token relation or unique tokens maps.
    + * Accounts, as most items in the network, SHALL have an expiration time, + * recorded as seconds since the epoch, and MUST be "renewed" for a small fee + * at expiration. This helps to reduce the amount of inactive accounts retained + * in state.
    + * Another account MAY be designated to pay any renewal fees and automatically + * renew an account for (by default) 30-90 days at a time as a means to + * optionally ensure important accounts remain active.
    + * Accounts MAY participate in securing the network by "staking" the account + * balances to a particular network node, and receive a portion of network + * fees as a reward. An account MAY optionally decline these rewards but still + * stake its balances.
    + * An account MAY optionally require that inbound transfer transactions be + * signed by that account as receiver + * (in addition to the sender's signature).
    + * As with all network entities, Account ID SHALL be represented as + * shard.realm.X.
    + * Alias and contractId SHALL be additional identifiers used to connect accounts + * to transactions before the account is fully enabled, + * or in EVM contracts.
    + * + * --- + * + * #### Alias + * There is considerable complexity with `alias` (aka `evm_address`) for + * Accounts. Much of this comes from the existence of a "hidden" alias for + * almost all accounts, and the reuse of the alias field for both EVM reference + * and "automatic" account creation. + * + * For the purposes of this specification, we will use the following terms for + * clarity. + * - `key_alias` is the account public key as a protobuf serialized message + * and used for auto-creation and subsequent lookup. This is only valid if + * the account key is a + * single `primitive` key, either ED25519 or ECDSA_SECP256K1. + * - `evm_address` exists for every account and is one of + * - `contract_address`, which is the 20 byte EVM contract address per + * EIP-1014 + * - `evm_key_address`, which is the keccak-256 hash of a ECDSA_SECP256K1 + * `primitive` key. + * - This is for accounts lazy-created from EVM public keys, when the + * corresponding ECDSA_SECP256K1 public key is presented in a + * transaction signed by the private key for that public key, the + * account is created that key assigned, and the protobuf-serialized + * form is set as the account alias. + * - `long_zero`, is a synthetic 20 byte address inferred for "normally" + * created accounts. It is constructed from the "standard" AccountID as + * follows. + * - 4 byte big-endian shard number + * - 8 byte big-endian realm number + * - 8 byte big-endian entity number + * + * The `alias` field in the `Account` message SHALL contain one of four values + * for any given account. + * - The `key_alias`, if the account was created by transferring HBAR to the + * account referenced by `key_alias`. + * - The `evm_key_address` if the account was created from an EVM public key + * - The `contract_address` if the account belongs to an EVM contract + * - Not-Set/null/Bytes.EMPTY (collectively `null`) if the account was + * created normally + * + * If the `alias` field of an `Account` is any form of `null`, then the account + * MAY be referenced by `alias` in an `AccountID` by using the `long_zero` + * address for the account. This "hidden default" alias SHALL NOT be stored, + * but is synthesized by the node software as needed, and may be synthesized by + * an EVM contract or client software as well.
    + * An AccountID in a transaction MAY reference an `Account` with + * `shard`.`realm`.`alias`.
    + * If the account `alias` field is set for an Account, that value SHALL be the + * account alias.
    + * If the account `alias` field is not set for an Account, the `long_zero` + * alias SHALL be the account alias. + */ +``` diff --git a/proto_src/documents/modified_md.tmpl b/proto_src/documents/modified_md.tmpl new file mode 100644 index 000000000..84941b5a6 --- /dev/null +++ b/proto_src/documents/modified_md.tmpl @@ -0,0 +1,93 @@ +## Table of Contents +{{range .Files}} +{{$file_name := .Name}}- [{{.Name}}](#{{.Name | anchor}}) + {{- if .Messages }} + {{range .Messages}} - [{{.LongName}}](#{{.FullName | anchor}}) + {{end}} + {{- end -}} + {{- if .Enums }} + {{range .Enums}} - [{{.LongName}}](#{{.FullName | anchor}}) + {{end}} + {{- end -}} + {{- if .Extensions }} + {{range .Extensions}} - [File-level Extensions](#{{$file_name | anchor}}-extensions) + {{end}} + {{- end -}} + {{- if .Services }} + {{range .Services}} - [{{.Name}}](#{{.FullName | anchor}}) + {{end}} + {{- end -}} +{{end}} + +{{range .Files}} +{{$file_name := .Name}} + +

    Top

    + +## {{.Name}} +{{.Description}} + +{{range .Messages}} + + +### {{.LongName}} +{{.Description}} + +{{if .HasFields}} +| Field | Type | Description | +| ----- | ---- | ----------- | +{{range .Fields -}} + | {{.Name}} | [{{.LongType}}](#{{.FullType | anchor}}) | {{if (index .Options "deprecated"|default false)}}**Deprecated.** {{end}}{{nobr .Description}}{{if .DefaultValue}} Default: {{.DefaultValue}}{{end}} | +{{end}} +{{end}} + +{{if .HasExtensions}} +| Extension | Type | Base | Number | Description | +| --------- | ---- | ---- | ------ | ----------- | +{{range .Extensions -}} + | {{.Name}} | {{.LongType}} | {{.ContainingLongType}} | {{.Number}} | {{nobr .Description}}{{if .DefaultValue}} Default: {{.DefaultValue}}{{end}} | +{{end}} +{{end}} + +{{end}} + +{{range .Enums}} + + +### {{.LongName}} +{{.Description}} + +| Name | Number | Description | +| ---- | ------ | ----------- | +{{range .Values -}} + | {{.Name}} | {{.Number}} | {{nobr .Description}} | +{{end}} + +{{end}} + +{{if .HasExtensions}} + + +### File-level Extensions +| Extension | Type | Base | Number | Description | +| --------- | ---- | ---- | ------ | ----------- | +{{range .Extensions -}} + | {{.Name}} | {{.LongType}} | {{.ContainingLongType}} | {{.Number}} | {{nobr .Description}}{{if .DefaultValue}} Default: `{{.DefaultValue}}`{{end}} | +{{end}} +{{end}} + +{{range .Services}} + + +### {{.Name}} +{{.Description}} + +| Method Name | Request Type | Response Type | Description | +| ----------- | ------------ | ------------- | ------------| +{{range .Methods -}} + | {{.Name}} | [{{.RequestLongType}}](#{{.RequestFullType | anchor}}){{if .RequestStreaming}} stream{{end}} | [{{.ResponseLongType}}](#{{.ResponseFullType | anchor}}){{if .ResponseStreaming}} stream{{end}} | {{nobr .Description}} | +{{end}} +{{end}} + +{{end}} + diff --git a/proto_src/mirror/consensus_service.proto b/proto_src/mirror/consensus_service.proto new file mode 100644 index 000000000..438633e2d --- /dev/null +++ b/proto_src/mirror/consensus_service.proto @@ -0,0 +1,100 @@ +/*- + * ‌ + * Hedera Mirror Node + * ​ + * Copyright (C) 2019 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. + * ‍ + */ + +syntax = "proto3"; + +package com.hedera.mirror.api.proto; + +/** + * Required for the reactor-grpc generator to work correctly + */ +option java_multiple_files = true; + +option java_package = "com.hedera.mirror.api.proto"; + +import "basic_types.proto"; +import "timestamp.proto"; +import "consensus_submit_message.proto"; + +message ConsensusTopicQuery { + /** + * A required topic ID to retrieve messages for. + */ + .proto.TopicID topicID = 1; + + /** + * Include messages which reached consensus on or after this time. Defaults to current time if + * not set. + */ + .proto.Timestamp consensusStartTime = 2; + + /** + * Include messages which reached consensus before this time. If not set it will receive + * indefinitely. + */ + .proto.Timestamp consensusEndTime = 3; + + /** + * The maximum number of messages to receive before stopping. If not set or set to zero it will + * return messages indefinitely. + */ + uint64 limit = 4; +} + +message ConsensusTopicResponse { + /** + * The time at which the transaction reached consensus + */ + .proto.Timestamp consensusTimestamp = 1; + + /** + * The message body originally in the ConsensusSubmitMessageTransactionBody. Message size will + * be less than 6KiB. + */ + bytes message = 2; + + /** + * The running hash (SHA384) of every message. + */ + bytes runningHash = 3; + + /** + * Starts at 1 for first submitted message. Incremented on each submitted message. + */ + uint64 sequenceNumber = 4; + + /** + * Version of the SHA-384 digest used to update the running hash. + */ + uint64 runningHashVersion = 5; + + /** + * Optional information of the current chunk in a fragmented message. + */ + .proto.ConsensusMessageChunkInfo chunkInfo = 6; +} + +/** + * The Mirror Service provides the ability to query a stream of Hedera Consensus Service (HCS) + * messages for an HCS Topic via a specific (possibly open-ended) time range. + */ +service ConsensusService { + rpc subscribeTopic (ConsensusTopicQuery) returns (stream ConsensusTopicResponse); +} diff --git a/proto_src/mirror/mirror_network_service.proto b/proto_src/mirror/mirror_network_service.proto new file mode 100644 index 000000000..a6c30d6bc --- /dev/null +++ b/proto_src/mirror/mirror_network_service.proto @@ -0,0 +1,57 @@ +/*- + * ‌ + * Hedera Mirror Node + * ​ + * Copyright (C) 2019-2022 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. + * ‍ + */ + +syntax = "proto3"; + +package com.hedera.mirror.api.proto; + +option java_multiple_files = true; // Required for the reactor-grpc generator to work correctly +option java_package = "com.hedera.mirror.api.proto"; + +import "basic_types.proto"; +import "timestamp.proto"; + +/** + * Request object to query an address book for its list of nodes + */ +message AddressBookQuery { + /** + * The ID of the address book file on the network. Can be either 0.0.101 or 0.0.102. + */ + .proto.FileID file_id = 1; + + /** + * The maximum number of node addresses to receive before stopping. If not set or set to zero it will return all node addresses in the database. + */ + int32 limit = 2; +} + +/** + * Provides cross network APIs like address book queries + */ +service NetworkService { + /* + * Query for an address book and return its nodes. The nodes are returned in ascending order by node ID. The + * response is not guaranteed to be a byte-for-byte equivalent to the NodeAddress in the Hedera file on + * the network since it is reconstructed from a normalized database table. + */ + rpc getNodes (AddressBookQuery) returns (stream .proto.NodeAddress); +} + diff --git a/proto_src/platform/event/event_consensus_data.proto b/proto_src/platform/event/event_consensus_data.proto new file mode 100644 index 000000000..db9202f82 --- /dev/null +++ b/proto_src/platform/event/event_consensus_data.proto @@ -0,0 +1,69 @@ +/** + * # Event Consensus Data + * A message that describes the consensus data for an event. + * + * The `EventConsensusData` contains two fields that are determined once an + * event reaches consensus, the `consensus_timestamp` and `consensus_order`. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in [RFC2119](https://www.ietf.org/rfc/rfc2119). + */ +syntax = "proto3"; + +package com.hedera.hapi.platform.event; + +/* + * Hedera Network Services Protobuf + * + * Copyright (C) 2024 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 "basic_types.proto"; +import "event/event_descriptor.proto"; +import "timestamp.proto"; + +option java_package = "com.hedera.hapi.platform.event.legacy"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +/** + * Event Consensus Data.
    + * This message records the critical values produced by consensus for an event. + */ +message EventConsensusData { + /** + * A consensus timestamp.
    + * The network's consensus agreement on a timestamp for this event. + *

    + * This timestamp MUST be strictly greater than the `consensus_timestamp` of + * the previous consensus event.
    + * This is a consensus value and MAY NOT match real-world "wall clock" time. + */ + proto.Timestamp consensus_timestamp = 1; + + /** + * A consensus order sequence number.
    + * A non-negative sequence number that identifies an event's consensus order + * since genesis. + *

    + * This SHALL be the unique for each consensus event.
    + * This SHALL always increase, and SHALL NOT decrease.
    + * This SHALL increment by one for each consensus event. + */ + uint64 consensus_order = 2; +} + diff --git a/proto_src/platform/event/event_core.proto b/proto_src/platform/event/event_core.proto new file mode 100644 index 000000000..1ff9bb49e --- /dev/null +++ b/proto_src/platform/event/event_core.proto @@ -0,0 +1,85 @@ +/** + * # Core Event Data + * A message that describes the metadata for an event. + * + * The `EventCore` contains a list of the event's parents, as well as the software + * version, an identifier for the node that created this event, the birth round, and + * the creation timestamp for the event. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in [RFC2119](https://www.ietf.org/rfc/rfc2119). + */ +syntax = "proto3"; + +package com.hedera.hapi.platform.event; + +/* + * Hedera Network Services Protobuf + * + * Copyright (C) 2024 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 "basic_types.proto"; +import "event/event_descriptor.proto"; +import "timestamp.proto"; + +option java_package = "com.hedera.hapi.platform.event.legacy"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +/** + * Contains information about an event and its parents. + */ +message EventCore { + /** + * The creator node identifier.
    + * This SHALL be the unique identifier for the node that created the event.
    + * This SHALL match the ID of the node as it appears in the address book. + */ + int64 creator_node_id = 1; + + /** + * The birth round of the event.
    + * The birth round SHALL be the pending consensus round at the time the event is created.
    + * The pending consensus round SHALL be **one greater** than the latest round to reach consensus. + */ + int64 birth_round = 2; + + /** + * The wall clock time at which the event was created, according to the node creating the event.
    + * If the event has a self parent, this timestamp MUST be strictly greater than the `time_created` of the self parent. + */ + proto.Timestamp time_created = 3; + + /** + * A list of EventDescriptors representing the parents of this event.
    + * The list of parents SHALL include zero or one self parents, and zero or more other parents.
    + * The first element of the list SHALL be the self parent, if one exists.
    + * The list of parents SHALL NOT include more than one parent from the same creator. + *

    + * This field is deprecated and can be removed in release 0.62 + */ + repeated EventDescriptor parents = 4 [deprecated = true]; + + /** + * The event specification version.
    + * The specification described by this version SHALL encompass the format of the `GossipEvent` message, and also the + * format of all contained messages.
    + * This SHALL exactly match the specification version passed into the platform at construction. + */ + proto.SemanticVersion version = 17; // This field is temporary until birth_round migration is complete. Field number 17 chosen to avoid polluting cheaper 1 byte field numbers 1-16 +} diff --git a/proto_src/platform/event/event_descriptor.proto b/proto_src/platform/event/event_descriptor.proto new file mode 100644 index 000000000..bb5690da6 --- /dev/null +++ b/proto_src/platform/event/event_descriptor.proto @@ -0,0 +1,80 @@ +/** + * # Event Descriptor + * Unique identifier for an event. + * + * Contains the hash of the event, the creator identifier, the birth round, and the generation. + * + * An event's descriptor is constructed individually by each node that receives a `GossipEvent`, + * to uniquely identify that event. An event's descriptor isn't part of the `GossipEvent` itself, + * since the descriptor contains the fields `hash` and `generation`, which can be computed locally. + * Nodes receiving a `GossipEvent` have the required information to construct the event descriptor + * immediately upon receiving the event, without needing to wait for the event to reach consensus. + * + * Aside from being a unique identifier for events that have been received through gossip, + * the event descriptor contains the necessary information to describe an event's parents, + * in the `parents` field of `GossipEvent`. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in [RFC2119](https://www.ietf.org/rfc/rfc2119). + */ +syntax = "proto3"; + +package com.hedera.hapi.platform.event; + +/* + * Hedera Network Services Protobuf + * + * Copyright (C) 2024 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.hapi.platform.event.legacy"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +/** + * Unique identifier for an event. + */ +message EventDescriptor { + /** + * The hash of the event.
    + * The hash SHALL be a SHA-384 hash.
    + * The hash SHALL have the following inputs, in the specified order:
    + * 1. The bytes of the `EventCore` protobuf
    + * 2. The SHA-384 hash of each individual `EventTransaction`, in the order the transactions appear in the `event_transactions` field of the `GossipEvent` protobuf + */ + bytes hash = 1; + + /** + * The creator node identifier.
    + * This SHALL be the unique identifier for the node that created the event.
    + * This SHALL match the ID of the node as it appears in the address book. + */ + int64 creator_node_id = 2; + + /** + * The birth round of the event.
    + * The birth round SHALL be the pending consensus round at the time the event is created.
    + * The pending consensus round SHALL be **one greater** than the latest round to reach consensus. + */ + int64 birth_round = 3; + + /** + * The generation of the event.
    + * This value SHALL be **one greater** than the _maximum_ generation of all parents.
    + */ + int64 generation = 17; // This field is temporary until birth_round migration is complete. Field number 17 chosen to avoid polluting cheaper 1 byte field numbers 1-16 +} diff --git a/proto_src/platform/event/event_transaction.proto b/proto_src/platform/event/event_transaction.proto new file mode 100644 index 000000000..4ba7d77c5 --- /dev/null +++ b/proto_src/platform/event/event_transaction.proto @@ -0,0 +1,111 @@ +/** + * # Event Transaction + * An Event Transaction gossiped between nodes as part of events. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package com.hedera.hapi.platform.event; + +/* + * Copyright (C) 2024 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 "event/state_signature_transaction.proto"; + +option java_package = "com.hedera.hapi.platform.event.legacy"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +/** + * Defines the position of an EventTransaction relative to a logical "group" + * of EventTransaction that correspond to a single set of changes to the state + * Merkle tree. + */ +enum TransactionGroupRole { + /** + * The EventTransaction is the only transaction in its group. + */ + STANDALONE = 0; + + /** + * The EventTransaction is a child and first in its group. + */ + FIRST_CHILD = 1; + + /** + * The EventTransaction is a child in the middle of its group. + */ + MIDDLE_CHILD = 2; + + /** + * The EventTransaction is a child and last in its group. + */ + LAST_CHILD = 3; + + /** + * The EventTransaction is a parent and first in its group. + */ + STARTING_PARENT = 4; + + /** + * The EventTransaction is a parent in the middle of its group. + */ + PARENT = 5; + + /** + * The EventTransaction is a parent and last in its group. + */ + ENDING_PARENT = 6; +} + +/** + * An Event Transaction gossiped between nodes as part of events. + * + * Each node MUST extract this transaction and process according to the type + * of transaction encoded.
    + * Both the platform and the application built on that platform MAY define event + * transactions.
    + * The encoded data MUST be a serialized protobuf message. + */ +message EventTransaction { + oneof transaction { + /** + * An application transaction. + *

    + * The contents of this transaction SHALL be defined by the application + * subsystem that created the event.
    + * The contents MUST be a serialized protobuf message. + */ + bytes application_transaction = 1; + /** + * A state signature. + *

    + * This transaction SHALL be a valid state signature for a state snapshot. + */ + StateSignatureTransaction state_signature_transaction = 2; + } + + /** + * The role of this transaction in a group of transactions. + */ + TransactionGroupRole transaction_group_role = 3; +} diff --git a/proto_src/platform/event/gossip_event.proto b/proto_src/platform/event/gossip_event.proto new file mode 100644 index 000000000..13304a29c --- /dev/null +++ b/proto_src/platform/event/gossip_event.proto @@ -0,0 +1,88 @@ +/** + * # Gossip Event + * An event that is sent and received via gossip + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in [RFC2119](https://www.ietf.org/rfc/rfc2119). + */ +syntax = "proto3"; + +package com.hedera.hapi.platform.event; + +/* + * Hedera Network Services Protobuf + * + * Copyright (C) 2024 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 "event/event_core.proto"; +import "event/event_descriptor.proto"; + +option java_package = "com.hedera.hapi.platform.event.legacy"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +/** + * An event that is sent and received via gossip + */ +message GossipEvent { + + // The EventTransaction field has been reserved because it is no longer + // required to be stored in the GossipEvent. + reserved 3; + + /** + * The core event data + */ + EventCore event_core = 1; + + /** + * A node signature on the event hash.
    + * The signature SHALL be created with the SHA384withRSA algorithm.
    + * The signature MUST verify using the public key belonging to the `event_creator`.
    + * The `event_creator` public key SHALL be read from the address book that corresponds to the event's birth round.
    + * The signed event hash SHALL be a SHA-384 hash.
    + * The signed event hash SHALL have the following inputs, in the specified order:
    + * 1. The bytes of the `event_core` field
    + * 2. The SHA-384 hash of each individual `EventTransaction`, in the order the transaction appear in the `event_transaction` field + */ + bytes signature = 2; + + /** + * A list of serialized transactions. + *

    + * This field MAY contain zero transactions.
    + * Each transaction in this list SHALL be presented exactly as + * it was supplied to the consensus algorithm.
    + * This field MUST contain one entry for each transaction + * included in this gossip event. + */ + repeated bytes transactions = 4; + + /** + * A list of EventDescriptors representing the parents of this event.
    + * The list of parents SHALL include zero or one self parents, and zero or more other parents.
    + * The first element of the list SHALL be the self parent, if one exists.
    + * The list of parents SHALL NOT include more than one parent from the same creator. + *

    + * NOTE: This field is currently being migrated from EventCore to GossipEvent. + * Once the migration is complete, this field will be removed from EventCore. + * While migration is ongoing, the expectation is that only one of the two + * fields will be set, but not both. + */ + repeated EventDescriptor parents = 5; +} diff --git a/proto_src/platform/event/state_signature_transaction.proto b/proto_src/platform/event/state_signature_transaction.proto new file mode 100644 index 000000000..a8d55010b --- /dev/null +++ b/proto_src/platform/event/state_signature_transaction.proto @@ -0,0 +1,64 @@ +/** + * # State Signature Transaction + * An signature of a state snapshot gossiped to other nodes. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in [RFC2119](https://www.ietf.org/rfc/rfc2119). + */ +syntax = "proto3"; + +package com.hedera.hapi.platform.event; + +/* + * Hedera Network Services Protobuf + * + * Copyright (C) 2018 - 2024 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.hapi.platform.event.legacy"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +/** + * An signature of a state snapshot gossiped to other nodes. + * Each node SHALL hash the root of the merkle tree of a state snapshot every + * round. Once this hash is calculated, it SHOULD be signed with the nodes + * private signing key. This signature, together with the hash SHOULD be added + * to an event as a StateSignatureTransaction. + */ +message StateSignatureTransaction { + + /** + * The round number corresponding to the round number of the state snapshot + * being signed.
    + * This number MUST be greater than 0. + */ + int64 round = 1; + + /** + * The signature of state snapshot hash.
    + * This signature MUST be a RSA signature with a maximum length of 384 bytes.
    + * The signature algorithm used MUST be RSASSA-PKCS1-v1_5 with SHA-384. + */ + bytes signature = 2; + + /** + * The hash of the state snapshot being signed.
    + * This hash MUST be a SHA-384 hash. + */ + bytes hash = 3; +} diff --git a/proto_src/platform/state/platform_state.proto b/proto_src/platform/state/platform_state.proto new file mode 100644 index 000000000..4c45e3e99 --- /dev/null +++ b/proto_src/platform/state/platform_state.proto @@ -0,0 +1,233 @@ +/** + * # PlatformState + * Messages that hold platform state in the network state. + * + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in [RFC2119](https://www.ietf.org/rfc/rfc2119) + * and clarified in [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package com.hedera.hapi.platform.state; + +/* + * Copyright (C) 2024 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.hapi.platform.state.legacy"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; +import "timestamp.proto"; + +/** + * The current state of platform consensus.
    + * This message stores the current consensus data for the platform + * in network state. + * + * The platform state SHALL represent the latest round's consensus.
    + * This data SHALL be used to ensure consistency and provide critical data for + * restart and reconnect. + */ +message PlatformState { + + /** + * A version describing the current version of application software. + *

    + * This SHALL be the software version that created this state. + */ + proto.SemanticVersion creation_software_version = 1; + + /** + * A number of non-ancient rounds. + *

    + * This SHALL be the count of rounds considered non-ancient. + */ + uint32 rounds_non_ancient = 2; + + /** + * A snapshot of the consensus state at the end of the round. + *

    + * This SHALL be used for restart/reconnect. + */ + ConsensusSnapshot consensus_snapshot = 3; + + /** + * A timestamp for the next scheduled time when a freeze will start. + *

    + * If a freeze is not scheduled, this SHALL NOT be set.
    + * If a freeze is currently scheduled, this MUST be set, and MUST + * match the timestamp requested for that freeze. + */ + proto.Timestamp freeze_time = 4; + + /** + * A timestamp for the last time a freeze was performed.
    + * If not set, there has never been a freeze. + */ + proto.Timestamp last_frozen_time = 5; + + // Fields below are to be deprecated in the foreseeable future. + + /** + * A running event hash.
    + * This is computed by the consensus event stream. + *

    + * This will be _removed_ and the field number reserved once the consensus + * event stream is retired. + */ + bytes legacy_running_event_hash = 10000 [deprecated = true]; + + /** + * A consensus generation.
    + * The lowest judge generation before birth round mode was enabled. + *

    + * This SHALL be `MAX_UNSIGNED` if birth round mode has not yet been enabled. + */ + uint64 lowest_judge_generation_before_birth_round_mode = 10001 [deprecated = true]; + + /** + * A consensus round.
    + * The last round before the birth round mode was enabled. + * Will be removed after the birth round migration. + *

    + * This SHALL be `MAX_UNSIGNED` if birth round mode has not yet been enabled. + */ + uint64 last_round_before_birth_round_mode = 10002 [deprecated = true]; + + /** + * A consensus node semantic version.
    + * The software version that enabled birth round mode. + *

    + * This SHALL be unset if birth round migration has not yet happened.
    + * If birth round migration is complete, this SHALL be the _first_ software + * version that enabled birth round mode. + */ + proto.SemanticVersion first_version_in_birth_round_mode = 10003 [deprecated = true]; + + reserved 10004; + reserved "address_book"; + + reserved 10005; + reserved "previous_address_book"; +} + + +/** + * A consensus snapshot.
    + * This is a snapshot of the consensus state for a particular round. + * + * This message SHALL record consensus data necessary for restart + * and reconnect. + */ +message ConsensusSnapshot { + /** + * A consensus round.
    + * The round number of this snapshot. + */ + uint64 round = 1; + /** + * A list of SHA-384 hash values.
    + * The hashes of all judges for this round. + *

    + * This list SHALL be ordered by creator ID.
    + * This list MUST be deterministically ordered. + */ + repeated bytes judge_hashes = 2 [deprecated = true]; + + /** + * A list of minimum judge information entries.
    + * These are "minimum ancient" entries for non-ancient rounds. + */ + repeated MinimumJudgeInfo minimum_judge_info_list = 3; + + /** + * A single consensus number.
    + * The consensus order of the next event to reach consensus. + */ + uint64 next_consensus_number = 4; + + /** + * A "consensus" timestamp.
    + * The consensus timestamp of this snapshot. + *

    + * Depending on the context this timestamp may have different meanings: + *

      + *
    • if there are transactions, the timestamp is equal to the timestamp of the last transaction
    • + *
    • if there are no transactions, the timestamp is equal to the timestamp of the last event
    • + *
    • if there are no events, the timestamp is equal to the timestamp of the previous round plus a small constant
    • + *
    + *

    + * This SHALL be a consensus value and MAY NOT correspond to an actual + * "wall clock" timestamp.
    + * Consensus Timestamps SHALL always increase. + */ + proto.Timestamp consensus_timestamp = 5; + + /* + * A list of judge creator ids and its hashes in a round.
    + */ + repeated JudgeId judge_ids = 6; +} + +/** + * A judge information that includes the creator node ID and the + * SHA-384 hash value of the judge. + */ +message JudgeId { + /** + * The creator node ID who created this judge. + */ + uint64 creator_id = 1; + + /** + * SHA-384 hash value of this judge + */ + bytes judge_hash = 2; +} + +/** + * Records the minimum ancient indicator for all judges in a particular round. + */ +message MinimumJudgeInfo { + /** + * A consensus round.
    + * The round this judge information applies to. + */ + uint64 round = 1; + + /** + * This is a minimum ancient threshold for all judges for a given round. + * The value should be interpreted as a generation if the birth + * round migration is not yet completed, and a birth round thereafter. + *

    + * This SHALL reflect the relevant minimum threshold, whether + * generation-based or birth-round-based. + */ + uint64 minimum_judge_ancient_threshold = 2; +} + +/** + * A consensus node identifier.
    + * This value uniquely identifies a single consensus node within the network. + */ +message NodeId { + /** + * A numeric identifier. + */ + uint64 id = 1; +} diff --git a/proto_src/run/copyright.txt b/proto_src/run/copyright.txt new file mode 100644 index 000000000..c5c0b2861 --- /dev/null +++ b/proto_src/run/copyright.txt @@ -0,0 +1,19 @@ +/*- + * ‌ + * 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. + * ‍ + */ diff --git a/proto_src/run/gen-proto-docs.sh b/proto_src/run/gen-proto-docs.sh new file mode 100755 index 000000000..9b092f8e6 --- /dev/null +++ b/proto_src/run/gen-proto-docs.sh @@ -0,0 +1,16 @@ +#! /bin/sh +DIR=${1:-'hedera'} +case $DIR in + hedera) + cd $DIR + ;; + *) + echo "Unknown proto directory '$DIR'" + ;; +esac + +docker run --rm \ + -v $(pwd):/out \ + -v $(pwd):/protos \ + pseudomuto/protoc-gen-doc +mv index.html ../ diff --git a/proto_src/sdk/transaction_list.proto b/proto_src/sdk/transaction_list.proto new file mode 100644 index 000000000..91e172740 --- /dev/null +++ b/proto_src/sdk/transaction_list.proto @@ -0,0 +1,19 @@ +syntax = "proto3"; + +package proto; + +option java_package = "com.hedera.hashgraph.sdk.proto"; +option java_multiple_files = true; + +import "transaction.proto"; + +/** + * A simple protobuf wrapper to store a list of transactions. This is used by + * `Transaction.[from|to]Bytes()` in the SDKs. The reason the SDK needs a list of transactions is + * because it holds onto a transaction per node. So if a transaction is to be submitted to nodes 3 + * and 4 the SDK Transaction type would contain a list of 2 protobuf transactions, one for node 3 + * and one for node 4. + */ +message TransactionList { + repeated Transaction transaction_list = 1; +} diff --git a/proto_src/services/address_book_service.proto b/proto_src/services/address_book_service.proto new file mode 100644 index 000000000..dd1730f51 --- /dev/null +++ b/proto_src/services/address_book_service.proto @@ -0,0 +1,152 @@ +/** + * # Address Book Service API + * GRPC service definitions for the Hedera Address Book Service (HABS). + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package + +import "transaction_response.proto"; +import "transaction.proto"; + +/** + * The Address Book service provides the ability for Hedera network node + * administrators to add, update, and remove consensus nodes. This addition, + * update, or removal of a consensus node requires governing council approval, + * but each node operator may update their own operational attributes without + * additional approval, reducing overhead for routine operations. + * + * Most operations are `privileged operations` and require governing council + * approval. + * + * ### For a node creation transaction. + * - The node operator SHALL create a `createNode` transaction. + * - The node operator MUST sign this transaction with the `Key` + * set as the `admin_key` for the new `Node`. + * - The node operator SHALL deliver the signed transaction to the Hedera + * council representative. + * - The Hedera council representative SHALL arrange for council members to + * review and sign the transaction. + * - Once sufficient council members have signed the transaction, the + * Hedera council representative SHALL submit the transaction to the + * network. + * - Upon receipt of a valid and signed node creation transaction the network + * software SHALL + * - Validate the threshold signature for the Hedera governing council + * - Validate the signature of the `Key` provided as the new `admin_key` + * for the `Node`. + * - Create the new node in state, this new node SHALL NOT be active in the + * network at this time. + * - When executing the next `freeze` transaction with `freeze_type` set to + * `PREPARE_UPGRADE`, update network configuration and bring the + * new node to an active status within the network. The node to be added + * SHALL be active in the network following this upgrade. + * + * ### For a node deletion transaction. + * - The node operator or Hedera council representative SHALL create a + * `deleteNode` transaction. + * - If the node operator creates the transaction + * - The node operator MUST sign this transaction with the `Key` + * set as the `admin_key` for the existing `Node`. + * - The node operator SHALL deliver the signed transaction to the Hedera + * council representative. + * - The Hedera council representative SHALL arrange for council members to + * review and sign the transaction. + * - Once sufficient council members have signed the transaction, the + * Hedera council representative SHALL submit the transaction to the + * network. + * - Upon receipt of a valid and signed node deletion transaction the network + * software SHALL + * - Validate the signature for the Hedera governing council + * - Remove the existing node from network state. The node SHALL still + * be active in the network at this time. + * - When executing the next `freeze` transaction with `freeze_type` set to + * `PREPARE_UPGRADE`, update network configuration and remove the + * node to be deleted from the network. The node to be deleted SHALL NOT + * be active in the network following this upgrade. + * + * ### For a node update transaction. + * - The node operator SHALL create an `updateNode` transaction. + * - The node operator MUST sign this transaction with the active `key` + * assigned as the `admin_key`. + * - The node operator SHALL submit the transaction to the + * network. Hedera council approval SHALL NOT be sought for this + * transaction + * - Upon receipt of a valid and signed node update transaction the network + * software SHALL + * - If the transaction modifies the value of the "node account", + * - Validate the signature of the active `key` for the account + * assigned as the _current_ "node account". + * - Validate the signature of the active `key` for the account to be + * assigned as the _new_ "node account". + * - Modify the node information held in network state with the changes + * requested in the update transaction. The node changes SHALL NOT be + * applied to network configuration, and SHALL NOT affect network + * operation at this time. + * - When executing the next `freeze` transaction with `freeze_type` set to + * `PREPARE_UPGRADE`, update network configuration according to the + * modified information in network state. The requested changes SHALL + * affect network operation following this upgrade. + */ +service AddressBookService { + /** + * A transaction to create a new consensus node in the network + * address book. + *

    + * This transaction, once complete, SHALL add a new consensus node to the + * network state.
    + * The new consensus node SHALL remain in state, but SHALL NOT participate + * in network consensus until the network updates the network configuration. + *

    + * Hedera governing council authorization is REQUIRED for this transaction. + */ + rpc createNode (proto.Transaction) returns (proto.TransactionResponse); + + /** + * A transaction to remove a consensus node from the network address + * book. + *

    + * This transaction, once complete, SHALL remove the identified consensus + * node from the network state. + *

    + * Hedera governing council authorization is REQUIRED for this transaction. + */ + rpc deleteNode (proto.Transaction) returns (proto.TransactionResponse); + + /** + * A transaction to update an existing consensus node from the network + * address book. + *

    + * This transaction, once complete, SHALL modify the identified consensus + * node state as requested. + *

    + * This transaction is authorized by the node operator + */ + rpc updateNode (proto.Transaction) returns (proto.TransactionResponse); +} diff --git a/proto_src/services/auxiliary/hints/crs_publication.proto b/proto_src/services/auxiliary/hints/crs_publication.proto new file mode 100644 index 000000000..0ccaaac7e --- /dev/null +++ b/proto_src/services/auxiliary/hints/crs_publication.proto @@ -0,0 +1,49 @@ +/** + * # hinTS Key Publication Transaction + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package com.hedera.hapi.services.auxiliary.hints; + +/* + * Copyright (C) 2025 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.hapi.services.auxiliary.hints.legacy"; +// <<>> This comment is special code for setting PBJ Compiler java package + +option java_multiple_files = true; + +/** + * A transaction body to publish a node's Common Reference String (CRS) to the network. This is used + * when node wants to update to reach the final CRS for network to use the hinTS protocol + */ +message CrsPublicationTransactionBody { + /** + * The party's generated random CRS. + */ + bytes new_crs = 1; + /** + * The party's proof of the CRS update. + */ + bytes proof = 2; +} diff --git a/proto_src/services/auxiliary/hints/hints_key_publication.proto b/proto_src/services/auxiliary/hints/hints_key_publication.proto new file mode 100644 index 000000000..9d4ef3116 --- /dev/null +++ b/proto_src/services/auxiliary/hints/hints_key_publication.proto @@ -0,0 +1,65 @@ +/** + * # hinTS Key Publication Transaction + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package com.hedera.hapi.services.auxiliary.hints; + +// SPDX-License-Identifier: Apache-2.0 +import "state/hints/hints_types.proto"; + +/* + * Copyright (C) 2025 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.hapi.services.auxiliary.hints.legacy"; +// <<>> This comment is special code for setting PBJ Compiler java package + +option java_multiple_files = true; + +/** + * A transaction body to publish a node's hinTS key for a certain + * party id and number of parties. A hinTS key is an extended + * public key; that is, a BLS public key combined with "hints" + * derived from the matching private key that a signature + * aggregator can use to prove well-formedness of an aggregate + * public key by an efficiently verifiable SNARK. + */ +message HintsKeyPublicationTransactionBody { + /** + * The party id for which the hinTS key is being published; + * must be in the range [0, num_parties). + *

    + * This value MUST be set to a non-negative integer.
    + */ + uint32 party_id = 1; + + /** + * The number of parties in the hinTS scheme. + */ + uint32 num_parties = 2; + + /** + * The party's hinTS key. + */ + bytes hints_key = 3; +} diff --git a/proto_src/services/auxiliary/hints/hints_partial_signature.proto b/proto_src/services/auxiliary/hints/hints_partial_signature.proto new file mode 100644 index 000000000..e7c023a48 --- /dev/null +++ b/proto_src/services/auxiliary/hints/hints_partial_signature.proto @@ -0,0 +1,58 @@ +/** + * # hinTS Partial Signature Transaction + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package com.hedera.hapi.services.auxiliary.hints; + +/* + * Copyright (C) 2025 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.hapi.services.auxiliary.hints.legacy"; +// <<>> This comment is special code for setting PBJ Compiler java package + +option java_multiple_files = true; + +/** + * A transaction body to publish a node's hinTS partial signature on + * a particular message for a certain construction id. + */ +message HintsPartialSignatureTransactionBody { + /** + * The id of the hinTS construction this partial signature applies to. + * (The size of the target roster for this construction implies what + * hinTS party id the submitting node has in the construction; and + * hence also what weight the node's signature has.) + */ + uint64 construction_id = 1; + + /** + * The message being signed. + */ + bytes message = 2; + + /** + * The node's partial signature on the message. + */ + bytes partial_signature = 3; +} diff --git a/proto_src/services/auxiliary/hints/hints_preprocessing_vote.proto b/proto_src/services/auxiliary/hints/hints_preprocessing_vote.proto new file mode 100644 index 000000000..72f4902b9 --- /dev/null +++ b/proto_src/services/auxiliary/hints/hints_preprocessing_vote.proto @@ -0,0 +1,59 @@ +/** + * # hinTS Aggregation Vote Transaction + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package com.hedera.hapi.services.auxiliary.hints; + +/* + * Copyright (C) 2025 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 "state/hints/hints_types.proto"; + +option java_package = "com.hedera.hapi.services.auxiliary.hints.legacy"; +// <<>> This comment is special code for setting PBJ Compiler java package + +option java_multiple_files = true; + +/** + * A transaction body to publish a node's vote for the results of + * aggregating the hinTS keys for a specified construction id. The + * node can either give their explicit aggregation results, or + * delegate their vote to another node's results. + */ +message HintsPreprocessingVoteTransactionBody { + /** + * The id of the hinTS construction this vote is for. Because + * the network only ever performs one construction a time, this + * is somewhat redundant, but included to detect any strange + * edge cases where a node is so far behind it votes on the wrong + * construction. + */ + uint64 construction_id = 1; + + /** + * The vote the node is casting for the aggregation of the hints + * in the given construction (which should be ongoing). + */ + com.hedera.hapi.node.state.hints.PreprocessingVote vote = 2; +} diff --git a/proto_src/services/auxiliary/history/history_proof_key_publication.proto b/proto_src/services/auxiliary/history/history_proof_key_publication.proto new file mode 100644 index 000000000..3243a19e7 --- /dev/null +++ b/proto_src/services/auxiliary/history/history_proof_key_publication.proto @@ -0,0 +1,46 @@ +/** + * # Proof Key Publication Transaction + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package com.hedera.hapi.services.auxiliary.history; + +/* + * Copyright (C) 2025 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.hapi.services.auxiliary.history.legacy"; +// <<>> This comment is special code for setting PBJ Compiler java package + +option java_multiple_files = true; + +/** + * A transaction body to publish a node's history proof key. + */ +message HistoryProofKeyPublicationTransactionBody { + /** + * The proof key the submitting node intends to use when + * contributing signatures for use in proving history + * belongs to the chain of trust for the ledger id. + */ + bytes proof_key = 1; +} diff --git a/proto_src/services/auxiliary/history/history_proof_signature.proto b/proto_src/services/auxiliary/history/history_proof_signature.proto new file mode 100644 index 000000000..5342e9205 --- /dev/null +++ b/proto_src/services/auxiliary/history/history_proof_signature.proto @@ -0,0 +1,54 @@ +/** + * # Metadata Proof Assembly Signature Transaction + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package com.hedera.hapi.services.auxiliary.history; + +/* + * Copyright (C) 2025 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 "state/history/history_types.proto"; + +option java_package = "com.hedera.hapi.services.auxiliary.history.legacy"; +// <<>> This comment is special code for setting PBJ Compiler java package + +option java_multiple_files = true; + +/** + * A transaction body to publish a node's signature on a computed + * history of address book hash and associated metadata. This + * signature can contribute to a proof that the history belongs to + * to the chain of trust for the ledger id. + */ +message HistoryProofSignatureTransactionBody { + /** + * The id of the proof construction this signature is contributing to. + */ + uint64 construction_id = 1; + + /** + * This node's signature on its computed history. + */ + com.hedera.hapi.node.state.history.HistorySignature signature = 2; +} diff --git a/proto_src/services/auxiliary/history/history_proof_vote.proto b/proto_src/services/auxiliary/history/history_proof_vote.proto new file mode 100644 index 000000000..4349739ab --- /dev/null +++ b/proto_src/services/auxiliary/history/history_proof_vote.proto @@ -0,0 +1,52 @@ +/** + * # Metadata Proof Vote Transaction + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package com.hedera.hapi.services.auxiliary.history; + +/* + * Copyright (C) 2025 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 "state/history/history_types.proto"; + +option java_package = "com.hedera.hapi.services.auxiliary.history.legacy"; +// <<>> This comment is special code for setting PBJ Compiler java package + +option java_multiple_files = true; + +/** + * A transaction body to publish a node's vote for a + * proof of history associated to a construction id. + */ +message HistoryProofVoteTransactionBody { + /** + * The id of the proof construction this vote is for. + */ + uint64 construction_id = 1; + + /** + * The submitting node's vote on the history proof. + */ + com.hedera.hapi.node.state.history.HistoryProofVote vote = 2; +} diff --git a/proto_src/services/auxiliary/tss/tss_encryption_key.proto b/proto_src/services/auxiliary/tss/tss_encryption_key.proto new file mode 100644 index 000000000..6cfa92df0 --- /dev/null +++ b/proto_src/services/auxiliary/tss/tss_encryption_key.proto @@ -0,0 +1,46 @@ +/** + * # Tss Encryption Key Transaction + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package com.hedera.hapi.services.auxiliary.tss; + +/* + * Copyright (C) 2024 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.hapi.services.auxiliary.tss.legacy"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +/** + * A transaction body for sending the public TSS encryption key. + */ +message TssEncryptionKeyTransactionBody { + /** + * The raw bytes of the public TSS encryption key of the node sending the transaction. + *

    + * This value MUST be set.
    + * This value MUST NOT be empty.
    + */ + bytes publicTssEncryptionKey = 1; +} diff --git a/proto_src/services/auxiliary/tss/tss_message.proto b/proto_src/services/auxiliary/tss/tss_message.proto new file mode 100644 index 000000000..73c495069 --- /dev/null +++ b/proto_src/services/auxiliary/tss/tss_message.proto @@ -0,0 +1,88 @@ +/** + * # Tss Message Transaction + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package com.hedera.hapi.services.auxiliary.tss; + +/* + * Copyright (C) 2024 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.hapi.services.auxiliary.tss.legacy"; +// <<>> This comment is special code for setting PBJ Compiler java package + +option java_multiple_files = true; + +/** A transaction body to to send a Threshold Signature Scheme (TSS) + * Message.
    + * This is a wrapper around several different TSS message types that a node + * might communicate with other nodes in the network. + * + * - A `TssMessageTransactionBody` MUST identify the hash of the roster + * containing the node generating this TssMessage + * - A `TssMessageTransactionBody` MUST identify the hash of the roster that + * the TSS messages is for + * - A `TssMessageTransactionBody` SHALL contain the specificc TssMessage data + * that has been generated by the node for the share_index. + */ +message TssMessageTransactionBody { + + /** + * A hash of the roster containing the node generating the TssMessage.
    + * This hash uniquely identifies the source roster, which will include + * an entry for the node generating this TssMessage. + *

    + * This value MUST be set.
    + * This value MUST NOT be empty.
    + * This value MUST contain a valid hash. + */ + bytes source_roster_hash = 1; + + /** + * A hash of the roster that the TssMessage is for. + *

    + * This value MUST be set.
    + * This value MUST NOT be empty.
    + * This value MUST contain a valid hash. + */ + bytes target_roster_hash = 2; + + /** + * An index to order shares. + *

    + * A share index SHALL establish a global ordering of shares across all + * shares in the network.
    + * A share index MUST correspond to the index of the public share in the list + * returned from the TSS library when the share was created for the source + * roster. + */ + uint64 share_index = 3; + + /** + * A byte array. + *

    + * This field SHALL contain the TssMessage data generated by the node + * for the specified `share_index`. + */ + bytes tss_message = 4; +} diff --git a/proto_src/services/auxiliary/tss/tss_vote.proto b/proto_src/services/auxiliary/tss/tss_vote.proto new file mode 100644 index 000000000..97eb559a4 --- /dev/null +++ b/proto_src/services/auxiliary/tss/tss_vote.proto @@ -0,0 +1,98 @@ +/** + * # Tss Vote Transaction + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package com.hedera.hapi.services.auxiliary.tss; + +/* + * Copyright (C) 2024 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.hapi.services.auxiliary.tss.legacy"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +/** + * A transaction body to vote on the validity of Threshold Signature Scheme + * (TSS) Messages for a candidate roster. + * + * - A `TssVoteTransactionBody` MUST identify the hash of the roster containing + * the node generating this TssVote + * - A `TssVoteTransactionBody` MUST identify the hash of the roster that the + * TSS messages is for + * - If the candidate roster has received enough yes votes, the candidate + * roster SHALL be adopted. + * - Switching to the candidate roster MUST not happen until enough nodes have + * voted that they have verified a threshold number of TSS messages from the + * active roster. + * - A vote consists of a bit vector of message statuses where each bit + * corresponds to the order of TssMessages as they have come through + * consensus. + * - The threshold for votes to adopt a candidate roster SHALL be at least 1/3 + * of the consensus weight of the active roster to ensure that at least 1 + * honest node has validated the TSS key material. + */ +message TssVoteTransactionBody { + + /** + * A hash of the roster containing the node generating this TssVote. + */ + bytes source_roster_hash = 1; + + /** + * A hash of the roster that this TssVote is for. + */ + bytes target_roster_hash = 2; + + /** + * An identifier (and public key) computed from the TssMessages for the target + * roster. + */ + bytes ledger_id = 3; + + /** + * A signature produced by the node. + *

    + * This signature SHALL be produced using the node RSA signing key to sign + * the ledger_id.
    + * This signature SHALL be used to establish a chain of trust in the ledger id. + */ + bytes node_signature = 4; + + /** + * A bit vector of message statuses. + *

    + * #### Example + *

    • The least significant bit of byte[0] SHALL be the 0th item in the sequence.
    • + *
    • The most significant bit of byte[0] SHALL be the 7th item in the sequence.
    • + *
    • The least significant bit of byte[1] SHALL be the 8th item in the sequence.
    • + *
    • The most significant bit of byte[1] SHALL be the 15th item in the sequence.
    • + *
    + * A bit SHALL be set if the `TssMessage` for the `TssMessageTransaction` + * with a sequence number matching that bit index has been + * received, and is valid.
    + * A bit SHALL NOT be set if the `TssMessage` has not been received or was + * received but not valid. + */ + bytes tss_vote = 5; +} diff --git a/proto_src/services/basic_types.proto b/proto_src/services/basic_types.proto new file mode 100644 index 000000000..edf1496a5 --- /dev/null +++ b/proto_src/services/basic_types.proto @@ -0,0 +1,2457 @@ +/** + * # Basic Types + * Fundamental message types used across transactions and state as field types. + * + * ### Requirements for identifier values + * - Most entities in the network SHALL be identified by a multi-part + * identifier. These identifier values SHALL consist of a shard, a realm, and + * an entity identifier. + * - Shard, Realm, and Entity Number MUST all be whole numbers. + * - A Shard SHALL be globally unique. + * - A Realm MAY be reused between shards, but SHALL be unique within a shard. + * - An Entity Number MAY be reused between shards and realms, but SHALL be + * unique within each combination of shard and realm. + * - Every object (e.g. account, file, token, etc...) SHALL be scoped to exactly + * one realm and shard. Thus a File has a FileID, a numeric triplet, such as + * 0.0.2 for shard 0, realm 0, entity 2. + * - Identifier values SHOULD use an Entity Number as the third component of the + * identifier. Some, however, MAY use alternative or composite values for the + * Entity portion of the three part identifier. Any such alternative or + * composite value MUST be unique within that shard and realm combination. + * - The entity portion of the identifier, regardless of type, MUST be unique + * within that realm and shard combination and MAY be globally unique. + * - The triplet of shard.realm.entity MUST be globally unique, even across + * different identifier types. + * - Each realm SHALL maintain a single counter for entity numbers, so if there + * is an identifier with value 0.1.2, then there MUST NOT be an identifier + * with value 0.1.2 for any other object. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +import "google/protobuf/wrappers.proto"; + +option java_package = "com.hederahashgraph.api.proto.java"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +/** + * A shard identifier.
    + * A shard is a partition of nodes running the network that processes + * transactions separately from other shards. Each shard is effectively an + * independent instance of the overall network that shares the same virtual + * distributed ledger, and may gossip cross-shard transactions with other + * shards to maintain overall correct processing of the ledger. + */ +message ShardID { + /** + * A whole number shard identifier. + */ + int64 shardNum = 1; +} + +/** + * A realm identifier.
    + * Within a given shard, every realm has a unique numeric identifier. + * Each account, file, and contract instance belongs to exactly one realm. + */ +message RealmID { + /** + * A whole number shard identifier. + */ + int64 shardNum = 1; + + /** + * A whole number realm identifier. + */ + int64 realmNum = 2; +} + +/** + * Unique identifier for a token.
    + * As with all entity identifiers within the network, a token identifier + * consists of a combination of shard number, realm number, and entity number. + * Each of these numbers is unique within its scope (shard > realm > entity). + */ +message TokenID { + /** + * A whole number shard identifier. + */ + int64 shardNum = 1; + + /** + * A whole number realm identifier. + */ + int64 realmNum = 2; + + /** + * A whole number token identifier. + */ + int64 tokenNum = 3; +} + +/** + * A specific hash algorithm. + * + * We did not reuse Record Stream `HashAlgorithm` here because in all cases, + * currently, this will be `SHA2_384` and if that is the default value then + * we can save space by not serializing it, whereas `HASH_ALGORITHM_UNKNOWN` + * is the default for Record Stream `HashAlgorithm`. + * + * Note that enum values here MUST NOT match the name of any other enum value + * in the same `package`, as protobuf follows `C++` scope rules and all enum + * _names_ are treated as global constants within the `package`. + */ +enum BlockHashAlgorithm { + /** + * A SHA2 algorithm SHA-384 hash. + *

    + * This is the default value, if a field of this enumerated type is + * not set, then this is the value that will be decoded when the + * serialized message is read. + */ + SHA2_384 = 0; +} + +/** + * A unique identifier for an Hedera account. + * + * An account identifier is of the form `shard.realm.[number|alias]`.
    + * The identifier MAY use the alias form when transferring HBAR to a public key + * before the account for that key is created, when only the alias value is + * known, or in some smart contracts that use the EVM address style alias to + * refer to Accounts.
    + * When the account entry is completed, the alias SHALL be stored separately in + * the Account record, and the identifier in the Account SHALL use the + * `accountNum` form. + * + * --- + * ### Additional Notes + * + * #### Alias + * There is considerable complexity with `alias` (aka `evm_address`) for + * Accounts. Much of this comes from the existence of a "hidden" alias for + * almost all accounts, and the reuse of the alias field for both EVM reference + * and "automatic" account creation.
    + * For the purposes of this specification, we will use the following terms for + * clarity. + * - `key_alias`
    + * The account public key as a protobuf serialized message and used for + * auto-creation and subsequent lookup. This is only valid if the account + * key is a single `primitive` key, either Ed25519 or ECDSA_SECP256K1. + * - `evm_address`
    + * Exists for every account and is one of + * - `contract_address`
    + * The 20 byte EVM address prescribed by `CREATE` or `CREATE2` + * - `evm_key_address`
    + * An arbitrary 20 byte EVM address that, for a usable externally owned + * account (EOA) SHALL be the rightmost 20 bytes of the Keccak-256 hash + * of a ECDSA_SECP256K1 key.
    + * Such accounts may be created in one of three ways: + * - Sending hbar or fungible tokens to an unused + * ECDSA_SECP256K1 key alias. + * - Sending hbar or fungible tokens to an unassigned 20-byte + * EVM address. + * - Submitting a `CryptoCreate` signed with the corresponding + * private key. + * - `long_zero`
    + * A synthetic 20 byte address inferred for "normally" created accounts. + * It is constructed from the "standard" AccountID as follows. + * 1. 4 byte big-endian shard number + * 1. 8 byte big-endian realm number + * 1. 8 byte big-endian entity number
    + * + * The `alias` field in the `Account` message SHALL contain one of four values + * for any given account. + * - The `key_alias`, if the account was created by transferring HBAR to the + * `key_alias` public key value. + * - The `evm_key_address` if the account was created from an EVM public key + * - The `contract_address` if the account belongs to an EVM contract + * - Not-Set/null/Bytes.EMPTY (collectively `null`) if the account was + * created normally + * + * If the `alias` field of an `Account` is any form of `null`, then the account + * MAY be referred to by `alias` in an `AccountID` by using the `long_zero` + * address for the account.
    + * This "hidden default" alias SHALL NOT be stored, but is synthesized by the + * node software as needed, and may be synthesized by an EVM contract or client + * software as well. + * + * --- + * + * #### Alias forms + * An `AccountID` in a transaction MAY reference an `Account` with + * `shard.realm.alias`.
    + * If the account `alias` field is set for an Account, that value SHALL be the + * account alias.
    + * If the account `alias` field is not set for an Account, the `long_zero` alias + * SHALL be the account alias. + */ +message AccountID { + /** + * A whole number shard identifier. + */ + int64 shardNum = 1; + + /** + * A whole number realm identifier. + */ + int64 realmNum = 2; + + oneof account { + /** + * A whole number account number, unique within its realm and shard. + *

    + * For any AccountID fields in the query response, transaction records, + * transaction receipts, or block stream `accountNum` MUST be used. + */ + int64 accountNum = 3; + + /** + * An alias value.
    + * Alias is a value used in some contexts to refer to an account when + * account number is not available, and may be an alias public key, or + * an EVM address. + */ + bytes alias = 4; + } +} + +/** + * An identifier for a unique token (or "NFT"), used by both contract + * and token services. + */ +message NftID { + /** + * A token identifier.
    + * This token represents the collection containing this NFT. + */ + TokenID token_ID = 1; + + /** + * A unique serial number.
    + * This serial number is unique within its token type. + */ + int64 serial_number = 2; +} + +/** + * An identifier for a File within the network. + */ +message FileID { + /** + * A whole number shard identifier. + */ + int64 shardNum = 1; + + /** + * A whole number realm identifier. + */ + int64 realmNum = 2; + + /** + * A whole number file identifier, unique within its realm and shard. + */ + int64 fileNum = 3; +} + +/** + * An identifier for a smart contract within the network. + */ +message ContractID { + /** + * A whole number shard identifier. + */ + int64 shardNum = 1; + + /** + * A whole number realm identifier. + */ + int64 realmNum = 2; + + oneof contract { + /** + * A whole number contract identifier, unique within its realm and shard. + */ + int64 contractNum = 3; + + /** + * A 20-byte EVM address of the contract to call. + *

    + * A contract created via a HAPI `ContractCreate` call SHALL have + * an EVM address determined by its `shard.realm.num` identifier.
    + * This address is as follows + *

      + *
    1. 4 byte big-endian shard number
    2. + *
    3. 8 byte big-endian realm number
    4. + *
    5. 8 byte big-endian contract number
    6. + *
    + * This address is not stored in state, but is computed when needed. + *

    + * Contracts created by any other means, including a HAPI + * `EthereumTransaction` whose `to` address is the zero address, + * SHALL have the EVM address prescribed by the `CREATE` or + * `CREATE2` opcode, as applicable. + */ + bytes evm_address = 4; + } +} + +/** + * An unique identifier for a topic.
    + * Topics are part of the consensus service, messages are published to a topic. + */ +message TopicID { + /** + * A whole number shard identifier. + */ + int64 shardNum = 1; + + /** + * A whole number realm identifier. + */ + int64 realmNum = 2; + + /** + * A whole number topic identifier, unique within its realm and shard. + */ + int64 topicNum = 3; +} + +/** + * An unique identifier for a Schedule + */ +message ScheduleID { + /** + * A whole number shard + */ + int64 shardNum = 1; + + /** + * A whole number realm + */ + int64 realmNum = 2; + + /** + * A whole number schedule, unique within its realm and shard + */ + int64 scheduleNum = 3; +} + +/** + * A transaction identifier.
    + * This is used for retrieving receipts and records for a transaction + * and internally by the network for detecting when duplicate transactions are + * submitted. + * + * A transaction may be processed more reliably by submitting it to + * several 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 SHALL NOT be executed (and SHALL result in a + * `DUPLICATE_TRANSACTION` response).
    + * Multiple submission increase reliability on the assumption that an error in, + * for example, network connectivity will not affect all nodes equally. Latency + * might be slightly lower, if one node is handling intake significantly slower + * than others, for example. The base transaction fee is required for each + * submission, however, so the total fees charged are significantly higher when + * using this approach. + * + * ### Requirements + * Each transaction identifier MUST be unique.
    + * Multiple transactions MAY be submitted with the same transaction + * identifier, but all except the first SHALL be rejected as duplicate + * transactions.
    + * An identifier MUST specify a `payer` account to be charged all fees + * associated with the transaction.
    + * The `payer` account MUST exist and MUST have sufficient HBAR to pay all + * transaction fees.
    + * An identifier MUST specify a "valid start time".
    + * The "valid start time" MUST be strictly _earlier_ than the current + * network consensus time when submitted.
    + * The "valid start time" MUST NOT be more than `transaction.maxValidDuration` + * seconds before the current network consensus time when submitted.
    + * A client-submitted transaction MUST NOT set the `scheduled` flag. + * + * ### Additional Notes + * + * Additional items applicable to Scheduled Transactions: + * + * - The ID of a Scheduled Transaction, once executed, SHALL inherit both + * `transactionValidStart` and `accountID` from the `ScheduleCreate` + * transaction that created the schedule. + * - The `scheduled` property SHALL be set for Scheduled Transactions. + */ +message TransactionID { + /** + * A timestamp for the transaction start time.
    + * This is the earliest expected start time for this transaction. + *

    + * This value MUST be strictly less than `consensusTimestamp` when the + * transaction is submitted. + */ + Timestamp transactionValidStart = 1; + + /** + * An Account identifier. + *

    + * The identified account SHALL pay transaction fees for this transaction. + */ + AccountID accountID = 2; + + /** + * A scheduled transaction flag.
    + * If set, this transaction represents the execution of a Schedule after + * all necessary signatures are gathered. + *

    + * This flag MUST NOT be set in a user-submitted transaction. + */ + bool scheduled = 3; + + /** + * An identifier for an internal transaction.
    + * An internal transaction is one that was spawned as part of handling a + * user transaction. These internal transactions share the + * transactionValidStart and accountID of the user transaction, so a nonce + * is necessary to give them a unique TransactionID. + *

    + * An example is when a "parent" ContractCreate or ContractCall transaction + * calls one or more HTS precompiled contracts; each of the "child" + * transactions spawned for a precompile has a transaction id with a + * different nonce. + *

    + * This value MUST be unset for user-submitted transactions. + */ + int32 nonce = 4; +} + +/** + * An account, and the amount that it sends or receives during a token transfer. + * + * This message is only relevant to fungible/common token transfers. + * Non-fungible/unique (NFT) token transfers MUST use the NftTransfer message. + */ +message AccountAmount { + /** + * An account identifier that will send or receive token(s). + */ + AccountID accountID = 1; + + /** + * An amount to send (negative) or receive (positive). + *

    + * This amount MUST be denominated in the smallest unit of the relevant + * token.
    + * For HBAR this SHALL be tinybar (10-8 HBAR).
    + * For other fungible/common tokens this SHALL depend on the value of + * `decimals` for that token. + */ + sint64 amount = 2; + + /** + * An approved allowance flag.
    + * If true then the transfer is expected to be an approved allowance. + *

    + * If set, `accountID` SHALL be the owner that previously approved + * the allowance.
    + * The default value SHALL be false (unset). + */ + bool is_approval = 3; +} + +/** + * A list of accounts and amounts to transfer. + * + * Each `AccountAmount` SHALL specify the account and the amount to + * send(negative) or receive(positive).
    + * Each `TransferList` SHALL be contained in another message that contains + * other details required to complete a transfer. This is typically a + * `CryptoTransferTransactionBody` or `TransactionRecord`.
    + * The `TransferList` SHALL only be used for HBAR transfers. Other token types + * MUST use the `TokenTransferList` message. + */ +message TransferList { + /** + * A list of AccountAmount pairs.
    + * Each entry in this list is an account and an amount to transfer + * into it (positive) or out of it (negative) + */ + repeated AccountAmount accountAmounts = 1; +} + +/** + * A NFT transfer.
    + * This refers to a sender account, a receiver account, and the serial number + * of an NFT to transfer from sender to receiver. + * + * Each `NftTransfer` SHALL be contained in another message (typically + * `TokenTransferList`) that details which `Token` type applies to this NFT + * transfer. + */ +message NftTransfer { + /** + * An Account identifier for the sender. + */ + AccountID senderAccountID = 1; + + /** + * An Account identifier for the receiver. + */ + AccountID receiverAccountID = 2; + + /** + * A serial number for the NFT to transfer. + */ + int64 serialNumber = 3; + + /** + * An approved allowance flag.
    + * If true then the transfer is expected to be an approved allowance. + *

    + * If set, `senderAccountID` SHALL be the owner that previously approved + * the allowance.
    + * If set, the `senderAccountID` MUST be the "payer" account for + * the transaction
    + * The default value SHALL be false (unset). + */ + bool is_approval = 4; +} + +/** + * A list of transfers for a particular (non-HBAR) token type. + * + * A `TokenTransferList` applies to a single token type, but may contain many + * individual transfers.
    + * Each transfer of a fungible/common token MUST specify an `accountID` and + * `amount`. Amount SHALL be positive when the account receives tokens, and + * SHALL be negative when the account sends tokens. The amount SHOULD NOT be + * `0`.
    + * In a transfer list containing fungible/common tokens in the `transfers` + * list, the sum of all such transfers MUST be zero (`0`). + * Each transfer of a unique token SHALL specify both sender and receiver, as + * well as the serial number transferred.
    + * A single `TokenTransferList` MUST contain `transfers` or `nftTransfers`, + * but MUST NOT contain both. + */ +message TokenTransferList { + /** + * A token identifier.
    + * This is the token to be transferred. + */ + TokenID token = 1; + + /** + * A list of account amounts. + *

    + * Each entry SHALL have an account and amount.
    + * These transfers SHALL be "double-entry" style; the credits (positive + * amount) and debits (negative amount) MUST sum to 0, unless this + * transfer list is part of a `mint` or `burn` operation.
    + * This SHALL be be set for fungible/common tokens and MUST be + * empty otherwise. + */ + repeated AccountAmount transfers = 2; + + /** + * A list of NftTransfers. + *

    + * Each entry SHALL have a sender and receiver account, and the + * serial number of the unique token to transfer.
    + * This SHALL be be set for non-fungible/unique tokens and SHALL be + * empty otherwise. + */ + repeated NftTransfer nftTransfers = 3; + + /** + * An expected decimal precision.
    + * This is the number of decimals a fungible/common token type is + * _expected_ to have. + *

    + * The transfer SHALL fail with response code `UNEXPECTED_TOKEN_DECIMALS` + * if this is set and the actual decimals specified for the `Token` differ + * from this value.
    + * If `nftTransfers` is set, then this value SHOULD NOT be set. + */ + google.protobuf.UInt32Value expected_decimals = 4; +} + +/** + * A rational number.
    + * A common use is to set the amount of a value transfer to collect as a + * custom fee. + * + * It is RECOMMENDED that both numerator and denominator be no larger than + * necessary to express the required fraction. A very large numerator, in + * particular, may not be reliable. + * Both fields are REQUIRED and SHOULD be positive integers. + */ +message Fraction { + /** + * A fractional number's numerator. + */ + int64 numerator = 1; + + /** + * A fractional number's denominator. + *

    + * A zero value SHALL fail with response code `FRACTION_DIVIDES_BY_ZERO`. + */ + int64 denominator = 2; +} + +/** + * Possible Token Types (IWA Compatibility). + * + * Apart from fungible and non-fungible, Tokens can have either a common or + * unique representation. Furthermore, tokens can have intrinsic or referential + * value, and can be whole and indivisible or fractional.
    + * These distinction might seem subtle, but it is important when considering + * how tokens can be traced, used, transferred, and if they can have isolated + * unique properties. + * + * A few examples (these may not match enumerations below) using IWA taxonomy. + *

    + *
    fungible, whole, intrinsic, unique
    + *
    Physical fiat currency
    + *
    fungible, fractional, intrinsic, common
    + *
    bank balance fiat currency
    + *
    non-fungible, fractional, reference, unique
    + *
    "mutual" collectible/art/property ownership
    + *
    non-fungible, whole, intrinsic, unique
    + *
    Physical work of fine art
    + *
    non-fungible, whole, reference, unique
    + *
    Registered property title
    + *
    + */ +enum TokenType { + /** + * A fungible/common token.
    + * Tokens of this type are interchangeable with one another, where any + * quantity of tokens has the same value as another equal quantity, if + * they are in the same class. Tokens share a single set of properties, + * and are not distinct from one another. Ownership is represented as a + * balance or quantity associated to a given account. Tokens may be + * divided into fractional tokens, within reasonable limits. + *

    + * IWA taxonomy _fungible, fractional, intrinsic, common_ + */ + FUNGIBLE_COMMON = 0; + + /** + * A non-fungible/unique token.
    + * Tokens of this type are unique, and are not interchangeable with other + * tokens of the same type. Each token carries a serial number which is + * unique for that token, these tokens may have a different trade value + * for each individual token. The tokens are individually accounted and + * often carry additional unique properties. Tokens cannot be subdivided, + * and value is related to what the individual token represents. + *

    + * IWA taxonomy _non-fungible, whole, reference, unique_ + */ + NON_FUNGIBLE_UNIQUE = 1; +} + +/** + * A transaction sub type.
    + * This enumeration enables a set of transaction base fees to be broadly + * defined for a type of operation and also be modified, when necessary, + * based on specifics of the operation. + * + * ### Explanation + * The resource cost for a TokenMint operation is different between minting + * fungible/common and non-fungible/unique tokens. This `enum` is used to + * "mark" a cost as applying to one or the other.
    + * Similarly, the resource cost for a basic `tokenCreate` without a custom + * fee schedule may yield a _base_ fee of $1. The resource cost for a + * `tokenCreate` _with_ a custom fee schedule is different and may yield a + * _base_ fee of $2 or more. + */ +enum SubType { + /** + * The resource cost for the transaction type has no additional attributes + */ + DEFAULT = 0; + + /** + * The resource cost for the transaction type includes an operation on a + * fungible/common token + */ + TOKEN_FUNGIBLE_COMMON = 1; + + /** + * The resource cost for the transaction type includes an operation on + * a non-fungible/unique token + */ + TOKEN_NON_FUNGIBLE_UNIQUE = 2; + + /** + * The resource cost for the transaction type includes an operation on a + * fungible/common token with a custom fee schedule + */ + TOKEN_FUNGIBLE_COMMON_WITH_CUSTOM_FEES = 3; + + /** + * The resource cost for the transaction type includes an operation on a + * non-fungible/unique token with a custom fee schedule + */ + TOKEN_NON_FUNGIBLE_UNIQUE_WITH_CUSTOM_FEES = 4; + + /** + * The resource cost for the transaction type includes a ScheduleCreate + * containing a ContractCall. + */ + SCHEDULE_CREATE_CONTRACT_CALL = 5; + + /** + * The resource cost for the transaction type includes a TopicCreate + * with custom fees. + */ + TOPIC_CREATE_WITH_CUSTOM_FEES = 6; + + /** + * The resource cost for the transaction type includes a ConsensusSubmitMessage + * for a topic with custom fees. + */ + SUBMIT_MESSAGE_WITH_CUSTOM_FEES = 7; +} + +/** + * Possible Token Supply Types (IWA Compatibility). + * + * This `enum` indicates the limit of tokens that can exist during the + * lifetime of a token definition. The "infinite" supply is only theoretically + * infinite, as it is still limited to the magnitude of a 64-bit signed + * integer. A "finite" supply is further limited to a value specified when + * the token is created (or updated, if not immutable). + */ +enum TokenSupplyType { + /** + * An unlimited supply.
    + * This indicates that tokens of this type have an upper bound of + * Long.MAX_VALUE.
    + * The supply is accounted in the smallest units of the token + * (i.e. 10-`decimals` whole tokens) + */ + INFINITE = 0; + + /** + * A limited supply.
    + * This indicates that tokens of this type have an upper bound of + * `maxSupply`.
    + * The maximum supply SHALL be provided on token creation, but MAY be + * changed thereafter if the token has an `admin_key` set. + */ + FINITE = 1; +} + +/** + * Types of validation strategies for token keys. + */ +enum TokenKeyValidation { + /** + * Perform all token key validations.
    + * This is the default value and behavior. + */ + FULL_VALIDATION = 0; + + /** + * Perform no validations at all for all passed token keys. + */ + NO_VALIDATION = 1; +} + +/** + * Possible token freeze status values. + * + * This is returned by `TokenGetInfoQuery` or `CryptoGetInfoResponse` + * in `TokenRelationship`. + */ +enum TokenFreezeStatus { + /** + * The token does not support freeze or cannot be frozen for the designated + * account.
    + * Typically this indicates that the token does not have a `freeze_key` set. + */ + FreezeNotApplicable = 0; + + /** + * The token is currently frozen for the designated account. + */ + Frozen = 1; + + /** + * The token is not currently frozen for the designated account. + */ + Unfrozen = 2; +} + +/** + * Possible token "KYC" status values. + * + * This is returned by `TokenGetInfoQuery` or `CryptoGetInfoResponse` + * in `TokenRelationship`. + */ +enum TokenKycStatus { + /** + * The token does not support KYC or cannot grant KYC for the + * designated account.
    + * Typically this indicates that the token does not have a `kyc_key` set. + */ + KycNotApplicable = 0; + + /** + * The designated account is currently granted KYC status for the + * designated token. + */ + Granted = 1; + + /** + * The designated account is not currently granted KYC status for the + * designated token. + */ + Revoked = 2; +} + +/** + * Possible Pause status values. + * + * This is returned by `TokenGetInfoQuery` in `TokenRelationship`. + */ +enum TokenPauseStatus { + /** + * The token does not support pause or cannot be paused.
    + * Typically this indicates that the token does not have a `pause_key` set. + */ + PauseNotApplicable = 0; + + /** + * The token is currently paused. + */ + Paused = 1; + + /** + * The token is not currently paused. + */ + Unpaused = 2; +} + +/** + * A Key is an entity representing one or more cryptographic public/private key + * pairs and, optionally, the structure for how multiple signatures may be + * composed to meet complex multiple-signature authorization requirements. + * + * A Key can be a public key from either the Ed25519 or ECDSA(secp256k1) + * signature schemes. In the ECDSA(secp256k1) case we require the 33-byte + * compressed form of the public key. For simplicity, we call these + * cryptographic public keys `primitive` keys.
    + * If an entity has a primitive key associated to it, then the corresponding + * private key must sign any transaction to send tokens or perform other + * actions requiring authorization. + * + * A Key can also be the ID of a smart contract, which SHALL authorize that + * contract to execute any system contract with signing requirements that are + * met by the key.
    + * > Example + * >> If account `0.0.A` has a threshold key whose threshold is satisfied + * >> by a contract ID key for contract `0.0.C`, then when `0.0.C` is called, + * >> it is authorized to use system contracts to manage any asset owned by + * >> `0.0.A`. If the contract ID key is "delegatable", then `0.0.C` can even + * >> perform these actions when running code accessed via `DELEGATECALL`. + * + * A Key can be a "threshold key", which is a list of N keys, any M of which + * may sign in order for the signature to be considered valid. The value of + * M for a given threshold key MUST be less than or equal to N. A threshold + * key is sometimes called a "M-of-N" key. + * + * A Key can be a "key list" where all keys in the list must sign unless + * specified otherwise in the documentation for a specific transaction + * type (e.g. FileDeleteTransactionBody).
    + * This implies that the use of a key list is dependent on context. For + * example, an Hedera file that is created with a list of keys, SHALL require + * that all of those keys must sign a transaction to create or modify the file, + * but only one key from that list MUST sign a transaction to delete the file. + * So it is a single list that sometimes acts as a N-of-N threshold key, and + * sometimes acts as a 1-of-N threshold key.
    + * To reduce confusion this may cause, a key list SHALL always be considered + * N-of-N, unless specified otherwise in official documentation.
    + * A key list MAY have repeated primitive public keys, but the signature + * requirement for all keys in a repeated set SHALL be satisfied by a single + * valid signature. There is no mechanism to require a single key to sign a + * single transaction more than once. + * + * Any list or threshold key MAY have nested key lists or threshold keys. + * This allows, for example, the keys within a threshold signature to + * themselves be threshold, list, contract, or primitive keys. This nesting + * structure enables complex asymmetric multi-party signature requirements to + * be met. + * + * To ensure adequate performance and transaction security, key nesting is + * limited to at most fifteen(15) levels. + */ +message Key { + oneof key { + /** + * A smart contract instance that is authorized implicitly. + *

    + * This key type SHALL require that the code in the active message frame + * belong to the contract with the given id. + */ + ContractID contractID = 1; + + /** + * An array of Ed25519 public key bytes. + */ + bytes ed25519 = 2; + + /** + * This option is not currently supported.
    + * An array of RSA-3072 public key bytes. + */ + bytes RSA_3072 = 3 [deprecated = true]; + + /** + * This option is not currently supported.
    + * An array of ECDSA, using the p-384 curve, public key bytes. + */ + bytes ECDSA_384 = 4 [deprecated = true]; + + /** + * A threshold, M, combined with a list of N keys, any M of which are + * sufficient to form a valid signature. + */ + ThresholdKey thresholdKey = 5; + + /** + * A list of keys. This may be treated like a "N-of-N" threshold key, + * as a component of another key, or in some other manner as documented. + */ + KeyList keyList = 6; + + /** + * A set of compressed ECDSA(secp256k1) public key bytes.
    + * This is an EVM compatibility format. + */ + bytes ECDSA_secp256k1 = 7; + + /** + * A smart contract that, if the recipient of the active message frame, + * SHALL be imputed authorization.
    + * Setting this key type is a more permissive version of setting a + * contractID key. + *

    + * This key form SHALL NOT strictly require that the code being executed + * in the frame belong to the given contract. The code in frame MAY be + * running another contract via a `delegatecall`. + */ + ContractID delegatable_contract_id = 8; + } +} + +/** + * A threshold value and a list of public keys that, together, form a threshold + * signature requirement. Any subset of the keys in the list may satisfy the + * signature requirements of this type of key, provided the number of keys meets + * or exceeds the threshold. For example, if a particular key has a threshold of + * three(3) and eight(8) keys in the list, then any three(3) signatures, from + * the list of eight(8), is sufficient to authorize that key. + * + * For threshold purposes, all signatures from a single `primitive` key are + * considered a single signature, so that signature(s) from a single key SHALL + * NOT _directly_ meet a threshold greater than one(1). + * + * #### Note + * > It is possible to construct a complex key structure that _would_ enable a + * > single primitive key to successfully meet a threshold requirement. All + * > threshold keys SHOULD be carefully audited to ensure no one `primitive` + * > key, or smart contract, has disproportionate capability. + */ +message ThresholdKey { + /** + * A transaction MUST have valid signatures from at least this number of + * separate keys, from the `keys` list to be authorized by this key. + */ + uint32 threshold = 1; + + /** + * A list of the keys that MAY satisfy signature requirements of this key. + */ + KeyList keys = 2; +} + +/** + * A list of keys.
    + * A `KeyList` requires all keys (N-of-N) to sign, unless otherwise + * specified in official documentation. A KeyList may contain repeated keys, + * but all such repeated keys are considered a single key when determining + * signature authorization. + * + * ### Additional Notes + * 1. An empty key list is the "standard" mechanism to represent an + * unassigned key. For example, if the `admin_key` of a token is set + * to the empty key list, then that token has no admin key, and + * functionality that requires an admin key to sign the + * transaction is disabled. + */ +message KeyList { + /** + * A list of keys. All values in this list SHALL be non-null. + *

    + */ + repeated Key keys = 1; +} + +/** + * This message is deprecated and MUST NOT be used to communicate with + * network nodes. It is retained here only for historical reasons. + * + * Client software MUST NOT include this message in any request.
    + * Compliant nodes SHALL NOT accept any request containing this message. + * + * Please use the `SignaturePair` and `SignatureMap` messages instead of + * this message. + */ +message Signature { + option deprecated = true; + + oneof signature { + /** + * Smart contract virtual signature (always length zero). + */ + bytes contract = 1; + + /** + * Ed25519 signature bytes. + */ + bytes ed25519 = 2; + + /** + * RSA-3072 signature bytes. + */ + bytes RSA_3072 = 3; + + /** + * ECDSA p-384 signature bytes. + */ + bytes ECDSA_384 = 4; + + /** + * 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. + */ + ThresholdSignature thresholdSignature = 5; + + /** + * A list of M signatures, each corresponding to a Key in a KeyList + * of the same length. + */ + SignatureList signatureList = 6; + } +} + +/** + * This message is deprecated and MUST NOT be used to communicate with network + * nodes. It is retained here only for historical reasons. + * + * Client software MUST NOT include this message in any request.
    + * Compliant nodes SHALL NOT accept any request containing this message. + * + * Please use the `SignaturePair` and `SignatureMap` messages, in combination + * with `ThresholdKey` keys, instead of this message. + */ +message ThresholdSignature { + option deprecated = true; + + /** + * For an N-of-M threshold key, this is a list of M signatures, at least N + * of which must be non-null. + */ + SignatureList sigs = 2; +} + +/** + * This message is deprecated and MUST NOT be used to communicate with network + * nodes. It is retained here only for historical reasons. + * + * Client software MUST NOT include this message in any request.
    + * Compliant nodes SHALL NOT accept any request containing this message. + * + * Please use the `SignaturePair` and `SignatureMap` messages instead of + * this message. + */ +message SignatureList { + option deprecated = true; + + /** + * Each signature corresponds to a Key in the KeyList. + */ + repeated Signature sigs = 2; +} + +/** + * A public key and signature pair.
    + * Only Ed25519 and ECDSA(secp256k1) keys and signatures are currently supported + * as cryptographic (non-implied) signatures. + */ +message SignaturePair { + /** + * Prefix bytes of the public key. + *

    + * The client may use any number of bytes from zero to the whole length of + * the public key for pubKeyPrefix. If zero bytes are used, then it MUST be + * true that only one cryptographic key is required to sign the associated + * transaction.
    + * If the `pubKeyPrefix` is 0 bytes and more than a single cryptographic + * key is required to sign the transaction, the request SHALL resolve to + * `INVALID_SIGNATURE`. + *

    Important Note
    + * In the special case that a signature is provided to authorize a + * precompiled contract, the `pubKeyPrefix` MUST contain the _entire public + * key_.
    + * That is, if the key is an Ed25519 key, the `pubKeyPrefix` MUST be + * 32 bytes long and contain the full public key bytes.
    + * If the key is an ECDSA(secp256k1) key, the `pubKeyPrefix` MUST be + * 33 bytes long and contain the full _compressed_ form of the public key. + *
    + *

    + *

    Purpose
    + *
    The `pubKeyPrefix` exists to save cost. A signed transaction with + * shorter prefixes will have fewer bytes, and so will have a lower + * transaction fee. + * The prefixes, however, MUST be long enough to distinguish between all + * of the public keys that might be signing the transaction. Therefore, + * software signing a transaction SHOULD evaluate which keys might possibly + * be required to sign a transaction, and ensure that the shortest prefix + * that is sufficient to unambiguously identify the correct key is used. + *
    + */ + bytes pubKeyPrefix = 1; + + oneof signature { + /** + * A smart contract virtual signature. + *

    + * This value MUST be length zero, if set. + */ + bytes contract = 2; + + /** + * An Ed25519 signature. + */ + bytes ed25519 = 3; + + /** + * This option is not supported.
    + * A RSA-3072 signature. + */ + bytes RSA_3072 = 4 [deprecated = true]; + + /** + * This option is not supported.
    + * ECDSA p-384 signature. + */ + bytes ECDSA_384 = 5 [deprecated = true]; + + /** + * An ECDSA(secp256k1) signature. + */ + bytes ECDSA_secp256k1 = 6; + } +} + +/** + * A set of signatures corresponding to every unique public key that + * signed a given transaction. + * + * If any public key matches more than one prefix in the signature map, + * the transaction containing that map SHALL fail immediately with the + * response code `KEY_PREFIX_MISMATCH`. + */ +message SignatureMap { + /** + * A list of signature pairs for a specific transaction.
    + * Each signature pair represents a single cryptographic (`primitive`) + * public key identified by a "prefix" value and the cryptographic + * signature produced for that key. + */ + repeated SignaturePair sigPair = 1; +} + +/** + * The transactions and queries supported by Hedera Hashgraph. + */ +enum HederaFunctionality { + // FUTURE - Uncomment when https://github.com/hashgraph/pbj/issues/339 is fixed; + // currently the PBJ-generated unit tests fail when using reserved ordinals + // reserved 96, 97, 98, 99; + + /** + * Unused - The first value is unused because this default value is + * ambiguous with an "unset" value and therefore should not be used. + */ + NONE = 0; + + /** + * Transfer tokens among accounts. + */ + CryptoTransfer = 1; + + /** + * Update an account. + */ + CryptoUpdate = 2; + + /** + * Delete an account. + */ + CryptoDelete = 3; + + /** + * Add a livehash to an account + */ + CryptoAddLiveHash = 4 [deprecated = true]; + + /** + * Delete a livehash from an account + */ + CryptoDeleteLiveHash = 5 [deprecated = true]; + + /** + * Execute a smart contract call. + */ + ContractCall = 6; + + /** + * Create a smart contract. + */ + ContractCreate = 7; + + /** + * Update a smart contract. + */ + ContractUpdate = 8; + + /** + * Create a "file" stored in the ledger. + */ + FileCreate = 9; + + /** + * Append data to a "file" stored in the ledger. + */ + FileAppend = 10; + + /** + * Update a "file" stored in the ledger. + */ + FileUpdate = 11; + + /** + * Delete a "file" stored in the ledger. + */ + FileDelete = 12; + + /** + * Get the balance for an account. + */ + CryptoGetAccountBalance = 13; + + /** + * Get a full account record. + */ + CryptoGetAccountRecords = 14; + + /** + * Get information about a token. + */ + CryptoGetInfo = 15; + + /** + * Execute a local smart contract call.
    + * Used by contracts to call other contracts. + */ + ContractCallLocal = 16; + + /** + * Get information about a smart contract. + */ + ContractGetInfo = 17; + + /** + * Get the compiled bytecode that implements a smart contract. + */ + ContractGetBytecode = 18; + + /** + * Get a smart contract record by reference to the solidity ID. + */ + GetBySolidityID = 19; + + /** + * Get a smart contract by reference to the contract key. + */ + GetByKey = 20; + + /** + * Get the live hash for an account + */ + CryptoGetLiveHash = 21 [deprecated = true]; + + /** + * Get the accounts proxy staking to a given account. + */ + CryptoGetStakers = 22 [deprecated = true]; + + /** + * Get the contents of a "file" stored in the ledger. + */ + FileGetContents = 23; + + /** + * Get the metadata for a "file" stored in the ledger. + */ + FileGetInfo = 24; + + /** + * Get transaction record(s) for a specified transaction ID. + */ + TransactionGetRecord = 25; + + /** + * Get all transaction records for a specified contract ID in + * the past 24 hours.
    + * deprecated since version 0.9.0 + */ + ContractGetRecords = 26 [deprecated = true]; + + /** + * Create a new account + */ + CryptoCreate = 27; + + /** + * Delete a "system" "file" stored in the ledger.
    + * "System" files are files with special purpose and ID values within a + * specific range.
    + * These files require additional controls and can only be deleted when + * authorized by accounts with elevated privilege. + */ + SystemDelete = 28; + + /** + * Undo the delete of a "system" "file" stored in the ledger.
    + * "System" files are files with special purpose and ID values within a + * specific range.
    + * These files require additional controls and can only be deleted when + * authorized by accounts with elevated privilege. This operation allows + * such files to be restored, within a reasonable timeframe, if + * deleted improperly. + */ + SystemUndelete = 29; + + /** + * Delete a smart contract + */ + ContractDelete = 30; + + /** + * Stop all processing and "freeze" the entire network.
    + * This is generally sent immediately prior to upgrading the network.
    + * After processing this transactions all nodes enter a quiescent state. + */ + Freeze = 31; + + /** + * Create a Transaction Record.
    + * This appears to be purely internal and unused. + */ + CreateTransactionRecord = 32; + + /** + * Auto-renew an account.
    + * This is used for internal fee calculations. + */ + CryptoAccountAutoRenew = 33; + + /** + * Auto-renew a smart contract.
    + * This is used for internal fee calculations. + */ + ContractAutoRenew = 34; + + /** + * Get version information for the ledger.
    + * This returns a the version of the software currently running the network + * for both the protocol buffers and the network services (node). + */ + GetVersionInfo = 35; + + /** + * Get a receipt for a specified transaction ID. + */ + TransactionGetReceipt = 36; + + /** + * Create a topic for the Hedera Consensus Service (HCS). + */ + ConsensusCreateTopic = 50; + + /** + * Update an HCS topic. + */ + ConsensusUpdateTopic = 51; + + /** + * Delete an HCS topic. + */ + ConsensusDeleteTopic = 52; + + /** + * Get metadata (information) for an HCS topic. + */ + ConsensusGetTopicInfo = 53; + + /** + * Publish a message to an HCS topic. + */ + ConsensusSubmitMessage = 54; + + /** + * Submit a transaction, bypassing intake checking. + * Only enabled in local-mode. + */ + UncheckedSubmit = 55; + + /** + * Create a token for the Hedera Token Service (HTS). + */ + TokenCreate = 56; + + /** + * Get metadata (information) for an HTS token. + */ + TokenGetInfo = 58; + + /** + * Freeze a specific account with respect to a specific HTS token. + *

    + * Once this transaction completes that account CANNOT send or receive + * the specified token. + */ + TokenFreezeAccount = 59; + + /** + * Remove a "freeze" from an account with respect to a specific HTS token. + */ + TokenUnfreezeAccount = 60; + + /** + * Grant KYC status to an account for a specific HTS token. + */ + TokenGrantKycToAccount = 61; + + /** + * Revoke KYC status from an account for a specific HTS token. + */ + TokenRevokeKycFromAccount = 62; + + /** + * Delete a specific HTS token. + */ + TokenDelete = 63; + + /** + * Update a specific HTS token. + */ + TokenUpdate = 64; + + /** + * Mint HTS token amounts to the treasury account for that token. + */ + TokenMint = 65; + + /** + * Burn HTS token amounts from the treasury account for that token. + */ + TokenBurn = 66; + + /** + * Wipe all amounts for a specific HTS token from a specified account. + */ + TokenAccountWipe = 67; + + /** + * Associate a specific HTS token to an account. + */ + TokenAssociateToAccount = 68; + + /** + * Dissociate a specific HTS token from an account. + */ + TokenDissociateFromAccount = 69; + + /** + * Create a scheduled transaction + */ + ScheduleCreate = 70; + + /** + * Delete a scheduled transaction + */ + ScheduleDelete = 71; + + /** + * Sign a scheduled transaction + */ + ScheduleSign = 72; + + /** + * Get metadata (information) for a scheduled transaction + */ + ScheduleGetInfo = 73; + + /** + * Get NFT metadata (information) for a range of NFTs associated to a + * specific non-fungible/unique HTS token and owned by a specific account. + */ + TokenGetAccountNftInfos = 74 [deprecated = true]; + + /** + * Get metadata (information) for a specific NFT identified by token and + * serial number. + */ + TokenGetNftInfo = 75 [deprecated = true]; + + /** + * Get NFT metadata (information) for a range of NFTs associated to a + * specific non-fungible/unique HTS token. + */ + TokenGetNftInfos = 76; + + /** + * Update a token's custom fee schedule. + *

    + * If a transaction of this type is not signed by the token + * `fee_schedule_key` it SHALL fail with INVALID_SIGNATURE, or + * TOKEN_HAS_NO_FEE_SCHEDULE_KEY if there is no `fee_schedule_key` set. + */ + TokenFeeScheduleUpdate = 77; + + /** + * Get execution time(s) for one or more "recent" TransactionIDs. + */ + NetworkGetExecutionTime = 78 [deprecated = true]; + + /** + * Pause a specific HTS token + */ + TokenPause = 79; + + /** + * Unpause a paused HTS token. + */ + TokenUnpause = 80; + + /** + * Approve an allowance for a spender relative to the owner account, which + * MUST sign the transaction. + */ + CryptoApproveAllowance = 81; + + /** + * Delete (unapprove) an allowance previously approved + * for the owner account. + */ + CryptoDeleteAllowance = 82; + + /** + * Get all the information about an account, including balance + * and allowances.
    + * This does not get a list of account records. + */ + GetAccountDetails = 83; + + /** + * Perform an Ethereum (EVM) transaction.
    + * CallData may be inline if small, or in a "file" if large. + */ + EthereumTransaction = 84; + + /** + * Used to indicate when the network has updated the staking information + * at the end of a staking period and to indicate a new staking period + * has started. + */ + NodeStakeUpdate = 85; + + /** + * Generate and return a pseudorandom number based on network state. + */ + UtilPrng = 86; + + /** + * Get a record for a "recent" transaction. + */ + TransactionGetFastRecord = 87 [deprecated = true]; + + /** + * Update the metadata of one or more NFT's of a specific token type. + */ + TokenUpdateNfts = 88; + + /** + * Create a node + */ + NodeCreate = 89; + + /** + * Update a node + */ + NodeUpdate = 90; + + /** + * Delete a node + */ + NodeDelete = 91; + + /** + * Transfer one or more token balances held by the requesting account + * to the treasury for each token type. + */ + TokenReject = 92; + + /** + * Airdrop one or more tokens to one or more accounts. + */ + TokenAirdrop = 93; + + /** + * Remove one or more pending airdrops from state on behalf of + * the sender(s) for each airdrop. + */ + TokenCancelAirdrop = 94; + + /** + * Claim one or more pending airdrops + */ + TokenClaimAirdrop = 95; + + /** + * Submit a signature of a state root hash gossiped to other nodes + */ + StateSignatureTransaction = 100; + + /** + * Publish a hinTS key to the network. + */ + HintsKeyPublication = 101; + + /** + * Vote for a particular preprocessing output of a hinTS construction. + */ + HintsPreprocessingVote = 102; + + /** + * Sign a partial signature for the active hinTS construction. + */ + HintsPartialSignature = 103; + + /** + * Sign a particular history assembly. + */ + HistoryAssemblySignature = 104; + + /** + * Publish a roster history proof key to the network. + */ + HistoryProofKeyPublication = 105; + + /** + * Vote for a particular history proof. + */ + HistoryProofVote = 106; + + /** + * Publish a random CRS to the network. + */ + CrsPublication = 107; + + /** + * Submit a batch of transactions to run atomically + */ + AtomicBatch = 108; +} + +/** + * A set of values the nodes use in determining transaction and query fees, and + * constants involved in fee calculations. + * + * Nodes SHALL multiply the amount of "resources" allocated to a transaction or + * query by the corresponding price to calculate the appropriate fee. Units are + * one-thousandth of a `tinyCent`. The "resource" allocations SHALL be estimated + * based on transaction characteristics and current network state, and MAY be + * further adjusted based on network load and congestion. + * + * This SHALL be used, in different contexts, for the cost _factors_ used to + * calculate charged amounts, for the resource accumulation, and for actual + * amounts to be charged.
    + * Amounts recorded here MUST be converted to tinybar according to the + * current active `ExchangeRate` for the network. + */ +message FeeComponents { + /** + * Base: "minimum total fee". + *

    + * The calculated fee MUST be greater than this value. + */ + int64 min = 1; + + /** + * Base: "maximum total fee". + *

    + * The calculated fee MUST be less than this value. + */ + int64 max = 2; + + /** + * Base: "constant fee".
    + * A baseline constant contribution to total fee. + */ + int64 constant = 3; + + /** + * Bandwidth: "bytes per transaction".
    + * The fee for bandwidth consumed by a transaction, measured in bytes + */ + int64 bpt = 4; + + /** + * Signatures: "validations per transaction".
    + * The fee for signature verifications required by a transaction + */ + int64 vpt = 5; + + /** + * Memory: "RAM byte-hours".
    + * The fee for RAM required to process a transaction, + * measured in byte-hours + */ + int64 rbh = 6; + + /** + * Disk: "storage byte-hours".
    + * The fee for storage required by a transaction, measured in byte-hours + */ + int64 sbh = 7; + + /** + * Compute: Ethereum term for a derivative EVM compute resource.
    + * The fee of computation for a smart contract transaction. The value of + * gas is set by a conversion rate, and is regularly updated to reflect + * reasonable and customary costs. + */ + int64 gas = 8; + + /** + * Ad valorem: "transferred value".
    + * The fee for HBAR transferred by a transaction. + */ + int64 tv = 9; + + /** + * Response memory: "bytes per response".
    + * The fee for data retrieved from memory to deliver a response, + * measured in bytes + */ + int64 bpr = 10; + + /** + * Response disk: "storage bytes per response".
    + * The fee for data retrieved from disk to deliver a response, + * measured in bytes + */ + int64 sbpr = 11; +} + +/** + * The fee schedule for a specific transaction or query based on the fee data. + */ +message TransactionFeeSchedule { + /** + * An enumeration for a particular transaction or query.
    + * The functionality type determines the base cost parameters. + */ + HederaFunctionality hederaFunctionality = 1; + + /** + * Use `fees` instead of this field.
    + * Resource price coefficients. + */ + FeeData feeData = 2 [deprecated = true]; + + /** + * The resource price coefficients for transaction type and any applicable + * subtypes.
    + * The multiple entries enable support for subtype price definitions. + */ + repeated FeeData fees = 3; +} + +/** + * A total fee, in component amounts charged for a transaction. + * + * Total fees are composed of three sets of components. + * - Node data, components that compensate the specific node that submitted + * the transaction. + * - Network data, components that compensate the Hedera network for gossiping + * the transaction and determining the consensus timestamp. + * - Service data, components that compensate the Hedera network for the ongoing + * maintenance and operation of the network, as well as ongoing development + * of network services. + * + * Fee components are recorded in thousandths of a tiny cent, and the network + * exchange rate converts these to tinybar amounts, which are what the network + * charges for transactions and what the network reports in the record stream. + */ +message FeeData { + /** + * Fee components to be paid to the submitting node. + */ + FeeComponents nodedata = 1; + + /** + * Fee components to be paid to the network for bringing a + * transaction to consensus. + */ + FeeComponents networkdata = 2; + + /** + * Fee components to be paid to the network for providing the immediate and + * ongoing services associated with executing the transaction, maintaining + * the network, and developing the network software. + */ + FeeComponents servicedata = 3; + + /** + * A sub-type distinguishing between different types of `FeeData` that may + * apply to the same base transaction type (associated with + * an `HederaFunctionality`). + */ + SubType subType = 4; +} + +/** + * A set of fee schedules covering all transaction types and query types, along + * with a specific time at which this fee schedule will expire. + * + * Nodes SHALL use the most recent unexpired fee schedule to determine the fees + * for all transactions based on various resource components imputed to each + * transaction. + */ +message FeeSchedule { + /** + * Sets of fee coefficients for various transaction or query types. + */ + repeated TransactionFeeSchedule transactionFeeSchedule = 1; + + /** + * A time, in seconds since the `epoch`, when this fee schedule + * will expire. + *

    + * For this purpose, `epoch` SHALL be the UNIX epoch + * with 0 at `1970-01-01T00:00:00.000Z`. + */ + TimestampSeconds expiryTime = 2; +} + +/** + * The "current" fee schedule and the "next" fee schedule. + * + * The current fee schedule is the schedule that SHALL apply to the current + * transaction.
    + * The next fee schedule is the schedule that SHALL apply after the current + * schedule expires.
    + * We store both to avoid a condition where transactions are processed very + * near the time when a fee schedule expires and it might be indeterminate + * which fees to apply. With both current and next fee schedule the network + * can deterministically apply the correct fee schedule based on consensus + * timestamp for each transaction. + */ +message CurrentAndNextFeeSchedule { + /** + * A current, unexpired, fee schedule. + */ + FeeSchedule currentFeeSchedule = 1; + + /** + * A future fee schedule to use when the current schedule expires. + */ + FeeSchedule nextFeeSchedule = 2; +} + +/** + * A network node endpoint.
    + * Each network node in the global address book publishes one or more endpoints + * which enable the nodes to communicate both with other nodes, for gossip, and + * with clients to receive transaction requests. + * + * This message supports IPv4 with address and TCP port, + * and MAY include a FQDN instead of an IP address.
    + * IPv6 is not currently supported. + * + * When the `domain_name` field is set, the `ipAddressV4` field + * MUST NOT be set.
    + * When the `ipAddressV4` field is set, the `domain_name` field + * MUST NOT be set. + */ +message ServiceEndpoint { + /** + * A 32-bit IPv4 address.
    + * This is the address of the endpoint, encoded in pure "big-endian" + * (i.e. left to right) order (e.g. `127.0.0.1` has hex bytes in the + * order `7F`, `00`, `00`, `01`). + */ + bytes ipAddressV4 = 1; + + /** + * A TCP port to use. + *

    + * This value MUST be between 0 and 65535, inclusive. + */ + int32 port = 2; + + /** + * A node domain name. + *

    + * This MUST be the fully qualified domain name of the node.
    + * This value MUST NOT exceed 253 characters.
    + * When the `domain_name` field is set, the `ipAddressV4` + * field MUST NOT be set.
    + * When the `ipAddressV4` field is set, the `domain_name` + * field MUST NOT be set. + */ + string domain_name = 3; +} + +/** + * 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). + * + * All active fields are populated in the `0.0.102` address book file.
    + * Only fields documented with "`0.0.101` field" are populated in the 0.0.101 + * address book file. + * + * This message MAY be superseded by messages in state/addressbook/node.proto + * and node_get_info.proto. + */ +message NodeAddress { + /** + * ServiceEndpoint is now used to retrieve a node's list of IP + * addresses and ports.
    + * The IP address of the Node, as a string, encoded in UTF-8.
    + * This value SHALL NOT be populated. + */ + bytes ipAddress = 1 [deprecated = true]; + + /** + * ServiceEndpoint is now used to retrieve a node's list of IP + * addresses and ports.
    + * The port number of the grpc server for the node.
    + * This value SHALL NOT be populated. + */ + int32 portno = 2 [deprecated = true]; + + /** + * Description provides short text functionality.
    + * A short description of the node. + *

    + * This field SHALL NOT be populated. + */ + bytes memo = 3 [deprecated = true]; + + /** + * A hexadecimal String encoding of an X509 public key. + *

    + * This X509 RSA _public_ key SHALL be used to verify record stream files + * (e.g., record stream files).
    + * This field SHALL be a string of hexadecimal characters, encoded UTF-8, + * which, translated to binary, form the public key DER encoding. + */ + string RSA_PubKey = 4; + + /** + * A numeric identifier for the node. + *

    + * This value SHALL NOT be sequential. + *

    + * A `0.0.101` field + */ + int64 nodeId = 5; + + /** + * An account to be paid the "node" portion of transaction fees.
    + * The "node" fees are paid to the node that submitted the transaction. + *

    + * A `0.0.101` field + */ + AccountID nodeAccountId = 6; + + /** + * A hash of the node's TLS certificate. + *

    + * This field SHALL be a string of hexadecimal characters, encoded UTF-8, + * which, translated to binary, form a SHA-384 hash of the node's TLS + * certificate in PEM format. + * This TLS certificate MUST be encoded UTF-8 and normalized according to + * the NFKD form prior to computing the hash value.
    + * The value of this field SHALL be used to verify the node TLS + * certificate when presented during protocol negotiation. + *

    + * A `0.0.101` field + */ + bytes nodeCertHash = 7; + + /** + * A node's service IP addresses and TCP ports.
    + * Nodes require multiple endpoints to ensure that inter-node communication + * (e.g. gossip) is properly separated from client communication to + * API endpoints. + *

    + * A `0.0.101` field + */ + repeated ServiceEndpoint serviceEndpoint = 8; + + /** + * A short description of the node. + *

    + * This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes` + * (default 100) bytes when encoded as UTF-8. + */ + string description = 9; + + /** + * This is replaced by per-account stake tracking and dynamic + * calculation.
    + * The amount of tinybar staked to the node.
    + * This value SHOULD NOT be populated, and SHALL be ignored. + */ + int64 stake = 10 [deprecated = true]; +} + +/** + * A list of nodes and their metadata that contains details of the nodes + * running the network. + * + * Used to parse the contents of system files `0.0.101` and `0.0.102`. + */ +message NodeAddressBook { + /** + * Published data for all nodes in the network + */ + repeated NodeAddress nodeAddress = 1; +} + +/** + * A software version according to "[semantic versioning](https://semver.org/)" + * or "date versioning". + * + * Hedera currently modifies the "typical" semantic versioning somewhat, the + * `major` version is always `0`, and each release increments the `minor` + * version. The `patch` and `pre` components are used in the typical manner. + * The `build` component is not generally used. + */ +message SemanticVersion { + /** + * A major version.
    + * Hedera does not increment this value and retains a `0` value to + * indicate that API may change for any release. + *

    + * This value SHALL increment for an incompatible API change.
    + */ + int32 major = 1; + + /** + * A minor version.
    + * Hedera increments this value with each release.
    + * There may be incompatible API changes in any Hedera Services release. + *

    + * This value SHALL increment for backwards-compatible new + * functionality. + */ + int32 minor = 2; + + /** + * A patch version. + *

    + * This value SHALL increment for backwards-compatible bug fixes. + */ + int32 patch = 3; + + /** + * A pre-release version. + *

    + * This MAY be denoted by appending a hyphen and a series of dot separated + * identifiers per [Semver Specification](https://semver.org/#spec-item-9); + * given a string `0.14.0-alpha.1+21AF26D3`, this field would contain + * 'alpha.1' + */ + string pre = 4; + + /** + * A build version. + *

    + * Build version MAY be denoted by appending a plus sign and a series of + * dot separated identifiers immediately following the patch or pre-release + * version per [Semver Specification](https://semver.org/#spec-item-10); so + * given a string `0.14.0-alpha.1+21AF26D3`, this field + * would contain '21AF26D3' + */ + string build = 5; +} + +/** + * A single runtime configuration setting. + * + * Typically a name-value pair, this may also contain a small amount of + * associated data. + */ +message Setting { + /** + * A name for this setting property. + */ + string name = 1; + + /** + * A value for this setting property. + */ + string value = 2; + + /** + * A small quantity of data associated with this setting. + *

    + * This SHOULD be less than 100 bytes.
    + * If the value is a string, it MUST be encoded UTF-8. + */ + bytes data = 3; +} + +/** + * Setting values representing a source of runtime configuration information. + */ +message ServicesConfigurationList { + /** + * A List of `Setting` values, typically read from application properties. + */ + repeated Setting nameValue = 1; +} + +/** + * An Hedera Token Service token relationship. A token relationship describes + * the connection between an Account and a Token type, including the current + * account balance in that token. + * + * A `TokenRelationship` SHALL contain, for the designated token and enclosing + * account, The account's current balance, whether the account has KYC granted, + * whether the assets are frozen and whether the association was automatic.
    + * A `TokenRelationship` MAY also contain the `symbol` and `decimals` values + * copied from the token.
    + * `TokenRelationship` entries SHALL be valid only within the context of a + * `GetAccountDetails` query response, or other enclosing message, which + * specifies the account side of the relationship. + */ +message TokenRelationship { + /** + * A token identifier. + *

    + * This MUST match an existing token that is not deleted. + */ + TokenID tokenId = 1; + + /** + * A token symbol. + *

    + * This MUST match an existing token that is not deleted.
    + * This MUST match the value for the token identified in `tokenId`. + */ + string symbol = 2; + + /** + * An account balance for this token. + *

    + * For fungible/common tokens this SHALL be the balance that the + * account holds of that token. The value is provided as an integer amount + * of the smallest unit of the token (i.e. 10`-decimals` whole + * tokens).
    + * For non-fungible/unique tokens this SHALL be the whole number of + * unique tokens held by the account for this token type. + */ + uint64 balance = 3; + + /** + * A KYC status for the account with respect to this token. + *

    + * This may be `KycNotApplicable`, `Granted` or `Revoked` and, if KYC is + * not supported for this token (e.g. the `kyc_key` of the token is not + * set), this SHALL be `KycNotApplicable`. + */ + TokenKycStatus kycStatus = 4; + + /** + * A Freeze status for the account with respect to this token. + *

    + * This value SHALL be one of `FreezeNotApplicable`, `Frozen` + * or `Unfrozen`.
    + * If the token cannot freeze account assets (e.g. the `freeze_key` of the + * token is not set), this SHALL be `FreezeNotApplicable`. + */ + TokenFreezeStatus freezeStatus = 5; + + /** + * A maximum "precision" for this token. + *

    + * This value MUST match the `decimals` field of the token identified in + * the `tokenId` field.
    + * A single whole token SHALL be divided into at most + * 10`decimals` sub-units. + */ + uint32 decimals = 6; + + /** + * An automatic association flag. + *

    + * This SHALL be set if the relationship was created implicitly + * (automatically).
    + * This SHALL be unset if the relationship was created explicitly + * (manually) via a `TokenAssociate` transaction. + */ + bool automatic_association = 7; +} + +/** + * A number of _transferable units_ of a specified token. + * + * The transferable unit of a token is its smallest denomination, as given by + * the token's `decimals` property. Each minted token contains + * 10`decimals` 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 { + /** + * A token identifier. + */ + TokenID tokenId = 1; + + /** + * A number of transferable units of the identified token. + *

    + * For fungible/common tokens this SHALL be the balance, in units of + * 10`-decimals` whole tokens.
    + * For non-fungible/unique tokens, this SHALL be the number of + * individual unique tokens in this balance. + */ + uint64 balance = 2; + + /** + * A number of "decimals" precision. + *

    + * This MUST match the `decimals` value for the token identified by the + * `tokenId` field. + */ + uint32 decimals = 3; +} + +/** + * A set of token balance values. + * + * Each entry describes the balance the enclosing account holds for a specific + * token. The balance is an amount for a fungible/common token or a count for + * a non-fungible/unique token. + */ +message TokenBalances { + /** + * A list of token balance values.
    + * Each entry represents a single account balance for a single token. + */ + repeated TokenBalance tokenBalances = 1; +} + +/** + * An association between a token and an account. + * + * An account must be associated with a token before that account can transact + * in (send or receive) that token. + */ +message TokenAssociation { + /** + * A token identifier for the associated token. + */ + TokenID token_id = 1; + + /** + * An account identifier for the associated account. + */ + AccountID account_id = 2; +} + +/** + * Staking information for an account or a contract. + * + * This is used for responses returned from `CryptoGetInfo` or + * `ContractGetInfo` queries. + */ +message StakingInfo { + + /** + * A flag indicating that the holder of this account has chosen to decline + * staking rewards. + */ + bool decline_reward = 1; + + /** + * A `Timestamp` of the start time for the latest active staking period. + *

    + * This MUST be a period during which either the staking settings for this + * account or contract changed or the account or contract received staking + * rewards, whichever is later. Examples of a change in staking settings + * include starting staking or changing the staked_node_id.
    + * If this account or contract is not currently staked to a node, then this + * field SHALL NOT be set. + */ + Timestamp stake_period_start = 2; + + /** + * An amount, in tinybar, to be received in the next reward payout.
    + * Rewards are not paid out immediately; for efficiency reasons rewards are + * only paid out as part of another transaction involving that account. + */ + int64 pending_reward = 3; + + /** + * A proxy-staked balance.
    + * The total HBAR balance of all accounts that delegate staking to this + * account or contract. + */ + int64 staked_to_me = 4; + + oneof staked_id { + /** + * A delegated stake. + *

    + * This account delegates to the indicated account for staking purposes. + */ + AccountID staked_account_id = 5; + + /** + * A direct stake. + *

    + * This accounts stakes its balance to the designated node. + */ + int64 staked_node_id = 6; + } +} + +/** + * A unique, composite, identifier for a pending airdrop. + * + * Each pending airdrop SHALL be uniquely identified by + * a `PendingAirdropId`.
    + * A `PendingAirdropId` SHALL be recorded when created and MUST be provided in + * any transaction that would modify that pending airdrop + * (such as a `claimAirdrop` or `cancelAirdrop`). + */ +message PendingAirdropId { + /** + * A sending account. + *

    + * This is the account that initiated, and SHALL fund, + * this pending airdrop.
    + * This field is REQUIRED. + */ + AccountID sender_id = 1; + + /** + * A receiving account. + *

    + * This is the ID of the account that SHALL receive the airdrop.
    + * This field is REQUIRED. + */ + AccountID receiver_id = 2; + + oneof token_reference { + /** + * A token identifier.
    + * This is the type of token for a fungible/common token airdrop. + *

    + * This field is REQUIRED for a fungible/common token and MUST NOT + * be used for a non-fungible/unique token. + */ + TokenID fungible_token_type = 3; + + /** + * The id of a single NFT
    + * This is the type of token for a non-fungible/unique token airdrop + * and consists of a Token ID and serial number. + *

    + * This field is REQUIRED for a non-fungible/unique token and + * MUST NOT be used for a fungible/common token. + */ + NftID non_fungible_token = 4; + } +} + +/** + * A single pending airdrop value. + * + * This message SHALL record the airdrop amount for a + * fungible/common token.
    + * This message SHOULD be null for a non-fungible/unique token.
    + * If a non-null `PendingAirdropValue` is set for a non-fungible/unique + * token, the amount field MUST be `0`. + * + * It is RECOMMENDED that implementations store pending airdrop information + * as a key-value map from `PendingAirdropId` to `PendingAirdropValue`, with + * a `null` value used for non-fungible pending airdrops. + */ +message PendingAirdropValue { + /** + * An amount to transfer for fungible/common tokens.
    + * This is expressed in the smallest available units for that token + * (i.e. 10-`decimals` whole tokens). + *

    + * This amount SHALL be transferred from the sender to the receiver, + * if claimed.
    + * If the token is a fungible/common token, this value MUST be strictly + * greater than `0`.
    + * If the token is a non-fungible/unique token, this message SHOULD NOT + * be set, and if set, this field MUST be `0`. + */ + uint64 amount = 1; +} diff --git a/proto_src/services/consensus_create_topic.proto b/proto_src/services/consensus_create_topic.proto new file mode 100644 index 000000000..1084e06ac --- /dev/null +++ b/proto_src/services/consensus_create_topic.proto @@ -0,0 +1,183 @@ +/** + * # Create Topic + * Create a new topic for the Hedera Consensus Service (HCS). + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; +import "custom_fees.proto"; +import "duration.proto"; + +/** + * Create a topic to accept and group consensus messages. + * + * If `autoRenewAccount` is specified, that account Key MUST also sign this + * transaction.
    + * If `adminKey` is set, that Key MUST sign the transaction.
    + * On success, the resulting `TransactionReceipt` SHALL contain the newly + * created `TopicId`. + * + * The `autoRenewPeriod` on a topic MUST be set to a value between + * `autoRenewPeriod.minDuration` and `autoRenewPeriod.maxDuration`. These + * values are configurable, typically 30 and 92 days.
    + * This also sets the initial expirationTime of the topic. + * + * If no `adminKey` is set on a topic + * -`autoRenewAccount` SHALL NOT be set on the topic. + * - A `deleteTopic` transaction SHALL fail. + * - An `updateTopic` transaction that only extends the expirationTime MAY + * succeed. + * - Any other `updateTopic` transaction SHALL fail. + * + * If the topic expires and is not automatically renewed, the topic SHALL enter + * the `EXPIRED` state. + * - All transactions on the topic SHALL fail with TOPIC_EXPIRED + * - Except an updateTopic() call that only extends the expirationTime. + * - getTopicInfo() SHALL succeed, and show the topic is expired. + * The topic SHALL remain in the `EXPIRED` state for a time determined by the + * `autorenew.gracePeriod` (configurable, originally 7 days).
    + * After the grace period, if the topic's expirationTime is not extended, the + * topic SHALL be automatically deleted from state entirely, and cannot be + * recovered or recreated. + * + * ### Block Stream Effects + * None + */ +message ConsensusCreateTopicTransactionBody { + /** + * A short memo for this topic. + *

    + * This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes` + * (default 100) bytes when encoded as UTF-8. + */ + string memo = 1; + + /** + * Access control for modification of the topic after it is created. + *

    + * If this field is set, that key MUST sign this transaction.
    + * If this field is set, that key MUST sign each future transaction to + * update or delete the topic.
    + * An updateTopic transaction that _only_ extends the topic expirationTime + * (a "manual renewal" transaction) SHALL NOT require admin key + * signature.
    + * A topic without an admin key SHALL be immutable, except for expiration + * and renewal.
    + * If adminKey is not set, then `autoRenewAccount` SHALL NOT be set. + */ + Key adminKey = 2; + + /** + * Access control for message submission to the topic. + *

    + * If this field is set, that key MUST sign each consensus submit message + * for this topic.
    + * If this field is not set then any account may submit a message on the + * topic, without restriction. + */ + Key submitKey = 3; + + /** + * The initial lifetime, in seconds, for the topic.
    + * This is also the number of seconds for which the topic SHALL be + * automatically renewed upon expiring, if it has a valid auto-renew + * account. + *

    + * This value MUST be set.
    + * This value MUST be greater than the configured + * MIN_AUTORENEW_PERIOD.
    + * This value MUST be less than the configured MAX_AUTORENEW_PERIOD. + */ + Duration autoRenewPeriod = 6; + + /** + * The ID of the account to be charged renewal fees at the topic's + * expirationTime to extend the lifetime of the topic. + *

    + * The topic lifetime SHALL be extended by the smallest of the following: + *

      + *
    • The current `autoRenewPeriod` duration.
    • + *
    • The maximum duration that this account has funds to purchase.
    • + *
    • The configured MAX_AUTORENEW_PERIOD at the time of automatic + * renewal.
    • + *
    + * If this value is set, the referenced account MUST sign this + * transaction.
    + * If this value is set, the `adminKey` field MUST also be set (though that + * key MAY not have any correlation to this account). + */ + AccountID autoRenewAccount = 7; + + /** + * Access control for update or delete of custom fees. + *

    + * If set, subsequent `consensus_update_topic` transactions signed with this + * key MAY update or delete the custom fees for this topic.
    + * If not set, the custom fees for this topic SHALL BE immutable.
    + * If not set when the topic is created, this field CANNOT be set via + * update.
    + * If set when the topic is created, this field MAY be changed via update. + */ + Key fee_schedule_key = 8; + + /** + * A set of keys.
    + * Keys in this list are permitted to submit messages to this topic without + * paying custom fees associated with this topic. + *

    + * If a submit transaction is signed by _any_ key included in this set, + * custom fees SHALL NOT be charged for that transaction.
    + * This field MUST NOT contain more than 10 keys.
    + * fee_exempt_key_list SHALL NOT contain any duplicate keys.
    + * fee_exempt_key_list MAY contain keys for accounts that are inactive, + * deleted, or non-existent.
    + * If fee_exempt_key_list is unset in this transaction, there SHALL NOT be + * any fee-exempt keys. In particular, the following keys SHALL NOT be + * implicitly or automatically added to this list: + * `adminKey`, `submitKey`, `fee_schedule_key`. + */ + repeated Key fee_exempt_key_list = 9; + + /** + * A set of custom fee definitions.
    + * These are fees to be assessed for each submit to this topic. + *

    + * Each fee defined in this set SHALL be evaluated for + * each message submitted to this topic, and the resultant + * total assessed fees SHALL be charged.
    + * Custom fees defined here SHALL be assessed in addition to the base + * network and node fees.
    + * custom_fees list SHALL NOT contain more than + * `MAX_CUSTOM_FEE_ENTRIES_FOR_TOPICS` entries. + */ + repeated FixedCustomFee custom_fees = 10; +} diff --git a/proto_src/services/consensus_delete_topic.proto b/proto_src/services/consensus_delete_topic.proto new file mode 100644 index 000000000..4bc28d3a0 --- /dev/null +++ b/proto_src/services/consensus_delete_topic.proto @@ -0,0 +1,57 @@ +/** + * # Delete Topic + * Delete an existing topic from the Hedera Consensus Service (HCS). + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; + +/** + * Delete a topic. + * + * Once deleted, subsequent transactions or queries for that topic SHALL NOT + * succeed.
    + * If adminKey is set on the topic, this transaction MUST be signed by that + * key.
    + * If adminKey is not set on the topic, this transaction SHALL fail with a + * response code of `UNAUTHORIZED`. A topic without an adminKey cannot be + * deleted (but MAY expire). + * + * ### Block Stream Effects + * None + */ +message ConsensusDeleteTopicTransactionBody { + /** + * Topic to be deleted. + */ + TopicID topicID = 1; +} diff --git a/proto_src/services/consensus_get_topic_info.proto b/proto_src/services/consensus_get_topic_info.proto new file mode 100644 index 000000000..ed116f608 --- /dev/null +++ b/proto_src/services/consensus_get_topic_info.proto @@ -0,0 +1,88 @@ +/** + * # Get Topic + * Query a topic in the Hedera Consensus Service (HCS). + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; +import "query_header.proto"; +import "response_header.proto"; +import "consensus_topic_info.proto"; + +/** + * Retrieve the latest state of a topic. + * + * This method is unrestricted and allowed on any topic by any payer + * account.
    + * A query for a deleted topic MAY succeed if the topic is within the + * "autorenew grace period".
    + * A query for a topic removed from state SHALL NOT succeed. + */ +message ConsensusGetTopicInfoQuery { + /** + * Standard information sent with every query operation.
    + * This includes the signed payment and what kind of response is requested + * (cost, state proof, both, or neither). + */ + QueryHeader header = 1; + + /** + * A topic ID. + *

    + * The network SHALL return information for this topic, if successful. + */ + TopicID topicID = 2; +} + +/** + * Query response to describe the current state of a topic in the Hedera + * Consensus Service(HCS). + */ +message ConsensusGetTopicInfoResponse { + /** + * The standard response information for queries.
    + * This includes the values requested in the `QueryHeader` + * (cost, state proof, both, or neither). + */ + ResponseHeader header = 1; + + /** + * The ID of the topic requested in the query. + */ + TopicID topicID = 2; + + + /** + * Information describing the current state of the topic. + */ + ConsensusTopicInfo topicInfo = 5; +} diff --git a/proto_src/services/consensus_service.proto b/proto_src/services/consensus_service.proto new file mode 100644 index 000000000..2b7afe48e --- /dev/null +++ b/proto_src/services/consensus_service.proto @@ -0,0 +1,126 @@ +/** + * # Consensus Service API + * GRPC service definitions for the Hedera Consensus Service (HCS). + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package + +import "query.proto"; +import "response.proto"; +import "transaction_response.proto"; +import "transaction.proto"; + +/** + * The Hedera Consensus Service (HCS) provides the ability for a 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. + * + */ +service ConsensusService { + /** + * Create an HCS topic. + *

    + * On success, the resulting TransactionReceipt SHALL contain the newly + * created TopicId.
    + * If the `adminKey` is set on the topic, this transaction MUST be signed + * by that key.
    + * If the `adminKey` is _not_ set on the topic, this transaction MUST NOT + * set an `autoRenewAccount`. The new topic will be immutable and must be + * renewed manually.
    + * If the `autoRenewAccount` is set on the topic, this transaction MUST be + * signed by that account.
    + *

    + * The request body MUST be a + * [ConsensusCreateTopicTransactionBody](#proto.ConsensusCreateTopicTransactionBody) + */ + rpc createTopic (Transaction) returns (TransactionResponse); + + /** + * Update an HCS topic. + *

    + * If the `adminKey` is not set on the topic, this transaction MUST extend + * the `expirationTime` and MUST NOT modify any other field.
    + * If the `adminKey` is set on the topic, this transaction MUST be signed + * by that key.
    + * If this transaction sets a new `adminKey`, this transaction MUST be + * signed by _both_ keys, the pre-update `adminKey` and + * the post-update `adminKey`.
    + * If this transaction sets a new, non-null, `autoRenewAccount`, the newly + * set account MUST sign this transaction.
    + *

    + * The request body MUST be a + * [ConsensusUpdateTopicTransactionBody](#proto.ConsensusUpdateTopicTransactionBody) + */ + rpc updateTopic (Transaction) returns (TransactionResponse); + + /** + * Delete an HCS topic. + *

    + * If this transaction succeeds, all subsequent transactions referencing + * the deleted topic SHALL fail.
    + * The `adminKey` MUST be set on the topic and this transaction MUST be + * signed by that key.
    + * If the `adminKey` is not set on the topic, this transaction SHALL fail + * with a response code of `UNAUTHORIZED`. A topic without an `adminKey` + * cannot be deleted, but MAY expire.
    + *

    + * The request body MUST be a + * [ConsensusDeleteTopicTransactionBody](#proto.ConsensusDeleteTopicTransactionBody) + */ + rpc deleteTopic (Transaction) returns (TransactionResponse); + + /** + * Submit a message to an HCS topic. + *

    + * Valid and authorized messages on valid topics will be ordered by the + * consensus service, published in the block stream, and available to all + * subscribers on this topic via the mirror nodes.
    + * If this transaction succeeds the resulting TransactionReceipt SHALL + * contain the latest topicSequenceNumber and topicRunningHash for the + * topic.
    + * If the topic has a `submitKey` then that key MUST sign this + * transaction.
    + *

    + * The request body MUST be a + * [ConsensusSubmitMessageTransactionBody](#proto.ConsensusSubmitMessageTransactionBody) + */ + rpc submitMessage (Transaction) returns (TransactionResponse); + + /** + * Retrieve the latest state of a topic. This method is unrestricted and + * allowed on any topic by any payer account. + *

    + * The request body MUST be a + * [ConsensusGetTopicInfoQuery](#proto.ConsensusGetTopicInfoQuery)
    + * The response body SHALL be a + * [ConsensusGetTopicInfoResponse](#proto.ConsensusGetTopicInfoResponse) + */ + rpc getTopicInfo (Query) returns (Response); +} diff --git a/proto_src/services/consensus_submit_message.proto b/proto_src/services/consensus_submit_message.proto new file mode 100644 index 000000000..3c53c3161 --- /dev/null +++ b/proto_src/services/consensus_submit_message.proto @@ -0,0 +1,110 @@ +/** + * # Submit Message + * Submit a message to a topic via the Hedera Consensus Service (HCS). + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; + +/** + * Consensus message "chunk" detail.
    + * This message carries information describing the way in which a message + * submitted for consensus is broken into multiple fragments to fit within + * network transaction size limits. + * + * The use of multiple message fragments is RECOMMENDED for any message + * greater than 4KiB in total size. + * + * ### Block Stream Effects + * None + */ +message ConsensusMessageChunkInfo { + /** + * The TransactionID of the first chunk. + *

    + * This MUST be set for every chunk in a fragmented message. + */ + TransactionID initialTransactionID = 1; + + /** + * The total number of chunks in the message. + */ + int32 total = 2; + + /** + * The sequence number (from 1 to total) of the current chunk + * in the message. + */ + int32 number = 3; +} + +/** + * Submit a message for consensus.
    + * This transaction adds a new entry to the "end" of a topic, and provides + * the core function of the consensus service. + * + * Valid and authorized messages on valid topics SHALL be ordered by the + * consensus service, published in the block stream, and available to all + * subscribers on this topic via the mirror nodes.
    + * If this transaction succeeds the resulting `TransactionReceipt` SHALL contain + * the latest `topicSequenceNumber` and `topicRunningHash` for the topic.
    + * If the topic `submitKey` is set, and not an empty `KeyList`, then that key + * MUST sign this transaction. + * + * ### Block Stream Effects + * None + */ +message ConsensusSubmitMessageTransactionBody { + /** + * Topic to submit message to. + */ + TopicID topicID = 1; + + /** + * A message to be submitted. + *

    + * This Transaction (including signatures) MUST be less than 6KiB.
    + * Messages SHOULD be less than 4KiB. A "chunked" message MAY be submitted + * if a message larger than this is required. + */ + bytes message = 2; + + /** + * Information for the current "chunk" in a fragmented message. + *

    + * This value is REQUIRED if the full `message` is submitted in two or + * more fragments due to transaction size limits.
    + * If the message is submitted in a single transaction, then this + * field SHOULD NOT be set. + */ + ConsensusMessageChunkInfo chunkInfo = 3; +} diff --git a/proto_src/services/consensus_topic_info.proto b/proto_src/services/consensus_topic_info.proto new file mode 100644 index 000000000..da8e12091 --- /dev/null +++ b/proto_src/services/consensus_topic_info.proto @@ -0,0 +1,193 @@ +/** + * # Topic Information + * Query response describing a topic of the Hedera Consensus Service (HCS). + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; +import "custom_fees.proto"; +import "duration.proto"; +import "timestamp.proto"; + +/** + * A query response describing the current state of a topic for the Hedera + * Consensus Service (HCS). + */ +message ConsensusTopicInfo { + /** + * A short description of this topic. + *

    + * This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes` + * (default 100) bytes when encoded as UTF-8. + */ + string memo = 1; + + /** + * The latest running hash of the topic. + *

    + * This 48-byte field is the output of a SHA-384 digest with input + * data determined by the current version of the running hash algorithm + * used by the network.
    + * All new transactions SHALL use algorithm version `3`.
    + * The bytes of each uint64 or uint32 encoded for the hash input + * MUST be in Big-Endian format. + *

    + *


    + * If the algorithm version 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. + *
    3. The `topicRunningHashVersion` (8 bytes)
    4. + *
    5. The payer account's shard (8 bytes)
    6. + *
    7. The payer account's realm (8 bytes)
    8. + *
    9. The payer account's number (8 bytes)
    10. + *
    11. The topic's shard (8 bytes)
    12. + *
    13. The topic's realm (8 bytes)
    14. + *
    15. The topic's number (8 bytes)
    16. + *
    17. The number of seconds since the epoch when the + * `ConsensusSubmitMessage` reached consensus (8 bytes)
    18. + *
    19. The number of nanoseconds within the second when the + * `ConsensusSubmitMessage` reached consensus (4 bytes)
    20. + *
    21. The `topicSequenceNumber` (8 bytes)
    22. + *
    23. The output of a SHA-384 digest of the message bytes from the + * `ConsensusSubmitMessage` (48 bytes)
    24. + *
    + */ + bytes runningHash = 2; + + /** + * A current sequence number (starting at 1 for the first message) + * for messages on this topic. + */ + uint64 sequenceNumber = 3; + + /** + * An expiration time for this topic, in seconds since the epoch. + *

    + * For this purpose, `epoch` SHALL be the UNIX epoch + * with 0 at `1970-01-01T00:00:00.000Z`. + */ + Timestamp expirationTime = 4; + + /** + * A key that MUST sign any transaction to update or delete this topic. + *

    + * If this value is not set (null) then the topic CANNOT be deleted, + * modified, or updated. + */ + Key adminKey = 5; + + /** + * A key that MUST sign any transaction to submit a message to this topic. + *

    + * If this value is not set (null) then any account MAY submit messages to + * this topic. + */ + Key submitKey = 6; + + /** + * A duration, in seconds, to extend the `expirationTime` value when + * this topic is automatically renewed. + *

    + * If the `autoRenewAccount` value for this topic is set to a valid account + * with sufficient HBAR balance to pay renewal fees when this topic + * expires, the system SHALL automatically renew this topic, extending the + * `expirationTime` value by the number of seconds described here.
    + * If, however, the `autoRenewAccount` lacks sufficient HBAR balance + * to pay renewal fees when this topic expires, this topic SHALL be + * deleted after the time period specified in the `AUTORENEW_GRACE_PERIOD` + * configuration value. + */ + Duration autoRenewPeriod = 7; + + /** + * An account that is designated to pay automatic renewal fees. + *

    + * If this value is a valid account ID when this topic expires, + * this account SHALL be charged the renewal fees for this topic, + * if it holds sufficient HBAR balance. If the account does not hold + * sufficient HBAR balance to pay renewal fees when necessary, then + * this topic SHALL be deleted.
    + * If this value is not set (null), or is not a valid account ID, when + * this topic expires, then this topic SHALL be deleted after the time + * period specified in the `AUTORENEW_GRACE_PERIOD` configuration value. + */ + AccountID autoRenewAccount = 8; + + /** + * A ledger ID of the network that generated this response. + *

    + * This value SHALL identify the distributed ledger that responded to + * this query. + */ + bytes ledger_id = 9; + + /** + * Access control for update/delete of custom fees. + *

    + * If unset, custom fees CANNOT be set for this topic.
    + * If not set when the topic is created, this field CANNOT be set via + * update.
    + * If set when the topic is created, this field MAY be changed via update. + */ + Key fee_schedule_key = 10; + + /** + * A set of keys.
    + * Keys in this list are permitted to submit messages to this topic without + * paying custom fees associated with this topic. + *

    + * If a topic submit message is signed by _any_ key included in this set, + * custom fees SHALL NOT be charged for that transaction.
    + * `fee_exempt_key_list` MAY contain keys for accounts that are inactive, + * deleted, or non-existent.
    + * If not set, there SHALL NOT be any fee-exempt keys. In particular, the + * following keys SHALL NOT be implicitly or automatically added to this + * list: `adminKey`, `submitKey`, `fee_schedule_key`. + * A `fee_exempt_key_list` MUST NOT contain more than + * `MAX_ENTRIES_FOR_FEE_EXEMPT_KEY_LIST` keys. + * A `fee_exempt_key_list` MUST NOT contain any duplicate keys. + */ + repeated Key fee_exempt_key_list = 11; + + /** + * A set of custom fee definitions.
    + * These are fees to be assessed for each submit to this topic. + *

    + * Each fee defined in this set SHALL be evaluated for + * each message submitted to this topic, and the resultant + * total assessed fees SHALL be charged.
    + * Custom fees defined here SHALL be assessed in addition to the base + * network and node fees. + */ + repeated FixedCustomFee custom_fees = 12; +} diff --git a/proto_src/services/consensus_update_topic.proto b/proto_src/services/consensus_update_topic.proto new file mode 100644 index 000000000..02e7f6406 --- /dev/null +++ b/proto_src/services/consensus_update_topic.proto @@ -0,0 +1,185 @@ +/** + * # Update Topic + * Update a topic for the Hedera Consensus Service (HCS). + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "google/protobuf/wrappers.proto"; +import "basic_types.proto"; +import "custom_fees.proto"; +import "duration.proto"; +import "timestamp.proto"; + +/** + * Update the fields of an existing HCS topic. + * + * The topicID field is REQUIRED. All other fields are OPTIONAL.
    + * Fields set on this transaction SHALL be updated.
    + * Fields _not_ set on this transaction SHALL NOT be updated. + * + * ### Block Stream Effects + * None + */ +message ConsensusUpdateTopicTransactionBody { + /** + * The topic ID specifying the topic to update. + *

    + * A topic with this ID MUST exist and MUST NOT be deleted.
    + * This value is REQUIRED. + */ + TopicID topicID = 1; + + /** + * An updated memo to be associated with this topic. + *

    + * If this value is set, the current `adminKey` for the topic MUST sign + * this transaction.
    + * This value, if set, SHALL be encoded UTF-8 and SHALL NOT exceed + * 100 bytes when so encoded. + */ + google.protobuf.StringValue memo = 2; + + /** + * An updated expiration time for this topic, in seconds since the epoch. + *

    + * For this purpose, `epoch` SHALL be the UNIX epoch + * with 0 at `1970-01-01T00:00:00.000Z`.
    + * The expirationTime MUST NOT be greater than the sum of + * `MAX_AUTORENEW_PERIOD` and the actual consensus timestamp of + * this transaction.
    + * If `adminKey` is unset for the _topic_, this transaction MUST NOT + * modify any other field. + */ + Timestamp expirationTime = 4; + + /** + * Updated access control for modification of the topic. + *

    + * If this field is set, that key and the previously set key MUST both + * sign this transaction.
    + * If this value is an empty `KeyList`, the prior key MUST sign this + * transaction, and the topic SHALL be immutable after this transaction + * completes, except for expiration and renewal. + */ + Key adminKey = 6; + + /** + * Updated access control for message submission to the topic. + *

    + * If this value is set, the current `adminKey` for the topic MUST sign + * this transaction.
    + * If this value is set to an empty `KeyList`, the `submitKey` for the + * topic will be unset after this transaction completes. When the + * `submitKey` is unset, any account may submit a message on the topic, + * without restriction. + */ + Key submitKey = 7; + + /* + * An updated value for the number of seconds by which the topic expiration + * will be automatically extended upon expiration, if it has a valid + * auto-renew account. + *

    + * If this value is set, the current `adminKey` for the topic MUST sign + * this transaction.
    + * This value, if set, MUST be greater than the + * configured MIN_AUTORENEW_PERIOD.
    + * This value, if set, MUST be less than the + * configured MAX_AUTORENEW_PERIOD. + */ + Duration autoRenewPeriod = 8; + + /** + * An updated ID for the account to be charged renewal fees at the topic's + * `expirationTime` to extend the lifetime of the topic. + *

    + * If this value is set and not the "sentinel account", the referenced + * account MUST sign this transaction.
    + * If this value is set, the current `adminKey` for the topic MUST sign + * this transaction.
    + * If this value is set to the "sentinel account", which is `0.0.0`, the + * `autoRenewAccount` SHALL be removed from the topic. + */ + AccountID autoRenewAccount = 9; + + /** + * Access control for update/delete of custom fees. + *

    + * If set, subsequent consensus_update_topic transactions signed with this + * key MAY update or delete the custom fees for this topic.
    + * If this field is set, the admin key MUST sign this transaction.
    + * If this field is set, the previous value SHALL be replaced.
    + * If set to a 'Key' containing an empty 'KeyList', the previous value + * SHALL be cleared.
    + * If not set, the current key SHALL NOT change.
    + * If unset in state, this field MUST NOT be set in this transaction.
    + * If not set when the topic is created, this field CANNOT be set via + * update.
    + */ + Key fee_schedule_key = 10; + + /** + * A set of keys
    + * Keys in this list are permitted to submit messages to this topic without + * paying custom fees associated with this topic. + *

    + * If a submit transaction is signed by _any_ key included in this set, + * custom fees SHALL NOT be charged for that transaction.
    + * If this field is not set, the current set of keys SHALL NOT change.
    + * If this field is set, but contains an empty list, any existing fee-exempt + * keys SHALL be removed.
    + * A `fee_exempt_key_list` MUST NOT contain more than + * `MAX_ENTRIES_FOR_FEE_EXEMPT_KEY_LIST` keys.
    + * A `fee_exempt_key_list` MUST NOT contain any duplicate keys.
    + * A `fee_exempt_key_list` MAY contain keys for accounts that are inactive, + * deleted, or non-existent. + */ + FeeExemptKeyList fee_exempt_key_list = 11; + + /** + * A set of custom fee definitions.
    + * These are fees to be assessed for each submit to this topic. + *

    + * Each fee defined in this set SHALL be evaluated for + * each message submitted to this topic, and the resultant + * total assessed fees SHALL be charged.
    + * Custom fees defined here SHALL be assessed in addition to the base + * network and node fees.
    + * If this field is not set, the current set of custom fees + * SHALL NOT change.
    + * If this field is set, but contains an empty list, all current custom fees + * SHALL be removed. + * custom_fees list SHALL NOT contain more than + * `MAX_CUSTOM_FEE_ENTRIES_FOR_TOPICS` entries. + */ + FixedCustomFeeList custom_fees = 12; +} diff --git a/proto_src/services/contract_call.proto b/proto_src/services/contract_call.proto new file mode 100644 index 000000000..604560c3a --- /dev/null +++ b/proto_src/services/contract_call.proto @@ -0,0 +1,87 @@ +/** + * # Contract Call + * Transaction body for calls to a Smart Contract. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; + +/** + * Call a function of a given smart contract, providing function parameter + * inputs as needed. + * + * Resource ("gas") charges SHALL include all relevant fees incurred by the + * contract execution, including any storage required.
    + * The total transaction fee SHALL incorporate all of the "gas" actually + * consumed as well as the standard fees for transaction handling, data + * transfers, signature verification, etc...
    + * The response SHALL contain the output returned by the function call. + * + * ### Block Stream Effects + * A `CallContractOutput` message SHALL be emitted for each transaction. + */ +message ContractCallTransactionBody { + /** + * The ID of a smart contract to call. + */ + ContractID contractID = 1; + + /** + * A maximum limit to the amount of gas to use for this call. + *

    + * The network SHALL charge the greater of the following, but + * SHALL NOT charge more than the value of this field. + *

      + *
    1. The actual gas consumed by the smart contract call.
    2. + *
    3. `80%` of this value.
    4. + *
    + * The `80%` factor encourages reasonable estimation, while allowing for + * some overage to ensure successful execution. + */ + int64 gas = 2; + + /** + * An amount of tinybar sent via this contract call. + *

    + * If this is non-zero, the function MUST be `payable`. + */ + int64 amount = 3; + + /** + * The smart contract function to call. + *

    + * This MUST contain The application binary interface (ABI) encoding of the + * function call per the Ethereum contract ABI standard, giving the + * function signature and arguments being passed to the function. + */ + bytes functionParameters = 4; +} diff --git a/proto_src/services/contract_call_local.proto b/proto_src/services/contract_call_local.proto new file mode 100644 index 000000000..394b97372 --- /dev/null +++ b/proto_src/services/contract_call_local.proto @@ -0,0 +1,134 @@ +/** + * # Local Contract Call + * A Contract Call executed directly on the current node + * (that is, without consensus). + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; +import "contract_types.proto"; +import "query_header.proto"; +import "response_header.proto"; + +/** + * Call a view function of a given smart contract
    + * The call must provide function parameter inputs as needed.
    + * This is potentially useful for calling view functions that will not revert + * when executed in a static EVM context. Many such use cases will be better + * served by using a Mirror Node API, however. + * + * This is performed locally on the particular node that the client is + * communicating with. Executing the call locally is faster and less costly, + * but imposes certain restrictions.
    + * The call MUST NOT change the state of the contract instance. This also + * precludes any expenditure or transfer of HBAR or other tokens.
    + * The call SHALL NOT have a separate consensus timestamp.
    + * The call SHALL NOT generate a record nor a receipt.
    + * The response SHALL contain the output returned by the function call.
    + * Any contract call that would use the `STATICCALL` opcode MAY be called via + * contract call local with performance and cost benefits. + * + * Unlike a ContractCall transaction, the node SHALL always consume the + * _entire_ amount of offered "gas" in determining the fee for this query, so + * accurate gas estimation is important. + */ +message ContractCallLocalQuery { + /** + * Standard information sent with every query operation.
    + * This includes the signed payment and what kind of response is requested + * (cost, state proof, both, or neither). + *

    + * The payment MUST be sufficient for the base fees _and_ the full amount + * in the `gas` field. + */ + QueryHeader header = 1; + + /** + * The ID of a smart contract to call. + */ + ContractID contractID = 2; + + /** + * The amount of "gas" to use for this call. + *

    + * This transaction SHALL consume all of the gas offered and charge the + * corresponding fee according to the current exchange rate between + * HBAR and "gas". + */ + int64 gas = 3; + + /** + * The smart contract function to call, and the parameters to pass to that + * function. + *

    + * These SHALL be presented in EVM bytecode function call format. + */ + bytes functionParameters = 4; + + /** + * Do not use this field; it is ignored in the current software. + *

    + * The maximum number of bytes that the result might include.
    + * The call will fail if it would have returned more than this number + * of bytes. + */ + int64 maxResultSize = 5 [deprecated = true]; + + /** + * The account that is the "sender" for this contract call. + *

    + * If this is not set it SHALL be interpreted as the accountId from the + * associated transactionId.
    + * If this is set then either the associated transaction or the foreign + * transaction data MUST be signed by the referenced account. + */ + AccountID sender_id = 6; +} + +/** + * The response returned by a `ContractCallLocalQuery` transaction. + */ +message ContractCallLocalResponse { + /** + * The standard response information for queries.
    + * This includes the values requested in the `QueryHeader` + * (cost, state proof, both, or neither). + */ + ResponseHeader header = 1; + + /** + * The result(s) returned by the function call, if successful. + *

    + * If the call failed this value SHALL be unset. + */ + ContractFunctionResult functionResult = 2; +} diff --git a/proto_src/services/contract_create.proto b/proto_src/services/contract_create.proto new file mode 100644 index 000000000..401626740 --- /dev/null +++ b/proto_src/services/contract_create.proto @@ -0,0 +1,290 @@ +/** + * # Smart Contract Create + * + * Create a new smart contract. + * + * ## General Comments + * - A smart contract 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 characteristic + * is generally true if the contract instance was created without a value + * for the `adminKey` field. For some uses, however, it may 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 `adminKey` is set to a valid Key (which MAY be complex), then a + * transaction that can change the state of the smart contract in arbitrary + * ways MAY be signed with enough signatures to activate that Key. Such + * transactions might reverse a transaction, change the code to close an + * unexpected loophole, remove an exploit, or adjust outputs in ways not + * covered by the code itself. The admin key MAY also be used to change the + * autoRenewPeriod, and change the adminKey field itself (for example, to + * remove that key after a suitable testing period). The API currently does + * not implement all relevant capabilities. But it does allow the `adminKey` + * field to be set and queried, and MAY implement further administrative + * capability in future releases. + * - The current API ignores shardID, realmID, and newRealmAdminKey, and + * creates everything in shard 0 and realm 0. Future versions of the system + * MAY support additional shards and realms. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; +import "duration.proto"; + +/** + * Create a new smart contract. + * + * If this transaction succeeds, the `ContractID` for the new smart contract + * SHALL be set in the transaction receipt.
    + * The contract is defined by the initial bytecode (or `initcode`). The + * `initcode` SHALL be stored either in a previously created file, or in the + * transaction body itself for very small contracts. + * + * As part of contract creation, the constructor defined for the new smart + * contract SHALL run with the parameters provided in the + * `constructorParameters` field.
    + * The gas to "power" that constructor MUST be provided via the `gas` field, + * and SHALL be charged to the payer for this transaction.
    + * If the contract _constructor_ stores information, it is charged gas for that + * storage. There is a separate fee in HBAR to maintain that storage until the + * expiration, and that fee SHALL be added to this transaction as part of the + * _transaction fee_, rather than gas. + * + * ### Block Stream Effects + * A `CreateContractOutput` message SHALL be emitted for each transaction. + */ +message ContractCreateTransactionBody { + + oneof initcodeSource { + /** + * The source for the smart contract EVM bytecode. + *

    + * The file containing the smart contract initcode. + * A copy of the contents SHALL be made and held as `bytes` + * in smart contract state.
    + * The contract bytecode is limited in size only by the + * network file size limit. + */ + FileID fileID = 1; + + /** + * The source for the smart contract EVM bytecode. + *

    + * The bytes of the smart contract initcode. A copy of the contents + * SHALL be made and held as `bytes` in smart contract state.
    + * This value is limited in length by the network transaction size + * limit. This entire transaction, including all fields and signatures, + * MUST be less than the network transaction size limit. + */ + bytes initcode = 16; + } + + /** + * Access control for modification of the smart contract after + * it is created. + *

    + * If this field is set, that key MUST sign this transaction.
    + * If this field is set, that key MUST sign each future transaction to + * update or delete the contract.
    + * An updateContract transaction that _only_ extends the topic + * expirationTime (a "manual renewal" transaction) SHALL NOT require + * admin key signature. + *

    + * A contract without an admin key SHALL be immutable, except for + * expiration and renewal. + */ + Key adminKey = 3; + + /** + * A maximum limit to the amount of gas to use for the constructor call. + *

    + * The network SHALL charge the greater of the following, but SHALL NOT + * charge more than the value of this field. + *

      + *
    1. The actual gas consumed by the smart contract + * constructor call.
    2. + *
    3. `80%` of this value.
    4. + *
    + * The `80%` factor encourages reasonable estimation, while allowing for + * some overage to ensure successful execution. + */ + int64 gas = 4; + + /** + * The amount of HBAR to use as an initial balance for the account + * representing the new smart contract. + *

    + * This value is presented in tinybar + * (10-8 HBAR).
    + * The HBAR provided here will be withdrawn from the payer account that + * signed this transaction. + */ + int64 initialBalance = 5; + + /** + * Proxy account staking is handled via `staked_id`. + *

    + * Former field to designate a proxy account for HBAR staking. + * This field MUST NOT be set. + */ + AccountID proxyAccountID = 6 [deprecated = true]; + + /** + * The initial lifetime, in seconds, for the smart contract, and the number + * of seconds for which the smart contract will be automatically renewed + * upon expiration. + *

    + * This value MUST be set.
    + * This value MUST be greater than the configured MIN_AUTORENEW_PERIOD.
    + * This value MUST be less than the configured MAX_AUTORENEW_PERIOD.
    + */ + Duration autoRenewPeriod = 8; + + /** + * An array of bytes containing the EVM-encoded parameters to pass to + * the smart contract constructor defined in the smart contract init + * code provided. + */ + bytes constructorParameters = 9; + + /** + *

    Review Question
    + *
    Should this be deprecated?
    + * It's never been used and probably never should be used...
    + * Shard should be determined by the node the transaction is submitted to. + *
    + *

    + * The shard in which to create the new smart contract.
    + * This value is currently ignored. + */ + ShardID shardID = 10; + + /** + *

    Review Question
    + *
    Should this be deprecated?
    + * It's never been used and probably never should be used...
    + * Realm should be determined by node and network parameters. + *
    + *

    + * The shard/realm in which to create the new smart contract.
    + * This value is currently ignored. + */ + RealmID realmID = 11; + + /** + *

    Review Question
    + *
    Should this be deprecated?
    + * It's never been used and probably never should be used...
    + * If a realm is used, it must already exist; we shouldn't be creating it + * without a separate transaction.
    + *

    + * This was intended to provide an admin key for any new realm created + * during the creation of the smart contract.
    + * This value is currently ignored. a new realm SHALL NOT be created, + * regardless of the value of `realmID`. + */ + Key newRealmAdminKey = 12; + + /** + * A short memo for this smart contract. + *

    + * This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes` + * (default 100) bytes when encoded as UTF-8. + */ + string memo = 13; + + /** + * The maximum number of tokens that can be auto-associated with this + * smart contract. + *

    + * If this is less than or equal to `used_auto_associations` (or 0), then + * this contract MUST manually associate with a token before transacting + * in that token.
    + * Following HIP-904 This value may also be `-1` to indicate no limit.
    + * This value MUST NOT be less than `-1`. + */ + int32 max_automatic_token_associations = 14; + + /** + * The id of an account, in the same shard and realm as this smart + * contract, that has signed this transaction, allowing the network to use + * its balance, when needed, to automatically extend this contract's + * expiration time. + *

    + * If this field is set, that key MUST sign this transaction.
    + * If this field is set, then the network SHALL deduct the necessary fees + * from the designated auto renew account, if that account has sufficient + * balance. If the auto renew account does not have sufficient balance, + * then the fees for contract renewal SHALL be deducted from the HBAR + * balance held by the smart contract.
    + * If this field is not set, then all renewal fees SHALL be deducted from + * the HBAR balance held by this contract. + */ + AccountID auto_renew_account_id = 15; + + oneof staked_id { + + /** + * An account ID. + *

    + * This smart contract SHALL stake its HBAR via this account as proxy. + */ + AccountID staked_account_id = 17; + + /** + * The ID of a network node. + *

    + * This smart contract SHALL stake its HBAR to this node. + *

    + *

    Note: node IDs do fluctuate as node operators change. + * Most contracts are immutable, and a contract staking to an invalid + * node ID SHALL NOT participate in staking. Immutable contracts MAY + * find it more reliable to use a proxy account for staking + * (via `staked_account_id`) to enable updating the _effective_ staking + * node ID when necessary through updating the proxy + * account.
    + */ + int64 staked_node_id = 18; + } + + /** + * A flag indicating that this smart contract declines to receive any + * reward for staking its HBAR balance to help secure the network. + *

    + * If set to true, this smart contract SHALL NOT receive any reward for + * staking its HBAR balance to help secure the network, regardless of + * staking configuration, but MAY stake HBAR to support the network + * without reward. + */ + bool decline_reward = 19; +} diff --git a/proto_src/services/contract_delete.proto b/proto_src/services/contract_delete.proto new file mode 100644 index 000000000..a8c9b4b86 --- /dev/null +++ b/proto_src/services/contract_delete.proto @@ -0,0 +1,102 @@ +/** + * # Contract Delete + * Delete a smart contract, transferring any remaining balance to a + * designated account. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; + +/** + * Delete a smart contract, and transfer any remaining HBAR balance to a + * designated account. + * + * If this call succeeds then all subsequent calls to that smart contract + * SHALL execute the `0x0` opcode, as required for EVM equivalence. + * + * ### Requirements + * - An account or smart contract MUST be designated to receive all remaining + * account balances. + * - The smart contract MUST have an admin key set. If the contract does not + * have `admin_key` set, then this transaction SHALL fail and response code + * `MODIFYING_IMMUTABLE_CONTRACT` SHALL be set. + * - If `admin_key` is, or contains, an empty `KeyList` key, it SHALL be + * treated the same as an admin key that is not set. + * - The `Key` set for `admin_key` on the smart contract MUST have a valid + * signature set on this transaction. + * - The designated receiving account MAY have `receiver_sig_required` set. If + * that field is set, the receiver account MUST also sign this transaction. + * - The field `permanent_removal` MUST NOT be set. That field is reserved for + * internal system use when purging the smart contract from state. Any user + * transaction with that field set SHALL be rejected and a response code + * `PERMANENT_REMOVAL_REQUIRES_SYSTEM_INITIATION` SHALL be set. + * + * ### Block Stream Effects + * None + */ +message ContractDeleteTransactionBody { + /** + * The id of the contract to be deleted. + *

    + * This field is REQUIRED. + */ + ContractID contractID = 1; + + oneof obtainers { + /** + * An Account ID recipient. + *

    + * This account SHALL receive all HBAR and other tokens still owned by + * the contract that is removed. + */ + AccountID transferAccountID = 2; + + /** + * A contract ID recipient. + *

    + * This contract SHALL receive all HBAR and other tokens still owned by + * the contract that is removed. + */ + ContractID transferContractID = 3; + } + + /** + * A flag indicating that this transaction is "synthetic"; initiated by the + * node software. + *

    + * The consensus nodes create such "synthetic" transactions to both to + * properly manage state changes and to communicate those changes to other + * systems via the Block Stream.
    + * A user-initiated transaction MUST NOT set this flag. + */ + bool permanent_removal = 4; +} diff --git a/proto_src/services/contract_get_bytecode.proto b/proto_src/services/contract_get_bytecode.proto new file mode 100644 index 000000000..f5d4331cc --- /dev/null +++ b/proto_src/services/contract_get_bytecode.proto @@ -0,0 +1,75 @@ +/** + * # Get Contract Bytecode + * A standard query to read the current bytecode for a smart contract. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; +import "query_header.proto"; +import "response_header.proto"; + +/** + * A transaction body to request the current bytecode for a smart contract. + */ +message ContractGetBytecodeQuery { + /** + * Standard information sent with every query operation.
    + * This includes the signed payment and what kind of response is requested + * (cost, state proof, both, or neither). + */ + QueryHeader header = 1; + + /** + * A smart contract ID. + *

    + * The network SHALL return bytecode for this smart contract, if successful. + */ + ContractID contractID = 2; +} + +/** + * Information returned in response to a "get bytecode" query for a + * smart contract. + */ +message ContractGetBytecodeResponse { + /** + * The standard response information for queries.
    + * This includes the values requested in the `QueryHeader` + * (cost, state proof, both, or neither). + */ + ResponseHeader header = 1; + + /** + * The current bytecode of the requested smart contract. + */ + bytes bytecode = 6; +} diff --git a/proto_src/services/contract_get_info.proto b/proto_src/services/contract_get_info.proto new file mode 100644 index 000000000..26bf05235 --- /dev/null +++ b/proto_src/services/contract_get_info.proto @@ -0,0 +1,181 @@ +/** + * # Contract Get Info + * A standard query to obtain detailed information about a smart contract. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "timestamp.proto"; +import "duration.proto"; +import "basic_types.proto"; +import "query_header.proto"; +import "response_header.proto"; + +/** + * Request detailed information about a smart contract. + */ +message ContractGetInfoQuery { + /** + * Standard information sent with every query operation.
    + * This includes the signed payment and what kind of response is requested + * (cost, state proof, both, or neither). + */ + QueryHeader header = 1; + + /** + * A smart contract ID. + *

    + * The network SHALL return information for this smart contract, + * if successful. + */ + ContractID contractID = 2; +} + +/** + * Information returned in response to a "get info" query for a smart contract. + */ +message ContractGetInfoResponse { + /** + * The standard response information for queries.
    + * This includes the values requested in the `QueryHeader` + * (cost, state proof, both, or neither). + */ + ResponseHeader header = 1; + + /** + * The information, as requested, for a smart contract. + * A state proof MAY be generated for this value. + */ + ContractInfo contractInfo = 2; + + message ContractInfo { + /** + * The ID of the smart contract requested in the query. + */ + ContractID contractID = 1; + + /** + * The Account ID for the account entry associated with this + * smart contract. + */ + AccountID accountID = 2; + + /** + * The "Solidity" form contract ID.
    + * This is a hexadecimal string form of the 20-byte EVM address + * of the contract. + */ + string contractAccountID = 3; + + /** + * The key that MUST sign any transaction to update or modify this + * smart contract. + *

    + * If this value is null, or is an empty `KeyList` then the contract + * CANNOT be deleted, modified, or updated, but MAY still expire. + */ + Key adminKey = 4; + + /** + * The point in time at which this contract will expire. + */ + Timestamp expirationTime = 5; + + /** + * The duration, in seconds, for which the contract lifetime will be + * automatically extended upon expiration, provide sufficient HBAR is + * available at that time to pay the renewal fee.
    + * See `auto_renew_account_id` for additional conditions. + */ + Duration autoRenewPeriod = 6; + + /** + * The amount of storage used by this smart contract. + */ + int64 storage = 7; + + /** + * A short description of this smart contract. + *

    + * This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes` + * (default 100) bytes when encoded as UTF-8. + */ + string memo = 8; + + /** + * The current HBAR balance, in tinybar, of the smart contract account. + */ + uint64 balance = 9; + + /** + * A flag indicating that this contract is deleted. + */ + bool deleted = 10; + + /** + * Because HIP-367, + * which allows an account to be associated to an unlimited number of + * tokens, it became necessary to only provide this information from + * a Mirror Node.
    + * The list of tokens associated to this contract. + */ + repeated TokenRelationship tokenRelationships = 11 [deprecated = true]; + + /** + * The ledger ID of the network that generated this response. + *

    + * This value SHALL identify the distributed ledger that responded to + * this query. + */ + bytes ledger_id = 12; + + /** + * An account designated to pay the renewal fee upon automatic renewal + * of this contract. + *

    + * If this is not set, or is set to an account with zero HBAR + * available, the HBAR balance of the contract, if available, + * SHALL be used to pay the renewal fee. + */ + AccountID auto_renew_account_id = 13; + + /** + * The maximum number of tokens that the contract can be + * associated to automatically. + */ + int32 max_automatic_token_associations = 14; + + /** + * Staking information for this contract. + */ + StakingInfo staking_info = 15; + } +} diff --git a/proto_src/services/contract_get_records.proto b/proto_src/services/contract_get_records.proto new file mode 100644 index 000000000..6f3ba566b --- /dev/null +++ b/proto_src/services/contract_get_records.proto @@ -0,0 +1,88 @@ +/** + * # Get contract records + * Deprecated query messages to read all recent contract transaction records. + * + * > REVIEW QUESTION + * >> Can we delete this file and remove the related query entirely? + * >> It appears it hasn't been supported for over 3½ years... + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; +import "transaction_record.proto"; +import "query_header.proto"; +import "response_header.proto"; + +/** + * Deprecated and not supported after release `0.9.0`. + * Request records of all transactions against the given contract in the last 25 hours. + */ +message ContractGetRecordsQuery { + option deprecated = true; + /** + * Standard information sent with every query operation.
    + * This includes the signed payment and what kind of response is requested + * (cost, state proof, both, or neither). + */ + QueryHeader header = 1; + + /** + * A smart contract ID. + *

    + * The network SHALL return information for this smart contract, if successful. + */ + ContractID contractID = 2; +} + +/** + * Deprecated and not supported after release `0.9.0`. + * Response with records of all transactions against the given contract in the last 25 hours. + */ +message ContractGetRecordsResponse { + option deprecated = true; + /** + * The standard response information for queries.
    + * This includes the values requested in the `QueryHeader` + * (cost, state proof, both, or neither). + */ + ResponseHeader header = 1; + + /** + * A smart contract that this response describes. + */ + ContractID contractID = 2; + + /** + * A list of records, each with contractCreateResult or contractCallResult as its body + */ + repeated TransactionRecord records = 3; +} diff --git a/proto_src/services/contract_types.proto b/proto_src/services/contract_types.proto new file mode 100644 index 000000000..669ef46b2 --- /dev/null +++ b/proto_src/services/contract_types.proto @@ -0,0 +1,248 @@ +/** + * # Contract Message Types + * Message types used in contract transactions. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; +import "google/protobuf/wrappers.proto"; + +/** + * A contract "nonce" reference.
    + * This connects a contract and its "nonce" value, and is primarily for use in + * query responses. A "nonce" is short for "nonsense" and is usually a value + * with no particular meaning. + * + * The nonce of a contract SHALL be incremented when that contract creates + * another contract. + */ +message ContractNonceInfo { + /** + * A contract identifier.
    + * This refers to the contract that holds this nonce value. + */ + ContractID contract_id = 1; + + /** + * A "nonce" value. + * The current value of the nonce associated with the identified contract. + */ + int64 nonce = 2; +} + +/** + * EVM log data for a contract call.
    + * The EVM log information produced by a smart contract function call. + * + * Each contract function call MAY return zero or more log events. + */ +message ContractLoginfo { + /** + * A contract identifier.
    + * This refers to the contract that generated this log entry. + */ + ContractID contractID = 1; + + /** + * A bloom filter.
    + * This filter applies to this log entry and indexes the contract log data + * in the full data of the Ethereum block.
    + * EIP-7668 proposes to remove bloom filters as they are quite low value + * in practice and separate indexing services are more effective. + */ + bytes bloom = 2; + + /** + * A list of the "topics" in this log entry.
    + * The EVM permits up to 4 topics, each of which is 32 bytes (one EVM word). + *

    + * The first "topic" is special, and MUST contain the keccak256 hash of the + * event signature, if the event is not anonymous. + */ + repeated bytes topic = 3; + + /** + * Event data for this log entry.
    + * This is binary data consisting of an arbitrary number of 256 bit + * (32 byte) words. The content of that data is determined by the smart + * contract code.
    + */ + bytes data = 4; +} + +/** + * A contract function result.
    + * 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. The ContractCreateInstance transaction record also carries a + * function result, which is the results of the call to the constructor. + */ +message ContractFunctionResult { + // No comments here: PBJ issue #217 + reserved 8; // Removed Field. + + /** + * A contract identifier.
    + * This identifies the smart contract that defines the function called. + */ + ContractID contractID = 1; + + /** + * Result data from the function call. + *

    + * This SHALL be encoded in RLP bytecode format. + */ + bytes contractCallResult = 2; + + /** + * Any error message produced by the contract call. + *

    + * This SHALL be unset if the contract call succeeded. + */ + string errorMessage = 3; + + /** + * A bloom filter produced by this contract call.
    + * Ethereum uses this bloom filter to search for call results in the + * Ethereum block history. High false positive rates make the bloom + * filters quite limited value. + */ + bytes bloom = 4; + + /** + * A quantity of "gas" used.
    + * This represents the resource units expended to execute this + * contract call, and correlates to transaction costs. + */ + uint64 gasUsed = 5; + + /** + * Any Log events produced by this contract call. + */ + repeated ContractLoginfo logInfo = 6; + + /** + * Replaced by values in transaction records to support + * `CREATE2` calls.
    + *

    + * The list of smart contracts that were created by the function call.
    + * The created ids will now _also_ be externalized through internal + * transaction records, where each record has its alias field populated + * with the new contract's EVM address.
    + * This is needed for contracts created with CREATE2, which removes the + * trivial relationship between a new contract's Identifier and its + * Solidity address. + */ + repeated ContractID createdContractIDs = 7 [deprecated = true]; + + /** + * A created contract address.
    + * If the function created a new contract (e.g. `CREATE2`), + * this is the primary 20-byte EVM address for that contract. + *

    + * Every contract SHALL have a "base" EVM address that is determined by its + * `shard.realm.num` contract ID.
    + * This address is constructed as follows + *

      + *
    1. The first 4 bytes are the big-endian + * representation of the shard.
    2. + *
    3. The next 8 bytes are the big-endian + * representation of the realm.
    4. + *
    5. The final 8 bytes are the big-endian + * representation of the number.
    6. + *
    + *

    + * Contracts created via `CREATE2` SHALL have an _additional_, primary, + * address that is derived from the + * EIP-1014 + * specification. This additional address SHALL NOT be directly related to + * the `shard.realm.num` contract ID.
    + * It should be emphasized that Contracts created via a `CREATE2` call can + * also be referenced via the same "base" EVM address as described above. + */ + google.protobuf.BytesValue evm_address = 9; + + /** + * The amount of gas available for this call, sometimes referred to as the + * gasLimit.
    + * This field SHALL NOT be populated when the associated `TransactionBody` + * in the block stream is a `ContractCreateTransactionBody` or + * a `ContractCallTransactionBody`. + */ + int64 gas = 10; + + /** + * An amount, in tinybar, sent by this function call.
    + * This SHALL be zero(0) if the function called is not `payable`.
    + * This field SHALL NOT be populated when the associated `TransactionBody` + * in the block stream is a `ContractCreateTransactionBody` or + * a `ContractCallTransactionBody`. + */ + int64 amount = 11; + + /** + * The smart contract function to call, and the parameters to pass to that + * function.
    + * These SHALL be presented in EVM bytecode function call format.
    + * This field SHALL NOT be populated when the associated `TransactionBody` + * in the block stream is a `ContractCreateTransactionBody` or + * a `ContractCallTransactionBody`. + */ + bytes functionParameters = 12; + + /** + * The account that was the "sender" for this contract call.
    + * If this is not set it SHALL be read from the accountId in the + * transactionId for the contract call.
    + * This field SHALL NOT be populated when the associated `TransactionBody` + * in the block stream is a `ContractCreateTransactionBody` or + * a `ContractCallTransactionBody`. + */ + AccountID sender_id = 13; + + /** + * A list of contract account nonce values.
    + * This list SHALL contain a nonce value for each contract account modified + * as a result of this contract call. These nonce values SHALL be the value + * after the contract call is completed. + */ + repeated ContractNonceInfo contract_nonces = 14; + + /** + * A nonce value for the "signer account".
    + * If the contract call updated the signer nonce for the signer account + * (i.e. by creating another contract), this field SHALL contain the + * updated value.
    + * If the signer account nonce was not updated, this field SHALL be `null`. + */ + google.protobuf.Int64Value signer_nonce = 15; +} diff --git a/proto_src/services/contract_update.proto b/proto_src/services/contract_update.proto new file mode 100644 index 000000000..7923b2883 --- /dev/null +++ b/proto_src/services/contract_update.proto @@ -0,0 +1,196 @@ +/** + * # Contract Update + * Modify a smart contract. Any change other than updating the expiration time + * requires that the contract be modifiable (has a valid `adminKey`) and that + * the transaction be signed by the `adminKey` + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; +import "duration.proto"; +import "timestamp.proto"; +import "google/protobuf/wrappers.proto"; + +/** + * Modify the current state of a smart contract. + * + * ### Requirements + * - The `adminKey` MUST sign all contract update transactions except one + * that only updates the `expirationTime`. + * - A transaction that modifies any field other than `expirationTime` for + * a contract without a valid `adminKey` set SHALL fail with response + * code `MODIFYING_IMMUTABLE_CONTRACT`. + * - Fields set to non-default values in this transaction SHALL be updated on + * success. Fields not set to non-default values SHALL NOT be + * updated on success. + * + * ### Block Stream Effects + * None + */ +message ContractUpdateTransactionBody { + /** + * The contact ID that identifies the smart contract to be updated.
    + * This field MUST be set, and MUST NOT be a default ID (`0.0.0`). + */ + ContractID contractID = 1; + + /** + * If set, modify the time at which this contract will expire.
    + * An expired contract requires a rent payment to "renew" the contract. + * A transaction to update this field is how that rent payment is made. + *

    + * This value MUST NOT be less than the current `expirationTime` + * of the contract. If this value is earlier than the current + * value, the transaction SHALL fail with response + * code `EXPIRATION_REDUCTION_NOT_ALLOWED`. + */ + Timestamp expirationTime = 2; + + /** + * If set, modify the key that authorizes updates to the contract. + *

    + * If this field is set to a valid Key, this key and the previously set key + * MUST both sign this transaction.
    + * If this value is an empty `KeyList`, the prior key MUST sign this + * transaction, and the smart contract SHALL be immutable after this + * transaction completes, except for expiration and renewal.
    + * If this value is not an empty `KeyList`, but does not contain any + * cryptographic keys, or is otherwise malformed, this transaction SHALL + * fail with response code `INVALID_ADMIN_KEY`. + */ + Key adminKey = 3; + + /** + * Replaced with `staked_id` alternatives. + * This field is unused and SHALL NOT modify the contract state.
    + * The id of an account to which the contract is proxy staked + */ + AccountID proxyAccountID = 6 [deprecated = true]; + + /** + * If set, modify the duration added to expiration time by each + * auto-renewal to this value. + */ + Duration autoRenewPeriod = 7; + + /** + * This field is unused and SHALL NOT modify the contract state.
    + * Previously, an ID of a file containing the bytecode of the Solidity + * transaction that created this contract. + */ + FileID fileID = 8 [deprecated = true]; + + // This should be condensed to just a field instead of a oneof and field 9 reserved. + oneof memoField { + /** + * This value could not accurately distinguish unset or deliberately + * empty. memoWrapper should be used instead.
    + */ + string memo = 9 [deprecated = true]; + + /** + * If set, modify the short memo for this smart contract. + *

    + * This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes` + * (default 100) bytes when encoded as UTF-8. + */ + google.protobuf.StringValue memoWrapper = 10; + } + + /** + * If set, modify the maximum number of tokens that can be auto-associated with the + * contract. + *

    + * If this is set and less than or equal to `used_auto_associations`, or 0, then this contract + * MUST manually associate with a token before transacting in that token.
    + * This value MAY also be `-1` to indicate no limit.
    + * This value MUST NOT be less than `-1`. + */ + google.protobuf.Int32Value max_automatic_token_associations = 11; + + /** + * If set, modify the account, in the same shard and realm as this smart + * contract, that has agreed to allow the network to use its balance, when + * needed, to automatically extend this contract's expiration time. + *

    + * If this field is set to a non-default value, that Account MUST sign this + * transaction.
    + * If this field is set to a default AccountID value (`0.0.0`), any + * pre-existing `auto_renew_account_id` value SHALL be removed on success. + */ + AccountID auto_renew_account_id = 12; + + oneof staked_id { + /** + * An account identifier.
    + * A staked account acts as a proxy, and this contract effectively + * nominates the same node as the identified account. + *

    + * If set, modify this smart contract such that it SHALL stake its HBAR + * to the same node as the identified account.
    + * If this field is set to a default AccountID value (`0.0.0`), any + * pre-existing `staked_account_id` value SHALL be removed on success. + */ + AccountID staked_account_id = 13; + + /** + * A node identifier.
    + * A staked node identifier indicates the consensus node that this + * account nominates for staking. + *

    + * If set, modify this smart contract such that it SHALL stake its HBAR + * to this node. + * If set to a the value `-1` any pre-existing `staked_node_id` value + * SHALL be removed on success. + *

    + *

    Note: node IDs do fluctuate as node operators change. + * Most contracts are immutable, and a contract staking to an invalid + * node ID SHALL NOT participate in staking. Immutable contracts may + * find it more reliable to use a proxy account for staking (via + * `staked_account_id`) to enable updating the _effective_ staking node + * ID when necessary through updating the proxy account.
    + */ + int64 staked_node_id = 14; + } + + /** + * A flag indicating if staking rewards are declined.
    + * If set, modify the flag indicating if this contract declines to accept + * rewards for staking its HBAR to secure the network. + *

    + * If set to true, this smart contract SHALL NOT receive any reward for + * staking its HBAR balance to help secure the network, regardless of + * staking configuration, but MAY stake HBAR to support the network + * without reward. + */ + google.protobuf.BoolValue decline_reward = 15; +} diff --git a/proto_src/services/crypto_add_live_hash.proto b/proto_src/services/crypto_add_live_hash.proto new file mode 100644 index 000000000..3bf71cbe4 --- /dev/null +++ b/proto_src/services/crypto_add_live_hash.proto @@ -0,0 +1,101 @@ +/** + * # Add Live Hash + * Associate content to an account via a SHA-384 hash. + * + * > Important + * >> This transaction is obsolete and not supported.
    + * >> Any transaction of this type that is submitted SHALL fail + * >> with a `PRE_CHECK` result of `NOT_SUPPORTED`. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + + +import "basic_types.proto"; +import "duration.proto"; + +/** + * A Live Hash value associating some item of content to an account. + * + * This message represents a desired entry in the ledger for a SHA-384 + * hash of some content, an associated specific account, a list of authorized + * keys, and a duration the live hash is "valid". + */ +message LiveHash { + /** + * An account associated via this live hash to the hashed content. + */ + AccountID accountId = 1; + + /** + * A SHA-384 hash of some content that is associated to the account + * or account holder. + */ + bytes hash = 2; + + /** + * A list of keys, all of which MUST sign the transaction to add the + * live hash.
    + * Any one of these keys may, however, remove the live hash to revoke + * the association. + */ + KeyList keys = 3; + + /** + * A duration describing how long this Live Hash SHALL remain valid.
    + * A Live Hash SHOULD NOT be relied upon after this duration has elapsed. + */ + Duration duration = 5; +} + +/** + * Add a hash value to the ledger and associate it with an account. + * + * Create an entry in the ledger for a SHA-384 hash of some content, and + * associate that with a specific account. This is sometimes used to associate + * a credential or certificate with an account as a public record.
    + * The entry created is also associated with a list of keys, all of which + * MUST sign this transaction.
    + * The account key for the associated account MUST sign this transaction.
    + * + * The live hash, once created, MAY be removed from the ledger with one + * or more signatures. + * - The account key of the account associated to the live hash. + * - Any one key from the key list in the live hash entry. + * - Any combination of keys from the key list in the live hash entry. + */ +message CryptoAddLiveHashTransactionBody { + /** + * A Live Hash to be added to the ledger and associated with + * the identified account. + */ + LiveHash liveHash = 3; +} diff --git a/proto_src/services/crypto_approve_allowance.proto b/proto_src/services/crypto_approve_allowance.proto new file mode 100644 index 000000000..d87507b89 --- /dev/null +++ b/proto_src/services/crypto_approve_allowance.proto @@ -0,0 +1,258 @@ +/** + * # Approve Allowance + * This transaction body provides a mechanism to add "allowance" entries + * for an account. These allowances enable one account to spend or transfer + * token balances (for fungible/common tokens), individual tokens (for + * non-fungible/unique tokens), or all non-fungible tokens owned by the + * account, now or in the future (if `approved_for_all` is set). + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; +import "google/protobuf/wrappers.proto"; + +/** + * Create ("Approve") allowances for one account to transfer tokens owned + * by a different account.
    + * An allowance permits a "spender" account to independently transfer tokens + * owned by a separate "owner" account. Each such allowance permits spending + * any amount, up to a specified limit, for fungible/common tokens; a single + * specified non-fungible/unique token, or all non-fungible/unique tokens + * of a particular token type held by the "owner" account. + * + * If the "owner" account is not specified for any allowance in this + * transaction (the `owner` field is not set), the `payer` account for this + * transaction SHALL be owner for that allowance.
    + * Each `owner` account specified in any allowance approved in this + * transaction MUST sign this transaction.
    + * If the `amount` field for any fungible/common allowance in this + * transaction is `0`, then that allowance SHOULD match an existing, + * previously approved, allowance which SHALL be removed.
    + * There are three lists in this message. Each list MAY be empty, but + * _at least one_ list MUST contain _at least one_ entry. + * + * Example for the `payer` rule.
    + * - Given an account `0.0.X` that pays for this transaction, and owner + * is not specified in an allowance of `200` HBAR to spender account + * `0.0.Y`. At consensus the spender account `0.0.Y` will have a new + * allowance to spend `200` HBAR from the balance of account `0.0.X`. + * + * ### Block Stream Effects + * None + */ +message CryptoApproveAllowanceTransactionBody { + /** + * List of hbar allowances approved by the account owner. + *

    + * This list MAY be empty, provided at least one other list is + * not empty. + */ + repeated CryptoAllowance cryptoAllowances = 1; + + /** + * List of non-fungible token allowances approved by the account owner. + *

    + * This list MAY be empty, provided at least one other list is + * not empty. + */ + repeated NftAllowance nftAllowances = 2; + + /** + * List of fungible token allowances approved by the account owner. + *

    + * This list MAY be empty, provided at least one other list is + * not empty. + */ + repeated TokenAllowance tokenAllowances = 3; +} + +/** + * An approved allowance of hbar transfers. + * This message specifies one allowance for a single, unique, combination + * of owner, spender, and amount. + * + * If `owner` is not set, the effective `owner` SHALL be the `payer` for the + * enclosing transaction.
    + * The `spender` MUST be specified and MUST be a valid account.
    + * The `amount` MUST be a whole number, and SHOULD be greater than `0` unless + * this allowance is intended to _remove_ a previously approved allowance. + */ +message CryptoAllowance { + /** + * An owner account identifier.
    + * This is the account identifier of the account granting an allowance + * for the `spender` to transfer tokens held by this account. + */ + AccountID owner = 1; + + /** + * A spender account identifier.
    + * This is the account identifier of the account permitted to transfer + * tokens held by the `owner`. + */ + AccountID spender = 2; + + /** + * An amount of tinybar (10-8 HBAR).
    + * This is the amount of HBAR held by the `owner` that the + * `spender` is permitted to transfer. + *

    + * This value MUST be a whole number.
    + * This value MUST be greater than 0 to create a new allowance.
    + * This value MAY be exactly `0` to _remove_ an existing allowance.
    + */ + int64 amount = 3; +} + +/** + * An approved allowance of non-fungible tokens.
    + * This type of allowance may permit transfers for one or more individual + * unique tokens, or may permit transfers for all unique tokens of the + * specified type. + * + * If `owner` is not set, the effective `owner` SHALL be the `payer` for the + * enclosing transaction.
    + * The `spender` MUST be specified and MUST be a valid account.
    + * If `approve_for_all` is set, then `serial_numbers` SHOULD be empty + * and SHALL be ignored. + * If `approve_for_all` is unset, then `serial_numbers` MUST NOT be empty. + */ +message NftAllowance { + /** + * A token identifier.
    + * This identifies the type of token the `spender` is permitted to + * transfer from the `owner`. + *

    + * The identified token type MUST be a non-fungible/unique token. + */ + TokenID tokenId = 1; + + /** + * An owner account identifier.
    + * This is the account identifier of the account granting an allowance + * for the `spender` to transfer tokens held by this account. + */ + AccountID owner = 2; + + /** + * A spender account identifier.
    + * This is the account identifier of the account permitted to transfer + * tokens held by the `owner`. + */ + AccountID spender = 3; + + /** + * A list of token serial numbers.
    + * The list of serial numbers that the spender is permitted to transfer. + *

    + * The `owner` MUST currently hold each token identified in this list. + */ + repeated int64 serial_numbers = 4; + + /** + * A flag indicating this allowance applies to all tokens of the + * specified (non-fungible/unique) type. + *

    + * If true, the `spender` SHALL be permitted to transfer any or all + * of the `owner`'s tokens of the specified token type. + * This SHALL apply not only to currently owned tokens, but to all + * such tokens acquired in the future, unless the + * allowance is `delete`d. + */ + google.protobuf.BoolValue approved_for_all = 5; + + /** + * A spender-owner account identifier.
    + * This account identifier identifies a `spender` for whom an existing + * `approved_for_all` allowance was previously created. This enables + * an account with such broad access to grant allowances to transfer + * individual tokens from the original owner without involving that + * original owner. + *

    + * If this is set, the account identified MUST sign this transaction, but + * the `owner` account MAY NOT sign this transaction.
    + * If this is set, there MUST exist an active `approved_for_all` + * allowance from the `owner` for the `delegating_spender` to transfer + * all tokens of the type identified by the `tokenId` field.
    + * If this value is set, the `approved_for_all` flag MUST be `false`. + */ + AccountID delegating_spender = 6; +} + +/** + * An approved allowance of fungible/common token transfers. + * This message specifies one allowance for a single, unique, combination + * of token, owner, spender, and amount. + * + * If `owner` is not set, the effective `owner` SHALL be the `payer` for the + * enclosing transaction.
    + * The `tokenId` MUST be specified and MUST be a valid + * fungible/common token type.
    + * The `spender` MUST be specified and MUST be a valid account.
    + * The `amount` MUST be a whole number, and SHOULD be greater than `0` unless + * this allowance is intended to _remove_ a previously approved allowance. + */ +message TokenAllowance { + /** + * A token identifier.
    + * This identifies the type of token the `spender` is permitted to + * transfer from the `owner`. + *

    + * The identified token type MUST be a fungible/common token. + */ + TokenID tokenId = 1; + + /** + * An owner account identifier.
    + * This is the account identifier of the account granting an allowance + * for the `spender` to transfer tokens held by this account. + */ + AccountID owner = 2; + + /** + * A spender account identifier.
    + * This is the account identifier of the account permitted to transfer + * tokens held by the `owner`. + */ + AccountID spender = 3; + + /** + * An amount of fractional tokens (10-decimals tokens).
    + * This is the amount of tokens held by the `owner` that the + * `spender` is permitted to transfer. + *

    + * This value MUST be a whole number.
    + * This value MUST be greater than 0 to create a new allowance.
    + * This value MAY be exactly `0` to _remove_ an existing allowance.
    + */ + int64 amount = 4; +} diff --git a/proto_src/services/crypto_create.proto b/proto_src/services/crypto_create.proto new file mode 100644 index 000000000..a4f6b8b84 --- /dev/null +++ b/proto_src/services/crypto_create.proto @@ -0,0 +1,216 @@ +/** + * # Crypto Create + * Messages to create a new end-user account within the distributed ledger. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; +import "duration.proto"; + +/* + * Create a new account. + * + * If the auto_renew_account field is set, the key of the referenced account + * MUST sign this transaction.
    + * Current limitations REQUIRE that `shardID` and `realmID` both MUST be `0`. + * This is expected to change in the future. + * + * ### Block Stream Effects + * The newly created account SHALL be included in State Changes. + */ +message CryptoCreateTransactionBody { + // Removed prior to oldest available history + reserved 4,5; + + /** + * The identifying key for this account. + * This key represents the account owner, and is required for most actions + * involving this account that do not modify the account itself. This key + * may also identify the account for smart contracts. + *

    + * This field is REQUIRED. + * This `Key` MUST NOT be an empty `KeyList` and MUST contain at least one + * "primitive" (i.e. cryptographic) key value. + */ + Key key = 1; + + /** + * An amount, in tinybar, to deposit to the newly created account. + *

    + * The deposited amount SHALL be debited to the "payer" account for this + * transaction. + */ + uint64 initialBalance = 2; + + /** + * Use `staked_id` instead.
    + * An account identifier for a staking proxy. + */ + AccountID proxyAccountID = 3 [deprecated = true]; + + /** + * Removed prior to the first available history, and may be related to an + * early design dead-end.
    + * An amount below which record stream records would not be created for + * a transaction that reduces this account balance. + */ + uint64 sendRecordThreshold = 6 [deprecated = true]; + + /** + * Removed prior to the first available history, and may be related to an + * early design dead-end.
    + * An amount below which record stream records would not be created for + * a transaction that increases this account balance. + */ + uint64 receiveRecordThreshold = 7 [deprecated = true]; + + /** + * A flag indicating the account holder must authorize all incoming + * token transfers. + *

    + * If this flag is set then any transaction that would result in adding + * hbar or other tokens to this account balance MUST be signed by the + * identifying key of this account (that is, the `key` field).
    + * If this flag is set, then the account key (`key` field) MUST sign + * this create transaction, in addition to the transaction payer. + */ + bool receiverSigRequired = 8; + + /** + * The duration between account automatic renewals.
    + * All entities in state may be charged "rent" occasionally (typically + * every 90 days) to prevent unnecessary growth of the ledger. This value + * sets the interval between such events for this account. + *

    + * If the account balance (in HBAR) is insufficient to pay the full renewal + * fee, the entire HBAR balance SHALL be consumed and the expiration for + * the account SHALL be extended as far as the available balance can + * support.
    + * If the account HBAR balance is `0` when the account must be renewed, then + * the account SHALL be deleted, and subsequently removed from state. + */ + Duration autoRenewPeriod = 9; + + /** + * The shard in which this account is created + *

    + * Currently, this MUST be `0`.
    + * If the desired shard is `0`, this SHOULD NOT be set. + */ + ShardID shardID = 10; + + /** + * The realm in which this account is created. + *

    + * The shard number for this realm MUST match the value in `shardID`.
    + * Currently, this MUST be `0` for both fields.
    + * If the desired realm is `0`, this SHOULD NOT be set. + */ + RealmID realmID = 11; + + /** + * This field was never actually used or enabled, and is not expected to + * ever be used in the future.
    + */ + Key newRealmAdminKey = 12 [deprecated = true]; + + /** + * A short description of this Account. + *

    + * This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes` + * (default 100) bytes when encoded as UTF-8. + */ + string memo = 13; + + /** + * A maximum number of tokens that can be auto-associated + * with this account.
    + * By default this value is 0 for all accounts except for automatically + * created accounts (e.g. smart contracts), which default to -1. + *

    + * If this value is `0`, then this account MUST manually associate to + * a token before holding or transacting in that token.
    + * This value MAY also be `-1` to indicate no limit.
    + * This value MUST NOT be less than `-1`. + */ + int32 max_automatic_token_associations = 14; + + oneof staked_id { + /** + * ID of the account to which this account is staking its balances. + *

    + * If this account is not currently staking its balances, then this + * field, if set, MUST be the sentinel value of `0.0.0`. + */ + AccountID staked_account_id = 15; + + /** + * ID of the node this account is staked to. + *

    + * If this account is not currently staking its balances, then this + * field, if set, SHALL be the sentinel value of `-1`.
    + * Wallet software SHOULD surface staking issues to users and provide a + * simple mechanism to update staking to a new node ID in the event the + * prior staked node ID ceases to be valid. + */ + int64 staked_node_id = 16; + } + + /** + * A boolean indicating that this account has chosen to decline rewards for + * staking its balances. + *

    + * This account MAY still stake its balances, but SHALL NOT receive reward + * payments for doing so, if this value is set. + */ + bool decline_reward = 17; + + /** + * Bytes to be used as the account's alias. + *

    + * This value, if set, MUST be one of the following values
    + *

      + *
    • The 32-byte serialized form of the ED25519 account key.
    • + *
    • The 33-byte _compressed_ serialized form of the ECDSA(secp256k1) + * account key.
    • + *
    • The 20-byte EVM address derived from a keccak-256 hash of the + * ECDSA(secp256k1) account key
    • + *
    + * All aliases within the network MUST be unique. If this value matches an + * existing account alias, this `create` transaction SHALL fail.
    + * If an account exists with a particular alias value, any transaction to + * transfer value _to_ that alias SHALL deposit the transferred value in + * the existing account, and SHALL NOT assess an account creation fee.
    + * Once set, an account alias is immutable and MUST NOT be changed. + */ + bytes alias = 18; +} diff --git a/proto_src/services/crypto_delete.proto b/proto_src/services/crypto_delete.proto new file mode 100644 index 000000000..72d27364c --- /dev/null +++ b/proto_src/services/crypto_delete.proto @@ -0,0 +1,78 @@ +/** + * # Crypto Delete + * Message to delete an account. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; + +/** + * Delete an account.
    + * This will mark an account deleted, and transfer all tokens to a "sweep" + * account. + * + * A deleted account SHALL NOT hold a balance in any token type.
    + * A deleted account SHALL remain in state until it expires.
    + * Transfers that would increase the balance of a deleted account + * SHALL fail.
    + * A deleted account MAY be subject of a `cryptoUpdate` transaction to extend + * its expiration.
    + * When a deleted account expires it SHALL be removed entirely, and SHALL NOT + * be archived. + * + * ### Block Stream Effects + * None + */ +message CryptoDeleteTransactionBody { + /** + * An account identifier. + *

    + * The identified account SHALL receive all tokens, token balances, + * and non-fungible/unique from the deleted account.
    + * The identified account MUST sign this transaction.
    + * If not set, the account to be deleted MUST NOT have a balance in any + * token, a balance in HBAR, or hold any NFT. + */ + AccountID transferAccountID = 1; + + /** + * An account identifier. + *

    + * This account SHALL be deleted if this transaction succeeds.
    + * This account SHOULD NOT hold any balance other than HBAR.
    + * If this account _does_ hold balances, the `transferAccountID` value + * MUST be set to a valid transfer account.
    + * This account MUST sign this transaction.
    + * This field MUST be set to a valid account identifier. + */ + AccountID deleteAccountID = 2; +} diff --git a/proto_src/services/crypto_delete_allowance.proto b/proto_src/services/crypto_delete_allowance.proto new file mode 100644 index 000000000..22aff67cf --- /dev/null +++ b/proto_src/services/crypto_delete_allowance.proto @@ -0,0 +1,108 @@ +/** + * # Crypto Delete Allowance + * Delete one or more NFT allowances that permit transfer of tokens from + * an "owner" account by a different, "spender", account. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; + +/** + * Delete one or more allowances.
    + * Given one or more, previously approved, allowances for non-fungible/unique + * tokens to be transferred by a spending account from an owning account; + * this transaction removes a specified set of those allowances. + * + * The owner account for each listed allowance MUST sign this transaction.
    + * Allowances for HBAR cannot be removed with this transaction. The owner + * account MUST submit a new `cryptoApproveAllowance` transaction with the + * amount set to `0` to "remove" that allowance.
    + * Allowances for fungible/common tokens cannot be removed with this + * transaction. The owner account MUST submit a new `cryptoApproveAllowance` + * transaction with the amount set to `0` to "remove" that allowance.
    + * + * ### Block Stream Effects + * None + */ +message CryptoDeleteAllowanceTransactionBody { + /** + * List of non-fungible/unique token allowances to remove. + *

    + * This list MUST NOT be empty. + */ + repeated NftRemoveAllowance nftAllowances = 2; + + // Note: Field numbers 1 and 3 were very briefly used in early + // versions of this file, but were removed prior to any release + // version. Those field numbers MAY be reused. +} + +/** + * A single allowance for one non-fungible/unique token. + * This is specific to removal, and the allowance is identified for that + * specific purpose. + * + * All fields in this message are REQUIRED. + * The `serial_numbers` list MUST NOT be empty. + * The combination of field values in this message MUST match existing + * allowances for one or more individual non-fungible/unique tokens. + * + * ### Removing an allowance that is `approve_for_all` + * To remove an allowance that has set the `approve_for_all` flag, the + * `owner` account must first _approve_ a **new** allowance for a specific + * serial number using a `cryptoApproveAllowance`, and then, if desired, + * that newly approved allowance to a specific serial number may be + * deleted in a separate `cryptoDeleteAllowance` transaction. + */ +message NftRemoveAllowance { + /** + * A token identifier. + *

    + * This MUST be a valid token identifier for a non-fungible/unique + * token type. + */ + TokenID token_id = 1; + + /** + * An `owner` account identifier. + *

    + * This account MUST sign the transaction containing this message. + */ + AccountID owner = 2; + + /** + * The list of serial numbers to remove allowances from. + *

    + * This list MUST NOT be empty. + */ + repeated int64 serial_numbers = 3; +} diff --git a/proto_src/services/crypto_delete_live_hash.proto b/proto_src/services/crypto_delete_live_hash.proto new file mode 100644 index 000000000..8eed51ba2 --- /dev/null +++ b/proto_src/services/crypto_delete_live_hash.proto @@ -0,0 +1,62 @@ +/** + * # Delete Live Hash + * Dissociate a specific live hash from a specified account. + * + * > Important + * >> This transaction is obsolete and not supported.
    + * >> Any transaction of this type that is submitted SHALL fail with a `PRE_CHECK` result + * >> of `NOT_SUPPORTED`. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; + +/** + * Delete a specific live hash associated to a given account. + * + * This transaction MUST be signed by either the key of the associated account, + * or at least one of the keys listed in the live hash. + * + * ### Block Stream Effects + * None + */ +message CryptoDeleteLiveHashTransactionBody { + /** + * An account associated to a live hash. + */ + AccountID accountOfLiveHash = 1; + + /** + * The SHA-384 value of a specific live hash to delete. + */ + bytes liveHashToDelete = 2; +} diff --git a/proto_src/services/crypto_get_account_balance.proto b/proto_src/services/crypto_get_account_balance.proto new file mode 100644 index 000000000..8660c3ffe --- /dev/null +++ b/proto_src/services/crypto_get_account_balance.proto @@ -0,0 +1,121 @@ +/** + * # Crypto Get Account Balance + * Query request to obtain balance information for a single account. + * + * This query SHOULD NOT be used by client software, queries to a + * Mirror Node provide more information at much lower cost. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; +import "query_header.proto"; +import "response_header.proto"; + +/** + * Query to read the HBAR balance of an account or contract. + * + * This query SHALL return _only_ the HBAR balance for an account + * or smart contract. Early releases of the network would return all + * fungible/common token balances, but HIP-367 made it infeasible to + * return all such balances. This query SHALL NOT return any information + * beyond the current HBAR balance. + */ +message CryptoGetAccountBalanceQuery { + /** + * Standard information sent with every query operation.
    + * This includes the signed payment and what kind of response is requested + * (cost, state proof, both, or neither). + */ + QueryHeader header = 1; + + oneof balanceSource { + /** + * An account identifier.
    + * This identifies an account for which the balance is requested. + *

    + * Exactly one identifier MUST be provided. + */ + AccountID accountID = 2; + + /** + * A smart contract identifier.
    + * This identifies a smart contract for which the balance is requested. + *

    + * Exactly one identifier MUST be provided. + */ + ContractID contractID = 3; + } +} + +/** + * Response to a CryptoGetAccountBalanceQuery.
    + * + * This response SHALL contain only the information needed to + * identify the query request and the actual HBAR balance of the + * identified account or contract. + */ +message CryptoGetAccountBalanceResponse { + /** + * The standard response information for queries.
    + * This includes the values requested in the `QueryHeader` + * (cost, state proof, both, or neither). + */ + ResponseHeader header = 1; + + /** + * An account identifier.
    + * This is the account ID queried.
    + * The inclusion of the account queried is useful with state proofs, + * when needed to prove an account balance to a third party. + */ + AccountID accountID = 2; + + /** + * A current account balance.
    + * This is the current HBAR balance denominated in tinybar + * (10-8 HBAR). + */ + uint64 balance = 3; + + /** + * This field became infeasible to support after HIP-367 removed limits on + * the number of associated tokens.
    + * A list of token balances for all tokens associated to the account. + *

    + * This field was deprecated by + * HIP-367, which + * allowed an account to be associated to an unlimited number of tokens. + * This scale makes it more efficient for users to consult mirror nodes + * to review their token balances. + */ + repeated TokenBalance tokenBalances = 4 [deprecated = true]; +} diff --git a/proto_src/services/crypto_get_account_records.proto b/proto_src/services/crypto_get_account_records.proto new file mode 100644 index 000000000..76abf0575 --- /dev/null +++ b/proto_src/services/crypto_get_account_records.proto @@ -0,0 +1,96 @@ +/** + * # Crypto Get Account Records + * Messages for a query to retrieve recent transaction records involving a + * specified account as effective `payer`.
    + * A "recent" transaction is typically one that reached consensus within + * the previous three(`3`) minutes of _consensus_ time. Additionally, the + * network only stores records in state when + * `ledger.keepRecordsInState=true` was true during transaction handling. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; +import "transaction_record.proto"; +import "query_header.proto"; +import "response_header.proto"; + +/** + * Request records of all "recent" transactions for which the specified + * account is the effective payer. + */ +message CryptoGetAccountRecordsQuery { + /** + * Standard information sent with every query operation.
    + * This includes the signed payment and what kind of response is requested + * (cost, state proof, both, or neither). + */ + QueryHeader header = 1; + + /** + * An account identifier.
    + * This identifies the account to use when filtering the + * transaction record lists. + *

    + * This field is REQUIRED. + */ + AccountID accountID = 2; +} + +/** + * Return records of all "recent" transactions for which the specified + * account is the effective payer. + */ +message CryptoGetAccountRecordsResponse { + /** + * The standard response information for queries.
    + * This includes the values requested in the `QueryHeader` + * (cost, state proof, both, or neither). + */ + ResponseHeader header = 1; + + /** + * An account identifier.
    + * This identifies the account used when filtering the + * transaction record lists. + *

    + * This field SHALL match the requested account identifier. + */ + AccountID accountID = 2; + + /** + * A list of records. + *

    + * This list SHALL contain all available and "recent" records in which + * the account identified in the `accountID` field acted as effective payer. + */ + repeated TransactionRecord records = 3; +} diff --git a/proto_src/services/crypto_get_info.proto b/proto_src/services/crypto_get_info.proto new file mode 100644 index 000000000..27655c8df --- /dev/null +++ b/proto_src/services/crypto_get_info.proto @@ -0,0 +1,295 @@ +/** + * # Get Account Information + * A standard query to inspect the full detail of an account. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "timestamp.proto"; +import "duration.proto"; +import "basic_types.proto"; +import "query_header.proto"; +import "response_header.proto"; +import "crypto_add_live_hash.proto"; + +/** + * A query to read information for an account. + * + * The returned information SHALL include balance.
    + * The returned information SHALL NOT include allowances.
    + * The returned information SHALL NOT include token relationships.
    + * The returned information SHALL NOT include account records. + */ +message CryptoGetInfoQuery { + /** + * Standard information sent with every query operation.
    + * This includes the signed payment and what kind of response is requested + * (cost, state proof, both, or neither). + */ + QueryHeader header = 1; + + /** + * The account ID for which information is requested + */ + AccountID accountID = 2; +} + +/** + * Response when the client sends the node CryptoGetInfoQuery + */ +message CryptoGetInfoResponse { + /** + * The standard response information for queries.
    + * This includes the values requested in the `QueryHeader` + * (cost, state proof, both, or neither). + */ + ResponseHeader header = 1; + + /** + * Information describing A single Account in the Hedera distributed ledger. + * + * #### Attributes + * Each Account may have a unique three-part identifier, a Key, and one or + * more token balances. Accounts also have an alias, which has multiple + * forms, and may be set automatically. Several additional items are + * associated with the Account to enable full functionality. + * + * #### Expiration + * Accounts, as most items in the network, have an expiration time, recorded + * as a `Timestamp`, and must be "renewed" for a small fee at expiration. + * This helps to reduce the amount of inactive accounts retained in state. + * Another account may be designated to pay any renewal fees and + * automatically renew the account for (by default) 30-90 days at a time as + * a means to optionally ensure important accounts remain active. + * + * ### Staking + * Accounts may participate in securing the network by "staking" the account + * balances to a particular network node, and receive a portion of network + * fees as a reward. An account may optionally decline these rewards but + * still stake its balances. + * + * #### Transfer Restrictions + * An account may optionally require that inbound transfer transactions be + * signed by that account as receiver (in addition to any other signatures + * required, including sender). + * + */ + message AccountInfo { + // Removed prior to oldest available history + reserved 5; + + /** + * a unique identifier for this account. + *

    + * An account identifier, when assigned to this field, SHALL be of + * the form `shard.realm.number`. + */ + AccountID accountID = 1; + + /** + * A Solidity ID. + *

    + * This SHALL be populated if this account is a smart contract, and + * SHALL NOT be populated otherwise.
    + * This SHALL be formatted as a string according to Solidity ID + * standards. + */ + string contractAccountID = 2; + + /** + * A boolean indicating that this account is deleted. + *

    + * Any transaction involving a deleted account SHALL fail. + */ + bool deleted = 3; + + /** + * Replaced by StakingInfo.
    + * ID of the account to which this account is staking its balances. If + * this account is not currently staking its balances, then this field, + * if set, SHALL be the sentinel value of `0.0.0`. + */ + AccountID proxyAccountID = 4 [deprecated = true]; + + /** + * Replaced by StakingInfo.
    + * The total amount of tinybar proxy staked to this account. + */ + int64 proxyReceived = 6 [deprecated = true]; + + /** + * The key to be used to sign transactions from this account, if any. + *

    + * This key SHALL NOT be set for hollow accounts until the account + * is finalized.
    + * This key SHALL be set on all other accounts, except for certain + * immutable accounts (0.0.800 and 0.0.801) necessary for network + * function and otherwise secured by the governing council. + */ + Key key = 7; + + /** + * The HBAR balance of this account, in tinybar (10-8 HBAR). + *

    + * This value SHALL always be a whole number. + */ + uint64 balance = 8; + + /** + * Obsolete and unused.
    + * The threshold amount, in tinybars, at which a record was created for + * any transaction that decreased the balance of this account. + */ + uint64 generateSendRecordThreshold = 9 [deprecated = true]; + + /** + * Obsolete and unused.
    + * The threshold amount, in tinybars, at which a record was created for + * any transaction that increased the balance of this account. + */ + uint64 generateReceiveRecordThreshold = 10 [deprecated = true]; + + /** + * A boolean indicating that the account requires a receiver signature + * for inbound token transfer transactions. + *

    + * If this value is `true` then a transaction to transfer tokens to this + * account SHALL NOT succeed unless this account has signed the + * transfer transaction. + */ + bool receiverSigRequired = 11; + + /** + * The current expiration time for this account. + *

    + * This account SHALL be due standard renewal fees when the network + * consensus time exceeds this time.
    + * If rent and expiration are enabled for the network, and automatic + * renewal is enabled for this account, renewal fees SHALL be charged + * after this time, and, if charged, the expiration time SHALL be + * extended for another renewal period.
    + * This account MAY be expired and removed from state at any point + * after this time if not renewed.
    + * An account holder MAY extend this time by submitting an account + * update transaction to modify expiration time, subject to the current + * maximum expiration time for the network. + */ + Timestamp expirationTime = 12; + + /** + * A duration to extend this account's expiration. + *

    + * The network SHALL extend the account's expiration by this + * duration, if funds are available, upon automatic renewal.
    + * This SHALL NOT apply if the account is already deleted + * upon expiration.
    + * If this is not provided in an allowed range on account creation, the + * transaction SHALL fail with INVALID_AUTO_RENEWAL_PERIOD. The default + * values for the minimum period and maximum period are currently + * 30 days and 90 days, respectively. + */ + Duration autoRenewPeriod = 13; + + /** + * 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 LiveHash liveHashes = 14; + + /** + * As of `HIP-367`, which enabled unlimited token associations, the + * potential scale for this value requires that users consult a mirror + * node for this information. + */ + repeated TokenRelationship tokenRelationships = 15 [deprecated = true]; + + /** + * A short description of this account. + *

    + * This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes` + * (default 100) bytes when encoded as UTF-8. + */ + string memo = 16; + + /** + * The total number of non-fungible/unique tokens owned by this account. + */ + int64 ownedNfts = 17; + + /** + * The maximum number of tokens that can be auto-associated with the + * account. + *

    + * If this is less than or equal to `used_auto_associations` (or 0), + * then this account MUST manually associate with a token before + * transacting in that token.
    + * Following HIP-904 This value may also be `-1` to indicate no + * limit.
    + * This value MUST NOT be less than `-1`. + */ + int32 max_automatic_token_associations = 18; + + /** + * An account alias.
    + * This is a value used in some contexts to reference an account when + * the tripartite account identifier is not available. + *

    + * This field, when set to a non-default value, is immutable and + * SHALL NOT be changed. + */ + bytes alias = 19; + + /** + * The ledger ID of the network that generated this response. + *

    + * This value SHALL identify the distributed ledger that responded to + * this query. + */ + bytes ledger_id = 20; + + /** + * The ethereum transaction nonce associated with this account. + */ + int64 ethereum_nonce = 21; + + /** + * Staking information for this account. + */ + StakingInfo staking_info = 22; + } + + /** + * Details of the account. + *

    + * A state proof MAY be generated for this field. + */ + AccountInfo accountInfo = 2; +} diff --git a/proto_src/services/crypto_get_live_hash.proto b/proto_src/services/crypto_get_live_hash.proto new file mode 100644 index 000000000..bee0bdb11 --- /dev/null +++ b/proto_src/services/crypto_get_live_hash.proto @@ -0,0 +1,90 @@ +/** + * # Get Live Hash + * Standard query to inspect associations between content and accounts + * via SHA-384 hashes. + * + * > Important + * >> This query is obsolete and not supported.
    + * >> Any query of this type that is submitted SHALL fail with a `PRE_CHECK` + * >> result of `NOT_SUPPORTED`. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; +import "query_header.proto"; +import "response_header.proto"; +import "crypto_add_live_hash.proto"; + +/** + * Request detail for a specific live hash associated to a specific account. + */ +message CryptoGetLiveHashQuery { + /** + * Standard information sent with every query operation.
    + * This includes the signed payment and what kind of response is requested + * (cost, state proof, both, or neither). + */ + QueryHeader header = 1; + + /** + * An account ID.
    + * The network SHALL return live hash information for this account, + * if successful. + */ + AccountID accountID = 2; + + /** + * The specific SHA-384 live hash to inspect + */ + bytes hash = 3; +} + +/** + * Return the full live hash associated to an account, if it is present. + * + * > Note that to generate a state proof of the _absence_ of a live hash from + * > an account a transaction MUST retrieve a state proof of the `Account` + * > with its list of live hashes. + */ +message CryptoGetLiveHashResponse { + /** + * The standard response information for queries.
    + * This includes the values requested in the `QueryHeader` + * (cost, state proof, both, or neither). + */ + ResponseHeader header = 1; + + /** + * The requested live hash, if found. + */ + LiveHash liveHash = 2; +} diff --git a/proto_src/services/crypto_get_stakers.proto b/proto_src/services/crypto_get_stakers.proto new file mode 100644 index 000000000..3c8f12790 --- /dev/null +++ b/proto_src/services/crypto_get_stakers.proto @@ -0,0 +1,114 @@ +/** + * # Get Stakers + * Query all of the accounts proxy staking _to_ a specified account. + * + * > Important + * >> This query is obsolete and not supported.
    + * >> Any query of this type that is submitted SHALL fail with a `PRE_CHECK` + * >> result of `NOT_SUPPORTED`. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; +import "query_header.proto"; +import "response_header.proto"; + +/** + * Get all the accounts that are proxy staking to this account. For each of + * them, give the amount currently staked. This was never implemented. + */ +message CryptoGetStakersQuery { + option deprecated = true; + /** + * Standard information sent with every query operation.
    + * This includes the signed payment and what kind of response is requested + * (cost, state proof, both, or neither). + */ + QueryHeader header = 1; + + /** + * The Account ID for which the records should be retrieved + */ + AccountID accountID = 2; +} + +/** + * information about a single account that is proxy staking + */ +message ProxyStaker { + option deprecated = true; + /** + * The Account ID that is proxy staking + */ + AccountID accountID = 1; + + /** + * The number of hbars that are currently proxy staked + */ + int64 amount = 2; +} + +/** + * All of the accounts proxy staking to a given account, and the amounts proxy + * staked + */ +message AllProxyStakers { + option deprecated = true; + /** + * The Account ID that is being proxy staked to + */ + AccountID accountID = 1; + + /** + * Each of the proxy staking accounts, and the amount they are proxy staking + */ + repeated ProxyStaker proxyStaker = 2; +} + +/** + * Response when the client sends the node CryptoGetStakersQuery + */ +message CryptoGetStakersResponse { + option deprecated = true; + /** + * The standard response information for queries.
    + * This includes the values requested in the `QueryHeader` + * (cost, state proof, both, or neither). + */ + ResponseHeader header = 1; + + /** + * List of accounts proxy staking to this account, and the amount each is + * currently proxy staking + */ + AllProxyStakers stakers = 3; +} diff --git a/proto_src/services/crypto_service.proto b/proto_src/services/crypto_service.proto new file mode 100644 index 000000000..9b64286e0 --- /dev/null +++ b/proto_src/services/crypto_service.proto @@ -0,0 +1,139 @@ +/** + * # Crypto Service + * A service defining transactions and queries related to accounts. + * + * This includes transactions for HBAR transfers and balance queries as well as + * transactions to manage "allowances" which permit a third party to spend a + * portion of the HBAR balance in an account.
    + * Basic account, record, and receipt queries are also defined in this service. + * + * Transactions and queries relating to tokens _other than HBAR_ are defined + * in the Token Service. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package + +import "query.proto"; +import "response.proto"; +import "transaction_response.proto"; +import "transaction.proto"; + +/** + * Transactions and queries for the Hedera Crypto Service. + */ +service CryptoService { + // The following queries are permanently removed. + // getStakersByAccountID, getFastTransactionRecord + + /** + * Create a new account by submitting the transaction + */ + rpc createAccount (Transaction) returns (TransactionResponse); + + /** + * Update an account by submitting the transaction + */ + rpc updateAccount (Transaction) returns (TransactionResponse); + + /** + * Initiate a transfer by submitting the transaction + */ + rpc cryptoTransfer (Transaction) returns (TransactionResponse); + + /** + * Delete an account by submitting the transaction + */ + rpc cryptoDelete (Transaction) returns (TransactionResponse); + + /** + * Add one or more approved allowances for spenders to transfer the paying + * account's hbar or tokens. + */ + rpc approveAllowances (Transaction) returns (TransactionResponse); + + /** + * Delete one or more of the specific approved NFT serial numbers on an + * owner account. + */ + rpc deleteAllowances (Transaction) returns (TransactionResponse); + + /** + * Add a livehash + *

    Important
    + * This transaction is obsolete, not supported, and SHALL fail with a + * pre-check result of `NOT_SUPPORTED`.
    + */ + rpc addLiveHash (Transaction) returns (TransactionResponse) {option deprecated = true;}; + + /** + * Delete a livehash + *
    Important
    + * This transaction is obsolete, not supported, and SHALL fail with a + * pre-check result of `NOT_SUPPORTED`.
    + */ + rpc deleteLiveHash (Transaction) returns (TransactionResponse) {option deprecated = true;}; + + /** + * Retrieve a livehash for an account + *
    Important
    + * This query is obsolete, not supported, and SHALL fail with a pre-check + * result of `NOT_SUPPORTED`.
    + */ + rpc getLiveHash (Query) returns (Response) {option deprecated = true;}; + + /** + * Return 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); + + /** + * Retrieve the balance of an account + */ + rpc cryptoGetBalance (Query) returns (Response); + + /** + * Retrieve the metadata of an account + */ + rpc getAccountInfo (Query) returns (Response); + + /** + * Retrieve the latest receipt for a transaction that is either awaiting + * consensus, or reached consensus in the last 180 seconds + */ + rpc getTransactionReceipts (Query) returns (Response); + + /** + * Retrieve the record of a transaction that is either awaiting consensus, + * or reached consensus in the last 180 seconds + */ + rpc getTxRecordByTxID (Query) returns (Response); +} diff --git a/proto_src/services/crypto_transfer.proto b/proto_src/services/crypto_transfer.proto new file mode 100644 index 000000000..f7b04fa9a --- /dev/null +++ b/proto_src/services/crypto_transfer.proto @@ -0,0 +1,96 @@ +/** + * # Crypto Transfer + * Transaction to transfer HBAR between accounts, or between accounts and + * smart contracts. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; + +/** + * Transfer HBAR and/or other tokens among two or more accounts and/or smart + * contracts. + * + * Transfers of HBAR or fungible/common tokens in this transaction are + * structured as a "double-entry" transfer list which debits one or more + * accounts, and separately credits one or more accounts. Each such transfer + * list may specify up to 10 individual credits or debits.
    + * Transfers of non-fungible/unique tokens in this transaction are + * structured as a "single-entry" transfer list, which both debits one account + * and credits another account in a single entry. + * + * At least one transfer MUST be present, this MAY be an HBAR transfer in + * `transfers`, or MAY be a token transfer in `tokenTransfers`.
    + * Either `transfers` or `tokenTransfers` MAY be unset, provided the other + * is set and not empty.
    + * If any one account with a debit in any transfer list holds insufficient + * balance to complete the transfer, the entire transaction SHALL fail, and + * all transfers SHALL NOT be completed.
    + * If any one account that is _sending_ an individual non-fungible/unique (NFT) + * token does not currently hold that unique NFT, the entire transaction SHALL + * FAIL, and all transfers SHALL NOT be completed. + * The transaction fee SHALL be charged for a transaction that fails due to + * insufficient balance or not holding the NFT to be transferred.
    + * Each account with any debit amounts in any transfer list MUST sign this + * transaction.
    + * Each account with any credit amounts in any transfer list that also has the + * `receiverSigRequired` flag set MUST sign this transaction. + * + * ### Block Stream Effects + * All debits and credits completed by this transaction SHALL be included in + * the transaction result transfer list.
    + * Multiple fungible/common debits from one account, or credits to one account, + * MAY be consolidated to a single debit or credit entry in the + * transaction result.
    + * Multiple non-fungible/unique transfers SHALL NOT be consolidated in the + * transaction result. + */ +message CryptoTransferTransactionBody { + /** + * A list of HBAR transfers. + *

    + * Each transfer in this list MUST be denominated in tinybar. + */ + TransferList transfers = 1; + + /** + * One or more lists of token transfers. + *

    + * This list MUST NOT contain more than 10 entries.
    + * If custom fees must be charged, the fee SHALL be assessed against the + * effective "payer" for this transaction.
    + * If the effective "payer" for this transaction lacks sufficient balance + * to pay custom fees assessed, the entire transaction SHALL fail with a + * response code `INSUFFICIENT_PAYER_BALANCE_FOR_CUSTOM_FEE`. + */ + repeated TokenTransferList tokenTransfers = 2; +} diff --git a/proto_src/services/crypto_update.proto b/proto_src/services/crypto_update.proto new file mode 100644 index 000000000..002067594 --- /dev/null +++ b/proto_src/services/crypto_update.proto @@ -0,0 +1,234 @@ +/** + * # Crypto Update + * Modify a single account. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; +import "duration.proto"; +import "timestamp.proto"; +import "google/protobuf/wrappers.proto"; + +/** + * Modify the current state of an account. + * + * ### Requirements + * - The `key` for this account MUST sign all account update transactions. + * - If the `key` field is set for this transaction, then _both_ the current + * `key` and the new `key` MUST sign this transaction, for security and to + * prevent setting the `key` field to an invalid value. + * - If the `auto_renew_account` field is set for this transaction, the account + * identified in that field MUST sign this transaction. + * - Fields set to non-default values in this transaction SHALL be updated on + * success. Fields not set to non-default values SHALL NOT be + * updated on success. + * - All fields that may be modified in this transaction SHALL have a + * default value of unset (a.k.a. `null`). + * + * ### Block Stream Effects + * None + */ +message CryptoUpdateTransactionBody { + // NOTE: Seven deprecated fields should probably be removed and the + // field names reserved. + // reserved 4,5,6,7,10,11,12 + // Also, the `receiverSigRequiredField` oneOf should be removed + // around `receiverSigRequiredWrapper` and the field renamed + // (both actions are "safe" in protobuf) to `receiver_signature_required`. + + /** + * An account identifier.
    + * This identifies the account which is to be modified in this transaction. + *

    + * This field is REQUIRED. + */ + AccountID accountIDToUpdate = 2; + + /** + * An account key.
    + * This may be a "primitive" key (a singly cryptographic key), or a + * composite key. + *

    + * If set, this key MUST be a valid key.
    + * If set, the previous key and new key MUST both sign this transaction. + */ + Key key = 3; + + /** + * Removed in favor of the `staked_id` oneOf.
    + * An account identifier for a "proxy" account. This account's HBAR are + * staked to a node selected by the proxy account. + */ + AccountID proxyAccountID = 4 [deprecated = true]; + + /** + * Removed prior to the first available history.
    + * A fraction to split staking rewards between this account and the proxy + * account. + */ + int32 proxyFraction = 5 [deprecated = true]; + + // This entire oneOf is deprecated, and the concept is not implemented. + oneof sendRecordThresholdField { + /** + * Removed prior to the first available history, and may be related + * to an early design dead-end.
    + * The new threshold amount (in tinybars) for which an account record is + * created for any send/withdraw transaction + */ + uint64 sendRecordThreshold = 6 [deprecated = true]; + + /** + * Removed prior to the first available history, and may be related + * to an early design dead-end.
    + * 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]; + + } + + // This entire oneOf is deprecated, and the concept is not implemented. + oneof receiveRecordThresholdField { + /** + * Removed prior to the first available history, and may be related + * to an early design dead-end.
    + * The new threshold amount (in tinybars) for which an account record is + * created for any receive/deposit transaction. + */ + uint64 receiveRecordThreshold = 7 [deprecated = true]; + + /** + * Removed prior to the first available history, and may be related + * to an early design dead-end.
    + * 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]; + } + + /** + * A duration to extend account expiration.
    + * An amount of time, in seconds, to extend the expiration date for this + * account when _automatically_ renewed. + *

    + * This duration MUST be between the current configured minimum and maximum + * values defined for the network.
    + * This duration SHALL be applied only when _automatically_ extending the + * account expiration. + */ + Duration autoRenewPeriod = 8; + + /** + * A new account expiration time, in seconds since the epoch. + *

    + * For this purpose, `epoch` SHALL be the UNIX epoch with 0 + * at `1970-01-01T00:00:00.000Z`.
    + * If set, this value MUST be later than the current consensus time.
    + * If set, this value MUST be earlier than the current consensus time + * extended by the current maximum expiration time configured for the + * network. + */ + Timestamp expirationTime = 9; + + oneof receiverSigRequiredField { + /** + * Removed to distinguish between unset and a default value.
    + * 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. + */ + bool receiverSigRequired = 10 [deprecated = true]; + + /** + * A flag indicating the account holder must authorize all incoming + * token transfers. + *

    + * If this flag is set then any transaction that would result in adding + * hbar or other tokens to this account balance MUST be signed by the + * identifying key of this account (that is, the `key` field). + */ + google.protobuf.BoolValue receiverSigRequiredWrapper = 13; + } + + /** + * A short description of this Account. + *

    + * This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes` + * (default 100) bytes when encoded as UTF-8. + */ + google.protobuf.StringValue memo = 14; + + /** + * A maximum number of tokens that can be auto-associated + * with this account.
    + * By default this value is 0 for all accounts except for automatically + * created accounts (i.e smart contracts) which default to -1. + *

    + * If this value is `0`, then this account MUST manually associate to + * a token before holding or transacting in that token.
    + * This value MAY also be `-1` to indicate no limit.
    + * If set, this value MUST NOT be less than `-1`.
    + */ + google.protobuf.Int32Value max_automatic_token_associations = 15; + + oneof staked_id { + /** + * ID of the account to which this account is staking its balances. + *

    + * If this account is not currently staking its balances, then this + * field, if set, MUST be the sentinel value of `0.0.0`. + */ + AccountID staked_account_id = 16; + + /** + * ID of the node this account is staked to. + *

    + * If this account is not currently staking its balances, then this + * field, if set, SHALL be the sentinel value of `-1`.
    + * Wallet software SHOULD surface staking issues to users and provide a + * simple mechanism to update staking to a new node ID in the event the + * prior staked node ID ceases to be valid. + */ + int64 staked_node_id = 17; + } + + /** + * A boolean indicating that this account has chosen to decline rewards for + * staking its balances. + *

    + * This account MAY still stake its balances, but SHALL NOT receive reward + * payments for doing so, if this value is set, and `true`. + */ + google.protobuf.BoolValue decline_reward = 18; + +} diff --git a/proto_src/services/custom_fees.proto b/proto_src/services/custom_fees.proto new file mode 100644 index 000000000..8450edcd8 --- /dev/null +++ b/proto_src/services/custom_fees.proto @@ -0,0 +1,422 @@ +/** + * # Custom Fees + * Fees defined by token creators that are charged as part of each + * transfer of that token type. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; + +/** + * A descriptor for a fee based on a portion of the tokens transferred. + * + * This fee option describes fees as a fraction of the amount of + * fungible/common token(s) transferred. The fee also describes a minimum + * and maximum amount, both of which are OPTIONAL. + * + * This type of fee SHALL be assessed only for fungible/common tokens.
    + * This type of fee MUST NOT be defined for a non-fungible/unique + * token type.
    + * This fee SHALL be paid with the same type of tokens as those + * transferred.
    + * The fee MAY be subtracted from the transferred tokens, or MAY be assessed + * to the sender in addition to the tokens actually transferred, based on + * the `net_of_transfers` field. + * + * When a single transaction sends tokens from one sender to multiple + * recipients, and the `net_of_transfers` flag is false, the network + * SHALL attempt to evenly assess the total fee across all recipients + * proportionally. This may be inexact and, particularly when there are + * large differences between recipients, MAY result in small deviations + * from an ideal "fair" distribution.
    + * If the sender lacks sufficient tokens to pay fees, or the assessment + * of custom fees reduces the net amount transferred to or below zero, + * the transaction MAY fail due to insufficient funds to pay all fees. + */ +message FractionalFee { + /** + * A Fraction of the transferred tokens to assess as a fee.
    + * This value MUST be less than or equal to one.
    + * This value MUST be greater than zero. + */ + Fraction fractional_amount = 1; + + /** + * A minimum fee to charge, in units of 10-decimals tokens. + *

    + * This value is OPTIONAL, with a default of `0` indicating no minimum.
    + * If set, this value MUST be greater than zero.
    + * If set, all transfers SHALL pay at least this amount. + */ + int64 minimum_amount = 2; + + /** + * A maximum fee to charge, in units of 10-decimals tokens. + *

    + * This value is OPTIONAL, with a default of `0` indicating no maximum.
    + * If set, this value MUST be greater than zero.
    + * If set, any fee charged SHALL NOT exceed this value.
    + * This value SHOULD be strictly greater than `minimum_amount`. + * If this amount is less than or equal to `minimum_amount`, then + * the fee charged SHALL always be equal to this value and + * `fractional_amount` SHALL NOT have any effect. + */ + int64 maximum_amount = 3; + + /** + * Flag requesting to assess the calculated fee against the sender, + * without reducing the amount transferred.
    + * #### Effects of this flag + *

      + *
    1. If this value is true + *
        + *
      • The receiver of a transfer SHALL receive the entire + * amount sent.
      • + *
      • The fee SHALL be charged to the sender as an additional + * amount, increasing the token transfer debit.
      • + *
      + *
    2. + *
    3. If this value is false + *
        + *
      • The receiver of a transfer SHALL receive the amount sent + * _after_ deduction of the calculated fee.
      • + *
      + *
    4. + *
    + */ + bool net_of_transfers = 4; +} + +/** + * A fixed fee to assess for each token transfer, regardless of the + * amount transferred.
    + * This fee type describes a fixed fee for each transfer of a token type. + * + * The fee SHALL be charged to the `sender` for the token transfer + * transaction.
    + * This fee MAY be assessed in HBAR, the token type transferred, or any + * other token type, as determined by the `denominating_token_id` field. + */ +message FixedFee { + /** + * The amount to assess for each transfer. + *

    + * This value MUST be greater than `0`.
    + * This amount is expressed in units of 10-decimals tokens. + */ + int64 amount = 1; + + /** + * The token type used to pay the assessed fee. + *

    + * If this is unset, the fee SHALL be assessed in HBAR.
    + * If this is set, the fee SHALL be assessed in the token identified. + * This MAY be any token type. Custom fees assessed in other token types + * are more likely to fail, however, and it is RECOMMENDED that token + * creators denominate custom fees in the transferred token, HBAR, or + * well documented and closely related token types.
    + * If this value is set to `0.0.0` in the `tokenCreate` transaction, it + * SHALL be replaced with the `TokenID` of the newly created token. + */ + TokenID denominating_token_id = 2; +} + +/** + * A fee to assess during a CryptoTransfer that changes ownership of a + * non-fungible/unique (NFT) token.
    + * This message defines the fraction of the fungible value exchanged for an + * NFT that the ledger should collect as a royalty. + * "Fungible value" includes both HBAR (ℏ) and units of fungible HTS tokens. + * When the NFT sender does not receive any fungible value, the ledger will + * assess the fallback fee, if present, to the new NFT owner. Royalty fees + * can only be added to non-fungible/unique tokens. + * + * #### Important Note + * > Users should be aware that native royalty fees are _strictly_ a + * > convenience feature, SHALL NOT be guaranteed, and the network SHALL NOT + * > enforce _inescapable_ royalties on the exchange of a unique NFT.
    + * > For _one_ example, if the counterparties agree to split their value + * > transfer and NFT exchange into separate transactions, the network cannot + * > possibly determine the value exchanged. Even trustless transactions, + * > using a smart contract or other form of escrow, can arrange such split + * > transactions as a single _logical_ transfer. + * + * Counterparties that wish to _respect_ creator royalties MUST follow the + * pattern the network recognizes. + *

    + * A single transaction MUST contain all three elements, transfer of the NFT, + * debit of fungible value from the receiver, and credit of fungible value to + * the sender, in order for the network to accurately assess royalty fees. + *
    + *
    + * Two examples are presented here. + *
    + * The NFT sender and receiver MUST both sign a single `cryptoTransfer` that + * transfers the NFT from sender to receiver, debits the fungible value from + * the receiver, and credits the sender with the fungible value the receiver + * is exchanging for the NFT.
    + * A marketplace using an approved spender account for an escrow transaction + * MUST credit the account selling the NFT in the same `cryptoTransfer` + * transaction that transfers the NFT to, and deducts fungible value from, + * the buying account. + *
    + * This type of fee MAY NOT produce accurate results if multiple transfers + * are executed in a single transaction. It is RECOMMENDED that each + * NFT subject to royalty fees be transferred separately and without + * unrelated fungible token transfers. + * + * The network SHALL NOT consider third-party transfers, including + * "approved spender" accounts, in collecting royalty fees. An honest + * broker MUST ensure that transfer of an NFT and payment delivered to + * the sender are present in the same transaction. + * There is an + * [open suggestion](https://github.com/hashgraph/hedera-improvement-proposal/discussions/578) + * that proposes to broaden the scope of transfers from which the network + * automatically collects royalties to cover related third parties. If this + * interests or concerns you, please add your voice to that discussion. + */ +message RoyaltyFee { + /** + * The fraction of fungible value exchanged for an NFT to collect + * as royalty. + *

    + * This SHALL be applied once to the total fungible value transferred + * for the transaction.
    + * There SHALL NOT be any adjustment based on multiple transfers + * involving the NFT sender as part of a single transaction. + */ + Fraction exchange_value_fraction = 1; + + /** + * A fixed fee to assess if no fungible value is known to be traded + * for the NFT. + *

    + * If an NFT is transferred without a corresponding transfer of + * _fungible_ value returned in the same transaction, the network + * SHALL charge this fee as a fallback.
    + * Fallback fees MAY have unexpected effects when interacting with + * escrow, market transfers, and smart contracts. + * It is RECOMMENDED that developers carefully consider possible + * effects from fallback fees when designing systems that facilitate + * the transfer of NFTs. + */ + FixedFee fallback_fee = 2; +} + +/** + * A transfer fee to assess during a CryptoTransfer.
    + * This fee applies to transactions that transfer units of the token to + * which the fee is attached. A custom fee may be either fixed or fractional, + * and must specify a fee collector account to receive the assessed fees. + * + * Custom fees MUST be greater than zero (0). + */ +message CustomFee { + oneof fee { + /** + * A fixed fee to be charged to the `sender` for every token transfer. + *

    + * This type of fee MAY be defined for any token type.
    + * This type of fee MAY be more consistent and reliable than + * other types. + */ + FixedFee fixed_fee = 1; + + /** + * A fee defined as a fraction of the tokens transferred. + *

    + * This type of fee MUST NOT be defined for a non-fungible/unique + * token type.
    + * This fee MAY be charged to either sender, as an increase to the + * amount sent, or receiver, as a reduction to the amount received. + */ + FractionalFee fractional_fee = 2; + + /** + * A fee charged as royalty for any transfer of a + * non-fungible/unique token. + *

    + * This type of fee MUST NOT be defined for a + * fungible/common token type. + */ + RoyaltyFee royalty_fee = 4; + + } + /** + * The account to receive the custom fee. + */ + AccountID fee_collector_account_id = 3; + + /** + * Flag indicating to exempt all custom fee collector accounts for this + * token type from paying this custom fee when sending tokens. + *

    + * The treasury account for a token, and the account identified by the + * `fee_collector_account_id` field of this `CustomFee` are always exempt + * from this custom fee to avoid redundant and unnecessary transfers. + * If this value is `true` then the account(s) identified in + * `fee_collector_account_id` for _all_ custom fee definitions for this + * token type SHALL also be exempt from this custom fee. + * This behavior is specified in HIP-573. + */ + bool all_collectors_are_exempt = 5; +} + +/** + * Description of a transfer added to a `cryptoTransfer` transaction that + * satisfies custom fee requirements. + * + * It is important to note that this is not the actual transfer. The transfer + * of value SHALL be merged into the original transaction to minimize the + * number of actual transfers. This descriptor presents the fee assessed + * separately in the record stream so that the details of the fee assessed + * are not hidden in this process. + */ +message AssessedCustomFee { + /** + * An amount of tokens assessed for this custom fee. + *

    + * This shall be expressed in units of 10-decimals tokens. + */ + int64 amount = 1; + + /** + * The token transferred to satisfy this fee. + *

    + * If the token transferred is HBAR, this field SHALL NOT be set. + */ + TokenID token_id = 2; + + /** + * An account that received the fee assessed. + *

    + * This SHALL NOT be the sender or receiver of the original + * cryptoTransfer transaction. + */ + AccountID fee_collector_account_id = 3; + + /** + * An account that provided the tokens assessed as a fee. + *

    + * This SHALL be the account that _would have_ had a higher balance + * absent the fee. In most cases this SHALL be the `sender`, but + * some _fractional_ fees reduce the amount transferred, and in those + * cases the `receiver` SHALL be the effective payer for the fee.
    + * There are currently no situations where a third party pays a custom + * fee. This MAY change in a future release. + */ + repeated AccountID effective_payer_account_id = 4; +} + +/** + * A custom fee definition for a consensus topic. + *

    + * This fee definition is specific to an Hedera Consensus Service (HCS) topic + * and SHOULD NOT be used in any other context.
    + * All fields for this message are REQUIRED.
    + * Only "fixed" fee definitions are supported because there is no basis for + * a fractional fee on a consensus submit transaction. + */ +message FixedCustomFee { + /** + * A fixed custom fee. + *

    + * The amount of HBAR or other token described by this `FixedFee` SHALL + * be charged to the transction payer for each message submitted to a + * topic that assigns this consensus custom fee. + */ + FixedFee fixed_fee = 1; + + /** + * A collection account identifier. + *

    + * All amounts collected for this consensus custom fee SHALL be transferred + * to the account identified by this field. + */ + AccountID fee_collector_account_id = 2; +} + +/** + * A wrapper around a consensus custom fee list.
    + * This wrapper exists to enable an update transaction to differentiate between + * a field that is not set and an empty list of custom fees. + *

    + * An _unset_ field of this type SHALL NOT modify existing values.
    + * A _set_ field of this type with an empty `fees` list SHALL remove any + * existing values. + */ +message FixedCustomFeeList { + /** + * A set of custom fee definitions.
    + * These are fees to be assessed for each submit to a topic. + */ + repeated FixedCustomFee fees = 1; +} + +/** + * A wrapper for fee exempt key list.
    + * This wrapper exists to enable an update transaction to differentiate between + * a field that is not set and an empty list of keys. + *

    + * An _unset_ field of this type SHALL NOT modify existing values.
    + * A _set_ field of this type with an empty `keys` list SHALL remove any + * existing values. + */ +message FeeExemptKeyList { + /** + * A set of keys.
    + * The keys in this list are permitted to submit messages to the + * topic without paying the topic's custom fees. + *

    + * If a submit transaction is signed by _any_ key included in this set, + * custom fees SHALL NOT be charged for that transaction. + */ + repeated Key keys = 1; +} + +/** + * A maximum custom fee that the user is willing to pay. + *

    + * This message is used to specify the maximum custom fee that given user is + * willing to pay. + */ +message CustomFeeLimit { + /** + * A payer account identifier. + */ + AccountID account_id = 1; + + /** + * The maximum fees that the user is willing to pay for the message. + */ + repeated FixedFee fees = 2; +} diff --git a/proto_src/services/duration.proto b/proto_src/services/duration.proto new file mode 100644 index 000000000..31dfe8619 --- /dev/null +++ b/proto_src/services/duration.proto @@ -0,0 +1,47 @@ +/** + * # Duration + * A duration, in seconds. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +/** + * A length of time in seconds. + * + * It is RECOMMENDED that this message be used whenever an amount of time, + * rather than a specific point in time, is needed. + */ +message Duration { + /** + * The number of seconds for this duration. + */ + int64 seconds = 1; +} diff --git a/proto_src/services/ethereum_transaction.proto b/proto_src/services/ethereum_transaction.proto new file mode 100644 index 000000000..64c52e636 --- /dev/null +++ b/proto_src/services/ethereum_transaction.proto @@ -0,0 +1,111 @@ +/** + * # Ethereum Call + * Make an Ethereum transaction "call" with all data in Ethereum formats, + * including the contract alias. Call data may be in the transaction, + * or stored within an Hedera File.
    + * The caller MAY offer additional gas above what is offered in the call + * data, but MAY be charged up to 80% of that value if the amount required + * is less than this "floor" amount. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; + +/** + * A transaction in Ethereum format.
    + * Make an Ethereum transaction "call" with all data in Ethereum formats, + * including the contract alias. Call data may be in the transaction, or + * stored within an Hedera File. + * + * The caller MAY offer additional gas above what is offered in the call data, + * but MAY be charged up to 80% of that value if the amount required is less + * than this "floor" amount. + * + * ### Block Stream Effects + * An `EthereumOutput` message SHALL be emitted for each transaction. + */ +message EthereumTransactionBody { + + /** + * The raw Ethereum transaction data. + *

    + * This transaction MUST be RLP encoded.
    + * This SHALL be the complete transaction data unless the `call_data` + * field is set.
    + * If `call_data` is set, this field SHALL be modified to replace the + * `callData` element with the content of the referenced file.
    + * The transaction signature SHALL be validated after `callData` is + * complete, if necessary. + */ + bytes ethereum_data = 1; + + /** + * The `callData` for the Ethereum transaction. + *

    + * If this field is set, the data in the `ethereum_data` field SHALL be + * re-written to replace the `callData` element with the contents of this + * file at time of execution.
    + * The Ethereum transaction MUST be "rehydrated" with this modified + * `callData` before signature validation MAY be performed. + */ + FileID call_data = 2; + + /** + * A maximum amount of "gas" offered to pay the Ethereum transaction costs. + *

    + * This gas offered is in addition to any gas supplied with the Ethereum + * transaction as declared in the `ethereum_data`.
    + * In most circumstances the account with an alias matching the public + * key available from the Ethereum transaction signature offers sufficient + * gas to power the transaction, but in some cases it MAY be desirable + * for the account submitting this transaction to either supplement + * or entirely fund the transaction cost.
    + * The amount of gas offered here SHALL be used to pay for + * transaction costs _in excess_ of any gas offered within + * the Ethereum transaction.
    + * If the gas offered within the Ethereum transaction is sufficient + * for all costs, the gas offered in this field SHALL NOT be expended.
    + * Regardless of actual transaction cost, the payer for this transaction + * SHALL NOT be charged more gas than the amount offered here.
    + * If the sum of both gas amounts is not sufficient to pay for the + * transaction, the entire total amount of gas offered SHALL be expended, + * the transaction SHALL fail, and the response code `INSUFFICIENT_GAS` + * SHALL be set.
    + * If any amount of gas is charged to the payer of this transaction, + * at least 80% of the value offered in this field SHALL be charged + * as a minimum fee.
    + * If the amount of gas authorized in the Ethereum transaction data is `0`, + * then the payer of this transaction SHALL be charged the entire cost of + * the Ethereum transaction, subject to the limit set in this field. + */ + int64 max_gas_allowance = 3; +} diff --git a/proto_src/services/exchange_rate.proto b/proto_src/services/exchange_rate.proto new file mode 100644 index 000000000..ac12e02b2 --- /dev/null +++ b/proto_src/services/exchange_rate.proto @@ -0,0 +1,104 @@ +/** + * # Exchange Rates + * Exchange rates that define ratios between HBAR and USD. + * + * Fees are denominated in USD, but paid in HBAR, so accurate exchange + * rates are important and the exchange rates kept in state are updated + * frequently.
    + * Exchange rates are also reported in every receipt for fee transparency. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "timestamp.proto"; + +/** + * An exchange rate as a ratio of USD cents per HBAR. + * + * This ratio SHALL be used to convert tinycent (`10-8` USD cent) + * to tinybar for fees and other purposes.
    + * When applying an `ExchangeRate`, implementations SHOULD ensure input values + * are `tinycent` and/or `tinybar` before applying the exchange ratio.
    + * Exchange results MAY be converted to USD or HBAR via division if whole + * unit values are required. + * + * The ratio described here SHALL be assigned such that a value in `tinybar` + * may be obtained with the following equation. + * ``` + * amountInTinybar = (amountInTinycent * hbarEquiv) / centEquiv + * ``` + */ +message ExchangeRate { + /** + * Denominator for a ratio of USD cents per HBAR. + */ + int32 hbarEquiv = 1; + + /** + * Numerator for a ratio of USD cents per HBAR. + */ + int32 centEquiv = 2; + + /** + * Expiration time stamp for this exchange rate. + */ + TimestampSeconds expirationTime = 3; +} + +/** + * A set of two exchange rates.
    + * The exchange rate for the network is stored and reported as a set of + * two rates; current and next. This structure supports the network cleanly + * switching between exchange rates when necessary. This also provides clear + * notice to clients when the exchange rate will change and the exchange + * rate that will be applied for the next time period. + * + * The difference in rate between `currentRate` and `nextRate` MUST NOT exceed + * the configured maximum percentage change. This limit SHALL be a + * network configuration value. + */ +message ExchangeRateSet { + /** + * A current exchange rate. + *

    + * When present in a receipt, this SHALL be the exchange rate used to + * compute the fees for that transaction. + */ + ExchangeRate currentRate = 1; + + /** + * A future exchange rate. + *

    + * This exchange rate SHALL be applied after the current exchange + * rate expires. + */ + ExchangeRate nextRate = 2; +} diff --git a/proto_src/services/file_append.proto b/proto_src/services/file_append.proto new file mode 100644 index 000000000..b96ce48ae --- /dev/null +++ b/proto_src/services/file_append.proto @@ -0,0 +1,86 @@ +/** + * # File Append + * A transaction body message to append data to a "file" in state. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; + +/** + * A transaction body for an `appendContent` transaction.
    + * This transaction body provides a mechanism to append content to a "file" in + * network state. Hedera transactions are limited in size, but there are many + * uses for in-state byte arrays (e.g. smart contract bytecode) which require + * more than may fit within a single transaction. The `appendFile` transaction + * exists to support these requirements. The typical pattern is to create a + * file, append more data until the full content is stored, verify the file is + * correct, then update the file entry with any final metadata changes (e.g. + * adding threshold keys and removing the initial upload key). + * + * Each append transaction MUST remain within the total transaction size limit + * for the network (typically 6144 bytes).
    + * The total size of a file MUST remain within the maximum file size limit for + * the network (typically 1048576 bytes). + * + * #### Signature Requirements + * Append transactions MUST have signatures from _all_ keys in the `KeyList` + * assigned to the `keys` field of the file.
    + * See the [File Service](#FileService) specification for a detailed + * explanation of the signature requirements for all file transactions. + * + * ### Block Stream Effects + * None + */ +message FileAppendTransactionBody { + /** + * A file identifier.
    + * This identifies the file to which the `contents` will be appended. + *

    + * This field is REQUIRED.
    + * The identified file MUST exist.
    + * The identified file MUST NOT be larger than the current maximum file + * size limit.
    + * The identified file MUST NOT be deleted.
    + * The identified file MUST NOT be immutable. + */ + FileID fileID = 2; + + /** + * An array of bytes to append.
    + *

    + * This content SHALL be appended to the identified file if this + * transaction succeeds.
    + * This field is REQUIRED.
    + * This field MUST NOT be empty. + */ + bytes contents = 4; +} diff --git a/proto_src/services/file_create.proto b/proto_src/services/file_create.proto new file mode 100644 index 000000000..9203fb7f1 --- /dev/null +++ b/proto_src/services/file_create.proto @@ -0,0 +1,139 @@ +/** + * # File Create + * Messages to create a new file entry. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; +import "timestamp.proto"; + +/** + * Create a new file. + * + * If successful, the new file SHALL contain the (possibly empty) content + * provided in the `contents` field.
    + * When the current consensus time exceeds the `expirationTime` value, the + * network SHALL expire the file, and MAY archive the state entry. + * + * #### Signature Requirements + * The HFS manages file authorization in a manner that can be confusing. + * The core element of file authorization is the `keys` field, + * which is a `KeyList`; a list of individual `Key` messages, each of which + * may represent a simple or complex key.
    + * The file service transactions treat this list differently.
    + * A `fileCreate`, `fileAppend`, or `fileUpdate` MUST have a valid signature + * from _each_ key in the list.
    + * A `fileDelete` MUST have a valid signature from _at least one_ key in + * the list. This is different, and allows a file "owned" by many entities + * to be deleted by any one of those entities. A deleted file cannot be + * restored, so it is important to consider this when assigning keys for + * a file.
    + * If any of the keys in a `KeyList` are complex, the full requirements of + * each complex key must be met to count as a "valid signature" for that key. + * A complex key structure (i.e. a `ThresholdKey`, or `KeyList`, possibly + * including additional `ThresholdKey` or `KeyList` descendants) may be + * assigned as the sole entry in a file `keys` field to ensure all transactions + * have the same signature requirements. + * + * If the `keys` field is an empty `KeyList`, then the file SHALL be immutable + * and the only transaction permitted to modify that file SHALL be a + * `fileUpdate` transaction with _only_ the `expirationTime` set. + * + * #### Shard and Realm + * The current API ignores shardID and realmID. All files are created in + * shard 0 and realm 0. Future versions of the API may support multiple + * realms and multiple shards. + * + * ### Block Stream Effects + * After the file is created, the FileID for it SHALL be returned in the + * transaction receipt, and SHALL be recorded in the transaction record. + */ +message FileCreateTransactionBody { + /** + * An expiration timestamp. + *

    + * When the network consensus time exceeds this value, the network + * SHALL expire the file. + */ + Timestamp expirationTime = 2; + + /** + * A list of keys that represent file "owners". + *

    + * Every `Key` in this list MUST sign this `fileCreate` transaction, as + * well as any `fileUpdate` or `fileAppend` that modifies this file.
    + * At least one `Key` in this list MUST sign any `fileDelete` transaction + * to delete this file.
    + * If this `KeyList` is empty, the file SHALL be created immutable and the + * only field that may be changed subsequently is the `expirationTime`. + * An immutable file cannot be deleted except with a `systemDelete` + * transaction, or by expiration. + */ + KeyList keys = 3; + + /** + * A byte array of file content. + *

    + * The file SHALL be created with initial content equal to this field. + */ + bytes contents = 4; + + /** + * A shard in which this file is created + */ + ShardID shardID = 5; + + /** + * A realm in which this file is created. + *

    + * The shard number for this realm MUST match the value in `shardID`.
    + * Currently, this MUST be `0` for both fields.
    + * If the desired realm is `0.0`, this SHOULD NOT be set. + */ + RealmID realmID = 6; + + /** + * The "create realm" was never enabled, and + * should not be possible on file creation.
    + * An admin key for a new realm, if one is created. + * Added deprecated tag 2024-05. + */ + Key newRealmAdminKey = 7 [deprecated = true]; + + /** + * A short description of this file. + *

    + * This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes` + * (default 100) bytes when encoded as UTF-8. + */ + string memo = 8; +} diff --git a/proto_src/services/file_delete.proto b/proto_src/services/file_delete.proto new file mode 100644 index 000000000..413c97770 --- /dev/null +++ b/proto_src/services/file_delete.proto @@ -0,0 +1,73 @@ +/** + * # File Delete + * A message for a transaction to delete a file. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; + +/** + * Mark a file as deleted and remove its content from network state. + * + * The metadata for a deleted file SHALL be retained at least until the + * expiration time for the file is exceeded.
    + * On completion, the identified file SHALL be marked `deleted`.
    + * On completion, the identified file SHALL have an empty `contents` array.
    + * This transaction SHALL be final and irreversible.
    + * + * #### Signature Requirements + * At least _one_ key from the `KeyList` in the `keys` field of the + * identified file MUST sign this transaction.
    + * If the keys field for the identified file is an empty `KeyList` (because that + * file was previously created or updated to have an empty `KeyList`), then the + * file is considered immutable and this message SHALL fail as UNAUTHORIZED. + * See the [File Service](#FileService) specification for a detailed + * explanation of the signature requirements for all file transactions. + * + * ### What is a "system" file + * A "system" file is any file with a file number less than or equal to the + * current configuration value for `ledger.numReservedSystemEntities`, + * typically `750`. + * + * ### Block Stream Effects + * None + */ +message FileDeleteTransactionBody { + /** + * A file identifier.
    + * This identifies the file to delete. + *

    + * The identified file MUST NOT be a "system" file.
    + * This field is REQUIRED. + */ + FileID fileID = 2; +} diff --git a/proto_src/services/file_get_contents.proto b/proto_src/services/file_get_contents.proto new file mode 100644 index 000000000..b4f6ed8b8 --- /dev/null +++ b/proto_src/services/file_get_contents.proto @@ -0,0 +1,106 @@ +/** + * # File Get Contents + * Messages for a query to retrieve the content of a file in the + * Hedera File Service (HFS). + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; +import "query_header.proto"; +import "response_header.proto"; + +/** + * A query request to the Hedera File Service (HFS) for file content.
    + * This query requests the content of a file, but none of the information + * _about_ a file. A client should submit a `fileGetInfo` query to view + * information about a file.
    + * File content may also be available from a block node or mirror node, + * generally at lower cost. + */ +message FileGetContentsQuery { + /** + * Standard information sent with every query operation.
    + * This includes the signed payment and what kind of response is requested + * (cost, state proof, both, or neither). + */ + QueryHeader header = 1; + + /** + * A file identifier. + *

    + * This MUST be the identifier of a file that exists in HFS.
    + * This value SHALL identify the file to be queried. + */ + FileID fileID = 2; +} + +/** + * A response to a query for the content of a file in the + * Hedera File Service (HFS). + * + * This message SHALL contain the full content of the requested file, but + * SHALL NOT contain any metadata. + */ +message FileGetContentsResponse { + /** + * The standard response information for queries.
    + * This includes the values requested in the `QueryHeader` + * (cost, state proof, both, or neither). + */ + ResponseHeader header = 1; + + message FileContents { + /** + * A file identifier. + *

    + * This SHALL be the identifier of a file that exists in HFS.
    + * This value SHALL identify the file that was queried. + */ + FileID fileID = 1; + + /** + * A byte array of file content. + *

    + * This SHALL contain the full content of the requested file.
    + * This SHALL be empty if, and only if, the file content is empty. + */ + bytes contents = 2; + } + + /** + * A combination of File identifier and content bytes. + *

    + * This SHALL NOT be set if the file does not exist.
    + * The network MAY generate a state proof for this field. + */ + FileContents fileContents = 2; +} diff --git a/proto_src/services/file_get_info.proto b/proto_src/services/file_get_info.proto new file mode 100644 index 000000000..53bb422e8 --- /dev/null +++ b/proto_src/services/file_get_info.proto @@ -0,0 +1,150 @@ +/** + * # File Get Information + * Messages for a query to retrieve the metadata for a file in the + * Hedera File Service (HFS). + * + * The query defined here does not include the content of the file. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "timestamp.proto"; +import "basic_types.proto"; +import "query_header.proto"; +import "response_header.proto"; + +/** + * Query to request file metadata from the Hedera File Service (HFS).
    + * This query requests all of the information _about_ a file, but none of the + * _content_ of a file. A client should submit a `fileGetContents` query to + * view the content of a file. File content _may_ also be available from a + * block node or mirror node, generally at lower cost. + * + * File metadata SHALL be available for active files and deleted files.
    + * The size of a deleted file SHALL be `0` and the content SHALL be empty. + */ +message FileGetInfoQuery { + /** + * Standard information sent with every query operation.
    + * This includes the signed payment and what kind of response is requested + * (cost, state proof, both, or neither). + */ + QueryHeader header = 1; + + /** + * A file identifier. + *

    + * This MUST be the identifier of a file that exists in HFS.
    + * This value SHALL identify the file to be queried. + */ + FileID fileID = 2; +} + +/** + * A response to a query for the metadata of a file in the HFS. + */ +message FileGetInfoResponse { + /** + * The standard response information for queries.
    + * This includes the values requested in the `QueryHeader` + * (cost, state proof, both, or neither). + */ + ResponseHeader header = 1; + + message FileInfo { + /** + * A file identifier. + *

    + * This SHALL be the identifier of a file that exists in HFS.
    + * This value SHALL identify the file that was queried. + */ + FileID fileID = 1; + + /** + * A size, in bytes, for the file. + */ + int64 size = 2; + + /** + * An expiration timestamp. + *

    + * The file SHALL NOT expire before the network consensus time + * exceeds this value.
    + * The file SHALL expire after the network consensus time + * exceeds this value.
    + */ + Timestamp expirationTime = 3; + + /** + * A flag indicating this file is deleted. + *

    + * A deleted file SHALL have a size `0` and empty content. + */ + bool deleted = 4; + + /** + * A KeyList listing all keys that "own" the file. + *

    + * All keys in this list MUST sign a transaction to append to the + * file content, or to modify file metadata.
    + * At least _one_ key in this list MUST sign a transaction to delete + * this file.
    + * If this is an empty `KeyList`, the file is immutable, cannot be + * modified or deleted, but MAY expire. A `fileUpdate` transaction MAY + * extend the expiration time for an immutable file. + */ + KeyList keys = 5; + + /** + * A short description for this file. + *

    + * This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes` + * (default 100) bytes when encoded as UTF-8. + */ + string memo = 6; + + /** + * A ledger identifier for the responding network. + *

    + * This value SHALL identify the distributed ledger that responded to + * this query. + */ + bytes ledger_id = 7; + } + + /** + * A combination of fields from the requested file metadata. + *

    + * This SHALL NOT be set if the identified file does not exist + * or has expired. + */ + FileInfo fileInfo = 2; +} diff --git a/proto_src/services/file_service.proto b/proto_src/services/file_service.proto new file mode 100644 index 000000000..11c456cfa --- /dev/null +++ b/proto_src/services/file_service.proto @@ -0,0 +1,138 @@ +/** + * # File Service + * gRPC definitions for the Hedera File Service (HFS). + * + * The HFS manages bulk data in the form of byte arrays of arbitrary + * size, up to a network-configured maximum size. These files are + * most often used to store bulk data for distributed applications + * and smart contracts. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package + +import "query.proto"; +import "response.proto"; +import "transaction_response.proto"; +import "transaction.proto"; + +/** + * Service gRPC definitions for the Hedera File Service (HFS). + * + * #### Signature Requirements + * The HFS manages file authorization differently, depending on type of file + * transaction, and this can be surprising.
    + * The core element of file authorization is the `keys` field, + * which is a `KeyList`; a list of individual `Key` messages, each of which + * may represent a simple or complex key.
    + * The file service transactions treat this list differently.
    + * A `fileCreate`, `fileAppend`, or `fileUpdate` MUST have a valid signature + * from _each_ key in the list.
    + * A `fileDelete` MUST have a valid signature from _at least one_ key in + * the list. This is different, and allows a file "owned" by many entities + * to be deleted by any one of those entities. A deleted file cannot be + * restored, so it is important to consider this when assigning keys for + * a file.
    + * If any of the keys in a `KeyList` are complex, the full requirements of + * each complex key must be met to count as a "valid signature" for that key. + * A complex key structure (i.e. a `ThresholdKey`, or `KeyList`, possibly + * including additional `ThresholdKey` or `KeyList` descendants) may be + * assigned as the sole entry in a file `keys` field to ensure all transactions + * have the same signature requirements. + */ +service FileService { + /** + * Create a file in HFS. + */ + rpc createFile (Transaction) returns (TransactionResponse); + + /** + * Update a file in HFS. + */ + rpc updateFile (Transaction) returns (TransactionResponse); + + /** + * Delete a file in HFS.
    + * The content of a file deleted in this manner is completely removed + * from network state, but the file metadata remains. + */ + rpc deleteFile (Transaction) returns (TransactionResponse); + + /** + * Append content to a file in HFS. + */ + rpc appendContent (Transaction) returns (TransactionResponse); + + /** + * Retrieve the content of a file in HFS.
    + * Note that this query retrieves _only_ the file content, not any of + * the metadata for the file. + */ + rpc getFileContent (Query) returns (Response); + + /** + * Retrieve the metadata for a file in HFS.
    + * Note that this query does not retrieve the file _content_. + */ + rpc getFileInfo (Query) returns (Response); + + /** + * Delete a "regular" file without "owner" authorization.
    + * This transaction _does not_ require signatures for the keys in + * the file `keys` list, but must be signed by a "privileged" account. + *

    + * This transaction SHALL NOT accept a file identifier for + * a "system" file.
    + * This transaction SHALL NOT remove the _content_ of the file from state. + * This permits use of the `systemUndelete` to reverse this action if + * performed in error. + *

    + * This is a privileged transaction, and only accounts 2-59 are permitted + * to call this function, by default. The actual restriction is in the + * `api-permission.properties` file in the consensus node configuration. + */ + rpc systemDelete (Transaction) returns (TransactionResponse); + + /** + * Undelete a "regular" file. + * This transaction must be signed by a "privileged" account.
    + *

    + * This transaction SHALL NOT accept a file identifier for + * a "system" file.
    + * The file identified SHOULD have been previously deleted.
    + * This transaction SHALL NOT recover the _content_ of a file unless that + * file was deleted with a `systemDelete` transaction. The _content_ of a + * file deleted with a `fileDelete` transaction is not retained in state. + *

    + * This is a privileged transaction, and only accounts 2-60 are permitted + * to call this function, by default. The actual restriction is in the + * `api-permission.properties` file in the consensus node configuration. + */ + rpc systemUndelete (Transaction) returns (TransactionResponse); +} diff --git a/proto_src/services/file_update.proto b/proto_src/services/file_update.proto new file mode 100644 index 000000000..711a54206 --- /dev/null +++ b/proto_src/services/file_update.proto @@ -0,0 +1,110 @@ +/** + * # File Update + * A message to modify the metadata for a file and/or _replace_ the contents. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; +import "timestamp.proto"; +import "google/protobuf/wrappers.proto"; + +/** + * Update the metadata, and/or replace the content, of a file in the + * Hedera File Service (HFS). + * + * Any field which is not set (i.e. is null) in this message, other than + * `fileID`, SHALL be ignored.
    + * If the `keys` list for the identified file is an empty `KeyList`, then + * this message MUST NOT set any field except `expirationTime`. + * + * #### Signature Requirements + * Every `Key` in the `keys` list for the identified file MUST sign this + * transaction, if any field other than `expirationTime` is to be updated.
    + * If the `keys` list for the identified file is an empty `KeyList` (because + * this file was previously created or updated to have an empty `KeyList`), + * then the file is considered immutable and this message MUST NOT set any + * field except `expirationTime`.
    + * See the [File Service](#FileService) specification for a detailed + * explanation of the signature requirements for all file transactions. + * + * ### Block Stream Effects + * None + */ +message FileUpdateTransactionBody { + /** + * A file identifier for the file to update. + *

    + * This field is REQUIRED. + */ + FileID fileID = 1; + + /** + * An expiration timestamp. + *

    + * If set, this value MUST be strictly later than the existing + * `expirationTime` value, or else it will be ignored.
    + * If set, this value SHALL replace the existing `expirationTime`.
    + * If this field is the only field set, then this transaction SHALL NOT + * require any signature other than the `payer` for the transaction.
    + * When the network consensus time exceeds the then-current + * `expirationTime`, the network SHALL expire the file. + */ + Timestamp expirationTime = 2; + + /** + * The new list of keys that "own" this file. + *

    + * If set, every key in this `KeyList` MUST sign this transaction.
    + * If set, every key in the _previous_ `KeyList` MUST _also_ + * sign this transaction.
    + * If this value is an empty `KeyList`, then the file SHALL be immutable + * after completion of this transaction. + */ + KeyList keys = 3; + + /** + * An array of bytes. + *

    + * This value, if set, SHALL _replace_ the existing file content. + * If this value is set to an empty byte array, the content of the file + * SHALL be unchanged. + */ + bytes contents = 4; + + /** + * A short description of this file. + *

    + * This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes` + * (default 100) bytes when encoded as UTF-8. + */ + google.protobuf.StringValue memo = 5; +} diff --git a/proto_src/services/freeze.proto b/proto_src/services/freeze.proto new file mode 100644 index 000000000..954853edd --- /dev/null +++ b/proto_src/services/freeze.proto @@ -0,0 +1,152 @@ +/** + * # Freeze + * Transaction body for a network "freeze" transaction. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "timestamp.proto"; +import "basic_types.proto"; +import "freeze_type.proto"; + +/** + * A transaction body for all five freeze transactions. + * + * Combining five different transactions into a single message, this + * transaction body MUST support options to schedule a freeze, abort a + * scheduled freeze, prepare a software upgrade, prepare a telemetry + * upgrade, or initiate a software upgrade. + * + * For a scheduled freeze, at the scheduled time, according to + * network consensus time + * - A freeze (`FREEZE_ONLY`) causes the network nodes to stop creating + * events or accepting transactions, and enter a persistent + * maintenance state. + * - A freeze upgrade (`FREEZE_UPGRADE`) causes the network nodes to stop + * creating events or accepting transactions, and upgrade the node software + * from a previously prepared upgrade package. The network nodes then + * restart and rejoin the network after upgrading. + * + * For other freeze types, immediately upon processing the freeze transaction + * - A Freeze Abort (`FREEZE_ABORT`) cancels any pending scheduled freeze. + * - A prepare upgrade (`PREPARE_UPGRADE`) begins to extract the contents of + * the specified upgrade file to the local filesystem. + * - A telemetry upgrade (`TELEMETRY_UPGRADE`) causes the network nodes to + * extract a telemetry upgrade package to the local filesystem and signal + * other software on the machine to upgrade, without impacting the node or + * network processing. + * + * ### Block Stream Effects + * Unknown + */ +message FreezeTransactionBody { + /** + * Rejected if set; replace with `start_time`.
    + * The start hour (in UTC time), a value between 0 and 23 + */ + int32 startHour = 1 [deprecated = true]; + + /** + * Rejected if set; replace with `start_time`.
    + * The start minute (in UTC time), a value between 0 and 59 + */ + int32 startMin = 2 [deprecated = true]; + + /** + * Rejected if set; end time is neither assigned nor guaranteed and depends + * on many uncontrolled factors.
    + * The end hour (in UTC time), a value between 0 and 23 + */ + int32 endHour = 3 [deprecated = true]; + + /** + * Rejected if set; end time is neither assigned nor guaranteed and depends + * on many uncontrolled factors.
    + * The end minute (in UTC time), a value between 0 and 59 + */ + int32 endMin = 4 [deprecated = true]; + + /** + * An upgrade file. + *

    + * If set, the identifier of a file in network state.
    + * The contents of this file MUST be a `zip` file and this data + * SHALL be extracted to the node filesystem during a + * `PREPARE_UPGRADE` or `TELEMETRY_UPGRADE` freeze type.
    + * The `file_hash` field MUST match the SHA384 hash of the content + * of this file.
    + * The extracted data SHALL be used to perform a network software update + * if a `FREEZE_UPGRADE` freeze type is subsequently processed. + */ + FileID update_file = 5; + + /** + * A SHA384 hash of file content.
    + * This is a hash of the file identified by `update_file`. + *

    + * This MUST be set if `update_file` is set, and MUST match the + * SHA384 hash of the contents of that file. + */ + bytes file_hash = 6; + + /** + * A start time for the freeze. + *

    + * If this field is REQUIRED for the specified `freeze_type`, then + * when the network consensus time reaches this instant

      + *
    1. The network SHALL stop accepting transactions.
    2. + *
    3. The network SHALL gossip a freeze state.
    4. + *
    5. The nodes SHALL, in coordinated order, disconnect and + * shut down.
    6. + *
    7. The nodes SHALL halt or perform a software upgrade, depending + * on `freeze_type`.
    8. + *
    9. If the `freeze_type` is `FREEZE_UPGRADE`, the nodes SHALL + * restart and rejoin the network upon completion of the + * software upgrade.
    10. + *
    + *
    + * If the `freeze_type` is `TELEMETRY_UPGRADE`, the start time is required, + * but the network SHALL NOT stop, halt, or interrupt transaction + * processing. The required field is an historical anomaly and SHOULD + * change in a future release.
    + */ + Timestamp start_time = 7; + + /** + * The type of freeze. + *

    + * This REQUIRED field effectively selects between five quite different + * transactions in the same transaction body. Depending on this value + * the service may schedule a freeze, prepare upgrades, perform upgrades, + * or even abort a previously scheduled freeze. + */ + FreezeType freeze_type = 8; +} diff --git a/proto_src/services/freeze_service.proto b/proto_src/services/freeze_service.proto new file mode 100644 index 000000000..88aaa9239 --- /dev/null +++ b/proto_src/services/freeze_service.proto @@ -0,0 +1,57 @@ +/** + * # Freeze Service + * A service to manage network freeze events. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package + +import "transaction_response.proto"; +import "transaction.proto"; + +/** + * A service to manage network "freeze" events. + * + * This service provides a facility to prepare for network upgrades, halt network processing, + * perform network software upgrades, and automatically restart the network following an upgrade. + */ +service FreezeService { + /** + * Freeze, cancel, or prepare a freeze. + * This single transaction performs all of the functions supported + * by the network freeze service. These functions include actions to + * prepare an upgrade, prepare a telemetry upgrade, freeze the network, + * freeze the network for upgrade, or abort a scheduled freeze. + *

    + * The actual freeze action SHALL be determined by the `freeze_type` field + * of the `FreezeTransactionBody`.
    + * The transaction body MUST be a `FreezeTransactionBody`. + */ + rpc freeze (Transaction) returns (TransactionResponse); +} diff --git a/proto_src/services/freeze_type.proto b/proto_src/services/freeze_type.proto new file mode 100644 index 000000000..606131687 --- /dev/null +++ b/proto_src/services/freeze_type.proto @@ -0,0 +1,136 @@ +/** + * # Freeze Type + * An enumeration to select the type of a network freeze. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +/** + * An enumeration of possible network freeze types. + * + * Each enumerated value SHALL be associated to a single network freeze + * scenario. Each freeze scenario defines the specific parameters + * REQUIRED for that freeze. + */ +enum FreezeType { + /** + * An invalid freeze type. + *

    + * The first value in a protobuf enum is a default value. This default + * is RECOMMENDED to be an invalid value to aid in detecting unset fields. + */ + UNKNOWN_FREEZE_TYPE = 0; + + /** + * Freeze the network, and take no further action. + *

    + * The `start_time` field is REQUIRED, MUST be strictly later than the + * consensus time when this transaction is handled, and SHOULD be between + * `300` and `3600` seconds after the transaction identifier + * `transactionValidStart` field.
    + * The fields `update_file` and `file_hash` SHALL be ignored.
    + * A `FREEZE_ONLY` transaction SHALL NOT perform any network + * changes or upgrades.
    + * After this freeze is processed manual intervention is REQUIRED + * to restart the network. + */ + FREEZE_ONLY = 1; + + /** + * This freeze type does not freeze the network, but begins + * "preparation" to upgrade the network. + *

    + * The fields `update_file` and `file_hash` are REQUIRED + * and MUST be valid.
    + * The `start_time` field SHALL be ignored.
    + * A `PREPARE_UPGRADE` transaction SHALL NOT freeze the network or + * interfere with general transaction processing.
    + * If this freeze type is initiated after a `TELEMETRY_UPGRADE`, the + * prepared telemetry upgrade SHALL be reset and all telemetry upgrade + * artifacts in the filesystem SHALL be deleted.
    + * At some point after this freeze type completes (dependent on the size + * of the upgrade file), the network SHALL be prepared to complete + * a software upgrade of all nodes. + */ + PREPARE_UPGRADE = 2; + + /** + * Freeze the network to perform a software upgrade. + *

    + * The `start_time` field is REQUIRED, MUST be strictly later than the + * consensus time when this transaction is handled, and SHOULD be between + * `300` and `3600` seconds after the transaction identifier + * `transactionValidStart` field.
    + * A software upgrade file MUST be prepared prior to this transaction.
    + * After this transaction completes, the network SHALL initiate an + * upgrade and restart of all nodes at the start time specified. + */ + FREEZE_UPGRADE = 3; + + /** + * Abort a pending network freeze operation. + *

    + * All fields SHALL be ignored for this freeze type.
    + * This freeze type MAY be submitted after a `FREEZE_ONLY`, + * `FREEZE_UPGRADE`, or `TELEMETRY_UPGRADE` is initiated.
    + * This freeze type MUST be submitted and reach consensus + * before the `start_time` designated for the current pending + * freeze to be effective.
    + * After this freeze type is processed, the upgrade file hash + * and pending freeze start time stored in the network SHALL + * be reset to default (empty) values. + */ + FREEZE_ABORT = 4; + + /** + * Prepare an upgrade of auxiliary services and containers + * providing telemetry/metrics. + *

    + * The `start_time` field is REQUIRED, MUST be strictly later than the + * consensus time when this transaction is handled, and SHOULD be between + * `300` and `3600` seconds after the transaction identifier + * `transactionValidStart` field.
    + * The `update_file` field is REQUIRED and MUST be valid.
    + * A `TELEMETRY_UPGRADE` transaction SHALL NOT freeze the network or + * interfere with general transaction processing.
    + * This freeze type MUST NOT be initiated between a `PREPARE_UPGRADE` + * and `FREEZE_UPGRADE`. If this freeze type is initiated after a + * `PREPARE_UPGRADE`, the prepared upgrade SHALL be reset and all software + * upgrade artifacts in the filesystem SHALL be deleted.
    + * At some point after this freeze type completes (dependent on the + * size of the upgrade file), the network SHALL automatically upgrade + * the telemetry/metrics services and containers as directed in + * the specified telemetry upgrade file. + *

    The condition that `start_time` is REQUIRED is an + * historical anomaly and SHOULD change in a future release.
    + */ + TELEMETRY_UPGRADE = 5; +} diff --git a/proto_src/services/get_account_details.proto b/proto_src/services/get_account_details.proto new file mode 100644 index 000000000..411b2abca --- /dev/null +++ b/proto_src/services/get_account_details.proto @@ -0,0 +1,425 @@ +/** + * # Get Account Details + * A standard query to inspect the full detail of an account. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "timestamp.proto"; +import "duration.proto"; +import "basic_types.proto"; +import "query_header.proto"; +import "response_header.proto"; + +/** + * Request detail information about an account. + * + * The returned information SHALL include balance and allowances.
    + * The returned information SHALL NOT include a list of account records. + * + * #### Important + * This query is a _privileged_ query. Only "system" accounts SHALL be + * permitted to submit this query. + */ +message GetAccountDetailsQuery { + /** + * Standard information sent with every query operation.
    + * This includes the signed payment and what kind of response is requested + * (cost, state proof, both, or neither). + */ + QueryHeader header = 1; + + /** + * An account ID for which information is requested + *

    + * This value SHALL identify the account to be queried.
    + * This value MUST identify a valid account.
    + * This field is REQUIRED. + */ + AccountID account_id = 2; +} + +/** + * A response to a `GetAccountDetailsQuery`. + * + * This SHALL contain the account details if requested and successful. + */ +message GetAccountDetailsResponse { + /** + * The standard response information for queries.
    + * This includes the values requested in the `QueryHeader` + * (cost, state proof, both, or neither). + */ + ResponseHeader header = 1; + + /** + * Information describing a single Account in the Hedera distributed ledger. + * + * #### Attributes + * Each Account may have a unique three-part identifier, a Key, and one or + * more token balances. Accounts also have an alias, which has multiple + * forms, and may be set automatically. Several additional items are + * associated with the Account to enable full functionality. + * + * #### Expiration + * Accounts, as most items in the network, have an expiration time, recorded + * as a `Timestamp`, and must be "renewed" for a small fee at expiration. + * This helps to reduce the amount of inactive accounts retained in state. + * Another account may be designated to pay any renewal fees and + * automatically renew the account for (by default) 30-90 days at a time as + * a means to optionally ensure important accounts remain active. + * + * ### Staking + * Accounts may participate in securing the network by "staking" the account + * balances to a particular network node, and receive a portion of network + * fees as a reward. An account may optionally decline these rewards but + * still stake its balances. + * + * #### Transfer Restrictions + * An account may optionally require that inbound transfer transactions be + * signed by that account as receiver (in addition to any other signatures + * required, including sender). + * + */ + message AccountDetails { + /** + * The unique ID of this account. + *

    + * An account ID, when assigned to this field, SHALL be of + * the form `shard.realm.number`.
    + * Transactions MAY reference the account by alias, but the account + * itself MUST always have a purely numeric identifier. This numeric + * ID is the value used to reference the account in query responses, + * transaction receipts, transaction records, and the block stream. + */ + AccountID account_id = 1; + + /** + * A Solidity ID.
    + * This identifies the contract instance, and the `Account` associated + * with that contract instance. + *

    + * This SHALL be populated if this account is a smart contract, and + * SHALL NOT be populated otherwise.
    + * This SHALL be formatted as a string according to Solidity ID + * standards. + */ + string contract_account_id = 2; + + /** + * A boolean indicating that this account is deleted. + */ + bool deleted = 3; + + /** + * Replaced by StakingInfo.
    + * ID of the account to which this account is staking its balances. If + * this account is not currently staking its balances, then this field, + * if set, SHALL be the sentinel value of `0.0.0`. + */ + AccountID proxy_account_id = 4 [deprecated = true]; + + /** + * The total amount of tinybar proxy staked to this account. + */ + int64 proxy_received = 5; + + /** + * The key to be used to sign transactions from this account, if any. + *

    + * This key SHALL NOT be set for hollow accounts until the account + * is finalized.
    + * This key SHALL be set on all other accounts, except for certain + * immutable accounts (0.0.800 and 0.0.801) necessary for network + * function and otherwise secured by the governing council. + */ + Key key = 6; + + /** + * The HBAR balance of this account, in tinybar (10-8 HBAR). + *

    + * This value SHALL always be a whole number. + */ + uint64 balance = 7; + + /** + * A boolean indicating that the account requires a receiver signature + * for inbound token transfer transactions. + *

    + * If this value is `true` then a transaction to transfer tokens to this + * account SHALL NOT succeed unless this account has signed the + * transfer transaction. + */ + bool receiver_sig_required = 8; + + /** + * The current expiration time for this account. + *

    + * This account SHALL be due standard renewal fees when the network + * consensus time exceeds this time.
    + * If rent and expiration are enabled for the network, and automatic + * renewal is enabled for this account, renewal fees SHALL be charged + * after this time, and, if charged, the expiration time SHALL be + * extended for another renewal period.
    + * This account MAY be expired and removed from state at any point + * after this time if not renewed.
    + * An account holder MAY extend this time by submitting an account + * update transaction to modify expiration time, subject to the current + * maximum expiration time for the network. + */ + Timestamp expiration_time = 9; + + /** + * A duration to extend this account's expiration. + *

    + * The network SHALL extend the account's expiration by this + * duration, if funds are available, upon automatic renewal.
    + * This SHALL NOT apply if the account is already deleted + * upon expiration.
    + * If this is not provided in an allowed range on account creation, the + * transaction SHALL fail with INVALID_AUTO_RENEWAL_PERIOD. The default + * values for the minimum period and maximum period are currently + * 30 days and 90 days, respectively. + */ + Duration auto_renew_period = 10; + + /** + * As of `HIP-367`, which enabled unlimited token associations, the + * potential scale for this value requires that users consult a mirror + * node for this information. Only the top `maxRelsPerInfoQuery` + * (default 1000) relationships will be returned by this query.
    + * A list of tokens to which this account is "associated", enabling the + * transfer of that token type by this account. + */ + repeated TokenRelationship token_relationships = 11; + + /** + * A short description of this account. + *

    + * This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes` + * (default 100) bytes when encoded as UTF-8. + */ + string memo = 12; + + /** + * The total number of non-fungible/unique tokens owned by this account. + */ + int64 owned_nfts = 13; + + /** + * The maximum number of tokens that can be auto-associated with the + * account. + *

    + * If this is less than or equal to `used_auto_associations` (or 0), + * then this account MUST manually associate with a token before + * transacting in that token.
    + * Following HIP-904 This value may also be `-1` to indicate no + * limit.
    + * This value MUST NOT be less than `-1`. + */ + int32 max_automatic_token_associations = 14; + + /** + * An account EVM alias.
    + * This is a value used in some contexts to reference an account when + * the tripartite account identifier is not available. + *

    + * This field, when set to a non-default value, is immutable and + * SHALL NOT be changed. + */ + bytes alias = 15; + + /** + * The ledger ID of the network that generated this response. + *

    + * This value SHALL identify the distributed ledger that responded to + * this query. + */ + bytes ledger_id = 16; + + /** + * A list of crypto (HBAR) allowances approved by this account. + *

    + * If this is not empty, each allowance SHALL permit a specified + * "spender" account to spend this account's HBAR balance, up + * to a designated limit.
    + * This field SHALL permit spending only HBAR balance, not other + * tokens the account may hold.
    + * Allowances for other tokens SHALL be listed in the + * `token_allowances` field or the + * `approve_for_all_nft_allowances` field. + */ + repeated GrantedCryptoAllowance granted_crypto_allowances = 17; + + /** + * A list of non-fungible token (NFT) allowances approved by + * this account. + *

    + * If this is not empty, each allowance SHALL permit a specified + * "spender" account to transfer _all_ of this account's + * non-fungible/unique tokens from a particular collection.
    + * Allowances for a specific serial number MUST be directly + * associated with that specific non-fungible/unique token, rather + * than the holding account. + */ + repeated GrantedNftAllowance granted_nft_allowances = 18; + + /** + * A list of fungible token allowances approved by this account. + *

    + * If this is not empty, each allowance SHALL permit a specified + * "spender" to spend this account's fungible tokens, of the + * designated type, up to a designated limit. + */ + repeated GrantedTokenAllowance granted_token_allowances = 19; + + } + + /** + * Details of the account. + *

    + * A state proof MAY be generated for this field. + */ + AccountDetails account_details = 2; +} + +/** + * Permission granted by one account (the "funding" account) to another + * account (the "spender" account) that allows the spender to spend a + * specified amount of HBAR owned by the funding account. + * + * An allowance SHALL NOT transfer any HBAR directly, it only permits + * transactions signed only by the spender account to transfer HBAR, up + * to the amount specified, from the funding account. + * + * Once the specified amount is spent, the allowance SHALL be consumed + * and a new allowance SHALL be required before that spending account + * may spend additional HBAR from the funding account. + */ +message GrantedCryptoAllowance { + /** + * The identifier for the spending account associated with this allowance. + *

    + * This account SHALL be permitted to sign transactions to spend + * HBAR from the funding/allowing account.
    + * This permission SHALL be limited to no more than the specified `amount`. + */ + AccountID spender = 1; + + /** + * The maximum amount that the spender account may transfer within + * the scope of this allowance. + *

    + * This allowance SHALL be consumed if any combination of transfers + * authorized via this allowance meet this value in total.
    + * This value MUST be specified in tinybar (i.e. 10-8 HBAR). + */ + int64 amount = 2; +} + +/** + * Permission granted by one account (the "funding" account) to another + * account (the "spender" account) that allows the spender to transfer + * all serial numbers of a specific non-fungible/unique token (NFT) + * collection owned by the funding account.
    + * This is a broad permission, as it does not matter how many NFTs of the + * specified collection the funding account owns, the spender MAY dispose + * of any or all of them with this allowance.
    + * Each token type (typically a collection of NFTs) SHALL require + * a separate allowance.
    + * Allowances for a specific serial number MUST be directly associated + * with that specific non-fungible/unique token, rather than + * the holding account. + * + * An allowance SHALL NOT transfer any tokens directly, it only permits + * transactions signed only by the spender account to transfer any + * non-fungible/unique tokens of the specified type owned by + * the funding account. + */ +message GrantedNftAllowance { + /** + * The identifier for the token associated with this allowance. + *

    + * This token MUST be a non-fungible/unique token. + */ + TokenID token_id = 1; + + /** + * The identifier for the spending account associated with this allowance. + *

    + * This account SHALL be permitted to sign transactions to spend + * tokens of the associated token type from the funding/allowing account. + */ + AccountID spender = 2; +} + +/** + * Permission granted by one account (the "funding" account) to another + * account (the "spender" account) that allows the spender to spend a + * specified amount of a specific non-HBAR fungible token from the + * balance owned by the funding account. + * + * An allowance SHALL NOT transfer any tokens directly, it only permits + * transactions signed only by the spender account to transfer tokens + * of the specified type, up to the amount specified, from the funding account. + * + * Once the specified amount is spent, the allowance SHALL be consumed + * and a new allowance SHALL be required before that spending account + * may spend additional tokens from the funding account. + */ +message GrantedTokenAllowance { + /** + * The identifier for the token associated with this allowance. + *

    + * This token MUST be a fungible/common token. + */ + TokenID token_id = 1; + + /** + * The identifier for the spending account associated with this allowance. + *

    + * This account SHALL be permitted to sign transactions to spend tokens + * of the associated token type from the funding/allowing account.
    + * This permission SHALL be limited to no more than the specified `amount`. + */ + AccountID spender = 2; + + /* + * The maximum amount that the spender account may transfer within + * the scope of this allowance. + *

    + * This allowance SHALL be consumed if any combination of transfers + * authorized via this allowance meet this value in total.
    + * This value MUST be specified in the smallest units of the relevant + * token (i.e. 10-decimals whole tokens). + */ + int64 amount = 3; +} diff --git a/proto_src/services/get_by_key.proto b/proto_src/services/get_by_key.proto new file mode 100644 index 000000000..9d061aee9 --- /dev/null +++ b/proto_src/services/get_by_key.proto @@ -0,0 +1,128 @@ +/** + * # Get By Key + * An obsolete query to obtain a list of entities that refer to + * a given Key object.
    + * Returned entities may be accounts, files, smart contracts, and/or + * live hash entries. + * + * > Important + * >> This query is obsolete and not supported.
    + * >> Any query of this type that is submitted SHALL fail with a `PRE_CHECK` + * >> result of `NOT_SUPPORTED`. + * + * > Implementation Note + * >> This query is not defined for any service, and while it is implemented + * >> in the "Network Admin" service, it may be unnecessary to do so. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; +import "query_header.proto"; +import "response_header.proto"; +import "crypto_add_live_hash.proto"; + +/** + * Query all accounts, claims, files, and smart contract instances whose + * associated keys include the given Key. + * + * > This query is no longer supported. + */ +message GetByKeyQuery { + option deprecated = true; + + /** + * Standard information sent with every query operation.
    + * This includes the signed payment and what kind of response is requested + * (cost, state proof, both, or neither). + */ + QueryHeader header = 1; + + /** + * The key to search for. It MUST NOT contain a contractID nor + * a ThresholdKey. + */ + Key key = 2; +} + +/** + * The ID for a single entity (account, livehash, file, or smart contract) + * + * > The query that defines this message is no longer supported. + */ +message EntityID { + option deprecated = true; + + oneof entity { + /** + * The Account ID for the cryptocurrency account + */ + AccountID accountID = 1; + + /** + * A uniquely identifying livehash of an account + */ + LiveHash liveHash = 2; + + /** + * The file ID of the file + */ + FileID fileID = 3; + + /** + * The smart contract ID that identifies instance + */ + ContractID contractID = 4; + + } +} + +/** + * Response when the client sends the node GetByKeyQuery + * + * > This query is no longer supported. + */ +message GetByKeyResponse { + option deprecated = true; + + /** + * The standard response information for queries.
    + * This includes the values requested in the `QueryHeader` + * (cost, state proof, both, or neither). + */ + ResponseHeader header = 1; + + /** + * The list of entities that include this public key in their + * associated Key list + */ + repeated EntityID entities = 2; +} diff --git a/proto_src/services/get_by_solidity_id.proto b/proto_src/services/get_by_solidity_id.proto new file mode 100644 index 000000000..64619624f --- /dev/null +++ b/proto_src/services/get_by_solidity_id.proto @@ -0,0 +1,103 @@ +/** + * # Get By Solidity + * A standard query to obtain account and contract identifiers for a smart + * contract, given the Solidity identifier for that contract. + * + * > Important + * >> This query is obsolete and not supported.
    + * >> Any query of this type that is submitted SHALL fail with a `PRE_CHECK` + * >> result of `NOT_SUPPORTED`. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; +import "query_header.proto"; +import "response_header.proto"; + +/** + * Query to read Contract, Account, and File identifiers for a smart + * contract given a Solidity identifier. + */ +message GetBySolidityIDQuery { + option deprecated = true; + /** + * Standard information sent with every query operation.
    + * This includes the signed payment and what kind of response is requested + * (cost, state proof, both, or neither). + */ + QueryHeader header = 1; + + /** + * A contract ID in the format used by Solidity. + *

    + * This field is REQUIRED. + */ + string solidityID = 2; +} + +/** + * Response to a getBySolidityId query. + * + * This message returns the account, contract, and file identifiers for + * a smart contract. + */ +message GetBySolidityIDResponse { + option deprecated = true; + /** + * The standard response information for queries.
    + * This includes the values requested in the `QueryHeader` + * (cost, state proof, both, or neither). + */ + ResponseHeader header = 1; + + /** + * An account identifier. + *

    + * This SHALL identify an account that backs the requested smart contract. + */ + AccountID accountID = 2; + + /** + * A file identifier. + *

    + * This SHALL identify a file, the contents of which are the EVM + * bytecode for the requested smart contract. + */ + FileID fileID = 3; + + /** + * A contract identifier. + *

    + * This SHALL identify the requested smart contract. + */ + ContractID contractID = 4; +} diff --git a/proto_src/services/network_get_execution_time.proto b/proto_src/services/network_get_execution_time.proto new file mode 100644 index 000000000..3fe399ec1 --- /dev/null +++ b/proto_src/services/network_get_execution_time.proto @@ -0,0 +1,101 @@ +/** + * # Get Execution Time + * Given a list of transaction identifiers, return the time required to + * process each transaction, excluding pre-consensus processing, consensus, + * and post-processing (e.g. record stream generation). + * + * > Important + * >> This query is obsolete and not supported.
    + * >> Any query of this type that is submitted SHALL fail with a `PRE_CHECK` + * >> result of `NOT_SUPPORTED`. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; +import "query_header.proto"; +import "response_header.proto"; + +/** + * Retrieve the time, in nanoseconds, spent in direct processing for one + * or more recent transactions. + * + * For each transaction identifier provided, if that transaction is + * sufficiently recent (that is, it is within the range of the configuration + * value `stats.executionTimesToTrack`), the node SHALL return the time, in + * nanoseconds, spent to directly process that transaction.
    + * This time will generally correspond to the time spent in a `handle` call + * within the workflow. + * + * Note that because each node processes every transaction for the Hedera + * network, this query MAY be sent to any node, and results MAY be different + * between different nodes. + * + */ +message NetworkGetExecutionTimeQuery { + option deprecated = true; + /** + * Standard information sent with every query operation.
    + * This includes the signed payment and what kind of response is requested + * (cost, state proof, both, or neither). + */ + QueryHeader header = 1; + + /** + * A list of transaction identifiers to query. + *

    + * All of the queried transaction identifiers MUST have execution time + * available. If any identifier does not have available execution time, + * the query SHALL fail with an `INVALID_TRANSACTION_ID` response. + */ + repeated TransactionID transaction_ids = 2; +} + +/** + * A response to a `networkGetExecutionTime` query. + */ +message NetworkGetExecutionTimeResponse { + option deprecated = true; + /** + * The standard response information for queries.
    + * This includes the values requested in the `QueryHeader` + * (cost, state proof, both, or neither). + */ + ResponseHeader header = 1; + + /** + * A list of execution times, in nanoseconds. + *

    + * This list SHALL be in the same order as the transaction + * identifiers were presented in the query. + */ + repeated uint64 execution_times = 2; +} diff --git a/proto_src/services/network_get_version_info.proto b/proto_src/services/network_get_version_info.proto new file mode 100644 index 000000000..eb98e3d24 --- /dev/null +++ b/proto_src/services/network_get_version_info.proto @@ -0,0 +1,82 @@ +/** + * # Get Version + * Standard query for services and API message versions. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; +import "query_header.proto"; +import "response_header.proto"; + +/** + * Query the deployed versions of Hedera Services and the API definitions in + * semantic version format + */ +message NetworkGetVersionInfoQuery { + /** + * Standard information sent with every query operation.
    + * This includes the signed payment and what kind of response is requested + * (cost, state proof, both, or neither). + */ + QueryHeader header = 1; +} + +/** + * A response to a `NetworkGetVersionInfoQuery`. + * + * This SHALL return `SemanticVersion` information for both Hedera API (HAPI) + * and Hedera Services. + */ +message NetworkGetVersionInfoResponse { + /** + * The standard response information for queries.
    + * This includes the values requested in the `QueryHeader` + * (cost, state proof, both, or neither). + */ + ResponseHeader header = 1; + + /** + * An API version. + *

    + * This SHALL be the current Hedera API (HAPI) protobuf message version + * accepted by the network. + */ + SemanticVersion hapiProtoVersion = 2; + + /** + * A Services version. + *

    + * This SHALL be the current version of the Hedera Services software + * operating the network. + */ + SemanticVersion hederaServicesVersion = 3; +} diff --git a/proto_src/services/network_service.proto b/proto_src/services/network_service.proto new file mode 100644 index 000000000..9710ab021 --- /dev/null +++ b/proto_src/services/network_service.proto @@ -0,0 +1,88 @@ +/** + * # Network Service + * This service offers some basic "network information" queries. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package + +import "query.proto"; +import "response.proto"; +import "transaction_response.proto"; +import "transaction.proto"; + +/** + * Basic "network information" queries. + * + * This service supports queries for the active services and API versions, + * and a query for account details. + */ +service NetworkService { + /** + * Retrieve the active versions of Hedera Services and API messages. + */ + rpc getVersionInfo (Query) returns (Response); + + /** + * Request detail information about an account. + *

    + * The returned information SHALL include balance and allowances.
    + * The returned information SHALL NOT include a list of account records. + */ + rpc getAccountDetails (Query) returns (Response); + + /** + * Retrieve the time, in nanoseconds, spent in direct processing for one or + * more recent transactions. + *

    + * For each transaction identifier provided, if that transaction is + * sufficiently recent (that is, it is within the range of the + * configuration value `stats.executionTimesToTrack`), the node SHALL + * return the time, in nanoseconds, spent to directly process that + * transaction (that is, excluding time to reach consensus).
    + * Note that because each node processes every transaction for the Hedera + * network, this query MAY be sent to any node. + *

    + *

    Important
    + * This query is obsolete, not supported, and SHALL fail with a pre-check + * result of `NOT_SUPPORTED`.
    + */ + rpc getExecutionTime (Query) returns (Response) {option deprecated = true;}; + + /** + * Submit a transaction that wraps another transaction which will + * skip most validation. + *

    + *

    Important
    + * This query is obsolete, not supported, and SHALL fail with a pre-check + * result of `NOT_SUPPORTED`. + *
    + */ + rpc uncheckedSubmit (Transaction) returns (TransactionResponse) {option deprecated = true;}; +} diff --git a/proto_src/services/node_create.proto b/proto_src/services/node_create.proto new file mode 100644 index 000000000..cf2a02d99 --- /dev/null +++ b/proto_src/services/node_create.proto @@ -0,0 +1,165 @@ +syntax = "proto3"; + +package com.hedera.hapi.node.addressbook; + +/* + * Copyright (C) 2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; + +/** + * A transaction body to add a new consensus node to the network address book. + * + * This transaction body SHALL be considered a "privileged transaction". + * + * This message supports a transaction to create a new node in the network + * address book. The transaction, once complete, enables a new consensus node + * to join the network, and requires governing council authorization. + * + * - A `NodeCreateTransactionBody` MUST be signed by the `Key` assigned to the + * `admin_key` field and one of those keys: treasure account (2) key, + * systemAdmin(50) key, or addressBookAdmin(55) key. + * - The newly created node information SHALL be added to the network address + * book information in the network state. + * - The new entry SHALL be created in "state" but SHALL NOT participate in + * network consensus and SHALL NOT be present in network "configuration" + * until the next "upgrade" transaction (as noted below). + * - All new address book entries SHALL be added to the active network + * configuration during the next `freeze` transaction with the field + * `freeze_type` set to `PREPARE_UPGRADE`. + * + * ### Block Stream Effects + * Upon completion the newly assigned `node_id` SHALL be recorded in + * the transaction receipt.
    + * This value SHALL be the next available node identifier.
    + * Node identifiers SHALL NOT be reused. + */ +message NodeCreateTransactionBody { + /** + * A Node account identifier. + *

    + * This account identifier MUST be in the "account number" form.
    + * This account identifier MUST NOT use the alias field.
    + * If the identified account does not exist, this transaction SHALL fail.
    + * Multiple nodes MAY share the same node account.
    + * This field is REQUIRED. + */ + proto.AccountID account_id = 1; + + /** + * A short description of the node. + *

    + * This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes` + * (default 100) bytes when encoded as UTF-8.
    + * This field is OPTIONAL. + */ + string description = 2; + + /** + * A list of service endpoints for gossip. + *

    + * These endpoints SHALL represent the published endpoints to which other + * consensus nodes may _gossip_ transactions.
    + * These endpoints MUST specify a port.
    + * This list MUST NOT be empty.
    + * This list MUST NOT contain more than `10` entries.
    + * The first two entries in this list SHALL be the endpoints published to + * all consensus nodes.
    + * All other entries SHALL be reserved for future use. + *

    + * Each network may have additional requirements for these endpoints. + * A client MUST check network-specific documentation for those + * details.
    + * If the network configuration value `gossipFqdnRestricted` is set, then + * all endpoints in this list MUST supply only IP address.
    + * If the network configuration value `gossipFqdnRestricted` is _not_ set, + * then endpoints in this list MAY supply either IP address or FQDN, but + * MUST NOT supply both values for the same endpoint. + */ + repeated proto.ServiceEndpoint gossip_endpoint = 3; + + /** + * A list of service endpoints for gRPC calls. + *

    + * These endpoints SHALL represent the published gRPC endpoints to which + * clients may submit transactions.
    + * These endpoints MUST specify a port.
    + * Endpoints in this list MAY supply either IP address or FQDN, but MUST + * NOT supply both values for the same endpoint.
    + * This list MUST NOT be empty.
    + * This list MUST NOT contain more than `8` entries. + */ + repeated proto.ServiceEndpoint service_endpoint = 4; + + /** + * A certificate used to sign gossip events. + *

    + * This value MUST be a certificate of a type permitted for gossip + * signatures.
    + * This value MUST be the DER encoding of the certificate presented.
    + * This field is REQUIRED and MUST NOT be empty. + */ + bytes gossip_ca_certificate = 5; + + /** + * A hash of the node gRPC TLS certificate. + *

    + * This value MAY be used to verify the certificate presented by the node + * during TLS negotiation for gRPC.
    + * This value MUST be a SHA-384 hash.
    + * The TLS certificate to be hashed MUST first be in PEM format and MUST be + * encoded with UTF-8 NFKD encoding to a stream of bytes provided to + * the hash algorithm.
    + * This field is OPTIONAL. + */ + bytes grpc_certificate_hash = 6; + + /** + * An administrative key controlled by the node operator. + *

    + * This key MUST sign this transaction.
    + * This key MUST sign each transaction to update this node.
    + * This field MUST contain a valid `Key` value.
    + * This field is REQUIRED and MUST NOT be set to an empty `KeyList`. + */ + proto.Key admin_key = 7; + + /** + * A boolean flag indicating whether the node operator declines to receive + * node rewards. + *

    + * If this flag is set to `true`, the node operator declines to receive + * node rewards.
    + */ + bool decline_reward = 8; + + /** + * A web proxy for gRPC from non-gRPC clients. + *

    + * This endpoint SHALL be a Fully Qualified Domain Name (FQDN) using the HTTPS + * protocol, and SHALL support gRPC-Web for use by browser-based clients.
    + * This endpoint MUST be signed by a trusted certificate authority.
    + * This endpoint MUST use a valid port and SHALL be reachable over TLS.
    + * This field MAY be omitted if the node does not support gRPC-Web access.
    + * This field MUST be updated if the gRPC-Web endpoint changes.
    + * This field SHALL enable frontend clients to avoid hard-coded proxy endpoints. + */ + proto.ServiceEndpoint grpc_proxy_endpoint = 9; +} diff --git a/proto_src/services/node_delete.proto b/proto_src/services/node_delete.proto new file mode 100644 index 000000000..22832ad61 --- /dev/null +++ b/proto_src/services/node_delete.proto @@ -0,0 +1,51 @@ +syntax = "proto3"; + +package com.hedera.hapi.node.addressbook; + +/* + * Copyright (C) 2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +/** + * A transaction body to delete a node from the network address book. + * + * - A `NodeDeleteTransactionBody` MUST be signed by one of those keys: + * adminKey, treasure account (2) key, systemAdmin(50) key, or + * addressBookAdmin(55) key. + * - Upon success, the address book entry SHALL enter a "pending delete" + * state. + * - All address book entries pending deletion SHALL be removed from the + * active network configuration during the next `freeze` transaction with + * the field `freeze_type` set to `PREPARE_UPGRADE`.
    + * - A deleted address book node SHALL be removed entirely from network state. + * - A deleted address book node identifier SHALL NOT be reused. + * + * ### Block Stream Effects + * None. + */ +message NodeDeleteTransactionBody { + /** + * A consensus node identifier in the network state. + *

    + * The node identified MUST exist in the network address book.
    + * The node identified MUST NOT be deleted.
    + * This value is REQUIRED. + */ + uint64 node_id = 1; +} diff --git a/proto_src/services/node_stake_update.proto b/proto_src/services/node_stake_update.proto new file mode 100644 index 000000000..f63b65c8e --- /dev/null +++ b/proto_src/services/node_stake_update.proto @@ -0,0 +1,276 @@ +/** + * # Node Stake Updates + * A system-initiated (i.e. internal) transaction to update stake information + * for nodes at the end of a staking period. + * + * Note that staking rewards are not paid immediately. The rewards are + * calculated, and the amount to be paid is reserved in the reward account, + * at the end of each staking period. The actual recipient accounts are then + * paid rewards when that account participates in any transaction that + * changes staking information or the account balance. This reduces the + * resources for calculating the staking rewards, quite dramatically, + * and provides an incentive for account owners to engage with the network, + * in at least a minor fashion, occasionally (typically annually).
    + * The unexpected change in balances, however, can be surprising to the + * account holder. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; +import "timestamp.proto"; + +/** + * A system initiated transaction to update staking information. + * + * This transaction SHALL be issued at the end of each staking period to update + * node stakes and reward limits.
    + * This transaction SHALL be a child of the first transaction to reach + * consensus following the end of the previous staking period.
    + * This transaction MUST NOT be sent by a client and SHALL be rejected if + * received by any node.
    + * This transaction SHALL be present in the record stream or block stream. + * + * ### Block Stream Effects + * None + */ +message NodeStakeUpdateTransactionBody { + /** + * A timestamp indicating the end of the staking period. + *

    + * This value SHALL be one nanosecond prior to midnight prior to the + * consensus time of the parent transaction. + */ + Timestamp end_of_staking_period = 1; + + /** + * A list of `NodeStake` entries for each node at the beginning of the new + * staking period. + *

    + * This list SHALL have one entry for each node participating in network + * consensus. + */ + repeated NodeStake node_stake = 2; + + /** + * A maximum reward rate for this staking period. + *

    + * This SHALL be a ratio of tinybar to HBAR.
    + * An account SHALL NOT receive a reward greater than the product of this + * ratio and the total number of HBAR staked by that account. + */ + int64 max_staking_reward_rate_per_hbar = 3; + + /** + * A fraction of network and service fees paid to + * the "node" reward account.
    + * The node staking rewards are paid from the designated reward account + * `0.0.801`, which receives a fraction of network and service fees for + * each transaction. This field is the value of that fraction for the + * last staking period. + */ + Fraction node_reward_fee_fraction = 4; + + /** + * A limit to the number of staking periods held for inactive accounts.
    + * This is the maximum number of trailing staking periods for which an + * account can collect staking rewards.
    + * #### Example + * If this value is 365 with a calendar day period, then each account must + * collect rewards at least once per calendar year to receive the full + * amount of staking rewards earned. + *

    + * Staking rewards SHALL be stored in network state for no more than + * `staking_periods_stored` staking periods.
    + * Each account MUST participate in at least one transaction that affects + * its balance, staking, or staking metadata within this time limit + * to receive all available staking rewards. + */ + int64 staking_periods_stored = 5; + + /** + * A number of minutes representing a staking period.
    + *

    Note
    + * For the special case of `1440` minutes, periods are treated as + * calendar days aligned to midnight UTC, rather than repeating `1440` + * minute periods left-aligned at the epoch.
    + */ + int64 staking_period = 6; + + /** + * A fraction of network and service fees paid to + * the "general" reward account.
    + * The general staking rewards are paid from the designated reward account + * `0.0.800`, which receives a fraction of network and service fees for + * each transaction. This field is the value of that fraction for the + * last staking period. + */ + Fraction staking_reward_fee_fraction = 7; + + /** + * A minimum balance required to pay general staking rewards. + *

    + * If the balance of the staking reward account `0.0.800` is below this + * threshold, staking rewards SHALL NOT be paid in full. + */ + int64 staking_start_threshold = 8; + + /** + * HIP-786 replaced this field with `max_total_reward`.
    + * This was a maximum total number of tinybars to be distributed as staking + * rewards in the staking period that just ended. + */ + int64 staking_reward_rate = 9 [deprecated = true]; + + /** + * An amount reserved in the staking reward account.
    + * This is an amount "reserved" in the balance of account `0.0.800` that + * is already owed for pending rewards that were previously earned but + * have not yet been collected.
    + * This value is further detailed in HIP-786. + */ + int64 reserved_staking_rewards = 10; + + /** + * An available, unreserved, amount in the staking reward account.
    + * This is the balance of the staking reward account `0.0.800` at the close + * of the staking period that just ended, after reduction for all "reserved" + * funds necessary to pay previously earned rewards.
    + * This value is further detailed in HIP-786. + *

    + * This value SHALL be used to calculate the reward ratio according to + * the formula detailed in HIP-782. + */ + int64 unreserved_staking_reward_balance = 11; + + /** + * A minimum balance required for maximum staking rewards.
    + * This value is further detailed in HIP-786. + * The formula to calculate staking rewards is detailed in HIP-782. + *

    + * The value of `unreserved_staking_reward_balance` MUST match or exceed the + * value of this field to support the maximum staking reward ratio.
    + */ + int64 reward_balance_threshold = 12; + + /** + * A maximum network-wide stake that can earn full rewards.
    + * If the network-wide stake, in tinybar, exceeds this value, then staking + * rewards must be reduced to maintain "smooth" reward adjustments as + * defined in HIP-782.
    + * This value is further detailed in HIP-786. + *

    + * If the total network-wide stake exceeds this value, the effective + * staking reward ratio MUST be reduced to maintain solvency of the + * staking reward account. + */ + int64 max_stake_rewarded = 13; + + /** + * A limit amount that could be paid as staking rewards.
    + * In the limit case, the network could pay at most this amount, in tinybar + * as staking rewards for the staking period that just ended, if all other + * conditions were met to perfection.
    + *

    + * This value SHALL reflect the result of a maximum reward calculation that + * takes into account the balance thresholds and maximum stake thresholds + * as defined in HIP-782 and HIP-786.
    + * This value is a convenience. The actual defined calculation SHALL be + * authoritative in the unlikely event this value differs. + */ + int64 max_total_reward = 14; +} + +/** + * Staking information for one node at the end of a staking period. + * + * This SHALL be one entry in a list reported at the end of each + * full staking period. + */ +message NodeStake { + /** + * A limit to the amount of stake considered for consensus weight. + *

    + * The amount of stake (whether accepting rewards or not) assigned to a + * node that exceeds this limit SHALL NOT be considered for + * consensus weight calculation.
    + * If stake to _reward_ for a node exceeds this threshold, then all + * accounts staking to that node SHALL receive a lower reward rate in + * proportion to the excess stake. + */ + int64 max_stake = 1; + + /** + * A minimum amount of HBAR staked to a node to receive rewards. + *

    + * If the amount of stake (whether accepting rewards or not) assigned to + * a node at the start of a staking period is less than this threshold, + * then no rewards SHALL be paid to that node or to any accounts + * staking to that node. + */ + int64 min_stake = 2; + + /** + * A node identifier.
    + * This value uniquely identifies this node within the + * network address book. + */ + int64 node_id = 3; + + /** + * The rate of rewards, in tinybar per HBAR, for the staking reward + * period that just ended. + */ + int64 reward_rate = 4; + + /** + * A consensus weight assigned to this node for the next staking period. + */ + int64 stake = 5; + + /** + * The total amount staked to this node, while declining rewards. + *

    + * This SHALL be the total staked amount, in tinybar, that is staked to + * this node with the value of the `decline_reward` set.
    + * This value MUST be calculated at the beginning of the staking period. + */ + int64 stake_not_rewarded = 6; + + /** + * The total amount staked to this node, while accepting rewards. + *

    + * This SHALL be the total staked amount, in tinybar, that is staked to + * this node with the value of the `decline_reward` not set.
    + * This value MUST be calculated at the beginning of the staking period. + */ + int64 stake_rewarded = 7; +} diff --git a/proto_src/services/node_update.proto b/proto_src/services/node_update.proto new file mode 100644 index 000000000..0b52707bc --- /dev/null +++ b/proto_src/services/node_update.proto @@ -0,0 +1,183 @@ +syntax = "proto3"; + +package com.hedera.hapi.node.addressbook; + +/* + * Copyright (C) 2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "google/protobuf/wrappers.proto"; +import "basic_types.proto"; + +/** + * Transaction body to modify address book node attributes. + * + * - This transaction SHALL enable the node operator, as identified by the + * `admin_key`, to modify operational attributes of the node. + * - This transaction MUST be signed by the active `admin_key` for the node. + * - If this transaction sets a new value for the `admin_key`, then both the + * current `admin_key`, and the new `admin_key` MUST sign this transaction. + * - This transaction SHALL NOT change any field that is not set (is null) in + * this transaction body. + * - This SHALL create a pending update to the node, but the change SHALL NOT + * be immediately applied to the active configuration. + * - All pending node updates SHALL be applied to the active network + * configuration during the next `freeze` transaction with the field + * `freeze_type` set to `PREPARE_UPGRADE`. + * + * ### Block Stream Effects + * None. + */ +message NodeUpdateTransactionBody { + /** + * A consensus node identifier in the network state. + *

    + * The node identified MUST exist in the network address book.
    + * The node identified MUST NOT be deleted.
    + * This value is REQUIRED. + */ + uint64 node_id = 1; + + /** + * An account identifier. + *

    + * If set, this SHALL replace the node account identifier.
    + * If set, this transaction MUST be signed by the active `key` for _both_ + * the current node account _and_ the identified new node account. + */ + proto.AccountID account_id = 2; + + /** + * A short description of the node. + *

    + * This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes` + * (default 100) bytes when encoded as UTF-8.
    + * If set, this value SHALL replace the previous value. + */ + google.protobuf.StringValue description = 3; + + /** + * A list of service endpoints for gossip. + *

    + * If set, this list MUST meet the following requirements. + *


    + * These endpoints SHALL represent the published endpoints to which other + * consensus nodes may _gossip_ transactions.
    + * These endpoints SHOULD NOT specify both address and DNS name.
    + * This list MUST NOT be empty.
    + * This list MUST NOT contain more than `10` entries.
    + * The first two entries in this list SHALL be the endpoints published to + * all consensus nodes.
    + * All other entries SHALL be reserved for future use. + *

    + * Each network may have additional requirements for these endpoints. + * A client MUST check network-specific documentation for those + * details.
    + *

    Example
    + * Hedera Mainnet _requires_ that address be specified, and does not + * permit DNS name (FQDN) to be specified. + *
    + *
    + * Solo, however, _requires_ DNS name (FQDN) but also permits + * address. + *
    + *

    + * If set, the new list SHALL replace the existing list. + */ + repeated proto.ServiceEndpoint gossip_endpoint = 4; + + /** + * A list of service endpoints for gRPC calls. + *

    + * If set, this list MUST meet the following requirements. + *


    + * These endpoints SHALL represent the published endpoints to which clients + * may submit transactions.
    + * These endpoints SHOULD specify address and port.
    + * These endpoints MAY specify a DNS name.
    + * These endpoints SHOULD NOT specify both address and DNS name.
    + * This list MUST NOT be empty.
    + * This list MUST NOT contain more than `8` entries. + *

    + * Each network may have additional requirements for these endpoints. + * A client MUST check network-specific documentation for those + * details. + *

    + * If set, the new list SHALL replace the existing list. + */ + repeated proto.ServiceEndpoint service_endpoint = 5; + + /** + * A certificate used to sign gossip events. + *

    + * This value MUST be a certificate of a type permitted for gossip + * signatures.
    + * This value MUST be the DER encoding of the certificate presented. + *

    + * If set, the new value SHALL replace the existing bytes value. + */ + google.protobuf.BytesValue gossip_ca_certificate = 6; + + /** + * A hash of the node gRPC TLS certificate. + *

    + * This value MAY be used to verify the certificate presented by the node + * during TLS negotiation for gRPC.
    + * This value MUST be a SHA-384 hash.
    + * The TLS certificate to be hashed MUST first be in PEM format and MUST be + * encoded with UTF-8 NFKD encoding to a stream of bytes provided to + * the hash algorithm.
    + *

    + * If set, the new value SHALL replace the existing hash value. + */ + google.protobuf.BytesValue grpc_certificate_hash = 7; + + /** + * An administrative key controlled by the node operator. + *

    + * This field is OPTIONAL.
    + * If set, this key MUST sign this transaction.
    + * If set, this key MUST sign each subsequent transaction to + * update this node.
    + * If set, this field MUST contain a valid `Key` value.
    + * If set, this field MUST NOT be set to an empty `KeyList`. + */ + proto.Key admin_key = 8; + + /** + * A boolean indicating that this node has chosen to decline node rewards + * distributed at the end of staking period. + *

    + * This node SHALL NOT receive reward if this value is set, and `true`. + */ + google.protobuf.BoolValue decline_reward = 9; + + /** + * A web proxy for gRPC from non-gRPC clients. + *

    + * This endpoint SHALL be a Fully Qualified Domain Name (FQDN) using the HTTPS + * protocol, and SHALL support gRPC-Web for use by browser-based clients.
    + * This endpoint MUST be signed by a trusted certificate authority.
    + * This endpoint MUST use a valid port and SHALL be reachable over TLS.
    + * This field MAY be omitted if the node does not support gRPC-Web access.
    + * This field MUST be updated if the gRPC-Web endpoint changes.
    + * This field SHALL enable frontend clients to avoid hard-coded proxy endpoints. + */ + proto.ServiceEndpoint grpc_proxy_endpoint = 10; +} diff --git a/proto_src/services/query.proto b/proto_src/services/query.proto new file mode 100644 index 000000000..97a02c3c7 --- /dev/null +++ b/proto_src/services/query.proto @@ -0,0 +1,246 @@ +/** + * # Query + * This is the parent message for all queries, and this message is + * serialized and signed, with the signature included in the QueryHeader. + * + * All of the entries in the `query` `oneof` are fully specified elsewhere; + * we only include a short summary here. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "get_by_key.proto"; +import "get_by_solidity_id.proto"; + +import "contract_call_local.proto"; +import "contract_get_info.proto"; +import "contract_get_bytecode.proto"; +import "contract_get_records.proto"; + +import "crypto_get_account_balance.proto"; +import "crypto_get_account_records.proto"; +import "crypto_get_info.proto"; +import "crypto_get_live_hash.proto"; +import "crypto_get_stakers.proto"; + +import "file_get_contents.proto"; +import "file_get_info.proto"; + +import "transaction_get_receipt.proto"; +import "transaction_get_record.proto"; +import "transaction_get_fast_record.proto"; + +import "consensus_get_topic_info.proto"; + +import "network_get_version_info.proto"; +import "network_get_execution_time.proto"; + +import "token_get_info.proto"; +import "schedule_get_info.proto"; + +import "token_get_account_nft_infos.proto"; +import "token_get_nft_info.proto"; +import "token_get_nft_infos.proto"; + +import "get_account_details.proto"; + +/** + * A query transaction.
    + * This message is serialized to bytes and those bytes are signed by the + * submitter, with the signature included in the QueryHeader for the query + * request. + */ +message Query { + oneof query { + /** + * Get all entities associated with a given key. + */ + GetByKeyQuery getByKey = 1; + + /** + * Get an Hedera identifier associated with an identifier in EVM + * "Solidity" form.
    + * Most often used in smart contracts to find an Hedera account, + * file, or contract identifier to pass to a system contract or + * precompile. + */ + GetBySolidityIDQuery getBySolidityID = 2; + + /** + * Call a function of a smart contract.
    + * This call is executed exclusively on the node to which it is + * submitted, and is much less expensive than a `contractCall` + * transaction. + */ + ContractCallLocalQuery contractCallLocal = 3; + + /** + * Get information about a smart contract. + */ + ContractGetInfoQuery contractGetInfo = 4; + + /** + * Get runtime bytecode used by a smart contract. + */ + ContractGetBytecodeQuery contractGetBytecode = 5; + + /** + * This query is unsupported and SHALL fail.
    + * Requests for this information MUST be directed to a mirror node. + *

    + * Get Records of a smart contract. + */ + ContractGetRecordsQuery ContractGetRecords = 6 [deprecated = true]; + + /** + * Get the current HBAR balance of an Hedera account or smart contract. + */ + CryptoGetAccountBalanceQuery cryptogetAccountBalance = 7; + + /** + * Get records of all "recent" transactions for which a specified + * account is the effective payer. + */ + CryptoGetAccountRecordsQuery cryptoGetAccountRecords = 8; + + /** + * Get information about an account, including the balance.
    + * This does not get the list of account records. + */ + CryptoGetInfoQuery cryptoGetInfo = 9; + + /** + * This query is unsupported and SHALL fail.
    + * Requests for this information MUST be directed to a mirror node. + *

    + * Get a single livehash from a single account, if present. + */ + CryptoGetLiveHashQuery cryptoGetLiveHash = 10 [deprecated = true]; + + /** + * This query is unsupported and SHALL fail.
    + * Requests for this information MUST be directed to a mirror node. + *

    + * Get all the accounts that are proxy staking to this account. + */ + CryptoGetStakersQuery cryptoGetProxyStakers = 11 [deprecated = true]; + + /** + * Get the content of a file. + */ + FileGetContentsQuery fileGetContents = 12; + + /** + * Get metadata for a file. + */ + FileGetInfoQuery fileGetInfo = 13; + + /** + * Get a receipt for a transaction.
    + * This only returns a receipt if the transaction is "recent", which + * is typically within the previous 180 seconds (3 minutes). + */ + TransactionGetReceiptQuery transactionGetReceipt = 14; + + /** + * Get a record for a transaction. + * This only returns a record if the transaction is "available", which + * is typically within the previous 1 hour. + */ + TransactionGetRecordQuery transactionGetRecord = 15; + + /** + * Get a record for a transaction. + * This only returns a record if the transaction is "recent", which + * is typically within the previous 180 seconds (3 minutes). + */ + TransactionGetFastRecordQuery transactionGetFastRecord = 16; + + /** + * Get metadata for a consensus topic. + */ + ConsensusGetTopicInfoQuery consensusGetTopicInfo = 50; + + /** + * Get the versions of Hedera Services and the HAPI API deployed on + * the responding consensus node. + */ + NetworkGetVersionInfoQuery networkGetVersionInfo = 51; + + /** + * Get metadata for a token. + */ + TokenGetInfoQuery tokenGetInfo = 52; + + /** + * Get metadata for a schedule.
    + * A schedule is a request to execute a transaction at a future + * time. + */ + ScheduleGetInfoQuery scheduleGetInfo = 53; + + /** + * This query is unsupported and SHALL fail.
    + * Requests for this information MUST be directed to a mirror node. + *

    + * Get a list of non-fungible/unique tokens associated with an account. + */ + TokenGetAccountNftInfosQuery tokenGetAccountNftInfos = 54 [deprecated = true]; + + /** + * Get metadata for a specific, serial numbered, non-fungible/unique + * token (NFT). + */ + TokenGetNftInfoQuery tokenGetNftInfo = 55; + + /** + * This query is unsupported and SHALL fail.
    + * Requests for this information MUST be directed to a mirror node. + *

    + * Get metadata for all non-fungible/unique tokens (NFTs) of a single + * type within a range of indices (0-based count of minted tokens). + */ + TokenGetNftInfosQuery tokenGetNftInfos = 56 [deprecated = true]; + + /** + * This query is unsupported and SHALL fail.
    + * Requests for this information MUST be directed to a mirror node. + *

    + * Get the execution time for a recent transaction. + */ + NetworkGetExecutionTimeQuery networkGetExecutionTime = 57 [deprecated = true]; + + /** + * Get detail metadata for an account. + */ + GetAccountDetailsQuery accountDetails = 58; + } +} diff --git a/proto_src/services/query_header.proto b/proto_src/services/query_header.proto new file mode 100644 index 000000000..b86be60b9 --- /dev/null +++ b/proto_src/services/query_header.proto @@ -0,0 +1,96 @@ +/** + * # Query Header + * Messages that comprise a header sent with each query request. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "transaction.proto"; + +/** + * The type of query response.
    + * + * This SHALL be answer-only as a default.
    + * This value SHALL support an "estimated cost" type.
    + * This value SHOULD support a "state proof" type, when available. + */ +enum ResponseType { + /** + * A response with the query answer. + */ + ANSWER_ONLY = 0; + + /** + * A response with both the query answer and a state proof. + */ + ANSWER_STATE_PROOF = 1; + + /** + * A response with the estimated cost to answer the query. + */ + COST_ANSWER = 2; + + /** + * A response with the estimated cost to answer and a state proof. + */ + COST_ANSWER_STATE_PROOF = 3; +} + +/** + * A standard query header.
    + * Each query from the client to the node must contain a QueryHeader, which + * specifies the desired response type, and includes a payment transaction + * that will compensate the network for responding to the query. + * The payment may be blank if the query is free. + * + * The payment transaction MUST be a `cryptoTransfer` from the payer account + * to the account of the node where the query is submitted.
    + * If the payment is sufficient, the network SHALL respond with the response + * type requested.
    + * If the response type is `COST_ANSWER` the payment MUST be unset. + * A state proof SHALL be available for some types of information.
    + * A state proof SHALL be available for a Record, but not a receipt, and the + * response entry for each supported "get info" query. + */ +message QueryHeader { + /** + * A signed `CryptoTransferTransaction` to pay query fees. + *

    + * This MUST transfer HBAR from the "payer" to the responding node account + * sufficient to pay the query fees. + */ + Transaction payment = 1; + + /** + * A type of query response requested. + */ + ResponseType responseType = 2; +} diff --git a/proto_src/services/response.proto b/proto_src/services/response.proto new file mode 100644 index 000000000..7bcc6dc38 --- /dev/null +++ b/proto_src/services/response.proto @@ -0,0 +1,252 @@ +/** + * # Query Response + * The `Response` message is returned from a query transaction. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "get_by_key.proto"; +import "get_by_solidity_id.proto"; + +import "contract_call_local.proto"; +import "contract_get_bytecode.proto"; +import "contract_get_info.proto"; +import "contract_get_records.proto"; + +import "crypto_get_account_balance.proto"; +import "crypto_get_account_records.proto"; +import "crypto_get_info.proto"; +import "crypto_get_live_hash.proto"; +import "crypto_get_stakers.proto"; + +import "file_get_contents.proto"; +import "file_get_info.proto"; + +import "transaction_get_receipt.proto"; +import "transaction_get_record.proto"; +import "transaction_get_fast_record.proto"; + +import "consensus_get_topic_info.proto"; + +import "network_get_version_info.proto"; +import "network_get_execution_time.proto"; + +import "token_get_account_nft_infos.proto"; +import "token_get_info.proto"; +import "token_get_nft_info.proto"; +import "token_get_nft_infos.proto"; + +import "schedule_get_info.proto"; + +import "get_account_details.proto"; + +/** + * A single query response. + * + * Each query MUST define its specific response type.
    + * Each query response MUST include both the information request and a + * `ResponseHeader`.
    + * All possible query response types MUST be listed here in a `oneof`. + */ +message Response { + oneof response { + /** + * A response for a query requesting all accounts, claims, files, and + * smart contract instances whose associated keys include the given Key. + *

    + * > This query is no longer supported. + */ + GetByKeyResponse getByKey = 1; + + /** + * A response for a query requesting Contract, Account, and File + * identifiers for a smart contract, given a Solidity identifier. + */ + GetBySolidityIDResponse getBySolidityID = 2; + + /** + * A response for a _local_ call to a query function of a given smart + * contract, providing function parameter inputs as needed. + *

    + * > This call is only performed on the local node. It is _not_ a + * > network consensus result. + */ + ContractCallLocalResponse contractCallLocal = 3; + + /** + * A response for a query requesting the current bytecode for + * a smart contract. + */ + ContractGetBytecodeResponse contractGetBytecodeResponse = 5; + + /** + * A response for a query requesting detailed information about + * a smart contract. + */ + ContractGetInfoResponse contractGetInfo = 4; + + /** + * A response for a query requesting records of all transactions + * against the given contract in the last 25 hours. + *

    + * > This query is no longer supported. + */ + ContractGetRecordsResponse contractGetRecordsResponse = 6; + + /** + * A response for a query requesting the HBAR balance of an account + * or contract. + */ + CryptoGetAccountBalanceResponse cryptogetAccountBalance = 7; + + /** + * A response for a query requesting records of all "recent" + * transactions for which the specified account is the effective payer. + */ + CryptoGetAccountRecordsResponse cryptoGetAccountRecords = 8; + + /** + * A response for a query requesting information for an account.
    + * This query includes balance, but not allowances or token + * relationships. + */ + CryptoGetInfoResponse cryptoGetInfo = 9; + + /** + * A response for a query requesting detail for a specific live hash + * associated to a specific account. + *

    + * > This query is no longer supported. + */ + CryptoGetLiveHashResponse cryptoGetLiveHash = 10; + + /** + * A response for a query requesting all the accounts that are proxy + * staking to this account. + *

    + * > This query is no longer supported. + */ + CryptoGetStakersResponse cryptoGetProxyStakers = 11; + + /** + * A response for a query requesting the content of a file in the + * Hedera File Service (HFS). + */ + FileGetContentsResponse fileGetContents = 12; + + /** + * A response for a query requesting file metadata from the + * Hedera File Service (HFS). + */ + FileGetInfoResponse fileGetInfo = 13; + + /** + * A response for a query requesting the post-consensus (final) + * result of a transaction. + */ + TransactionGetReceiptResponse transactionGetReceipt = 14; + + /** + * A response for a query requesting a transaction record; the detail + * changes completed in response to a transaction. + */ + TransactionGetRecordResponse transactionGetRecord = 15; + + /** + * A response for a query requesting a very recent transaction record. + *

    + * > This query is no longer supported. + */ + TransactionGetFastRecordResponse transactionGetFastRecord = 16; + + /** + * A response for a query requesting the current state of a topic for + * the Hedera Consensus Service (HCS). + */ + ConsensusGetTopicInfoResponse consensusGetTopicInfo = 150; + + /** + * A response for a query requesting the deployed versions of Hedera + * Services and the API definitions in semantic version format + */ + NetworkGetVersionInfoResponse networkGetVersionInfo = 151; + + /** + * A response for a query requesting metadata for a specific Token. + */ + TokenGetInfoResponse tokenGetInfo = 152; + + /** + * A response for a query requesting detail for a scheduled transaction. + */ + ScheduleGetInfoResponse scheduleGetInfo = 153; + + /** + * A response for a query requesting detail for a subset of individual + * non-fungible/unique tokens owned by an account.
    + * The requested tokens are selected by a list index, which is based + * on the order in which the tokens were added to the account. + */ + TokenGetAccountNftInfosResponse tokenGetAccountNftInfos = 154; + + /** + * A response for a query requesting detail for a specific + * non-fungible/unique token selected by both token identifier and + * serial number. + */ + TokenGetNftInfoResponse tokenGetNftInfo = 155; + + /** + * A response for a query requesting detail for a subset of individual + * non-fungible/unique tokens.
    + * The requested tokens are selected by a list index, which is based + * on the order in which the tokens were minted. + */ + TokenGetNftInfosResponse tokenGetNftInfos = 156; + + /** + * A response for a query requesting the time, in nanoseconds, spent + * in direct processing for one or more recent transactions. + *

    + * > This query is no longer supported. + */ + NetworkGetExecutionTimeResponse networkGetExecutionTime = 157; + + /** + * A response for a query requesting detail information + * about an account. + *

    + * This query is a privileged query and "system" account authorization + * is REQUIRED for this query. + */ + GetAccountDetailsResponse accountDetails = 158; + } +} diff --git a/proto_src/services/response_code.proto b/proto_src/services/response_code.proto new file mode 100644 index 000000000..64c9fb1c3 --- /dev/null +++ b/proto_src/services/response_code.proto @@ -0,0 +1,1778 @@ +/** + * # Response Code Enumeration + * An enumeration of possible response codes. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +/** + * An enumeration of possible response codes. + */ +enum ResponseCodeEnum { + /** + * The transaction passed the precheck validations. + */ + OK = 0; + + /** + * For any error not handled by specific error codes listed below. + */ + INVALID_TRANSACTION = 1; + + /** + * Payer account does not exist. + */ + PAYER_ACCOUNT_NOT_FOUND = 2; + + /** + * Node Account provided does not match the node account of the node the transaction was submitted + * to. + */ + INVALID_NODE_ACCOUNT = 3; + + /** + * Pre-Check error when TransactionValidStart + transactionValidDuration is less than current + * consensus time. + */ + TRANSACTION_EXPIRED = 4; + + /** + * Transaction start time is greater than current consensus time + */ + INVALID_TRANSACTION_START = 5; + + /** + * The given transactionValidDuration was either non-positive, or greater than the maximum + * valid duration of 180 secs. + * + */ + INVALID_TRANSACTION_DURATION = 6; + + /** + * The transaction signature is not valid + */ + INVALID_SIGNATURE = 7; + + /** + * Transaction memo size exceeded 100 bytes + */ + MEMO_TOO_LONG = 8; + + /** + * The fee provided in the transaction is insufficient for this type of transaction + */ + INSUFFICIENT_TX_FEE = 9; + + /** + * The payer account has insufficient cryptocurrency to pay the transaction fee + */ + INSUFFICIENT_PAYER_BALANCE = 10; + + /** + * This transaction ID is a duplicate of one that was submitted to this node or reached consensus + * in the last 180 seconds (receipt period) + */ + DUPLICATE_TRANSACTION = 11; + + /** + * If API is throttled out + */ + BUSY = 12; + + /** + * The API is not currently supported + */ + NOT_SUPPORTED = 13; + + /** + * The file id is invalid or does not exist + */ + INVALID_FILE_ID = 14; + + /** + * The account id is invalid or does not exist + */ + INVALID_ACCOUNT_ID = 15; + + /** + * The contract id is invalid or does not exist + */ + INVALID_CONTRACT_ID = 16; + + /** + * Transaction id is not valid + */ + INVALID_TRANSACTION_ID = 17; + + /** + * Receipt for given transaction id does not exist + */ + RECEIPT_NOT_FOUND = 18; + + /** + * Record for given transaction id does not exist + */ + RECORD_NOT_FOUND = 19; + + /** + * The solidity id is invalid or entity with this solidity id does not exist + */ + INVALID_SOLIDITY_ID = 20; + + /** + * The responding node has submitted the transaction to the network. Its final status is still + * unknown. + */ + UNKNOWN = 21; + + /** + * The transaction succeeded + */ + SUCCESS = 22; + + /** + * There was a system error and the transaction failed because of invalid request parameters. + */ + FAIL_INVALID = 23; + + /** + * There was a system error while performing fee calculation, reserved for future. + */ + FAIL_FEE = 24; + + /** + * There was a system error while performing balance checks, reserved for future. + */ + FAIL_BALANCE = 25; + + /** + * Key not provided in the transaction body + */ + KEY_REQUIRED = 26; + + /** + * Unsupported algorithm/encoding used for keys in the transaction + */ + BAD_ENCODING = 27; + + /** + * When the account balance is not sufficient for the transfer + */ + INSUFFICIENT_ACCOUNT_BALANCE = 28; + + /** + * During an update transaction when the system is not able to find the Users Solidity address + */ + INVALID_SOLIDITY_ADDRESS = 29; + + /** + * Not enough gas was supplied to execute transaction + */ + INSUFFICIENT_GAS = 30; + + /** + * contract byte code size is over the limit + */ + CONTRACT_SIZE_LIMIT_EXCEEDED = 31; + + /** + * local execution (query) is requested for a function which changes state + */ + LOCAL_CALL_MODIFICATION_EXCEPTION = 32; + + /** + * Contract REVERT OPCODE executed + */ + CONTRACT_REVERT_EXECUTED = 33; + + /** + * For any contract execution related error not handled by specific error codes listed above. + */ + CONTRACT_EXECUTION_EXCEPTION = 34; + + /** + * In Query validation, account with +ve(amount) value should be Receiving node account, the + * receiver account should be only one account in the list + */ + INVALID_RECEIVING_NODE_ACCOUNT = 35; + + /** + * Header is missing in Query request + */ + MISSING_QUERY_HEADER = 36; + + /** + * The update of the account failed + */ + ACCOUNT_UPDATE_FAILED = 37; + + /** + * Provided key encoding was not supported by the system + */ + INVALID_KEY_ENCODING = 38; + + /** + * null solidity address + */ + NULL_SOLIDITY_ADDRESS = 39; + + /** + * update of the contract failed + */ + CONTRACT_UPDATE_FAILED = 40; + + /** + * the query header is invalid + */ + INVALID_QUERY_HEADER = 41; + + /** + * Invalid fee submitted + */ + INVALID_FEE_SUBMITTED = 42; + + /** + * Payer signature is invalid + */ + INVALID_PAYER_SIGNATURE = 43; + + /** + * The keys were not provided in the request. + */ + KEY_NOT_PROVIDED = 44; + + /** + * Expiration time provided in the transaction was invalid. + */ + INVALID_EXPIRATION_TIME = 45; + + /** + * WriteAccess Control Keys are not provided for the file + */ + NO_WACL_KEY = 46; + + /** + * The contents of file are provided as empty. + */ + FILE_CONTENT_EMPTY = 47; + + /** + * The crypto transfer credit and debit do not sum equal to 0 + */ + INVALID_ACCOUNT_AMOUNTS = 48; + + /** + * Transaction body provided is empty + */ + EMPTY_TRANSACTION_BODY = 49; + + /** + * Invalid transaction body provided + */ + INVALID_TRANSACTION_BODY = 50; + + /** + * 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_TYPE_MISMATCHING_KEY = 51; + + /** + * 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. + */ + INVALID_SIGNATURE_COUNT_MISMATCHING_KEY = 52; + + /** + * the livehash body is empty + */ + EMPTY_LIVE_HASH_BODY = 53; + + /** + * the livehash data is missing + */ + EMPTY_LIVE_HASH = 54; + + /** + * the keys for a livehash are missing + */ + EMPTY_LIVE_HASH_KEYS = 55; + + /** + * the livehash data is not the output of a SHA-384 digest + */ + INVALID_LIVE_HASH_SIZE = 56; + + /** + * the query body is empty + */ + EMPTY_QUERY_BODY = 57; + + /** + * the crypto livehash query is empty + */ + EMPTY_LIVE_HASH_QUERY = 58; + + /** + * the livehash is not present + */ + LIVE_HASH_NOT_FOUND = 59; + + /** + * the account id passed has not yet been created. + */ + ACCOUNT_ID_DOES_NOT_EXIST = 60; + + /** + * the livehash already exists for a given account + */ + LIVE_HASH_ALREADY_EXISTS = 61; + + /** + * File WACL keys are invalid + */ + INVALID_FILE_WACL = 62; + + /** + * Serialization failure + */ + SERIALIZATION_FAILED = 63; + + /** + * The size of the Transaction is greater than transactionMaxBytes + */ + TRANSACTION_OVERSIZE = 64; + + /** + * The Transaction has more than 50 levels + */ + TRANSACTION_TOO_MANY_LAYERS = 65; + + /** + * Contract is marked as deleted + */ + CONTRACT_DELETED = 66; + + /** + * the platform node is either disconnected or lagging behind. + */ + PLATFORM_NOT_ACTIVE = 67; + + /** + * one public key matches more than one prefixes on the signature map + */ + KEY_PREFIX_MISMATCH = 68; + + /** + * transaction not created by platform due to large backlog + */ + PLATFORM_TRANSACTION_NOT_CREATED = 69; + + /** + * auto renewal period is not a positive number of seconds + */ + INVALID_RENEWAL_PERIOD = 70; + + /** + * the response code when a smart contract id is passed for a crypto API request + */ + INVALID_PAYER_ACCOUNT_ID = 71; + + /** + * the account has been marked as deleted + */ + ACCOUNT_DELETED = 72; + + /** + * the file has been marked as deleted + */ + FILE_DELETED = 73; + + /** + * same accounts repeated in the transfer account list + */ + ACCOUNT_REPEATED_IN_ACCOUNT_AMOUNTS = 74; + + /** + * attempting to set negative balance value for crypto account + */ + SETTING_NEGATIVE_ACCOUNT_BALANCE = 75; + + /** + * when deleting smart contract that has crypto balance either transfer account or transfer smart + * contract is required + */ + OBTAINER_REQUIRED = 76; + + /** + * when deleting smart contract that has crypto balance you can not use the same contract id as + * transferContractId as the one being deleted + */ + OBTAINER_SAME_CONTRACT_ID = 77; + + /** + * transferAccountId or transferContractId specified for contract delete does not exist + */ + OBTAINER_DOES_NOT_EXIST = 78; + + /** + * attempting to modify (update or delete a immutable smart contract, i.e. one created without a + * admin key) + */ + MODIFYING_IMMUTABLE_CONTRACT = 79; + + /** + * Unexpected exception thrown by file system functions + */ + FILE_SYSTEM_EXCEPTION = 80; + + /** + * the duration is not a subset of [MINIMUM_AUTORENEW_DURATION,MAXIMUM_AUTORENEW_DURATION] + */ + AUTORENEW_DURATION_NOT_IN_RANGE = 81; + + /** + * Decoding the smart contract binary to a byte array failed. Check that the input is a valid hex + * string. + */ + ERROR_DECODING_BYTESTRING = 82; + + /** + * File to create a smart contract was of length zero + */ + CONTRACT_FILE_EMPTY = 83; + + /** + * Bytecode for smart contract is of length zero + */ + CONTRACT_BYTECODE_EMPTY = 84; + + /** + * Attempt to set negative initial balance + */ + INVALID_INITIAL_BALANCE = 85; + + /** + * Attempt to set negative receive record threshold + */ + INVALID_RECEIVE_RECORD_THRESHOLD = 86 [deprecated = true]; + + /** + * Attempt to set negative send record threshold + */ + INVALID_SEND_RECORD_THRESHOLD = 87 [deprecated = true]; + + /** + * Special Account Operations should be performed by only Genesis account, return this code if it + * is not Genesis Account + */ + ACCOUNT_IS_NOT_GENESIS_ACCOUNT = 88; + + /** + * The fee payer account doesn't have permission to submit such Transaction + */ + PAYER_ACCOUNT_UNAUTHORIZED = 89; + + /** + * FreezeTransactionBody is invalid + */ + INVALID_FREEZE_TRANSACTION_BODY = 90; + + /** + * FreezeTransactionBody does not exist + */ + FREEZE_TRANSACTION_BODY_NOT_FOUND = 91; + + /** + * Exceeded the number of accounts (both from and to) allowed for crypto transfer list + */ + TRANSFER_LIST_SIZE_LIMIT_EXCEEDED = 92; + + /** + * Smart contract result size greater than specified maxResultSize + */ + RESULT_SIZE_LIMIT_EXCEEDED = 93; + + /** + * The payer account is not a special account(account 0.0.55) + */ + NOT_SPECIAL_ACCOUNT = 94; + + /** + * Negative gas was offered in smart contract call + */ + CONTRACT_NEGATIVE_GAS = 95; + + /** + * Negative value / initial balance was specified in a smart contract call / create + */ + CONTRACT_NEGATIVE_VALUE = 96; + + /** + * Failed to update fee file + */ + INVALID_FEE_FILE = 97; + + /** + * Failed to update exchange rate file + */ + INVALID_EXCHANGE_RATE_FILE = 98; + + /** + * Payment tendered for contract local call cannot cover both the fee and the gas + */ + INSUFFICIENT_LOCAL_CALL_GAS = 99; + + /** + * Entities with Entity ID below 1000 are not allowed to be deleted + */ + ENTITY_NOT_ALLOWED_TO_DELETE = 100; + + /** + * 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). + */ + AUTHORIZATION_FAILED = 101; + + /** + * Fee Schedule Proto uploaded but not valid (append or update is required) + */ + 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 File Part uploaded + */ + FEE_SCHEDULE_FILE_PART_UPLOADED = 104; + + /** + * The change on Exchange Rate exceeds Exchange_Rate_Allowed_Percentage + */ + EXCHANGE_RATE_CHANGE_LIMIT_EXCEEDED = 105; + + /** + * Contract permanent storage exceeded the currently allowable limit + */ + MAX_CONTRACT_STORAGE_EXCEEDED = 106; + + /** + * Transfer Account should not be same as Account to be deleted + */ + TRANSFER_ACCOUNT_SAME_AS_DELETE_ACCOUNT = 107; + + TOTAL_LEDGER_BALANCE_INVALID = 108; + /** + * The expiration date/time on a smart contract may not be reduced + */ + EXPIRATION_REDUCTION_NOT_ALLOWED = 110; + + /** + * Gas exceeded currently allowable gas limit per transaction + */ + MAX_GAS_LIMIT_EXCEEDED = 111; + + /** + * File size exceeded the currently allowable limit + */ + MAX_FILE_SIZE_EXCEEDED = 112; + + /** + * When a valid signature is not provided for operations on account with receiverSigRequired=true + */ + RECEIVER_SIG_REQUIRED = 113; + + /** + * The Topic ID specified is not in the system. + */ + INVALID_TOPIC_ID = 150; + + /** + * A provided admin key was invalid. Verify the bytes for an Ed25519 public key are exactly 32 bytes; and the bytes for a compressed ECDSA(secp256k1) key are exactly 33 bytes, with the first byte either 0x02 or 0x03.. + */ + INVALID_ADMIN_KEY = 155; + + /** + * A provided submit key was invalid. + */ + INVALID_SUBMIT_KEY = 156; + + /** + * An attempted operation was not authorized (ie - a deleteTopic for a topic with no adminKey). + */ + UNAUTHORIZED = 157; + + /** + * A ConsensusService message is empty. + */ + INVALID_TOPIC_MESSAGE = 158; + + /** + * The autoRenewAccount specified is not a valid, active account. + */ + INVALID_AUTORENEW_ACCOUNT = 159; + + /** + * An adminKey was not specified on the topic, so there must not be an autoRenewAccount. + */ + AUTORENEW_ACCOUNT_NOT_ALLOWED = 160; + + /** + * 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 + + /** + * The Scheduled entity does not exist; or has now expired, been deleted, or been executed + */ + INVALID_SCHEDULE_ID = 201; + + /** + * The Scheduled entity cannot be modified. Admin key not set + */ + SCHEDULE_IS_IMMUTABLE = 202; + + /** + * The provided Scheduled Payer does not exist + */ + INVALID_SCHEDULE_PAYER_ID = 203; + + /** + * The Schedule Create Transaction TransactionID account does not exist + */ + INVALID_SCHEDULE_ACCOUNT_ID = 204; + + /** + * The provided sig map did not contain any new valid signatures from required signers of the scheduled transaction + */ + NO_NEW_VALID_SIGNATURES = 205; + + /** + * The required signers for a scheduled transaction cannot be resolved, for example because they do not exist or have been deleted + */ + UNRESOLVABLE_REQUIRED_SIGNERS = 206; + + /** + * Only whitelisted transaction types may be scheduled + */ + SCHEDULED_TRANSACTION_NOT_IN_WHITELIST = 207; + + /** + * At least one of the signatures in the provided sig map did not represent a valid signature for any required signer + */ + SOME_SIGNATURES_WERE_INVALID = 208; + + /** + * The scheduled field in the TransactionID may not be set to true + */ + TRANSACTION_ID_FIELD_NOT_ALLOWED = 209; + + /** + * A schedule already exists with the same identifying fields of an attempted ScheduleCreate (that is, all fields other than scheduledPayerAccountID) + */ + IDENTICAL_SCHEDULE_ALREADY_CREATED = 210; + + /** + * A string field in the transaction has a UTF-8 encoding with the prohibited zero byte + */ + INVALID_ZERO_BYTE_IN_STRING = 211; + + /** + * A schedule being signed or deleted has already been deleted + */ + SCHEDULE_ALREADY_DELETED = 212; + + /** + * A schedule being signed or deleted has already been executed + */ + SCHEDULE_ALREADY_EXECUTED = 213; + + /** + * ConsensusSubmitMessage request's message size is larger than allowed. + */ + MESSAGE_SIZE_TOO_LARGE = 214; + + /** + * An operation was assigned to more than one throttle group in a given bucket + */ + OPERATION_REPEATED_IN_BUCKET_GROUPS = 215; + + /** + * The capacity needed to satisfy all opsPerSec groups in a bucket overflowed a signed 8-byte integral type + */ + BUCKET_CAPACITY_OVERFLOW = 216; + + /** + * 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 + */ + NODE_CAPACITY_NOT_SUFFICIENT_FOR_OPERATION = 217; + + /** + * A bucket was defined without any throttle groups + */ + BUCKET_HAS_NO_THROTTLE_GROUPS = 218; + + /** + * A throttle group was granted zero opsPerSec + */ + THROTTLE_GROUP_HAS_ZERO_OPS_PER_SEC = 219; + + /** + * The throttle definitions file was updated, but some supported operations were not assigned a bucket + */ + SUCCESS_BUT_MISSING_EXPECTED_OPERATION = 220; + + /** + * The new contents for the throttle definitions system file were not valid protobuf + */ + UNPARSEABLE_THROTTLE_DEFINITIONS = 221; + + /** + * The new throttle definitions system file were invalid, and no more specific error could be divined + */ + INVALID_THROTTLE_DEFINITIONS = 222; + + /** + * The transaction references an account which has passed its expiration without renewal funds available, and currently remains in the ledger only because of the grace period given to expired entities + */ + ACCOUNT_EXPIRED_AND_PENDING_REMOVAL = 223; + + /** + * Invalid token max supply + */ + INVALID_TOKEN_MAX_SUPPLY = 224; + + /** + * Invalid token nft serial number + */ + INVALID_TOKEN_NFT_SERIAL_NUMBER = 225; + + /** + * Invalid nft id + */ + INVALID_NFT_ID = 226; + + /** + * Nft metadata is too long + */ + METADATA_TOO_LONG = 227; + + /** + * Repeated operations count exceeds the limit + */ + BATCH_SIZE_LIMIT_EXCEEDED = 228; + + /** + * The range of data to be gathered is out of the set boundaries + */ + INVALID_QUERY_RANGE = 229; + + /** + * A custom fractional fee set a denominator of zero + */ + FRACTION_DIVIDES_BY_ZERO = 230; + + /** + * The transaction payer could not afford a custom fee + */ + INSUFFICIENT_PAYER_BALANCE_FOR_CUSTOM_FEE = 231 [deprecated = true]; + + /** + * More than 10 custom fees were specified + */ + CUSTOM_FEES_LIST_TOO_LONG = 232; + + /** + * Any of the feeCollector accounts for customFees is invalid + */ + INVALID_CUSTOM_FEE_COLLECTOR = 233; + + /** + * Any of the token Ids in customFees is invalid + */ + INVALID_TOKEN_ID_IN_CUSTOM_FEES = 234; + + /** + * Any of the token Ids in customFees are not associated to feeCollector + */ + TOKEN_NOT_ASSOCIATED_TO_FEE_COLLECTOR = 235; + + /** + * A token cannot have more units minted due to its configured supply ceiling + */ + TOKEN_MAX_SUPPLY_REACHED = 236; + + /** + * The transaction attempted to move an NFT serial number from an account other than its owner + */ + SENDER_DOES_NOT_OWN_NFT_SERIAL_NO = 237; + + /** + * A custom fee schedule entry did not specify either a fixed or fractional fee + */ + CUSTOM_FEE_NOT_FULLY_SPECIFIED = 238; + + /** + * Only positive fees may be assessed at this time + */ + CUSTOM_FEE_MUST_BE_POSITIVE = 239; + + /** + * Fee schedule key is not set on token + */ + TOKEN_HAS_NO_FEE_SCHEDULE_KEY = 240; + + /** + * A fractional custom fee exceeded the range of a 64-bit signed integer + */ + CUSTOM_FEE_OUTSIDE_NUMERIC_RANGE = 241; + + /** + * A royalty cannot exceed the total fungible value exchanged for an NFT + */ + ROYALTY_FRACTION_CANNOT_EXCEED_ONE = 242; + + /** + * Each fractional custom fee must have its maximum_amount, if specified, at least its minimum_amount + */ + FRACTIONAL_FEE_MAX_AMOUNT_LESS_THAN_MIN_AMOUNT = 243; + + /** + * A fee schedule update tried to clear the custom fees from a token whose fee schedule was already empty + */ + CUSTOM_SCHEDULE_ALREADY_HAS_NO_FEES = 244; + + /** + * Only tokens of type FUNGIBLE_COMMON can be used to as fee schedule denominations + */ + CUSTOM_FEE_DENOMINATION_MUST_BE_FUNGIBLE_COMMON = 245; + + /** + * Only tokens of type FUNGIBLE_COMMON can have fractional fees + */ + CUSTOM_FRACTIONAL_FEE_ONLY_ALLOWED_FOR_FUNGIBLE_COMMON = 246; + + /** + * The provided custom fee schedule key was invalid + */ + INVALID_CUSTOM_FEE_SCHEDULE_KEY = 247; + + /** + * The requested token mint metadata was invalid + */ + INVALID_TOKEN_MINT_METADATA = 248; + + /** + * The requested token burn metadata was invalid + */ + INVALID_TOKEN_BURN_METADATA = 249; + + /** + * The treasury for a unique token cannot be changed until it owns no NFTs + */ + CURRENT_TREASURY_STILL_OWNS_NFTS = 250; + + /** + * An account cannot be dissociated from a unique token if it owns NFTs for the token + */ + ACCOUNT_STILL_OWNS_NFTS = 251; + + /** + * A NFT can only be burned when owned by the unique token's treasury + */ + TREASURY_MUST_OWN_BURNED_NFT = 252; + + /** + * An account did not own the NFT to be wiped + */ + ACCOUNT_DOES_NOT_OWN_WIPED_NFT = 253; + + /** + * An AccountAmount token transfers list referenced a token type other than FUNGIBLE_COMMON + */ + ACCOUNT_AMOUNT_TRANSFERS_ONLY_ALLOWED_FOR_FUNGIBLE_COMMON = 254; + + /** + * All the NFTs allowed in the current price regime have already been minted + */ + MAX_NFTS_IN_PRICE_REGIME_HAVE_BEEN_MINTED = 255; + + /** + * The payer account has been marked as deleted + */ + PAYER_ACCOUNT_DELETED = 256; + + /** + * The reference chain of custom fees for a transferred token exceeded the maximum length of 2 + */ + CUSTOM_FEE_CHARGING_EXCEEDED_MAX_RECURSION_DEPTH = 257; + + /** + * More than 20 balance adjustments were to satisfy a CryptoTransfer and its implied custom fee payments + */ + CUSTOM_FEE_CHARGING_EXCEEDED_MAX_ACCOUNT_AMOUNTS = 258; + + /** + * The sender account in the token transfer transaction could not afford a custom fee + */ + INSUFFICIENT_SENDER_ACCOUNT_BALANCE_FOR_CUSTOM_FEE = 259; + + /** + * Currently no more than 4,294,967,295 NFTs may be minted for a given unique token type + */ + SERIAL_NUMBER_LIMIT_REACHED = 260; + + /** + * Only tokens of type NON_FUNGIBLE_UNIQUE can have royalty fees + */ + CUSTOM_ROYALTY_FEE_ONLY_ALLOWED_FOR_NON_FUNGIBLE_UNIQUE = 261; + + /** + * The account has reached the limit on the automatic associations count. + */ + NO_REMAINING_AUTOMATIC_ASSOCIATIONS = 262; + + /** + * Already existing automatic associations are more than the new maximum automatic associations. + */ + EXISTING_AUTOMATIC_ASSOCIATIONS_EXCEED_GIVEN_LIMIT = 263; + + /** + * Cannot set the number of automatic associations for an account more than the maximum allowed + * token associations tokens.maxPerAccount. + */ + REQUESTED_NUM_AUTOMATIC_ASSOCIATIONS_EXCEEDS_ASSOCIATION_LIMIT = 264; + + /** + * Token is paused. This Token cannot be a part of any kind of Transaction until unpaused. + */ + TOKEN_IS_PAUSED = 265; + + /** + * Pause key is not set on token + */ + TOKEN_HAS_NO_PAUSE_KEY = 266; + + /** + * The provided pause key was invalid + */ + INVALID_PAUSE_KEY = 267; + + /** + * The update file in a freeze transaction body must exist. + */ + FREEZE_UPDATE_FILE_DOES_NOT_EXIST = 268; + + /** + * The hash of the update file in a freeze transaction body must match the in-memory hash. + */ + FREEZE_UPDATE_FILE_HASH_DOES_NOT_MATCH = 269; + + /** + * A FREEZE_UPGRADE transaction was handled with no previous update prepared. + */ + NO_UPGRADE_HAS_BEEN_PREPARED = 270; + + /** + * A FREEZE_ABORT transaction was handled with no scheduled freeze. + */ + NO_FREEZE_IS_SCHEDULED = 271; + + /** + * The update file hash when handling a FREEZE_UPGRADE transaction differs from the file + * hash at the time of handling the PREPARE_UPGRADE transaction. + */ + UPDATE_FILE_HASH_CHANGED_SINCE_PREPARE_UPGRADE = 272; + + /** + * The given freeze start time was in the (consensus) past. + */ + FREEZE_START_TIME_MUST_BE_FUTURE = 273; + + /** + * The prepared update file cannot be updated or appended until either the upgrade has + * been completed, or a FREEZE_ABORT has been handled. + */ + PREPARED_UPDATE_FILE_IS_IMMUTABLE = 274; + + /** + * Once a freeze is scheduled, it must be aborted before any other type of freeze can + * can be performed. + */ + FREEZE_ALREADY_SCHEDULED = 275; + + /** + * If an NMT upgrade has been prepared, the following operation must be a FREEZE_UPGRADE. + * (To issue a FREEZE_ONLY, submit a FREEZE_ABORT first.) + */ + FREEZE_UPGRADE_IN_PROGRESS = 276; + + /** + * If an NMT upgrade has been prepared, the subsequent FREEZE_UPGRADE transaction must + * confirm the id of the file to be used in the upgrade. + */ + UPDATE_FILE_ID_DOES_NOT_MATCH_PREPARED = 277; + + /** + * If an NMT upgrade has been prepared, the subsequent FREEZE_UPGRADE transaction must + * confirm the hash of the file to be used in the upgrade. + */ + UPDATE_FILE_HASH_DOES_NOT_MATCH_PREPARED = 278; + + /** + * Consensus throttle did not allow execution of this transaction. System is throttled at + * consensus level. + */ + CONSENSUS_GAS_EXHAUSTED = 279; + + /** + * A precompiled contract succeeded, but was later reverted. + */ + REVERTED_SUCCESS = 280; + + /** + * All contract storage allocated to the current price regime has been consumed. + */ + MAX_STORAGE_IN_PRICE_REGIME_HAS_BEEN_USED = 281; + + /** + * An alias used in a CryptoTransfer transaction is not the serialization of a primitive Key + * message--that is, a Key with a single Ed25519 or ECDSA(secp256k1) public key and no + * unknown protobuf fields. + */ + INVALID_ALIAS_KEY = 282; + + /** + * A fungible token transfer expected a different number of decimals than the involved + * type actually has. + */ + UNEXPECTED_TOKEN_DECIMALS = 283; + + /** + * The proxy account id is invalid or does not exist. + */ + INVALID_PROXY_ACCOUNT_ID = 284 [deprecated = true]; + + /** + * The transfer account id in CryptoDelete transaction is invalid or does not exist. + */ + INVALID_TRANSFER_ACCOUNT_ID = 285; + + /** + * The fee collector account id in TokenFeeScheduleUpdate is invalid or does not exist. + */ + INVALID_FEE_COLLECTOR_ACCOUNT_ID = 286; + + /** + * The alias already set on an account cannot be updated using CryptoUpdate transaction. + */ + ALIAS_IS_IMMUTABLE = 287; + + /** + * An approved allowance specifies a spender account that is the same as the hbar/token + * owner account. + */ + SPENDER_ACCOUNT_SAME_AS_OWNER = 288; + + /** + * The establishment or adjustment of an approved allowance cause the token allowance + * to exceed the token maximum supply. + */ + AMOUNT_EXCEEDS_TOKEN_MAX_SUPPLY = 289; + + /** + * The specified amount for an approved allowance cannot be negative. + */ + NEGATIVE_ALLOWANCE_AMOUNT = 290; + + /** + * The approveForAll flag cannot be set for a fungible token. + */ + CANNOT_APPROVE_FOR_ALL_FUNGIBLE_COMMON = 291 [deprecated = true]; + + /** + * The spender does not have an existing approved allowance with the hbar/token owner. + */ + SPENDER_DOES_NOT_HAVE_ALLOWANCE = 292; + + /** + * The transfer amount exceeds the current approved allowance for the spender account. + */ + AMOUNT_EXCEEDS_ALLOWANCE = 293; + + /** + * The payer account of an approveAllowances or adjustAllowance transaction is attempting + * to go beyond the maximum allowed number of allowances. + */ + MAX_ALLOWANCES_EXCEEDED = 294; + + /** + * No allowances have been specified in the approval transaction. + */ + EMPTY_ALLOWANCES = 295; + + /** + * Spender is repeated more than once in Crypto or Token or NFT allowance lists in a single + * CryptoApproveAllowance transaction. + */ + SPENDER_ACCOUNT_REPEATED_IN_ALLOWANCES = 296 [deprecated = true]; + + /** + * Serial numbers are repeated in nft allowance for a single spender account + */ + REPEATED_SERIAL_NUMS_IN_NFT_ALLOWANCES = 297 [deprecated = true]; + + /** + * Fungible common token used in NFT allowances + */ + FUNGIBLE_TOKEN_IN_NFT_ALLOWANCES = 298; + + /** + * Non fungible token used in fungible token allowances + */ + NFT_IN_FUNGIBLE_TOKEN_ALLOWANCES = 299; + + /** + * The account id specified as the owner is invalid or does not exist. + */ + INVALID_ALLOWANCE_OWNER_ID = 300; + + /** + * The account id specified as the spender is invalid or does not exist. + */ + INVALID_ALLOWANCE_SPENDER_ID = 301; + + /** + * [Deprecated] If the CryptoDeleteAllowance transaction has repeated crypto or token or Nft allowances to delete. + */ + REPEATED_ALLOWANCES_TO_DELETE = 302 [deprecated = true]; + + /** + * If the account Id specified as the delegating spender is invalid or does not exist. + */ + INVALID_DELEGATING_SPENDER = 303; + + /** + * The delegating Spender cannot grant approveForAll allowance on a NFT token type for another spender. + */ + DELEGATING_SPENDER_CANNOT_GRANT_APPROVE_FOR_ALL = 304; + + /** + * The delegating Spender cannot grant allowance on a NFT serial for another spender as it doesnt not have approveForAll + * granted on token-owner. + */ + DELEGATING_SPENDER_DOES_NOT_HAVE_APPROVE_FOR_ALL = 305; + + /** + * The scheduled transaction could not be created because it's expiration_time was too far in the future. + */ + SCHEDULE_EXPIRATION_TIME_TOO_FAR_IN_FUTURE = 306; + + /** + * The scheduled transaction could not be created because it's expiration_time was less than or equal to the consensus time. + */ + SCHEDULE_EXPIRATION_TIME_MUST_BE_HIGHER_THAN_CONSENSUS_TIME = 307; + + /** + * The scheduled transaction could not be created because it would cause throttles to be violated on the specified expiration_time. + */ + SCHEDULE_FUTURE_THROTTLE_EXCEEDED = 308; + + /** + * The scheduled transaction could not be created because it would cause the gas limit to be violated on the specified expiration_time. + */ + SCHEDULE_FUTURE_GAS_LIMIT_EXCEEDED = 309; + + /** + * The ethereum transaction either failed parsing or failed signature validation, or some other EthereumTransaction error not covered by another response code. + */ + INVALID_ETHEREUM_TRANSACTION = 310; + + /** + * EthereumTransaction was signed against a chainId that this network does not support. + */ + WRONG_CHAIN_ID = 311; + + /** + * This transaction specified an ethereumNonce that is not the current ethereumNonce of the account. + */ + WRONG_NONCE = 312; + + /** + * The ethereum transaction specified an access list, which the network does not support. + */ + ACCESS_LIST_UNSUPPORTED = 313; + + /** + * A schedule being signed or deleted has passed it's expiration date and is pending execution if needed and then expiration. + */ + SCHEDULE_PENDING_EXPIRATION = 314; + + /** + * A selfdestruct or ContractDelete targeted a contract that is a token treasury. + */ + CONTRACT_IS_TOKEN_TREASURY = 315; + + /** + * A selfdestruct or ContractDelete targeted a contract with non-zero token balances. + */ + CONTRACT_HAS_NON_ZERO_TOKEN_BALANCES = 316; + + /** + * A contract referenced by a transaction is "detached"; that is, expired and lacking any + * hbar funds for auto-renewal payment---but still within its post-expiry grace period. + */ + CONTRACT_EXPIRED_AND_PENDING_REMOVAL = 317; + + /** + * A ContractUpdate requested removal of a contract's auto-renew account, but that contract has + * no auto-renew account. + */ + CONTRACT_HAS_NO_AUTO_RENEW_ACCOUNT = 318; + + /** + * A delete transaction submitted via HAPI set permanent_removal=true + */ + PERMANENT_REMOVAL_REQUIRES_SYSTEM_INITIATION = 319; + + /* + * A CryptoCreate or ContractCreate used the deprecated proxyAccountID field. + */ + PROXY_ACCOUNT_ID_FIELD_IS_DEPRECATED = 320; + + /** + * An account set the staked_account_id to itself in CryptoUpdate or ContractUpdate transactions. + */ + SELF_STAKING_IS_NOT_ALLOWED = 321; + + /** + * The staking account id or staking node id given is invalid or does not exist. + */ + INVALID_STAKING_ID = 322; + + /** + * Native staking, while implemented, has not yet enabled by the council. + */ + STAKING_NOT_ENABLED = 323; + + /** + * The range provided in UtilPrng transaction is negative. + */ + INVALID_PRNG_RANGE = 324; + + /** + * The maximum number of entities allowed in the current price regime have been created. + */ + MAX_ENTITIES_IN_PRICE_REGIME_HAVE_BEEN_CREATED = 325; + + /** + * The full prefix signature for precompile is not valid + */ + INVALID_FULL_PREFIX_SIGNATURE_FOR_PRECOMPILE = 326; + + /** + * The combined balances of a contract and its auto-renew account (if any) did not cover + * the rent charged for net new storage used in a transaction. + */ + INSUFFICIENT_BALANCES_FOR_STORAGE_RENT = 327; + + /** + * A contract transaction tried to use more than the allowed number of child records, via + * either system contract records or internal contract creations. + */ + MAX_CHILD_RECORDS_EXCEEDED = 328; + + /** + * The combined balances of a contract and its auto-renew account (if any) or balance of an account did not cover + * the auto-renewal fees in a transaction. + */ + INSUFFICIENT_BALANCES_FOR_RENEWAL_FEES = 329; + + /** + * A transaction's protobuf message includes unknown fields; could mean that a client + * expects not-yet-released functionality to be available. + */ + TRANSACTION_HAS_UNKNOWN_FIELDS = 330; + + /** + * The account cannot be modified. Account's key is not set + */ + ACCOUNT_IS_IMMUTABLE = 331; + + /** + * An alias that is assigned to an account or contract cannot be assigned to another account or contract. + */ + ALIAS_ALREADY_ASSIGNED = 332; + + /** + * A provided metadata key was invalid. Verification includes, for example, checking the size of Ed25519 and ECDSA(secp256k1) public keys. + */ + INVALID_METADATA_KEY = 333; + + /** + * Metadata key is not set on token + */ + TOKEN_HAS_NO_METADATA_KEY = 334; + + /** + * Token Metadata is not provided + */ + MISSING_TOKEN_METADATA = 335; + /** + * NFT serial numbers are missing in the TokenUpdateNftsTransactionBody + */ + MISSING_SERIAL_NUMBERS = 336; + + /** + * Admin key is not set on token + */ + TOKEN_HAS_NO_ADMIN_KEY = 337; + + /** + * A transaction failed because the consensus node identified is + * deleted from the address book. + */ + NODE_DELETED = 338; + + /** + * A transaction failed because the consensus node identified is not valid or + * does not exist in state. + */ + INVALID_NODE_ID = 339; + + /** + * A transaction failed because one or more entries in the list of + * service endpoints for the `gossip_endpoint` field is invalid.
    + * The most common cause for this response is a service endpoint that has + * the domain name (DNS) set rather than address and port. + */ + INVALID_GOSSIP_ENDPOINT = 340; + + /** + * A transaction failed because the node account identifier provided + * does not exist or is not valid.
    + * One common source of this error is providing a node account identifier + * using the "alias" form rather than "numeric" form. + * It is also used for atomic batch transaction for child transaction if the node account id is not 0.0.0. + */ + INVALID_NODE_ACCOUNT_ID = 341; + + /** + * A transaction failed because the description field cannot be encoded + * as UTF-8 or is more than 100 bytes when encoded. + */ + INVALID_NODE_DESCRIPTION = 342; + + /** + * A transaction failed because one or more entries in the list of + * service endpoints for the `service_endpoint` field is invalid.
    + * The most common cause for this response is a service endpoint that has + * the domain name (DNS) set rather than address and port. + */ + INVALID_SERVICE_ENDPOINT = 343; + + /** + * A transaction failed because the TLS certificate provided for the + * node is missing or invalid. + *

    + * #### Probable Causes + * The certificate MUST be a TLS certificate of a type permitted for gossip + * signatures.
    + * The value presented MUST be a UTF-8 NFKD encoding of the TLS + * certificate.
    + * The certificate encoded MUST be in PEM format.
    + * The `gossip_ca_certificate` field is REQUIRED and MUST NOT be empty. + */ + INVALID_GOSSIP_CA_CERTIFICATE = 344; + + /** + * A transaction failed because the hash provided for the gRPC certificate + * is present but invalid. + *

    + * #### Probable Causes + * The `grpc_certificate_hash` MUST be a SHA-384 hash.
    + * The input hashed MUST be a UTF-8 NFKD encoding of the actual TLS + * certificate.
    + * The certificate to be encoded MUST be in PEM format. + */ + INVALID_GRPC_CERTIFICATE = 345; + + /** + * The maximum automatic associations value is not valid.
    + * The most common cause for this error is a value less than `-1`. + */ + INVALID_MAX_AUTO_ASSOCIATIONS = 346; + + /** + * The maximum number of nodes allowed in the address book have been created. + */ + MAX_NODES_CREATED = 347; + + /** + * In ServiceEndpoint, domain_name and ipAddressV4 are mutually exclusive + */ + IP_FQDN_CANNOT_BE_SET_FOR_SAME_ENDPOINT = 348; + + /** + * Fully qualified domain name is not allowed in gossip_endpoint + */ + GOSSIP_ENDPOINT_CANNOT_HAVE_FQDN = 349; + + /** + * In ServiceEndpoint, domain_name size too large + */ + FQDN_SIZE_TOO_LARGE = 350; + + /** + * ServiceEndpoint is invalid + */ + INVALID_ENDPOINT = 351; + + /** + * The number of gossip endpoints exceeds the limit + */ + GOSSIP_ENDPOINTS_EXCEEDED_LIMIT = 352; + + /** + * The transaction attempted to use duplicate `TokenReference`.
    + * This affects `TokenReject` attempting to reject same token reference more than once. + */ + TOKEN_REFERENCE_REPEATED = 353; + + /** + * The account id specified as the owner in `TokenReject` is invalid or does not exist. + */ + INVALID_OWNER_ID = 354; + + /** + * The transaction attempted to use more than the allowed number of `TokenReference`. + */ + TOKEN_REFERENCE_LIST_SIZE_LIMIT_EXCEEDED = 355; + + /** + * The number of service endpoints exceeds the limit + */ + SERVICE_ENDPOINTS_EXCEEDED_LIMIT = 356; + + /* + * The IPv4 address is invalid + */ + INVALID_IPV4_ADDRESS = 357; + + /** + * The transaction attempted to use empty `TokenReference` list. + */ + EMPTY_TOKEN_REFERENCE_LIST = 358; + + /* + * The node account is not allowed to be updated + */ + UPDATE_NODE_ACCOUNT_NOT_ALLOWED = 359; + + /* + * The token has no metadata or supply key + */ + TOKEN_HAS_NO_METADATA_OR_SUPPLY_KEY = 360; + + /** + * The list of `PendingAirdropId`s is empty and MUST NOT be empty. + */ + EMPTY_PENDING_AIRDROP_ID_LIST = 361; + + /** + * A `PendingAirdropId` is repeated in a `claim` or `cancel` transaction. + */ + PENDING_AIRDROP_ID_REPEATED = 362; + + /** + * The number of `PendingAirdropId` values in the list exceeds the maximum + * allowable number. + */ + PENDING_AIRDROP_ID_LIST_TOO_LONG = 363; + + /* + * A pending airdrop already exists for the specified NFT. + */ + PENDING_NFT_AIRDROP_ALREADY_EXISTS = 364; + + /* + * The identified account is sender for one or more pending airdrop(s) + * and cannot be deleted. + *

    + * The requester SHOULD cancel all pending airdrops before resending + * this transaction. + */ + ACCOUNT_HAS_PENDING_AIRDROPS = 365; + + /** + * Consensus throttle did not allow execution of this transaction.
    + * The transaction should be retried after a modest delay. + */ + THROTTLED_AT_CONSENSUS = 366; + + /** + * The provided pending airdrop id is invalid.
    + * This pending airdrop MAY already be claimed or cancelled. + *

    + * The client SHOULD query a mirror node to determine the current status of + * the pending airdrop. + */ + INVALID_PENDING_AIRDROP_ID = 367; + + /** + * The token to be airdropped has a fallback royalty fee and cannot be + * sent or claimed via an airdrop transaction. + */ + TOKEN_AIRDROP_WITH_FALLBACK_ROYALTY = 368; + + /** + * This airdrop claim is for a pending airdrop with an invalid token.
    + * The token might be deleted, or the sender may not have enough tokens + * to fulfill the offer. + *

    + * The client SHOULD query mirror node to determine the status of the + * pending airdrop and whether the sender can fulfill the offer. + */ + INVALID_TOKEN_IN_PENDING_AIRDROP = 369; + + /** + * A scheduled transaction configured to wait for expiry to execute was given + * an expiry time at which there is already too many transactions scheduled to + * expire; its creation must be retried with a different expiry. + */ + SCHEDULE_EXPIRY_IS_BUSY = 370; + + /** + * The provided gRPC certificate hash is invalid. + */ + INVALID_GRPC_CERTIFICATE_HASH = 371; + + /** + * A scheduled transaction configured to wait for expiry to execute was not + * given an explicit expiration time. + */ + MISSING_EXPIRY_TIME = 372; + + /** + * A contract operation attempted to schedule another transaction after it + * had already scheduled a recursive contract call. + */ + NO_SCHEDULING_ALLOWED_AFTER_SCHEDULED_RECURSION = 373; + + /** + * A contract can schedule recursive calls a finite number of times (this is + * approximately four million times with typical network configuration.) + */ + RECURSIVE_SCHEDULING_LIMIT_REACHED = 374; + + /** + * The target network is waiting for the ledger ID to be set, which is a + * side effect of finishing the network's TSS construction. + */ + WAITING_FOR_LEDGER_ID = 375; + + /** + * The provided fee exempt key list size exceeded the limit. + */ + MAX_ENTRIES_FOR_FEE_EXEMPT_KEY_LIST_EXCEEDED = 376; + + /** + * The provided fee exempt key list contains duplicated keys. + */ + FEE_EXEMPT_KEY_LIST_CONTAINS_DUPLICATED_KEYS = 377; + + /** + * The provided fee exempt key list contains an invalid key. + */ + INVALID_KEY_IN_FEE_EXEMPT_KEY_LIST = 378; + + /** + * The provided fee schedule key contains an invalid key. + */ + INVALID_FEE_SCHEDULE_KEY = 379; + + /** + * If a fee schedule key is not set when we create a topic + * we cannot add it on update. + */ + FEE_SCHEDULE_KEY_CANNOT_BE_UPDATED = 380; + + /** + * If the topic's custom fees are updated the topic SHOULD have a + * fee schedule key + */ + FEE_SCHEDULE_KEY_NOT_SET = 381; + + /** + * The fee amount is exceeding the amount that the payer + * is willing to pay. + */ + MAX_CUSTOM_FEE_LIMIT_EXCEEDED = 382; + + /** + * There are no corresponding custom fees. + */ + NO_VALID_MAX_CUSTOM_FEE = 383; + + /** + * The provided list contains invalid max custom fee. + */ + INVALID_MAX_CUSTOM_FEES = 384; + + /** + * The provided max custom fee list contains fees with + * duplicate denominations. + */ + DUPLICATE_DENOMINATION_IN_MAX_CUSTOM_FEE_LIST = 385; + + /** + * The provided max custom fee list contains fees with + * duplicate account id. + */ + DUPLICATE_ACCOUNT_ID_IN_MAX_CUSTOM_FEE_LIST = 386; + + /** + * Max custom fees list is not supported for this operation. + */ + MAX_CUSTOM_FEES_IS_NOT_SUPPORTED = 387; + + /** + * The list of batch transactions is empty + */ + BATCH_LIST_EMPTY = 388; + + /** + * The list of batch transactions contains duplicated transactions + */ + BATCH_LIST_CONTAINS_DUPLICATES = 389; + + /** + * The list of batch transactions contains a transaction type that is + * in the AtomicBatch blacklist as configured in the network. + */ + BATCH_TRANSACTION_IN_BLACKLIST = 390; + + /** + * The inner transaction of a batch transaction failed + */ + INNER_TRANSACTION_FAILED = 391; + + /** + * The inner transaction of a batch transaction is missing a batch key + */ + MISSING_BATCH_KEY = 392; + + /** + * The batch key is set for a non batch transaction + */ + BATCH_KEY_SET_ON_NON_INNER_TRANSACTION = 393; + + /** + * The batch key is not valid + */ + INVALID_BATCH_KEY = 394; + + /** + * The provided schedule expiry time is not configurable. + */ + SCHEDULE_EXPIRY_NOT_CONFIGURABLE = 395; + + /** + * The network just started at genesis and is creating system entities. + */ + CREATING_SYSTEM_ENTITIES = 396; + + /** + * The least common multiple of the throttle group's milliOpsPerSec is + * too large and it's overflowing. + */ + THROTTLE_GROUP_LCM_OVERFLOW = 397; + + /** + * Token airdrop transactions can not contain multiple senders for a single token. + */ + AIRDROP_CONTAINS_MULTIPLE_SENDERS_FOR_A_TOKEN = 398; + + /** + * The GRPC proxy endpoint is set in the NodeCreate or NodeUpdate transaction, + * which the network does not support. + */ + GRPC_WEB_PROXY_NOT_SUPPORTED = 399; +} diff --git a/proto_src/services/response_header.proto b/proto_src/services/response_header.proto new file mode 100644 index 000000000..6ee70d5c7 --- /dev/null +++ b/proto_src/services/response_header.proto @@ -0,0 +1,85 @@ +/** + * # Response Header + * A standard header for all query responses. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "query_header.proto"; +import "response_code.proto"; + +/** + * A standard header returned with every query response. + * + * The fields for `cost` or `stateProof` MAY be unset if the requested + * `ResponseType` does not request those values.
    + * The `responseType` SHALL match the request response type.
    + * The `nodeTransactionPrecheckCode` field SHALL contain the result code + * for the query. + */ +message ResponseHeader { + /** + * The result code for this query. + *

    + * This value SHALL indicate either success or the reason for failure. + */ + ResponseCodeEnum nodeTransactionPrecheckCode = 1; + + /** + * The response type requested for this query. + *

    + * This SHALL be the response type requested in the query header. + */ + ResponseType responseType = 2; + + /** + * Requested cost estimate.
    + * This is the fee that _would be_ charged if the query was executed. + *

    + * This value SHALL be set if the response type requested requires cost + * information, and SHALL NOT be set otherwise.
    + * This value SHALL include the query fee, but SHALL NOT include the + * transfer fee required to execute the fee payment transaction. + */ + uint64 cost = 3; + + /** + * A state proof for the information requested. + * + * This field SHALL NOT be set if the response type does not require + * a state proof.
    + * This field SHALL NOT be set if a state proof is not available for + * the query type.
    + * This field SHALL be set if the response type requested a state proof + * and a state proof is available. + */ + bytes stateProof = 4; +} diff --git a/proto_src/services/schedulable_transaction_body.proto b/proto_src/services/schedulable_transaction_body.proto new file mode 100644 index 000000000..2766dbb2f --- /dev/null +++ b/proto_src/services/schedulable_transaction_body.proto @@ -0,0 +1,421 @@ +/** + * # Schedulable Transaction Body + * A message that replicates the `TransactionBody` message, with slight + * changes to exclude fields that cannot be scheduled via a `scheduleCreate` + * transaction. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "system_delete.proto"; +import "system_undelete.proto"; +import "freeze.proto"; + +import "contract_call.proto"; +import "contract_create.proto"; +import "contract_update.proto"; + +import "crypto_create.proto"; +import "crypto_delete.proto"; +import "crypto_transfer.proto"; +import "crypto_update.proto"; +import "crypto_approve_allowance.proto"; +import "crypto_delete_allowance.proto"; + +import "file_append.proto"; +import "file_create.proto"; +import "file_delete.proto"; +import "file_update.proto"; + +import "contract_delete.proto"; + +import "consensus_create_topic.proto"; +import "consensus_update_topic.proto"; +import "consensus_delete_topic.proto"; +import "consensus_submit_message.proto"; + +import "token_create.proto"; +import "token_freeze_account.proto"; +import "token_unfreeze_account.proto"; +import "token_grant_kyc.proto"; +import "token_revoke_kyc.proto"; +import "token_delete.proto"; +import "token_update.proto"; +import "token_mint.proto"; +import "token_burn.proto"; +import "token_wipe_account.proto"; +import "token_associate.proto"; +import "token_dissociate.proto"; +import "token_fee_schedule_update.proto"; +import "token_pause.proto"; +import "token_unpause.proto"; +import "token_update_nfts.proto"; +import "token_reject.proto"; +import "token_cancel_airdrop.proto"; +import "token_claim_airdrop.proto"; +import "token_airdrop.proto"; + +import "schedule_delete.proto"; +import "util_prng.proto"; + +import "node_create.proto"; +import "node_update.proto"; +import "node_delete.proto"; + +/** + * A schedulable transaction. + * + * The network configuration `scheduling.whitelist` limits which of these + * transaction types may actually be scheduled. As of version `0.50.0` of the + * consensus node software this list contains only `CryptoTransfer`, + * `ConsensusSubmitMessage`, `TokenBurn`, `TokenMint`, + * and `CryptoApproveAllowance`. + */ +message SchedulableTransactionBody { + /** + * A limit for the transaction fee the client is willing to pay. + *

    + * The network SHALL NOT charge fees greater than this value. + */ + uint64 transactionFee = 1; + + /** + * A short description of the schedulable transaction. + *

    + * This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes` + * (default 100) bytes when encoded as UTF-8. + */ + string memo = 2; + + oneof data { + /** + * Call a function defined on a smart contract. + */ + ContractCallTransactionBody contractCall = 3; + + /** + * Create a smart contract. + */ + ContractCreateTransactionBody contractCreateInstance = 4; + + /** + * Update a smart contract. + */ + ContractUpdateTransactionBody contractUpdateInstance = 5; + + /** + * Delete a smart contract and transfer remaining balance + * to a specified account. + */ + ContractDeleteTransactionBody contractDeleteInstance = 6; + + /** + * Create a new Hedera account. + */ + CryptoCreateTransactionBody cryptoCreateAccount = 7; + + /** + * Delete an Hedera account.
    + * This will mark the account as deleted, and transfer all remaining + * HBAR to a receiver account. + */ + CryptoDeleteTransactionBody cryptoDelete = 8; + + /** + * Transfer HBAR between accounts. + */ + CryptoTransferTransactionBody cryptoTransfer = 9; + + /** + * Modify an Hedera account. + */ + CryptoUpdateTransactionBody cryptoUpdateAccount = 10; + + /** + * Append data to the end of a file. + */ + FileAppendTransactionBody fileAppend = 11; + + /** + * Create a new file. + */ + FileCreateTransactionBody fileCreate = 12; + + /** + * Delete a file.
    + * This will remove the content of the file, and mark the file as + * deleted. + */ + FileDeleteTransactionBody fileDelete = 13; + + /** + * Modify a file.
    + * This may modify any metadata, and/or _replace_ the content. + */ + FileUpdateTransactionBody fileUpdate = 14; + + /** + * Delete a file as an Hedera administrative function.
    + * This is a privileged operation. + */ + SystemDeleteTransactionBody systemDelete = 15; + + /** + * Restore a file deleted via `systemDelete`.
    + * This is a privileged operation. + */ + SystemUndeleteTransactionBody systemUndelete = 16; + + /** + * Freeze the network.
    + * This is actually several possible operations, and the caller + * should examine the "freeze service" for more detail.
    + * This is a privileged operation. + */ + FreezeTransactionBody freeze = 17; + + /** + * Create a topic. + */ + ConsensusCreateTopicTransactionBody consensusCreateTopic = 18; + + /** + * Update a topic. + */ + ConsensusUpdateTopicTransactionBody consensusUpdateTopic = 19; + + /** + * Delete a topic. + */ + ConsensusDeleteTopicTransactionBody consensusDeleteTopic = 20; + + /** + * Submit a message to a topic.
    + * A message may be "chunked", and submitted in parts, if the total + * message size exceeds the limit for a single transaction. + */ + ConsensusSubmitMessageTransactionBody consensusSubmitMessage = 21; + + /** + * Create a new Hedera token. + */ + TokenCreateTransactionBody tokenCreation = 22; + + /** + * Freeze an account with respect to a token.
    + * A frozen account cannot transact in that token until unfrozen. + */ + TokenFreezeAccountTransactionBody tokenFreeze = 23; + + /** + * Unfreeze an account with respect to a token. + */ + TokenUnfreezeAccountTransactionBody tokenUnfreeze = 24; + + /** + * Grant KYC to an account with respect to a token.
    + * KYC is generally a "know your customer" assertion that a + * responsible entity has sufficient information to positively + * identify the account holder to relevant authorities. + */ + TokenGrantKycTransactionBody tokenGrantKyc = 25; + + /** + * Revoke KYC from an account with respect to a token. + */ + TokenRevokeKycTransactionBody tokenRevokeKyc = 26; + + /** + * Deletes an Hedera token.
    + * The token will be marked deleted. + */ + TokenDeleteTransactionBody tokenDeletion = 27; + + /** + * Update an Hedera token.
    + * Depending on what fields are to be modified, the signature + * requirements will vary. See `TokenUpdateTransactionBody` for + * further detail. + */ + TokenUpdateTransactionBody tokenUpdate = 28; + + /** + * Mint new tokens.
    + * All minted tokens will be delivered to the treasury account for + * the token type. The "mint key" for the token must sign this + * transaction. + */ + TokenMintTransactionBody tokenMint = 29; + + /** + * Burn tokens from the treasury account.
    + * The "burn key" for the token must sign this transaction. + */ + TokenBurnTransactionBody tokenBurn = 30; + + /** + * Wipe tokens from an account.
    + * This will remove a specified amount of fungible/common tokens or + * a specified list of non-fungible/unique serial numbered tokens + * of a given token type from an Hedera account. The removed tokens + * are _burned_ as if by a `tokenBurn` transaction.
    + * The "wipe key" for the token must sign this transaction. + */ + TokenWipeAccountTransactionBody tokenWipe = 31; + + /** + * Associate tokens to an account. + */ + TokenAssociateTransactionBody tokenAssociate = 32; + + /** + * Dissociate tokens from an account. + */ + TokenDissociateTransactionBody tokenDissociate = 33; + + /** + * Delete a schedule.
    + * The schedule will be marked as deleted. + */ + ScheduleDeleteTransactionBody scheduleDelete = 34; + + /** + * Pause a Token.
    + * This transaction must be signed by the "pause key" for the token. + */ + TokenPauseTransactionBody token_pause = 35; + + /** + * Unpause a Token.
    + * This transaction must be signed by the "pause key" for the token. + */ + TokenUnpauseTransactionBody token_unpause = 36; + + /** + * Add one or more approved allowances for spenders to transfer the + * paying account's hbar or tokens. + */ + CryptoApproveAllowanceTransactionBody cryptoApproveAllowance = 37; + + /** + * Delete one or more approvals for spenders to transfer the + * paying account's hbar or tokens. + */ + CryptoDeleteAllowanceTransactionBody cryptoDeleteAllowance = 38; + + /** + * Update the custom fee schedule for a token.
    + * This transaction must be signed by the "fee schedule key" + * for the token. + */ + TokenFeeScheduleUpdateTransactionBody token_fee_schedule_update = 39; + + /** + * Provide a deterministic pseudorandom number based on network state. + */ + UtilPrngTransactionBody util_prng = 40; + + /** + * Update one or more non-fungible/unique tokens.
    + * This will update metadata for one or more serial numbers within + * a collection (token type). + */ + TokenUpdateNftsTransactionBody token_update_nfts = 41; + + /** + * Create a new node in the network address book.
    + * This is a privileged operation. + */ + com.hedera.hapi.node.addressbook.NodeCreateTransactionBody nodeCreate = 42; + + /** + * Update a node in the network address book.
    + * This is a privileged operation. + */ + com.hedera.hapi.node.addressbook.NodeUpdateTransactionBody nodeUpdate = 43; + + /** + * Delete a node from the network address book.
    + * This will mark the node as deleted.
    + * This is a privileged operation. + */ + com.hedera.hapi.node.addressbook.NodeDeleteTransactionBody nodeDelete = 44; + + /** + * "Reject" undesired tokens.
    + * This transaction will transfer one or more tokens or token + * balances held by the requesting account to the treasury + * for each token type. + *

    + * Each transfer MUST be one of the following: + *

      + *
    • A single non-fungible/unique token.
    • + *
    • The full balance held for a fungible/common + * token type.
    • + *
    + * When complete, the requesting account SHALL NOT hold the + * rejected tokens.
    + * Custom fees and royalties defined for the tokens rejected + * SHALL NOT be charged for this transaction. + */ + TokenRejectTransactionBody tokenReject = 45; + + /** + * Cancel an "airdrop".
    + * This transaction cancels a pending airdrop for one or more + * recipients. + *

    + * The airdrop(s) to cancel MUST be pending, and not claimed.
    + */ + TokenCancelAirdropTransactionBody tokenCancelAirdrop = 46; + + /** + * Claim an "airdrop". + * This transaction "claims" one or more pending "airdrops". + *

    + * The airdrop(s) to claim MUST be pending, and not + * already claimed.
    + */ + TokenClaimAirdropTransactionBody tokenClaimAirdrop = 47; + + /** + * Send an "airdrop" of tokens to one or more recipients. + *

    + * This transaction unilaterally "gifts" tokens by transferring them + * from a "sender" account to the "recipient" account(s). If any + * recipient is not already associated to the token to airdrop, or + * has set a "reciever signature required" flag, then that recipient + * is recorded as a "pending" airdrop which must be "claimed". All + * other recipients receive the "airdropped" tokens immediately. + */ + TokenAirdropTransactionBody tokenAirdrop = 48; + } +} diff --git a/proto_src/services/schedule_create.proto b/proto_src/services/schedule_create.proto new file mode 100644 index 000000000..4785a89a1 --- /dev/null +++ b/proto_src/services/schedule_create.proto @@ -0,0 +1,181 @@ +/** + * # Schedule Create + * Message to create a schedule, which is an instruction to execute some other + * transaction (the scheduled transaction) at a future time, either when + * enough signatures are gathered (short term) or when the schedule expires + * (long term). In all cases the scheduled transaction is not executed if + * signature requirements are not met before the schedule expires. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; +import "timestamp.proto"; +import "schedulable_transaction_body.proto"; + +/** + * Create a new Schedule. + * + * #### Requirements + * This transaction SHALL create a new _schedule_ entity in network state.
    + * The schedule created SHALL contain the `scheduledTransactionBody` to be + * executed.
    + * If successful the receipt SHALL contain a `scheduleID` with the full + * identifier of the schedule created.
    + * When a schedule _executes_ successfully, the receipt SHALL include a + * `scheduledTransactionID` with the `TransactionID` of the transaction that + * executed.
    + * When a scheduled transaction is executed the network SHALL charge the + * regular _service_ fee for the transaction to the `payerAccountID` for + * that schedule, but SHALL NOT charge node or network fees.
    + * If the `payerAccountID` field is not set, the effective `payerAccountID` + * SHALL be the `payer` for this create transaction.
    + * If an `adminKey` is not specified, or is an empty `KeyList`, the schedule + * created SHALL be immutable.
    + * An immutable schedule MAY be signed, and MAY execute, but SHALL NOT be + * deleted.
    + * If two schedules have the same values for all fields except `payerAccountID` + * then those two schedules SHALL be deemed "identical".
    + * If a `scheduleCreate` requests a new schedule that is identical to an + * existing schedule, the transaction SHALL fail and SHALL return a status + * code of `IDENTICAL_SCHEDULE_ALREADY_CREATED` in the receipt.
    + * The receipt for a duplicate schedule SHALL include the `ScheduleID` of the + * existing schedule and the `TransactionID` of the earlier `scheduleCreate` + * so that the earlier schedule may be queried and/or referred to in a + * subsequent `scheduleSign`. + * + * #### Signature Requirements + * A `scheduleSign` transaction SHALL be used to add additional signatures + * to an existing schedule.
    + * Each signature SHALL "activate" the corresponding cryptographic("primitive") + * key for that schedule.
    + * Signature requirements SHALL be met when the set of active keys includes + * all keys required by the scheduled transaction.
    + * A scheduled transaction for a "long term" schedule SHALL NOT execute if + * the signature requirements for that transaction are not met when the + * network consensus time reaches the schedule `expiration_time`.
    + * A "short term" schedule SHALL execute immediately once signature + * requirements are met. This MAY be immediately when created. + * + * #### Long Term Schedules + * A "short term" schedule SHALL have the flag `wait_for_expiry` _unset_.
    + * A "long term" schedule SHALL have the flag `wait_for_expiry` _set_.
    + * A "long term" schedule SHALL NOT be accepted if the network configuration + * `scheduling.longTermEnabled` is not enabled.
    + * A "long term" schedule SHALL execute when the current consensus time + * matches or exceeds the `expiration_time` for that schedule, if the + * signature requirements for the scheduled transaction + * are met at that instant.
    + * A "long term" schedule SHALL NOT execute before the current consensus time + * matches or exceeds the `expiration_time` for that schedule.
    + * A "long term" schedule SHALL expire, and be removed from state, after the + * network consensus time exceeds the schedule `expiration_time`.
    + * A short term schedule SHALL expire, and be removed from state, + * after the network consensus time exceeds the current network + * configuration for `ledger.scheduleTxExpiryTimeSecs`. + * + * > Note + * >> Long term schedules are not (as of release 0.56.0) enabled. Any schedule + * >> created currently MUST NOT set the `wait_for_expiry` flag.
    + * >> When long term schedules are not enabled, schedules SHALL NOT be + * >> executed at expiration, and MUST meet signature requirements strictly + * >> before expiration to be executed. + * + * ### Block Stream Effects + * If the scheduled transaction is executed immediately, the transaction + * record SHALL include a `scheduleRef` with the schedule identifier of the + * schedule created. + */ +message ScheduleCreateTransactionBody { + /** + * A scheduled transaction. + *

    + * This value is REQUIRED.
    + * This transaction body MUST be one of the types enabled in the + * network configuration value `scheduling.whitelist`. + */ + SchedulableTransactionBody scheduledTransactionBody = 1; + + /** + * A short description of the schedule. + *

    + * This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes` + * (default 100) bytes when encoded as UTF-8. + */ + string memo = 2; + + /** + * A `Key` required to delete this schedule. + *

    + * If this is not set, or is an empty `KeyList`, this schedule SHALL be + * immutable and SHALL NOT be deleted. + */ + Key adminKey = 3; + + /** + * An account identifier of a `payer` for the scheduled transaction. + *

    + * This value MAY be unset. If unset, the `payer` for this `scheduleCreate` + * transaction SHALL be the `payer` for the scheduled transaction.
    + * If this is set, the identified account SHALL be charged the fees + * required for the scheduled transaction when it is executed.
    + * If the actual `payer` for the _scheduled_ transaction lacks + * sufficient HBAR balance to pay service fees for the scheduled + * transaction _when it executes_, the scheduled transaction + * SHALL fail with `INSUFFICIENT_PAYER_BALANCE`.
    + */ + AccountID payerAccountID = 4; + + /** + * An expiration time. + *

    + * If not set, the expiration SHALL default to the current consensus time + * advanced by either the network configuration value + * `scheduling.maxExpirationFutureSeconds`, if `wait_for_expiry` is set and + * "long term" schedules are enabled, or the network configuration value + * `ledger.scheduleTxExpiryTimeSecs` otherwise. + */ + Timestamp expiration_time = 5; + + /** + * A flag to delay execution until expiration. + *

    + * If this flag is set the scheduled transaction SHALL NOT be evaluated for + * execution before the network consensus time matches or exceeds the + * `expiration_time`.
    + * If this flag is not set, the scheduled transaction SHALL be executed + * immediately when all required signatures are received, whether in this + * `scheduleCreate` transaction or a later `scheduleSign` transaction.
    + * This value SHALL NOT be used and MUST NOT be set when the network + * configuration value `scheduling.longTermEnabled` is not enabled. + */ + bool wait_for_expiry = 13; +} diff --git a/proto_src/services/schedule_delete.proto b/proto_src/services/schedule_delete.proto new file mode 100644 index 000000000..fe100d64a --- /dev/null +++ b/proto_src/services/schedule_delete.proto @@ -0,0 +1,59 @@ +/** + * # Schedule Delete + * A transaction body for a `scheduleDelete` transaction. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; + +/** + * Mark a schedule in the network state as deleted. + * + * This transaction MUST be signed by the `adminKey` for the + * identified schedule.
    + * If a schedule does not have `adminKey` set or if `adminKey` is an empty + * `KeyList`, that schedule SHALL be immutable and MUST NOT be deleted.
    + * A deleted schedule SHALL not be executed.
    + * A deleted schedule MUST NOT be the subject of a subsequent + * `scheduleSign` transaction. + * + * ### Block Stream Effects + * None + */ +message ScheduleDeleteTransactionBody { + /** + * A schedule identifier. + *

    + * This MUST identify the schedule which SHALL be deleted. + */ + ScheduleID scheduleID = 1; +} diff --git a/proto_src/services/schedule_get_info.proto b/proto_src/services/schedule_get_info.proto new file mode 100644 index 000000000..ff1bcdfd1 --- /dev/null +++ b/proto_src/services/schedule_get_info.proto @@ -0,0 +1,239 @@ +/** + * # Schedule Get Information + * Query body and response to retrieve information about a scheduled + * transaction. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; +import "timestamp.proto"; +import "query_header.proto"; +import "response_header.proto"; +import "schedulable_transaction_body.proto"; + +/** + * Request for information about a scheduled transaction. + * + * If the requested schedule does not exist, the network SHALL respond + * with `INVALID_SCHEDULE_ID`. + */ +message ScheduleGetInfoQuery { + /** + * Standard information sent with every query operation.
    + * This includes the signed payment and what kind of response is requested + * (cost, state proof, both, or neither). + */ + QueryHeader header = 1; + + /** + * A schedule identifier. + *

    + * This SHALL identify the schedule to retrieve.
    + * This field is REQUIRED. + */ + ScheduleID scheduleID = 2; +} + +/** + * Information summarizing schedule state + */ +message ScheduleInfo { + /** + * A schedule identifier. + *

    + * This SHALL identify the schedule retrieved. + */ + ScheduleID scheduleID = 1; + + oneof data { + /** + * A deletion timestamp. + *

    + * If the schedule was deleted, this SHALL be set to the consensus + * timestamp of the `deleteSchedule` transaction.
    + * If the schedule is _not_ deleted, this field SHALL NOT be set. + */ + Timestamp deletion_time = 2; + + /** + * An execution timestamp. + *

    + * If the schedule was completed, and the _scheduled_ transaction + * executed, this SHALL be set to the consensus timestamp of the + * transaction that initiated that execution.
    + * If the schedule is _not_ complete, this field SHALL NOT be set. + */ + Timestamp execution_time = 3; + } + + /** + * An expiration timestamp.
    + * This represents the time at which the schedule will expire. For a + * long-term schedule (if enabled) this is when the schedule will be + * executed, assuming it meets signature requirements at that time. + * For a short-term schedule, this is the deadline to complete the + * signature requirements for the scheduled transaction to execute. + * Regardless of schedule type, the schedule will be removed from + * state when it expires. + *

    + * A schedule SHALL be removed from state when it expires.
    + * A short-term schedule MUST meet signature requirements strictly + * before expiration or it SHALL NOT be executed.
    + * A long-term schedule SHALL be executed if, and only if, all signature + * requirements for the scheduled transaction are met at expiration.
    + * A long-term schedule SHALL NOT be executed if any signature requirement + * for the scheduled transaction are not met at expiration.
    + */ + Timestamp expirationTime = 4; + + /** + * A scheduled transaction. + *

    + * This SHALL be a transaction type enabled in the network property + * `scheduling.whitelist`, and SHALL NOT be any other + * transaction type.
    + * This transaction SHALL be executed if the schedule meets all signature + * and execution time requirements for this transaction.
    + * The signature requirements for this transaction SHALL be evaluated + * at schedule creation, SHALL be reevaluated with each `signSchedule` + * transaction, and, for long-term schedules, SHALL be reevaluated when + * the schedule expires.
    + */ + SchedulableTransactionBody scheduledTransactionBody = 5; + + /** + * A short description for this schedule. + *

    + * This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes` + * (default 100) bytes when encoded as UTF-8. + */ + string memo = 6; + + /** + * The key used to delete the schedule from state + */ + Key adminKey = 7; + + /** + * A list of "valid" signatures for this schedule.
    + * This list contains only "primitive" (i.e. cryptographic or contract) + * signatures. The full signature requirements for the scheduled + * transaction are evaluated as if this list of keys had signed the + * scheduled transaction directly. + *

    + * This list SHALL contain every "primitive" key that has signed the + * original `createSchedule`, or any subsequent + * `signSchedule` transaction.
    + * This list MAY elide any signature not likely to be required by the + * scheduled transaction. Such requirement SHOULD be evaluated when the + * signature is presented (i.e. during evaluation of a `createSchedule` or + * `signSchedule` transaction). + */ + KeyList signers = 8; + + /** + * An account identifier. + *

    + * This SHALL identify the account that created this schedule. + */ + AccountID creatorAccountID = 9; + + /** + * An account identifier. + *

    + * The identified account SHALL pay the full transaction fee for the + * scheduled transaction _when it executes_. + */ + AccountID payerAccountID = 10; + + /** + * A transaction identifier. + *

    + * This SHALL be recorded as the transaction identifier for the + * _scheduled_ transaction, if (and when) it is executed. + */ + TransactionID scheduledTransactionID = 11; + + /** + * The ledger ID of the network that generated this response. + *

    + * This value SHALL identify the distributed ledger that responded to + * this query. + */ + bytes ledger_id = 12; + + /** + * A flag indicating this schedule will execute when it expires. + *

    + * If this field is set + *

      + *
    • This schedule SHALL be considered a "long-term" schedule.
    • + *
    • This schedule SHALL be evaluated when the network consensus time + * reaches the `expirationTime`, and if the signature requirements + * for the scheduled transaction are met at that time, the + * scheduled transaction SHALL be executed.
    • + *
    • This schedule SHALL NOT be executed before the network consensus + * time reaches the `expirationTime`.
    • + *
    + * If this field is not set + *
      + *
    • This schedule SHALL be considered a "short-term" schedule.
    • + *
    • This schedule SHALL be evaluated when created, and reevaluated + * with each `signSchedule` transaction, and if the signature + * requirements for the scheduled transaction are met at that time, + * the scheduled transaction SHALL be executed immediately.
    • + *
    • This schedule SHALL be executed as soon as the signature + * requirements are met, and MUST be executed before the network + * consensus time reaches the `expirationTime`, if at all.
    • + *
    + */ + bool wait_for_expiry = 13; +} + +/** + * A response message for a `getScheduleInfo` query. + */ +message ScheduleGetInfoResponse { + /** + * The standard response information for queries.
    + * This includes the values requested in the `QueryHeader` + * (cost, state proof, both, or neither). + */ + ResponseHeader header = 1; + + /** + * Detail information for a schedule. + *

    + * This field SHALL contain all available schedule detail. + */ + ScheduleInfo scheduleInfo = 2; +} diff --git a/proto_src/services/schedule_service.proto b/proto_src/services/schedule_service.proto new file mode 100644 index 000000000..f8d6457c4 --- /dev/null +++ b/proto_src/services/schedule_service.proto @@ -0,0 +1,119 @@ +/** + * # Schedule Service + * gRPC service definitions for the Schedule Service. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package + +import "query.proto"; +import "response.proto"; +import "transaction_response.proto"; +import "transaction.proto"; + +/** + * Transactions and queries for the Schedule Service.
    + * The Schedule Service enables transactions to be submitted without all + * required signatures and offers a `scheduleSign` transaction to provide + * additional signatures independently after the schedule is created. The + * scheduled transaction may be executed immediately when all required + * signatures are present, or at expiration if "long term" schedules + * are enabled in network configuration. + * + * ### Execution + * Scheduled transactions SHALL be executed under the following conditions. + * 1. If "long term" schedules are enabled and `wait_for_expiry` is set for + * that schedule then the transaction SHALL NOT be executed before the + * network consensus time matches or exceeds the `expiration_time` field + * for that schedule. + * 1. If "long term" schedules are enabled and `wait_for_expiry` is _not_ set + * for that schedule, then the transaction SHALL be executed when all + * signatures required by the scheduled transaction are active for that + * schedule. This MAY be immediately after the `scheduleCreate` or a + * subsequent `scheduleSign` transaction, or MAY be at expiration if + * the signature requirements are met at that time. + * 1. If "long term" schedules are _disabled_, then the scheduled transaction + * SHALL be executed immediately after all signature requirements for the + * scheduled transaction are met during the `scheduleCreate` or a subsequent + * `scheduleSign` transaction. The scheduled transaction SHALL NOT be + * on expiration when "long term" schedules are disabled. + * + * A schedule SHALL remain in state and MAY be queried with a `getScheduleInfo` + * transaction after execution, until the schedule expires.
    + * When network consensus time matches or exceeds the `expiration_time` for + * a schedule, that schedule SHALL be removed from state, whether it has + * executed or not.
    + * If "long term" schedules are _disabled_, the maximum expiration time SHALL + * be the consensus time of the `scheduleCreate` transaction extended by + * the network configuration value `ledger.scheduleTxExpiryTimeSecs`. + * + * ### Block Stream Effects + * When a scheduled transaction is executed, the timestamp in the transaction + * identifier for that transaction SHALL be 1 nanosecond after the consensus + * timestamp for the transaction that resulted in its execution. If execution + * occurred at expiration, that transaction may be almost any transaction, + * including another scheduled transaction that executed at expiration.
    + * The transaction identifier for a scheduled transaction that is executed + * SHALL have the `scheduled` flag set and SHALL inherit the `accountID` and + * `transactionValidStart` values from the `scheduleCreate` that created the + * schedule.
    + * The `scheduleRef` property of the record for a scheduled transaction SHALL + * be populated with the schedule identifier of the schedule that executed. + */ +service ScheduleService { + /** + * Create a new Schedule. + *

    + * If all signature requirements are met with this transaction, the + * scheduled transaction MAY execute immediately. + */ + rpc createSchedule (Transaction) returns (TransactionResponse); + + /** + * Add signatures to an existing schedule. + *

    + * Signatures on this transaction SHALL be added to the set of active + * signatures on the schedule, and MAY result in execution of the + * scheduled transaction if all signature requirements are met. + */ + rpc signSchedule (Transaction) returns (TransactionResponse); + + /** + * Mark an existing schedule deleted. + *

    + * Once deleted a schedule SHALL NOT be executed and any subsequent + * `scheduleSign` transaction SHALL fail. + */ + rpc deleteSchedule (Transaction) returns (TransactionResponse); + + /** + * Retrieve the metadata for a schedule. + */ + rpc getScheduleInfo (Query) returns (Response); +} diff --git a/proto_src/services/schedule_sign.proto b/proto_src/services/schedule_sign.proto new file mode 100644 index 000000000..50a36e68d --- /dev/null +++ b/proto_src/services/schedule_sign.proto @@ -0,0 +1,72 @@ +/** + * # Schedule Sign + * Transaction body for a `scheduleSign` transaction to add signatures + * to an existing scheduled transaction. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; + +/** + * Add signatures to an existing scheduled transaction. + * + * When a schedule _executes_ successfully, the receipt SHALL include a + * `scheduledTransactionID` with the `TransactionID` of the transaction that + * executed.
    + * When a scheduled transaction is executed the network SHALL charge the + * regular _service_ fee for the transaction to the `payerAccountID` for + * that schedule, but SHALL NOT charge node or network fees.
    + * If the `payerAccountID` field is not set, the effective `payerAccountID` + * SHALL be the `payer` for this create transaction.
    + * Each signature on this transaction SHALL "activate" the corresponding + * cryptographic("primitive") key for the schedule identified.
    + * Signature requirements SHALL be met when the set of active keys includes + * all keys required by the scheduled transaction.
    + * A scheduled transaction for a "long term" schedule SHALL NOT execute if + * the signature requirements for that transaction are not met when the + * network consensus time reaches the schedule `expiration_time`.
    + * A "short term" schedule SHALL execute immediately once signature + * requirements are met. This MAY be immediately when created.
    + * + * ### Block Stream Effects + * If the scheduled transaction is executed immediately following this + * `scheduleSign` transaction, the transaction record SHALL include a + * `scheduleRef` with the schedule identifier `scheduleID`. + */ +message ScheduleSignTransactionBody { + /** + * A schedule identifier. + *

    + * This MUST identify the schedule to which signatures SHALL be added. + */ + ScheduleID scheduleID = 1; +} diff --git a/proto_src/services/smart_contract_service.proto b/proto_src/services/smart_contract_service.proto new file mode 100644 index 000000000..fb6f87096 --- /dev/null +++ b/proto_src/services/smart_contract_service.proto @@ -0,0 +1,189 @@ +/** + * # Smart Contract Service + * gRPC service definitions for calls to the Hedera EVM-compatible + * Smart Contract service. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package + +import "transaction_response.proto"; +import "query.proto"; +import "response.proto"; +import "transaction.proto"; + +/** + * The Hedera Smart Contract Service (HSCS) provides an interface to an EVM + * compatible environment to create, store, manage, and execute smart contract + * calls. Smart Contracts implement useful and often highly complex + * interactions between individuals, systems, and the distributed ledger. + */ +service SmartContractService { + /** + * Create a new smart contract. + *

    + * If this transaction succeeds, the `ContractID` for the new smart + * contract SHALL be set in the transaction receipt.
    + * The contract is defined by the initial bytecode (or `initcode`). + * The `initcode` SHALL be provided either in a previously created file, + * or in the transaction body itself for very small contracts.
    + * As part of contract creation, the constructor defined for the new + * smart contract SHALL run with the parameters provided in + * the `constructorParameters` field.
    + * The gas to "power" that constructor MUST be provided via the `gas` + * field, and SHALL be charged to the payer for this transaction.
    + * If the contract _constructor_ stores information, it is charged gas for + * that storage. There is a separate fee in HBAR to maintain that storage + * until the expiration, and that fee SHALL be added to this transaction + * as part of the _transaction fee_, rather than gas. + */ + rpc createContract (Transaction) returns (TransactionResponse); + + /** + * Modify a smart contract.
    + * Any change other than updating the expiration time requires that the + * contract be modifiable (has a valid `adminKey`) and that the + * transaction be signed by the `adminKey` + *

    + * Fields _not set_ on the request SHALL NOT be modified. + */ + rpc updateContract (Transaction) returns (TransactionResponse); + + /** + * Call a function of a given smart contract, providing function parameter + * inputs as needed. + *

    + * Resource ("gas") charges SHALL include all relevant fees incurred by + * the contract execution, including any storage required.
    + * The total transaction fee SHALL incorporate all of the "gas" actually + * consumed as well as the standard fees for transaction handling, + * data transfers, signature verification, etc... + */ + rpc contractCallMethod (Transaction) returns (TransactionResponse); + + /** + * Call a query function of a given smart contract, providing + * function parameter inputs as needed.
    + * This is performed locally on the particular node that the client is + * communicating with. Executing the call locally is faster and less + * costly, but imposes certain restrictions. + *

    + * The call MUST NOT change the state of the contract instance. This also + * precludes any expenditure or transfer of HBAR or other tokens.
    + * The call SHALL NOT have a separate consensus timestamp.
    + * The call SHALL NOT generate a record nor a receipt.
    + * The response SHALL contain the output returned by the function call.
    + *

    + * This is generally useful for calling accessor functions which read + * (query) state without changes or side effects. Any contract call that + * would use the `STATICCALL` opcode MAY be called via contract call local + * with performance and cost benefits. + *

    + * Unlike a ContractCall transaction, the node SHALL always consume the + * _entire_ amount of offered "gas" in determining the fee for this query, + * so accurate gas estimation is important. + */ + rpc contractCallLocalMethod (Query) returns (Response); + + /** + * A standard query to obtain detailed information for a smart contract. + */ + rpc getContractInfo (Query) returns (Response); + + /** + * A standard query to read the current bytecode for a smart contract. + */ + rpc ContractGetBytecode (Query) returns (Response); + + /** + * A standard query to obtain account and contract identifiers for a smart + * contract, given the Solidity identifier for that contract. + */ + rpc getBySolidityID (Query) returns (Response) {option deprecated = true;}; + + /** + *

    This query is no longer supported.
    + * This query always returned an empty record list. + */ + rpc getTxRecordByContractID (Query) returns (Response) {option deprecated = true;}; + + /** + * Delete a smart contract, and transfer any remaining HBAR balance + * to a designated account. + *

    + * If this call succeeds then all subsequent calls to that smart + * contract SHALL fail.
    + */ + rpc deleteContract (Transaction) returns (TransactionResponse); + + /** + * Delete a smart contract, as a system-initiated deletion, this + * SHALL NOT transfer balances. + *

    + * This call is an administrative function of the Hedera network, and + * SHALL require network administration authorization.
    + * This transaction MUST be signed by one of the network administration + * accounts (typically `0.0.2` through `0.0.59`, as defined in the + * `api-permission.properties` file). + *
    + * If this call succeeds then all subsequent calls to that smart + * contract SHALL fail.
    + */ + rpc systemDelete (Transaction) returns (TransactionResponse) {option deprecated = true;}; + + /** + * Un-Delete a smart contract, returning it (mostly) to its state + * prior to deletion. + *

    + * The contract to be restored MUST have been deleted via `systemDelete`. + * If the contract was deleted via `deleteContract`, it + * SHALL NOT be recoverable. + *

    + * This call is an administrative function of the Hedera network, and + * SHALL require network administration authorization.
    + * This transaction MUST be signed by one of the network administration + * accounts (typically `0.0.2` through `0.0.59`, as defined in the + * `api-permission.properties` file). + *
    + * If this call succeeds then subsequent calls to that smart + * contract MAY succeed.
    + */ + rpc systemUndelete (Transaction) returns (TransactionResponse) {option deprecated = true;}; + + /** + * Make an Ethereum transaction "call" with all data in Ethereum formats, + * including the contract alias. + *

    + * Call data MAY be in the transaction, or stored within a "File".
    + * The caller MAY offer additional gas above what is offered in the call + * data, but MAY be charged up to 80% of that value if the amount required + * is less than this "floor" amount. + */ + rpc callEthereum (Transaction) returns (TransactionResponse); +} diff --git a/proto_src/services/state/addressbook/node.proto b/proto_src/services/state/addressbook/node.proto new file mode 100644 index 000000000..aa17f228f --- /dev/null +++ b/proto_src/services/state/addressbook/node.proto @@ -0,0 +1,176 @@ +syntax = "proto3"; + +package com.hedera.hapi.node.state.addressbook; + +/* + * Copyright (C) 2024 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 "basic_types.proto"; + +option java_package = "com.hederahashgraph.api.proto.java"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +/** + * A single address book node in the network state. + * + * Each node in the network address book SHALL represent a single actual + * consensus node that is eligible to participate in network consensus. + * + * Address book nodes SHALL NOT be _globally_ uniquely identified. A given node + * is only valid within a single realm and shard combination, so the identifier + * for a network node SHALL only be unique within a single realm and shard + * combination. + */ +message Node { + /** + * A consensus node identifier. + *

    + * Node identifiers SHALL be globally unique for a given ledger. + */ + uint64 node_id = 1; + + /** + * An account identifier. + *

    + * This account SHALL be owned by the entity responsible for the node.
    + * This account SHALL be charged transaction fees for any transactions + * that are submitted to the network by this node and + * fail due diligence checks.
    + * This account SHALL be paid the node portion of transaction fees + * for transactions submitted by this node. + */ + proto.AccountID account_id = 2; + + /** + * A short description of the node. + *

    + * This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes` + * (default 100) bytes when encoded as UTF-8. + */ + string description = 3; + + /** + * A list of service endpoints for gossip. + *

    + * These endpoints SHALL represent the published endpoints to which other + * consensus nodes may _gossip_ transactions.
    + * If the network configuration value `gossipFqdnRestricted` is set, then + * all endpoints in this list SHALL supply only IP address.
    + * If the network configuration value `gossipFqdnRestricted` is _not_ set, + * then endpoints in this list MAY supply either IP address or FQDN, but + * SHALL NOT supply both values for the same endpoint.
    + * This list SHALL NOT be empty.
    + * This list SHALL NOT contain more than `10` entries.
    + * The first two entries in this list SHALL be the endpoints published to + * all consensus nodes.
    + * All other entries SHALL be reserved for future use. + */ + repeated proto.ServiceEndpoint gossip_endpoint = 4; + + /** + * A list of service endpoints for client calls. + *

    + * These endpoints SHALL represent the published endpoints to which clients + * may submit transactions.
    + * These endpoints SHALL specify a port.
    + * Endpoints in this list MAY supply either IP address or FQDN, but SHALL + * NOT supply both values for the same endpoint.
    + * This list SHALL NOT be empty.
    + * This list SHALL NOT contain more than `8` entries. + */ + repeated proto.ServiceEndpoint service_endpoint = 5; + + /** + * A certificate used to sign gossip events. + *

    + * This value SHALL be a certificate of a type permitted for gossip + * signatures.
    + * This value SHALL be the DER encoding of the certificate presented.
    + * This field is REQUIRED and MUST NOT be empty. + */ + bytes gossip_ca_certificate = 6; + + /** + * A hash of the node gRPC certificate. + *

    + * This value MAY be used to verify the certificate presented by the node + * during TLS negotiation for gRPC.
    + * This value SHALL be a SHA-384 hash.
    + * The TLS certificate to be hashed SHALL first be in PEM format and SHALL + * be encoded with UTF-8 NFKD encoding to a stream of bytes provided to + * the hash algorithm.
    + * This field is OPTIONAL. + */ + bytes grpc_certificate_hash = 7; + + /** + * A consensus weight. + *

    + * Each node SHALL have a weight in consensus calculations.
    + * The consensus weight of a node SHALL be calculated based on the amount + * of HBAR staked to that node.
    + * Consensus SHALL be calculated based on agreement of greater than `2/3` + * of the total `weight` value of all nodes on the network. + *

    + * This field is deprecated and SHALL NOT be used when RosterLifecycle + * is enabled. + */ + uint64 weight = 8 [deprecated = true]; + + /** + * A flag indicating this node is deleted. + *

    + * If this field is set, then this node SHALL NOT be included in the next + * update of the network address book.
    + * If this field is set, then this node SHALL be immutable and SHALL NOT + * be modified.
    + * If this field is set, then any `nodeUpdate` transaction to modify this + * node SHALL fail. + */ + bool deleted = 9; + + /** + * An administrative key controlled by the node operator. + *

    + * This key MUST sign each transaction to update this node.
    + * This field MUST contain a valid `Key` value.
    + * This field is REQUIRED and MUST NOT be set to an empty `KeyList`. + */ + proto.Key admin_key = 10; + + /** + * A flag indicating this node declines node rewards distributed at + * the end of staking period. + *

    + * If this field is set, then this node SHALL NOT receive any node rewards + * distributed at the end of the staking period. + */ + bool decline_reward = 11; + + /** + * A web proxy for gRPC from non-gRPC clients. + *

    + * This endpoint SHALL be a Fully Qualified Domain Name (FQDN) using the HTTPS + * protocol, and SHALL support gRPC-Web for use by browser-based clients.
    + * This endpoint MUST be signed by a trusted certificate authority.
    + * This endpoint MUST use a valid port and SHALL be reachable over TLS.
    + * This field MAY be omitted if the node does not support gRPC-Web access.
    + * This field MUST be updated if the gRPC-Web endpoint changes.
    + * This field SHALL enable frontend clients to avoid hard-coded proxy endpoints. + */ + proto.ServiceEndpoint grpc_proxy_endpoint = 12; +} diff --git a/proto_src/services/state/blockrecords/block_info.proto b/proto_src/services/state/blockrecords/block_info.proto new file mode 100644 index 000000000..379169501 --- /dev/null +++ b/proto_src/services/state/blockrecords/block_info.proto @@ -0,0 +1,111 @@ +/** + * # Block Info + * Information about the most recent block; including block hashes, current and + * previous start times, etc... + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in [RFC2119](https://www.ietf.org/rfc/rfc2119) + * and clarified in [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2023-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +/** + * Information for a transaction block. + * + * This includes: + * - last block number. + * - consensus times for: + * - previous block start. + * - current block start. + * - last handled transaction. + * - hash data for a rolling window of 256 blocks. + * - whether migration records were produced. + */ +message BlockInfo { + + /** + * A block number. + *

    + * The block number of the last completed immutable block. + */ + int64 last_block_number = 1; + + /** + * A consensus timestamp. + *

    + * The consensus time of the first transaction for the last completed immutable block. + */ + Timestamp first_cons_time_of_last_block = 2; + + /** + * A list of the last 256 block hashes.
    + * This is the SHA384 48 byte hashes of the previous 256 blocks, + * collected in a single byte array. + *

    + * The first 48 bytes SHALL be the oldest block in the list.
    + * The last 48 bytes SHALL be the newest block, which is the last fully + * completed immutable block.
    + * This SHALL contain less than 256 block hashes if there are less than 256 + * preceding blocks; for instance, shortly after network genesis the network + * will not have processed 256 blocks yet. + *

    + * This MAY change significantly for Block Stream (HIP TBD). + */ + bytes block_hashes = 3; + + /** + * A consensus timestamp. + *

    + * The consensus time of the last transaction that was handled by the node + * within the current block.
    + * This property is how we 'advance the consensus clock'. The node MUST + * continually set this property to the consensus timestamp for the most + * recent transaction completed by the node. + */ + Timestamp cons_time_of_last_handled_txn = 4; + + /** + * A flag indicating that migration records have been published. + *

    + * This property SHALL be `false` immediately following a node upgrade
    + * This SHALL be set 'true' as migration records, if any, are published. + * Migration records are typically published "during" the first transaction + * handled by the node following startup. + */ + bool migration_records_streamed = 5; + + /** + * A consensus timestamp. + *

    + * The consensus time of the first transaction in the current block; + * necessary for reconnecting nodes to detect when the current block + * is finished. + */ + Timestamp first_cons_time_of_current_block = 6; +} diff --git a/proto_src/services/state/blockrecords/running_hashes.proto b/proto_src/services/state/blockrecords/running_hashes.proto new file mode 100644 index 000000000..5b2b17972 --- /dev/null +++ b/proto_src/services/state/blockrecords/running_hashes.proto @@ -0,0 +1,63 @@ +/** + * # Running Hashes + * The running hash values for the record stream, including current and + * three(3) previous values. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in [RFC2119](https://www.ietf.org/rfc/rfc2119) + * and clarified in [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2023-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +/** + * The running hash of transaction records and the previous `3` running hashes. + * + * All hashes are 48 byte SHA384 hash values. If the running hashes do not + * exist yet (for example, at genesis) then each not-yet-available value SHALL + * be empty (zero-length) bytes. + */ +message RunningHashes { + /** + * A running hash of all record stream items. + */ + bytes running_hash = 1; + + /** + * The previous running hash of all record stream items. + */ + bytes n_minus_1_running_hash = 2; + + /** + * The previous, previous running hash of all record stream items. + */ + bytes n_minus_2_running_hash = 3; + + /** + * The previous, previous, previous running hash of all record stream items. + */ + bytes n_minus_3_running_hash = 4; +} diff --git a/proto_src/services/state/blockstream/block_stream_info.proto b/proto_src/services/state/blockstream/block_stream_info.proto new file mode 100644 index 000000000..529fdabf0 --- /dev/null +++ b/proto_src/services/state/blockstream/block_stream_info.proto @@ -0,0 +1,166 @@ +/** + * # Block Stream Info + * Information stored in consensus state at the beginning of each block to + * record the status of the immediately prior block. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package com.hedera.hapi.node.state.blockstream; + +/* + * Copyright (C) 2024 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"; +import "basic_types.proto"; + +option java_package = "com.hederahashgraph.api.proto.java"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +/** + * A message stored in state to maintain block stream parameters.
    + * Nodes use this information for three purposes. + * 1. To maintain hash chain continuity at restart and reconnect boundaries. + * 1. To store historical hashes for implementation of the EVM `BLOCKHASH` + * and `PREVRANDAO` opcodes. + * 1. To track the amount of consensus time that has passed between blocks. + * + * This value MUST be updated for every block.
    + * This value MUST be transmitted in the "state changes" section of + * _each_ block, but MUST be updated at the beginning of the _next_ block.
    + * This value SHALL contain the block hash up to, and including, the + * immediately prior completed block.
    + * The state change to update this singleton MUST be the last + * block item in this block. + */ +message BlockStreamInfo { + /** + * A block number.
    + * This is the current block number. + */ + uint64 block_number = 1; + + /** + * A consensus time for the current block.
    + * This is the consensus time of the first round in the current block, + * and is used to determine if this block was the first across an + * important boundary in consensus time, such as UTC midnight. + * This may also be used to purge entities expiring between the last + * block time and this time. + */ + proto.Timestamp block_time = 2; + + /** + * A concatenation of hash values.
    + * This combines several trailing output block item hashes and + * is used as a seed value for a pseudo-random number generator.
    + * This is also required to implement the EVM `PREVRANDAO` opcode.
    + * This MUST contain at least 256 bits of entropy. + */ + bytes trailing_output_hashes = 3; + + /** + * A concatenation of hash values.
    + * This field combines up to 256 trailing block hashes. + *

    + * If this message is for block number N, then the earliest available + * hash SHALL be for block number N-256.
    + * The latest available hash SHALL be for block N-1.
    + * This is REQUIRED to implement the EVM `BLOCKHASH` opcode. + *

    + * ### Field Length + * Each hash value SHALL be the trailing 265 bits of a SHA2-384 hash.
    + * The length of this field SHALL be an integer multiple of 32 bytes.
    + * This field SHALL be at least 32 bytes.
    + * The maximum length of this field SHALL be 8192 bytes. + */ + bytes trailing_block_hashes = 4; + + /** + * A SHA2-384 hash value.
    + * This is the hash of the "input" subtree for this block. + */ + bytes input_tree_root_hash = 5; + + /** + * A SHA2-384 hash value.
    + * This is the hash of consensus state at the _start_ of this block. + */ + bytes start_of_block_state_hash = 6; + + /** + * A count of "output" block items in this block. + *

    + * This SHALL count the number of output block items that _precede_ + * the state change that updates this singleton. + */ + uint32 num_preceding_output_items = 7; + + /** + * A concatenation of SHA2-384 hash values.
    + * This is the "rightmost" values of the "output" subtree. + *

    + * The subtree containing these hashes SHALL be constructed from all "output" + * `BlockItem`s in this block that _precede_ the update to this singleton. + */ + repeated bytes rightmost_preceding_output_tree_hashes = 8; + + /** + * A block-end consensus time stamp. + *

    + * This field SHALL hold the last-used consensus time for + * the current block. + */ + proto.Timestamp block_end_time = 9; + + /** + * Whether the post-upgrade work has been done. + *

    + * This MUST be false if and only if the network just restarted + * after an upgrade and has not yet done the post-upgrade work. + */ + bool post_upgrade_work_done = 10; + + /** + * A version describing the version of application software. + *

    + * This SHALL be the software version that created this block. + */ + proto.SemanticVersion creation_software_version = 11; + + /** + * The time stamp at which the last interval process was done. + *

    + * This field SHALL hold the consensus time for the last time + * at which an interval of time-dependent events were processed. + */ + proto.Timestamp last_interval_process_time = 12; + + /** + * The time stamp at which the last user transaction was handled. + *

    + * This field SHALL hold the consensus time for the last time + * at which a user transaction was handled. + */ + proto.Timestamp last_handle_time = 13; +} diff --git a/proto_src/services/state/common.proto b/proto_src/services/state/common.proto new file mode 100644 index 000000000..e9bee90f6 --- /dev/null +++ b/proto_src/services/state/common.proto @@ -0,0 +1,78 @@ +/** + * # State Common + * Two older messages used in rare cases. + * - EntityNumber is used to store The last used entity number in state, so + * that all entities in state have unique entity numbers, even across types. + * - EntityIDPair is used to store a Token/Account pair in certain rare cases. + * + * Where possible, these messages SHOULD NOT be used. A primitive `int64` or + * `google.protobuf.Int64Value` wrapper is preferred instead of `EntityNumber + * and `TokenAssociation` is preferred instead of `EntityIDPair`. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in [RFC2119](https://www.ietf.org/rfc/rfc2119) + * and clarified in [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2023-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; + +/** + * A single 64-bit number identifying a Hedera native entity. + * + * Deprecated.
    + * A primitive `int64` or `google.protobuf.Int64Value` wrapper is preferred. + */ +message EntityNumber { + option deprecated = true; + + /** + * The entity number to store. + */ + int64 number = 1; +} + +/** + * A Pair of AccountID and TokenID.
    + * This is used as a key in certain cases. + * + * Deprecated.
    + * The TokenAssociation message should be used instead of this message. + */ +message EntityIDPair { + option deprecated = true; + + /** + * An account identifier for the associated account. + */ + AccountID account_id = 1; + + /** + * A token identifier for the associated token. + */ + TokenID token_id = 2; +} diff --git a/proto_src/services/state/congestion/congestion_level_starts.proto b/proto_src/services/state/congestion/congestion_level_starts.proto new file mode 100644 index 000000000..9eb5166be --- /dev/null +++ b/proto_src/services/state/congestion/congestion_level_starts.proto @@ -0,0 +1,68 @@ +/** + * # Congestion timestamps + * The timestamp values indicating when congestion pricing changed. + * + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in [RFC2119](https://www.ietf.org/rfc/rfc2119) + * and clarified in [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2023-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +/** + * Two lists of congestion pricing level "start" times. Each list details the + * start of each time period when the congestion pricing level changed + * (increasing, or decreasing, the congestion fee multiplier). + * + * > Review Question + * >> What prunes these lists? + * > + * >> Do these grow indefinitely? + * > + * >> Are these two lists the same size? + */ +message CongestionLevelStarts { + /** + * Timestamps for each point where "entity utilization" congestion pricing + * levels changed. + *

    + * If congestion pricing has not occurred then this SHALL contain a single + * timestamp of value 0. + */ + repeated Timestamp generic_level_starts = 1; + + /** + * Timestamps for each point where "gas utilization" congestion pricing + * levels changed. + *

    + * If congestion pricing has not occurred then this SHALL contain a single + * timestamp of value 0. + */ + repeated Timestamp gas_level_starts = 2; +} diff --git a/proto_src/services/state/consensus/topic.proto b/proto_src/services/state/consensus/topic.proto new file mode 100644 index 000000000..72c4305a0 --- /dev/null +++ b/proto_src/services/state/consensus/topic.proto @@ -0,0 +1,194 @@ +/** + * # HCS Topic Information + * The current network state of an Hedera Consensus Service (HCS) Topic. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in [RFC2119](https://www.ietf.org/rfc/rfc2119) + * and clarified in [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2023-2024 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 "basic_types.proto"; +import "custom_fees.proto"; + +option java_package = "com.hederahashgraph.api.proto.java"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +/** + * Representation of an Hedera Consensus Service(HCS) topic. + * + * As with all network entities, a topic has a unique entity number, which is + * usually given along with the network's shard and realm in the form of a + * shard.realm.number id.
    + * An HCS topic is an ordered logical stream of messages united and secured by + * a running hash of those messages. The integrity of any message on a topic, + * and the topic stream as a whole, can always be ascertained from block stream + * data by recomputing the running hash across any subset of messages on the + * topic.
    + * The messages on a topic SHALL NOT be stored in network state, but are + * available in the network block stream, and may be queried via the + * Mirror Node system. + */ +message Topic { + /** + * The topic's ID. + *

    + * This value SHALL be unique within the network. + */ + TopicID topic_id = 1; + + /** + * The number of messages sent to the topic. + */ + int64 sequence_number = 2; + + /** + * The expiration time for this topic, in seconds since the epoch. + *

    + * For this purpose, `epoch` SHALL be the UNIX epoch with 0 at `1970-01-01T00:00:00.000Z`. + */ + int64 expiration_second = 3; + + /** + * The number of seconds for which the topic will be automatically renewed + * upon expiring (if it has a valid auto-renew account). + */ + int64 auto_renew_period = 4; + + /** + * The id of the account (if any) that the network will attempt to charge + * fees to complete auto-renewal of this topic, upon expiration. + */ + AccountID auto_renew_account_id = 5; + + /** + * A flag indicating that this topic is deleted. + */ + bool deleted = 6; + + /** + * The current running hash of this topic. + *

    + * This 48-byte field is the output of a SHA-384 digest with input data + * determined by the current version of the running hash algorithm used + * by the network.
    + * All topics in state SHALL use running hash algorithm version `3`.
    + * The bytes of each uint64 or uint32 encoded for the hash input MUST be in + * Big-Endian format. + *

    + *


    + * If the algorithm version 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. + *
    3. The `topicRunningHashVersion` (8 bytes)
    4. + *
    5. The payer account's shard (8 bytes)
    6. + *
    7. The payer account's realm (8 bytes)
    8. + *
    9. The payer account's number (8 bytes)
    10. + *
    11. The topic's shard (8 bytes)
    12. + *
    13. The topic's realm (8 bytes)
    14. + *
    15. The topic's number (8 bytes)
    16. + *
    17. The number of seconds since the epoch when the + * `ConsensusSubmitMessage` reached consensus (8 bytes)
    18. + *
    19. The number of nanoseconds within the second when the + * `ConsensusSubmitMessage` reached consensus (4 bytes)
    20. + *
    21. The `topicSequenceNumber` (8 bytes)
    22. + *
    23. The output of a SHA-384 digest of the message bytes from the + * `ConsensusSubmitMessage` (48 bytes)
    24. + *
    + *
    Note that older messages on a topic, which are available in + * the block stream, MAY use older algorithm versions, and the block stream + * record incorporates a running hash version field to ensure the correct + * hash calculation for each such historical message.
    + */ + bytes running_hash = 7; + + /** + * A short description of this topic. + *

    + * This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes` + * (default 100) bytes when encoded as UTF-8. + */ + string memo = 8; + + /** + * Access control for modification of the topic. + *

    + * If this field is set, that key MUST sign each message to update or delete + * this topic.
    + * A topic without an admin key SHALL be immutable, except for expiration + * and renewal.
    + * If this field is not set, the `auto_renew_account_id` MUST NOT be set. + */ + Key admin_key = 9; + + /** + * Access control for message submission to the topic. + *

    + * If this field is set, that key MUST sign each consensus submit message + * for this topic. + */ + Key submit_key = 10; + + /** + * Access control for update/delete of custom fees. + *

    + * If this field is unset, the current custom fees CANNOT be changed.
    + * If this field is set, that `Key` MUST sign any transaction to update + * the custom fee schedule for this topic. + */ + Key fee_schedule_key = 11; + + /** + * A set of "privileged payer" keys
    + * Keys in this list are permitted to submit messages to this topic without + * paying custom fees associated with this topic. + *

    + * If a submit transaction is signed by _any_ key included in this set, + * custom fees SHALL NOT be charged for that transaction.
    + * A `fee_exempt_key_list` MUST NOT contain more than + * `MAX_ENTRIES_FOR_FEE_EXEMPT_KEY_LIST` keys.
    + * A `fee_exempt_key_list` MUST NOT contain any duplicate keys.
    + * A `fee_exempt_key_list` MAY contain keys for accounts that are inactive, + * deleted, or non-existent. + * If not set, there SHALL NOT be any fee-exempt keys. In particular, the + * following keys SHALL NOT be implicitly or automatically added to this + * list: `adminKey`, `submitKey`, `fee_schedule_key`. + */ + repeated Key fee_exempt_key_list = 12; + + /** + * A set of custom fee definitions.
    + * These are fees to be assessed for each submit to this topic. + *

    + * If this list is empty, the only fees charged for a submit to this + * topic SHALL be the network and node fees.
    + * If this list is not empty, each fee defined in this set SHALL + * be evaluated for each message submitted to this topic, and the + * resultant total assessed fees SHALL be charged.
    + * If this list is not empty, custom fees defined here SHALL be + * charged _in addition to_ the base network and node fees. + */ + repeated FixedCustomFee custom_fees = 13; +} diff --git a/proto_src/services/state/contract/bytecode.proto b/proto_src/services/state/contract/bytecode.proto new file mode 100644 index 000000000..ba8343de2 --- /dev/null +++ b/proto_src/services/state/contract/bytecode.proto @@ -0,0 +1,46 @@ +/** + * # EVM Bytecode + * The verified bytecode of an EVM contract for the Hedera Smart Contract service. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in [RFC2119](https://www.ietf.org/rfc/rfc2119) + * and clarified in [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2023-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +/** + * The bytecode for a contract account. + * + * This is not referred to by any other protocol buffer, but is used internally + * within the Hedera Node software. + */ +message Bytecode { + /** + * The raw bytes (not hex-encoded) of a contract's bytecode. + */ + bytes code = 1; +} diff --git a/proto_src/services/state/contract/storage_slot.proto b/proto_src/services/state/contract/storage_slot.proto new file mode 100644 index 000000000..38d366a56 --- /dev/null +++ b/proto_src/services/state/contract/storage_slot.proto @@ -0,0 +1,78 @@ +/** + * # EVM Contract Slot + * Information regarding EVM storage "slot"s for the + * Hedera Smart Contract service. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in [RFC2119](https://www.ietf.org/rfc/rfc2119) + * and clarified in [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2023-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; + +/** + * The key of a storage slot. A slot is scoped to a specific contract ID. + * + * For each contract, its EVM storage is a mapping of 256-bit keys (or "words") + * to 256-bit values. + */ +message SlotKey { + /** + * The Contract ID of the contract that owns (and pays for) this slot. + */ + ContractID contractID = 1; + + /** + * The EVM key of this slot, left-padded with zeros to form a 256-bit word. + */ + bytes key = 2; +} + +/** + * The value of a contract storage slot. For the EVM, this is a single "word". + * + * Because we iterate through all the storage slots for an expired contract + * when purging it from state, our slot values also include the words of the + * previous and next keys in this contract's storage "virtual linked list". + */ +message SlotValue { + /** + * The EVM value in this slot, left-padded with zeros to form a 256-bit word. + */ + bytes value = 1; + + /** + * The word of the previous key in this contract's storage list (if any). + */ + bytes previous_key = 2; + + /** + * The word of the next key in this contract's storage list (if any). + */ + bytes next_key = 3; +} diff --git a/proto_src/services/state/entity/entity_counts.proto b/proto_src/services/state/entity/entity_counts.proto new file mode 100644 index 000000000..daf071917 --- /dev/null +++ b/proto_src/services/state/entity/entity_counts.proto @@ -0,0 +1,118 @@ +/** + * # Entity Counts + * Information about the number of entities in the network. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in [RFC2119](https://www.ietf.org/rfc/rfc2119) + * and clarified in [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package com.hedera.hapi.node.state.entity; +/* + * Copyright (C) 2025 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +/** + * Representation of a Hedera Entity Service entity counts in the network Merkle tree. + * + * This message is used to store the counts of various entities in the network. + */ +message EntityCounts { + /** + * The number of accounts in the network. This represents the size of accounts merkle tree. + *

    + * It MUST be greater than or equal to 0. + */ + uint64 num_accounts = 1; + /** + * The number of aliases in the network. This represents the size of aliases smerkle tree. + *

    + * It MUST be greater than or equal to 0. + */ + uint64 num_aliases = 2; + /** + * The number of tokens in the network. This represents the size of tokens merkle tree. + *

    + * It MUST be greater than or equal to 0. + */ + uint64 num_tokens = 3; + /** + * The number of token relationships in the network. This represents the size of token relationships merkle tree. + *

    + * It MUST be greater than or equal to 0. + */ + uint64 num_token_relations = 4; + /** + * The number of NFTs in the network. This represents the size of NFTs merkle tree. + *

    + * It MUST be greater than or equal to 0. + */ + uint64 num_nfts = 5; + /** + * The number of airdrops in the network. This represents the size of airdrops merkle tree. + *

    + * It MUST be greater than or equal to 0. + */ + uint64 num_airdrops = 6; + /** + * The number of staking infos in the network. This represents the size of staking infos merkle tree. + *

    + * It MUST be greater than or equal to 0. + */ + uint64 num_staking_infos = 7; + /** + * The number of topics in the network. This represents the size of topics merkle tree. + *

    + * It MUST be greater than or equal to 0. + */ + uint64 num_topics = 8; + /** + * The number of files in the network. This represents the size of files merkle tree. + *

    + * It MUST be greater than or equal to 0. + */ + uint64 num_files = 9; + /** + * The number of nodes in the network. This represents the size of nodes merkle tree. + *

    + * It MUST be greater than or equal to 0. + */ + uint64 num_nodes = 10; + /** + * The number of schedules in the network. This represents the size of schedules merkle tree. + *

    + * It MUST be greater than or equal to 0. + */ + uint64 num_schedules = 11; + /** + * The number of contract storage slots in the network. This represents the size of contract storage slots merkle tree. + *

    + * It MUST be greater than or equal to 0. + */ + uint64 num_contract_storage_slots = 12; + /** + * The number of contract bytecodes in the network. This represents the size of contract bytecodes merkle tree. + *

    + * It MUST be greater than or equal to 0. + */ + uint64 num_contract_bytecodes = 13; +} diff --git a/proto_src/services/state/file/file.proto b/proto_src/services/state/file/file.proto new file mode 100644 index 000000000..ef7137307 --- /dev/null +++ b/proto_src/services/state/file/file.proto @@ -0,0 +1,116 @@ +/** + * # File + * A "file" in the distributed ledger is a stream of bytes. These bytes may + * contain any data, and are limited in length based on network configuration + * (for example, 1048576). + * + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in [RFC2119](https://www.ietf.org/rfc/rfc2119) + * and clarified in [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2023-2024 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 "basic_types.proto"; + +option java_package = "com.hederahashgraph.api.proto.java"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +/** + * Representation of an Hedera File Service `file`. + * + * Files offer a place to store additional data, much more than is available in + * other entities, for use with smart contracts, non-fungible tokens, etc... + * As with all network entities, a file has a unique entity number, which is + * given along with the network's shard and realm in the form of a + * shard.realm.number id. + */ +message File { + /** + * This file's ID within the global network state. + *

    + * This value SHALL be unique within the network. + */ + FileID file_id = 1; + + /** + * The file's expiration time in seconds since the epoch.
    + * This value should be compared against consensus time, which may not + * exactly match clock time at the moment of expiration. + *

    + * For this purpose, `epoch` SHALL be the UNIX epoch with 0 at `1970-01-01T00:00:00.000Z`. + */ + int64 expiration_second = 2; + + /** + * A list of keys that MUST sign any transaction to create + * or update this file. + *

    + * Only _one_ of these keys must sign a transaction to delete the file.
    + * This field MAY be `null` or an empty list.
    + * If this field is null or an empty `KeyList`, then the file SHALL be + * immutable.
    + * For an immutable file, the only transaction permitted to modify that + * file SHALL be a `fileUpdate` transaction with _only_ the + * `expirationTime` set. + */ + KeyList keys = 3; + + /** + * The contents of the file. + *

    + * This SHALL be limited to the current maximum file size; typically no + * more than 1 Megabyte (1048576 bytes). + */ + bytes contents = 4; + + /** + * A short description of the file. + *

    + * This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes` + * (default 100) bytes when encoded as UTF-8. + */ + string memo = 5; + + /** + * A flag indicating that this file is deleted. + *

    + * The `contents` of a deleted "regular" file SHALL be an empty + * (zero length) bytes. + */ + bool deleted = 6; + + /** + * The pre-system-delete expiration time of a deleted "system" file, in seconds. + *

    + * This field SHALL contain the original expiration time of a "system" file + * that is deleted. This SHOULD be used to restore that expiration time if + * the file is subsequently "un-deleted" before it is purged from the + * system.
    + * A "regular" file cannot be "un-deleted", so this field SHALL NOT be set + * for those files. + */ + int64 pre_system_delete_expiration_second = 7; + +} diff --git a/proto_src/services/state/hints/hints_types.proto b/proto_src/services/state/hints/hints_types.proto new file mode 100644 index 000000000..6c44acaf8 --- /dev/null +++ b/proto_src/services/state/hints/hints_types.proto @@ -0,0 +1,234 @@ +syntax = "proto3"; + +package com.hedera.hapi.node.state.hints; + +/* + * Copyright (C) 2024 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"; +import "google/protobuf/wrappers.proto"; + +option java_package = "com.hederahashgraph.api.proto.java"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +/** + * The id of a party in a hinTS scheme with a certain + * number of parties. + */ +message HintsPartyId { + /** + * The party id, in the range [0, num_parties). + */ + uint32 party_id = 1; + /** + * The number of parties in the hinTS scheme. + */ + uint32 num_parties = 2; +} + +/** + * A set of hinTS keys submitted by a node. + */ +message HintsKeySet { + /** + * The id of the node submitting these keys. + */ + uint64 node_id = 1; + /** + * The consensus time at which the network adopted the active + * hinTS key in this set. + */ + proto.Timestamp adoption_time = 2; + /** + * The party's active hinTS key. + */ + bytes key = 3; + /** + * If set, the new hinTS key the node wants to use when + * the next construction begins. + */ + bytes next_key = 4; +} + +/** + * The output of the hinTS preprocessing algorithm; that is, a + * linear-size aggregation key and a succinct verification key. + */ +message PreprocessedKeys { + /** + * The aggregation key for the hinTS scheme + */ + bytes aggregation_key = 1; + /** + * The succinct verification key for the hinTS scheme. + */ + bytes verification_key = 2; +} + +/** + * The id for a node's vote for the output of the + * preprocessing output of a hinTS construction. + */ +message PreprocessingVoteId { + /** + * The construction this vote is connected to. + */ + uint64 construction_id = 1; + /** + * The id of the node submitting the vote. + */ + uint64 node_id = 2; +} + +/** + * A node's vote for the consensus output of a hinTS preprocessing + * algorithm. + */ +message PreprocessingVote { + oneof vote { + /** + * The preprocessed keys this node is voting for. + */ + PreprocessedKeys preprocessed_keys = 1; + /** + * The id of any node that already voted for the exact keys + * that this node wanted to vote for. + */ + uint64 congruent_node_id = 2; + } +} + +/** + * A node's hinTS party id. + */ +message NodePartyId { + /** + * The node id. + */ + uint64 node_id = 1; + /** + * The party id. + */ + uint32 party_id = 2; +} + +/** + * The information constituting the hinTS scheme Hiero TSS. + */ +message HintsScheme { + /** + * The aggregation and verification keys for the scheme. + */ + PreprocessedKeys preprocessed_keys = 1; + + /** + * The final party ids assigned to each node in the target roster. + */ + repeated NodePartyId node_party_ids = 2; +} + +/** + * A summary of progress in constructing a hinTS scheme. + */ +message HintsConstruction { + /** + * The id of the construction. + */ + uint64 construction_id = 1; + /** + * The hash of the roster whose weights are used to determine when + * the >=1/3 weight signing threshold is reached. + */ + bytes source_roster_hash = 2; + /** + * The hash of the roster whose weights are used to determine when + * the >2/3 weight availability threshold is reached. + */ + bytes target_roster_hash = 3; + + oneof preprocessing_state { + /** + * If the network is still gathering hinTS keys for this construction, + * the time at which honest nodes should stop waiting for tardy + * publications and begin preprocessing as soon as there are valid + * hinTS keys for nodes with >2/3 weight in the target roster. + */ + proto.Timestamp grace_period_end_time = 4; + /** + * If the network has gathered enough hinTS keys for this construction + * to begin preprocessing, the cutoff time by which keys must have been + * adopted to be included as input to the preprocessing algorithm. + */ + proto.Timestamp preprocessing_start_time = 5; + + /** + * If set, the completed hinTS scheme. + */ + HintsScheme hints_scheme = 6; + } +} + +/** + * The stage of a CRS construction. + */ +enum CRSStage { + /** + * The network is gathering contributions to the CRS from all nodes. + */ + GATHERING_CONTRIBUTIONS = 0; + + /** + * The network is waiting for some grace period to allow the verification future + * to be completed after the last node has contributed to the CRS. + */ + WAITING_FOR_ADOPTING_FINAL_CRS = 1; + + /** + * The network has completed the CRS construction and is set in the CrsState. + */ + COMPLETED = 2; +} + +/** + * The state of a CRS construction. + */ +message CRSState { + + /** + * The bytes of the CRS. Based on the CRSStage, this may be the initial CRS + * or the final CRS. + */ + bytes crs = 1; + + /** + * The stage of the CRS construction. + */ + CRSStage stage = 2; + + /** + * The id of the next node that should contribute to the CRS. This is used + * to ensure that all nodes contribute to the CRS in a round-robin fashion. + * If this is null, then all nodes in the network have contributed to the CRS. + */ + google.protobuf.UInt64Value next_contributing_node_id = 3; + + /** + * The time at which the network should stop waiting for the node's contributions + * and move on to the next node in the round-robin fashion. + */ + proto.Timestamp contribution_end_time = 4; +} diff --git a/proto_src/services/state/history/history_types.proto b/proto_src/services/state/history/history_types.proto new file mode 100644 index 000000000..ba3df2c85 --- /dev/null +++ b/proto_src/services/state/history/history_types.proto @@ -0,0 +1,227 @@ +syntax = "proto3"; + +package com.hedera.hapi.node.state.history; + +/* + * Copyright (C) 2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +/** + * A set of proof keys for a node; that is, the key the node is + * currently using and the key it wants to use in assembling the + * next address book in the ledger id's chain of trust. + */ +message ProofKeySet { + /** + * The consensus time when the network adopted the active + * proof key in this set. An adoption time that is sufficiently + * tardy relative to the latest assembly start time may result + * in the node's key being omitted from the address book. + */ + proto.Timestamp adoption_time = 2; + /** + * The proof key the node is using. + */ + bytes key = 3; + /** + * If set, the proof key the node wants to start using in the + * address book. + */ + bytes next_key = 4; +} + +/** + * A record of the proof key a node had in a particular address + * book. Necessary to keep at each point history so that nodes + * can verify the correct key was used to sign in transitions + * starting from the current address book; no matter how keys + * have been rotated from the time the address book was created. + */ +message ProofKey { + /** + * The node id. + */ + uint64 node_id = 1; + /** + * The key. + */ + bytes key = 2; +} + +/** + * A piece of new history in the form of an address book hash and + * associated metadata. + */ +message History { + /** + * The address book hash of the new history. + */ + bytes address_book_hash = 1; + /** + * The metadata associated to the address book. + */ + bytes metadata = 2; +} + +/** + * A proof that some address book history belongs to the ledger id's + * chain of trust. + */ +message HistoryProof { + /** + * The hash of the source address book. + */ + bytes source_address_book_hash = 1; + /** + * The proof keys for the target address book, needed to keep + * constructing proofs after adopting the target address book's + * roster at a handoff. + */ + repeated ProofKey target_proof_keys = 2; + /** + * The target history of the proof. + */ + History target_history = 3; + /** + * The proof of chain of trust from the ledger id. + */ + bytes proof = 4; +} + +/** + * Summary of the status of constructing a metadata proof, necessary to + * ensure deterministic construction ending in a roster with sufficient + * weight to enact its own constructions. + */ +message HistoryProofConstruction { + /** + * The construction id. + */ + uint64 construction_id = 1; + /** + * The hash of the roster whose weights are used to determine when + * certain thresholds are during construction. + */ + bytes source_roster_hash = 2; + /** + * If set, the proof that the address book of the source roster belongs + * to the the ledger id's chain of trust; if not set, the source roster's + * address book must *be* the ledger id. + */ + HistoryProof source_proof = 3; + /** + * The hash of the roster whose weights are used to assess progress + * toward obtaining proof keys for parties that hold at least a + * strong minority of the stake in that roster. + */ + bytes target_roster_hash = 4; + + oneof proof_state { + /** + * If the network is still gathering proof keys for this + * construction, the next time at which nodes should stop waiting + * for tardy proof keys and assembly the history to be proven as + * soon as it has the associated metadata and proof keys for nodes + * with >2/3 weight in the target roster. + */ + proto.Timestamp grace_period_end_time = 5; + /** + * If the network has gathered enough proof keys to assemble the + * history for this construction, the cutoff time at which those + * keys must have been adopted to be included in the final history. + */ + proto.Timestamp assembly_start_time = 6; + /** + * When this construction is complete, the recursive proof that + * the target roster's address book and associated metadata belong + * to the ledger id's chain of trust. + */ + HistoryProof target_proof = 7; + + /** + * If set, the reason the construction failed. + */ + string failure_reason = 8; + } +} + +/** + * A construction-scoped node id. + */ +message ConstructionNodeId { + /** + * The unique id of a history proof construction. + */ + uint64 construction_id = 1; + /** + * The unique id of a node. + */ + uint64 node_id = 2; +} + +/** + * A node's vote for a particular history proof; either by explicitly + * giving the proof, or by identifying a node that already voted for it. + */ +message HistoryProofVote { + oneof vote { + /** + * The history proof the submitting node is voting for. + */ + HistoryProof proof = 1; + /** + * The id of another node that already voted for the exact proof + * the submitting node is voting for. + */ + uint64 congruent_node_id = 2; + } +} + +/** + * A node's signature blessing some new history. + */ +message HistorySignature { + /** + * The new history the node is signing. + */ + History history = 1; + /** + * The node's signature on the canonical serialization of + * the new history. + */ + bytes signature = 2; +} + +/** + * A signature on some new history recorded at a certain time. + */ +message RecordedHistorySignature { + /** + * The time at which the signature was recorded. + */ + proto.Timestamp signing_time = 1; + + /** + * The signature on some new history. + */ + HistorySignature history_signature = 2; +} + diff --git a/proto_src/services/state/primitives.proto b/proto_src/services/state/primitives.proto new file mode 100644 index 000000000..935ea7ba0 --- /dev/null +++ b/proto_src/services/state/primitives.proto @@ -0,0 +1,72 @@ +/** + * # Primitives + * Primitive value wrapper messages. + * + * These SHALL be used only for situations where the entire value to be stored + * in state is a single primitive. These MUST NOT ever be used as components of + * another message; use the protobuf type instead. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in [RFC2119](https://www.ietf.org/rfc/rfc2119) + * and clarified in [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2023-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +/** + * A single 64-bit number with no particular meaning. + */ +message ProtoLong { + int64 value = 1; +} + +/** + * A single 32-bit number with no particular meaning. + */ +message ProtoInteger { + int32 value = 1; +} + +/** + * A single boolean with no particular meaning. + */ +message ProtoBoolean { + bool value = 1; +} + +/** + * A single string with no particular meaning. + */ +message ProtoString { + string value = 1; +} + +/** + * A single byte array with no particular meaning. + */ +message ProtoBytes { + bytes value = 1; +} diff --git a/proto_src/services/state/recordcache/recordcache.proto b/proto_src/services/state/recordcache/recordcache.proto new file mode 100644 index 000000000..56cf97d88 --- /dev/null +++ b/proto_src/services/state/recordcache/recordcache.proto @@ -0,0 +1,121 @@ +/** + * # Record Cache + * The Record Cache holds transaction records for a short time, and is the + * source for responses to `transactionGetRecord` and `transactionGetReceipt` + * queries. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in [RFC2119](https://www.ietf.org/rfc/rfc2119) + * and clarified in [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2023-2024 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 "basic_types.proto"; +import "transaction_record.proto"; +import "response_code.proto"; + +option java_package = "com.hederahashgraph.api.proto.java"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +/** + * As transactions are handled and records and receipts are created, they are + * stored in state for a configured time period (for example, 3 minutes). + * During this time, any client can query the node and get the record or receipt + * for the transaction. The `TransactionRecordEntry` is the object stored in + * state with this information. + */ +message TransactionRecordEntry { + /** + * A node identifier.
    + * This identifier is the node, as known to the address book, that + * submitted the transaction for consensus. + *

    + * This SHALL be a whole number. + */ + int64 node_id = 1; + + /** + * An Account identifier for the payer for the transaction. + *

    + * This MAY be the same as the account ID within the Transaction ID of the + * record, or it MAY be the account ID of the node that submitted the + * transaction to consensus if the account ID in the Transaction ID was + * not able to pay. + */ + AccountID payer_account_id = 2; + + /** + * A transaction record for the transaction. + */ + TransactionRecord transaction_record = 3; +} + +/** + * An entry in the record cache with the receipt for a transaction. + * This is the entry stored in state that enables returning the receipt + * information when queried by clients. + * + * When a transaction is handled a receipt SHALL be created.
    + * This receipt MUST be stored in state for a configured time limit + * (e.g. 3 minutes).
    + * While a receipt is stored, a client MAY query the node and retrieve + * the receipt. + */ +message TransactionReceiptEntry { + /** + * A node identifier.
    + * This identifies the node that submitted the transaction to consensus. + * The value is the identifier as known to the current address book. + *

    + * Valid node identifiers SHALL be between 0 and 263-1, + * inclusive. + */ + uint64 node_id = 1; + + /** + * A transaction identifier.
    + * This identifies the submitted transaction for this receipt. + */ + TransactionID transaction_id = 2; + + /** + * A status result.
    + * This is the final status after handling the transaction. + */ + ResponseCodeEnum status = 3; +} + +/** + * A cache of transaction receipts.
    + * As transactions are handled and receipts are created, they are stored in + * state for a configured time limit (perhaps, for example, 3 minutes). + * During this time window, any client can query the node and get the receipt + * for the transaction. The `TransactionReceiptEntries` is the object stored in + * state with this information. + * + * This message SHALL contain a list of `TransactionReceiptEntry` objects. + */ +message TransactionReceiptEntries { + repeated TransactionReceiptEntry entries = 1; +} diff --git a/proto_src/services/state/roster/ledger_id.proto b/proto_src/services/state/roster/ledger_id.proto new file mode 100644 index 000000000..fcefa11e2 --- /dev/null +++ b/proto_src/services/state/roster/ledger_id.proto @@ -0,0 +1,140 @@ +/** + * # Ledger ID + * A Ledger ID is a Threshold Signature Scheme (TSS) public key that + * identifies the ledger. A Ledger ID is intended to be long-lived, but + * may change under rare circumstances. The Ledger ID for a particular + * distributed ledger can be used to validate the signature of that ledger + * in, for example, a block stream "block proof". + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package com.hedera.hapi.node.state.roster; + +/* + * Copyright (C) 2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +/** + * A ledger identifier.
    + * This message identifies a ledger and is used to verify ledger + * signatures in a Threshold Signature Scheme (TSS). + * + * A ledger identifier SHALL be a public key defined according to the TSS + * process.
    + * A ledger identifier SHOULD NOT change, but MAY do so in rare + * circumstances.
    + * Clients SHOULD always check for the correct ledger identifier, according to + * the network roster, before attempting to verify any state proof or other + * ledger signature. + * + * ### Block Stream Effects + * Every block in the Block Stream `BlockProof` SHALL be signed via TSS and + * MUST be verified with the ledger identifier current at the _start_ of that + * block. + * If the ledger identifier changes, the new value MUST be used to validate + * Block Proof items after the change. + * A change to the ledger identifier SHALL be reported in a State Change for + * the block containing that change, which SHALL be verified with the _prior_ + * ledger identifier. + */ +message LedgerId { + + /** + * A public key.
    + * This key both identifies the ledger and can be used to verify ledger + * signatures. + *

    + * This value MUST be set.
    + * This value MUST NOT be empty.
    + * This value MUST contain a valid public key. + */ + bytes ledger_id = 1; + + /** + * A round number.
    + * This identifies when this ledger id becomes active.
    + * This value is REQUIRED. + */ + uint64 round = 2; + + /** + * A signature from the prior ledger key.
    + * This signature is the _previous_ ledger ID signing _this_ ledger ID.
    + * This value MAY be unset, if there is no prior ledger ID.
    + * This value SHOULD be set if a prior ledger ID exists + * to generate the signature. + */ + bytes ledger_signature = 3; + + /** + * The signatures from nodes in the active roster signing the new + * ledger id.
    + * These signatures establish a chain of trust from the network to the new + * ledger id. + *

    + * This value MUST be present when the ledger signature of a previous ledger + * id is absent. + */ + RosterSignatures roster_signatures = 4; +} + +/** + * A collection of signatures from nodes in a roster. + */ +message RosterSignatures { + /** + * A roster hash for the roster that the node signatures are from. + */ + bytes roster_hash = 1; + + /** + * A list of node signatures on the same message where all node ids in the + * NodeSignature objects are from the roster that the roster_hash represents. + */ + repeated NodeSignature node_signatures = 2; +} + +/** + * A pair of a _RSA_ signature and the node id of the node that created the + * signature. + */ +message NodeSignature { + /** + * The node id of the node that created the _RSA_ signature. + * This value MUST be set.
    + * This value MUST NOT be empty.
    + * This value is REQUIRED. + */ + uint64 node_id = 1; + + /** + * The bytes of an _RSA_ signature. + * This value MUST be set.
    + * This value MUST NOT be empty.
    + * This value MUST contain a valid signature. + */ + bytes node_signature = 2; +} diff --git a/proto_src/services/state/roster/roster.proto b/proto_src/services/state/roster/roster.proto new file mode 100644 index 000000000..91c212ef3 --- /dev/null +++ b/proto_src/services/state/roster/roster.proto @@ -0,0 +1,97 @@ +syntax = "proto3"; + +package com.hedera.hapi.node.state.roster; + +/* + * Copyright (C) 2024 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 "basic_types.proto"; + +option java_package = "com.hederahashgraph.api.proto.java"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +/** + * A single roster in the network state. + *

    + * The roster SHALL be a list of `RosterEntry` objects. + */ +message Roster { + /** + * List of roster entries, one per consensus node. + *

    + * This list SHALL contain roster entries in natural order of ascending node ids. + * This list SHALL NOT be empty.
    + */ + repeated RosterEntry roster_entries = 1; +} + +/** + * A single roster entry in the network state. + * + * Each roster entry SHALL encapsulate the elements required + * to manage node participation in the Threshold Signature Scheme (TSS).
    + * All fields are REQUIRED. + */ +message RosterEntry { + + // The tssEncryptionKey field has been reserved because it is no longer + // required to be stored in the Roster. The public portion of this key will + // continue to be stored in TssBaseService, but will, however, just be + // stored as raw bytes. + reserved 4; + + /** + * A consensus node identifier. + *

    + * Node identifiers SHALL be unique _within_ a ledger, + * and MUST NOT be repeated _between_ shards and realms. + */ + uint64 node_id = 1; + + /** + * A consensus weight. + *

    + * Each node SHALL have a weight of zero or more in consensus calculations.
    + * The sum of the weights of all nodes in the roster SHALL form the total weight of the system, + * and each node's individual weight SHALL be proportional to that sum.
    + */ + uint64 weight = 2; + + /** + * An RSA public certificate used for signing gossip events. + *

    + * This value SHALL be a certificate of a type permitted for gossip + * signatures.
    + * This value SHALL be the DER encoding of the certificate presented.
    + * This field is REQUIRED and MUST NOT be empty. + */ + bytes gossip_ca_certificate = 3; + + /** + * A list of service endpoints for gossip. + *

    + * These endpoints SHALL represent the published endpoints to which other + * consensus nodes may _gossip_ transactions.
    + * If the network configuration value `gossipFqdnRestricted` is set, then + * all endpoints in this list SHALL supply only IP address.
    + * If the network configuration value `gossipFqdnRestricted` is _not_ set, + * then endpoints in this list MAY supply either IP address or FQDN, but + * SHALL NOT supply both values for the same endpoint.
    + * This list SHALL NOT be empty.
    + */ + repeated proto.ServiceEndpoint gossip_endpoint = 5; +} diff --git a/proto_src/services/state/roster/roster_state.proto b/proto_src/services/state/roster/roster_state.proto new file mode 100644 index 000000000..ae36e38d0 --- /dev/null +++ b/proto_src/services/state/roster/roster_state.proto @@ -0,0 +1,73 @@ +syntax = "proto3"; + +package com.hedera.hapi.node.state.roster; + +/* + * Copyright (C) 2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +/** + * The current state of platform rosters.
    + * This message stores a roster data for the platform in network state. + * + * The roster state SHALL encapsulate the incoming candidate roster's hash, + * and a list of pairs of round number and active roster hash.
    + * This data SHALL be used to track round numbers and the rosters used in determining the consensus.
    + */ +message RosterState { + /** + * The SHA-384 hash of a candidate roster. + *

    + * This is the hash of the roster that is currently being considered + * for adoption.
    + * A Node SHALL NOT, ever, have more than one candidate roster + * at the same time. + */ + bytes candidate_roster_hash = 1; + + /** + * A list of round numbers and roster hashes.
    + * The round number indicates the round in which the corresponding roster became active + *

    + * This list SHALL be ordered by round numbers in descending order. + */ + repeated RoundRosterPair round_roster_pairs = 2; +} + +/** + * A pair of round number and active roster hash. + *

    + * This message SHALL encapsulate the round number and the hash of the + * active roster used for that round. + */ +message RoundRosterPair { + /** + * The round number. + *

    + * This value SHALL be the round number of the consensus round in which this roster became active. + */ + uint64 round_number = 1; + + /** + * The SHA-384 hash of the active roster for the given round number. + *

    + * This value SHALL be the hash of the active roster used for the round. + */ + bytes active_roster_hash = 2; +} diff --git a/proto_src/services/state/schedule/schedule.proto b/proto_src/services/state/schedule/schedule.proto new file mode 100644 index 000000000..724dda6bf --- /dev/null +++ b/proto_src/services/state/schedule/schedule.proto @@ -0,0 +1,268 @@ +/** + * # Scheduled Transaction + * Information regarding Scheduled Transactions. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in [RFC2119](https://www.ietf.org/rfc/rfc2119) + * and clarified in [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2023-2024 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 "basic_types.proto"; +import "timestamp.proto"; +import "schedulable_transaction_body.proto"; +import "transaction.proto"; + +option java_package = "com.hederahashgraph.api.proto.java"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +/** + * Representation of a Hedera Schedule entry in the network Merkle tree.
    + * A Schedule represents a request to run a transaction _at some future time_ + * either when the `Schedule` expires (if long term schedules are enabled and + * `wait_for_expiry` is true) or as soon as the `Schedule` has gathered + * enough signatures via any combination of the `scheduleCreate` and 0 or more + * subsequent `scheduleSign` transactions. + */ +message Schedule { + /** + * This schedule's ID within the global network state. + *

    + * This value SHALL be unique within the network. + */ + ScheduleID schedule_id = 1; + + /** + * A flag indicating this schedule is deleted. + *

    + * A schedule SHALL either be executed or deleted, but never both. + */ + bool deleted = 2; + + /** + * A flag indicating this schedule has executed. + *

    + * A schedule SHALL either be executed or deleted, but never both. + */ + bool executed = 3; + + /** + * A schedule flag to wait for expiration before executing. + *

    + * A schedule SHALL be executed immediately when all necessary signatures + * are gathered, unless this flag is set.
    + * If this flag is set, the schedule SHALL wait until the consensus time + * reaches `expiration_time_provided`, when signatures MUST again be + * verified. If all required signatures are present at that time, the + * schedule SHALL be executed. Otherwise the schedule SHALL expire without + * execution. + *

    + * Note that a schedule is always removed from state after it expires, + * regardless of whether it was executed or not. + */ + bool wait_for_expiry = 4; + + /** + * A short description for this schedule. + *

    + * This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes` + * (default 100) bytes when encoded as UTF-8. + */ + string memo = 5; + + /** + * The scheduler account for this schedule. + *

    + * This SHALL be the account that submitted the original + * ScheduleCreate transaction. + */ + AccountID scheduler_account_id = 6; + + /** + * The explicit payer account for the scheduled transaction. + *

    + * If set, this account SHALL be added to the accounts that MUST sign the + * schedule before it may execute. + */ + AccountID payer_account_id = 7; + + /** + * The admin key for this schedule. + *

    + * This key, if set, MUST sign any `schedule_delete` transaction.
    + * If not set, then this schedule SHALL NOT be deleted, and any + * `schedule_delete` transaction for this schedule SHALL fail. + */ + Key admin_key = 8; + + /** + * The transaction valid start value for this schedule. + *

    + * This MUST be set, and SHALL be copied from the `TransactionID` of + * the original `schedule_create` transaction. + */ + Timestamp schedule_valid_start = 9; + + /** + * The requested expiration time of the schedule if provided by the user. + *

    + * If not provided in the `schedule_create` transaction, this SHALL be set + * to a default value equal to the current consensus time, forward offset by + * the maximum schedule expiration time in the current dynamic network + * configuration (typically 62 days).
    + * The actual `calculated_expiration_second` MAY be "earlier" than this, + * but MUST NOT be later. + */ + int64 provided_expiration_second = 10; + + /** + * The calculated expiration time of the schedule. + *

    + * This SHALL be calculated from the requested expiration time in the + * `schedule_create` transaction, and limited by the maximum expiration time + * in the current dynamic network configuration (typically 62 days). + *

    + * The schedule SHALL be removed from global network state after the network + * reaches a consensus time greater than or equal to this value. + */ + int64 calculated_expiration_second = 11; + + /** + * The consensus timestamp of the transaction that executed or deleted this schedule. + *

    + * This value SHALL be set to the `current_consensus_time` when a + * `schedule_delete` transaction is completed.
    + * This value SHALL be set to the `current_consensus_time` when the + * scheduled transaction is executed, either as a result of gathering the + * final required signature, or, if long-term schedule execution is enabled, + * at the requested execution time. + */ + Timestamp resolution_time = 12; + + /** + * The scheduled transaction to execute. + *

    + * This MUST be one of the transaction types permitted in the current value + * of the `schedule.whitelist` in the dynamic network configuration. + */ + SchedulableTransactionBody scheduled_transaction = 13; + + /** + * The full transaction that created this schedule. + *

    + * This is primarily used for duplicate schedule create detection. This is + * also the source of the parent transaction ID, from which the child + * transaction ID is derived when the `scheduled_transaction` is executed. + */ + TransactionBody original_create_transaction = 14; + + /** + * All of the "primitive" keys that have already signed this schedule. + *

    + * The scheduled transaction SHALL NOT be executed before this list is + * sufficient to "activate" the required keys for the scheduled transaction.
    + * A Key SHALL NOT be stored in this list unless the corresponding private + * key has signed either the original `schedule_create` transaction or a + * subsequent `schedule_sign` transaction intended for, and referencing to, + * this specific schedule. + *

    + * The only keys stored are "primitive" keys (ED25519 or ECDSA_SECP256K1) in + * order to ensure that any key list or threshold keys are correctly handled, + * regardless of signing order, intervening changes, or other situations. + * The `scheduled_transaction` SHALL execute only if, at the time of + * execution, this list contains sufficient public keys to satisfy the + * full requirements for signature on that transaction. + */ + repeated Key signatories = 15; +} + +/** + * A message for storing a list of schedules in state.
    + * This is used to store lists of `Schedule` values. + * One example is all schedules that expire at a particular time. + */ +message ScheduleList { + /** + * a list of schedules, in no particular order. + *

    + * While the order is not _specified_, it MUST be deterministic. + */ + repeated Schedule schedules = 1; +} + +/** + * A message for storing a list of schedule identifiers in state.
    + * This is used to store lists of `ScheduleID` values. + * One example is all schedules that expire at a particular time. + */ +message ScheduleIdList { + /** + * A list of schedule identifiers, in no particular order. + *

    + * While the order is not _specified_, it MUST be deterministic. + */ + repeated ScheduleID schedule_ids = 1; +} + +/** + * A count of schedules scheduled and processed. + * This value summarizes the counts of scheduled and processed transactions + * within a particular consensus second. + */ +message ScheduledCounts { + /** + * A number of transactions scheduled to expire at a consensus second. + */ + uint32 number_scheduled = 1; + + /** + * A number of scheduled transactions that have been processed at + * a consensus second. + */ + uint32 number_processed = 2; +} + +/** + * An ordering for a scheduled transaction.
    + * This establishes the order in which scheduled transactions intended to + * execute at a particular consensus second will be executed. + * + * Scheduled transactions that have the same `expiry_second` SHALL execute + * in ascending order of `order_number`. + */ +message ScheduledOrder { + /** + * A consensus second in which the transaction is to be executed. + * This is _also_ the consensus time when the transaction will expire + * if it has not gathered enough signatures in time. + */ + uint64 expiry_second = 1; + + /* + * An ordered position within a conceptual list.
    + * This is the ordered position within the consensus second when + * the associated transaction will be executed. + */ + uint32 order_number = 2; +} diff --git a/proto_src/services/state/throttles/throttle_usage_snapshots.proto b/proto_src/services/state/throttles/throttle_usage_snapshots.proto new file mode 100644 index 000000000..fc5fadbad --- /dev/null +++ b/proto_src/services/state/throttles/throttle_usage_snapshots.proto @@ -0,0 +1,79 @@ +/** + * # Throttle Snapshots + * Point-in-time information regarding throttle usage. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in [RFC2119](https://www.ietf.org/rfc/rfc2119) + * and clarified in [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2023-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +/** + * All point-in-time snapshots of throttle usage for TPS and "gas" throttle + * values for a given point in time. + * + * > Question: + * >> What point in time? Should this store consensus timestamp here? + */ +message ThrottleUsageSnapshots { + + /** + * A list of snapshots for TPS throttles. + *

    + *

    Question:
    What is the order?
    + */ + repeated ThrottleUsageSnapshot tps_throttles = 1; + + /** + * A single snapshot for the gas throttle. + */ + ThrottleUsageSnapshot gas_throttle = 2; +} + +/** + * A single snapshot of the used throttle capacity for a throttle and point in + * time. + * + * > Question: + * >> What throttle does this apply to? How is that determined? + */ +message ThrottleUsageSnapshot { + /** + * Used throttle capacity. + */ + int64 used = 1; + + /** + * The time at which the this snapshot of capacity was calculated.
    + * Stored as an offset from the `epoch`. + *

    + * For this purpose, `epoch` SHALL be the UNIX epoch with 0 at `1970-01-01T00:00:00.000Z`. + */ + Timestamp last_decision_time = 2; +} diff --git a/proto_src/services/state/token/account.proto b/proto_src/services/state/token/account.proto new file mode 100644 index 000000000..9afc52e81 --- /dev/null +++ b/proto_src/services/state/token/account.proto @@ -0,0 +1,594 @@ +/** + * # Account. + * This is a single account within the Hedera network. An Account is the + * primary entity representing ownership of assets tracked on the ledger. + * Account Allowances are also described here, and these represent permission + * granted to an account to transfer assets owned by a different account which + * granted the "allowance". Allowances specify the assets and amounts which may + * be transferred. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2023-2024 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 "basic_types.proto"; + +option java_package = "com.hederahashgraph.api.proto.java"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +/** + * A single Account in the Hedera distributed ledger. + * + * Each Account SHALL have a unique three-part identifier, a Key, and one + * or more token balances.
    + * Each Account SHALL have an alias, which has multiple forms, and MAY be set automatically.
    + * Several additional items SHALL be associated with the Account to enable + * full functionality.
    + * Assets SHALL be represented as linked-lists with only the "head" item + * referenced directly in the Account, and the remaining items SHALL be + * accessible via the token relation or unique tokens maps.
    + * Accounts, as most items in the network, SHALL have an expiration time, + * recorded as seconds since the epoch, and MUST be "renewed" for a small fee + * at expiration. This helps to reduce the amount of inactive accounts retained + * in state.
    + * Another account MAY be designated to pay any renewal fees and automatically + * renew an account for (by default) 30-90 days at a time as a means to + * optionally ensure important accounts remain active.
    + * Accounts MAY participate in securing the network by "staking" the account + * balances to a particular network node, and receive a portion of network + * fees as a reward. An account MAY optionally decline these rewards but still + * stake its balances.
    + * An account MAY optionally require that inbound transfer transactions be + * signed by that account as receiver + * (in addition to the sender's signature).
    + * As with all network entities, Account ID SHALL be represented as + * shard.realm.X.
    + * Alias and contractId SHALL be additional identifiers used to connect accounts + * to transactions before the account is fully enabled, + * or in EVM contracts.
    + * + * --- + * + * #### Alias + * There is considerable complexity with `alias` (aka `evm_address`) for + * Accounts. Much of this comes from the existence of a "hidden" alias for + * almost all accounts, and the reuse of the alias field for both EVM reference + * and "automatic" account creation. + * + * For the purposes of this specification, we will use the following terms for + * clarity. + * - `key_alias` is the account public key as a protobuf serialized message + * and used for auto-creation and subsequent lookup. This is only valid if + * the account key is a + * single `primitive` key, either ED25519 or ECDSA_SECP256K1. + * - `evm_address` exists for every account and is one of + * - `contract_address`, which is the 20 byte EVM contract address per + * EIP-1014 + * - `evm_key_address`, which is the keccak-256 hash of a ECDSA_SECP256K1 + * `primitive` key. + * - This is for accounts lazy-created from EVM public keys, when the + * corresponding ECDSA_SECP256K1 public key is presented in a + * transaction signed by the private key for that public key, the + * account is created that key assigned, and the protobuf-serialized + * form is set as the account alias. + * - `long_zero`, is a synthetic 20 byte address inferred for "normally" + * created accounts. It is constructed from the "standard" AccountID as + * follows. + * - 4 byte big-endian shard number + * - 8 byte big-endian realm number + * - 8 byte big-endian entity number + * + * The `alias` field in the `Account` message SHALL contain one of four values + * for any given account. + * - The `key_alias`, if the account was created by transferring HBAR to the + * account referenced by `key_alias`. + * - The `evm_key_address` if the account was created from an EVM public key + * - The `contract_address` if the account belongs to an EVM contract + * - Not-Set/null/Bytes.EMPTY (collectively `null`) if the account was + * created normally + * + * If the `alias` field of an `Account` is any form of `null`, then the account + * MAY be referenced by `alias` in an `AccountID` by using the `long_zero` + * address for the account. This "hidden default" alias SHALL NOT be stored, + * but is synthesized by the node software as needed, and may be synthesized by + * an EVM contract or client software as well. + * + * An AccountID in a transaction MAY reference an `Account` with + * `shard`.`realm`.`alias`.
    + * If the account `alias` field is set for an Account, that value SHALL be the + * account alias.
    + * If the account `alias` field is not set for an Account, the `long_zero` + * alias SHALL be the account alias. + */ +message Account { + /** + * The unique ID of this account. + *

    + * An account ID, when assigned to this field, SHALL be of + * the form `shard.realm.number`.
    + * Transactions MAY reference the account by alias, but the account itself + * MUST always have a purely numeric identifier. This numeric ID is the + * value used to reference the account in query responses, transaction + * receipts, transaction records, and the block stream. + */ + AccountID account_id = 1; + + /** + * An account EVM alias. + *

    + * This is a value used in some contexts to reference an account when the + * numeric account identifier is not available.
    + * This field, when set to a non-default value, is immutable and + * SHALL NOT be changed. + */ + bytes alias = 2; + + /** + * The key to be used to sign transactions from this account, if any. + *

    + * This key SHALL NOT be set for hollow accounts until the account + * is finalized.
    + * This key SHALL be set on all other accounts, except for certain + * immutable accounts (0.0.800 and 0.0.801) necessary for network function + * and otherwise secured by the governing council. + */ + Key key = 3; + + /** + * The current expiration time of this account, in seconds since the epoch. + *

    + * For this purpose, `epoch` SHALL be the UNIX epoch + * with 0 at `1970-01-01T00:00:00.000Z`.
    + * This account SHALL be due standard renewal fees when the network + * consensus time exceeds this time.
    + * If rent and expiration are enabled for the network, and automatic + * renewal is enabled for this account, renewal fees SHALL be charged + * after this time, and, if charged, the expiration time SHALL be + * extended for another renewal period.
    + * This account MAY be expired and removed from state at any point + * after this time if not renewed.
    + * An account holder MAY extend this time by submitting an account + * update transaction to modify expiration time, subject to the current + * maximum expiration time for the network. + */ + int64 expiration_second = 4; + + /** + * The HBAR balance of this account, in tinybar (10-8 HBAR). + *

    + * This value is a signed integer for efficiency, but MUST always + * be a whole number. + */ + int64 tinybar_balance = 5; + + /** + * A short description of this account. + *

    + * This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes` + * (default 100) bytes when encoded as UTF-8. + */ + string memo = 6; + + /** + * A boolean indicating that this account is deleted. + */ + bool deleted = 7; + + /** + * The amount of HBAR staked to this account by others. + */ + int64 staked_to_me = 8; + + /** + * If this account stakes to another account, this value SHALL be set to + * the time when the current period for staking and reward + * calculations began. + */ + int64 stake_period_start = 9; + + // Below comment is NOT included in generated documentation + /** + * ID of the account or node to which this account is staking, if any. + *

    + * if not set this field MAY be interpreted as staked_account_id + * with value `0.0.0`. + */ + oneof staked_id { + /** + * An identifier for the account to which this account is + * staking its balances as a proxy. + *

    + * If this account is not currently staking its balances, then this + * field, if set, SHALL be the sentinel value of `0.0.0`. + */ + AccountID staked_account_id = 10; + + /** + * An identifier for the node this account is staked to. + *

    + * If this account is not currently staking its balances, then this + * field, if set, SHALL be the sentinel value of `-1`. + * Wallet software SHOULD surface staking issues to users and provide a + * simple mechanism to update staking to a new node ID in the event the + * prior staked node ID ceases to be valid. + *

    + *

    Note: node IDs do fluctuate as node operators change. + * The Account owner MUST submit a new transaction to change this value + * if the current node ID changes or ceases to operate as a node. An + * account with an invalid `staked_node_id` SHALL NOT participate in + * staking until the `staked_node_id` is updated to a valid node ID. + *
    + */ + int64 staked_node_id = 11; + } + + /** + * A boolean indicating that this account has chosen to decline rewards for + * staking its balances. + *

    + * This account MAY still stake its balances, but SHALL NOT receive reward + * payments for doing so. + */ + bool decline_reward = 12; + + /** + * A boolean indicating that the account requires a receiver signature for + * inbound token transfer transactions. + *

    + * If this value is `true` then a transaction to transfer tokens to this + * account SHALL NOT succeed unless this account has signed the transfer + * transaction. + */ + bool receiver_sig_required = 13; + + /** + * A token ID at the head of the linked list for this account from the + * token relations map.
    + * The token relations are connected by including the "next" and "previous" + * TokenID in each TokenRelation message. The "head" item in that list is + * found by looking up the TokenRelation with this Account's account_id and + * this head_token_id. Each subsequent item in the list is found via + * similar lookup with both an AccountID and a TokenID. + */ + TokenID head_token_id = 14; + + /** + * A NftID at the head of the linked list for this account from + * the unique tokens map.
    + * The unique token relations are connected by including the "next" and + * "previous" NftID in each Nft message. The "head" item in that list is + * found by looking up the Nft with ID matching this head_nft_id. Each + * subsequent item in the list is found via similar lookup with the next + * or previous NftID. + */ + NftID head_nft_id = 15; + + /** + * A serial number in the NftID at the head of the linked list for this + * account from unique tokens map. + *

    + * This MUST match the `serial_number` field of `head_nft_id`. + */ + int64 head_nft_serial_number = 16; + + /** + * A number of non-fungible tokens (NTFs) owned by the account. + */ + int64 number_owned_nfts = 17; + + /** + * A maximum for the number of tokens that can be automatically + * associated with this account. + *

    + * If this is less than or equal to `used_auto_associations` (or 0), then + * this account MUST manually associate with a token before transacting in + * that token.
    + * This value may also be `-1` to indicate no limit.
    + * This value MUST NOT be less than `-1`. + */ + int32 max_auto_associations = 18; + + /** + * A count of used auto-association slots. + *

    + * If this is greater than, or equal to, the current value of + * `max_auto_associations`, then this account MUST manually associate with + * a new token before transacting in that token. + */ + int32 used_auto_associations = 19; + + /** + * A count of tokens associated with this account. + *

    + * This value determines a portion of the renewal fee for this account. + */ + int32 number_associations = 20; + + /** + * A boolean indicating that this account is owned by a smart contract. + */ + bool smart_contract = 21; + + /** + * A count of tokens with a positive balance associated with this account. + *

    + * If the account has a positive balance in any token, + * it SHALL NOT be deleted. + */ + int32 number_positive_balances = 22; + + /** + * A nonce of this account for Ethereum interoperability. + */ + int64 ethereum_nonce = 23; + + /** + * An amount of HBAR staked by this account at the start of + * the last reward period. + */ + int64 stake_at_start_of_last_rewarded_period = 24; + + /** + * An account identifier for automatic renewal.
    + * This is the identifier of another account, in the same shard and + * realm as this account, that has signed a transaction allowing the + * network to use its balance, if needed, to automatically extend this + * account's expiration time during automatic renewal processing. + *

    + * If this is set, and this account lack sufficient HBAR balance to pay + * renewal fees when due, then the network SHALL deduct the necessary fees + * from the designated auto renew account, if that account has sufficient + * balance. + */ + AccountID auto_renew_account_id = 25; + + /** + * A count of the number of seconds to extend this account's expiration. + *

    + * The network SHALL extend the account's expiration by this number of + * seconds, if funds are available, upon automatic renewal.
    + * This SHALL NOT apply if the account is already deleted + * upon expiration.
    + * If this is not provided in an allowed range on account creation, the + * transaction SHALL fail with INVALID_AUTO_RENEWAL_PERIOD. The default + * values for the minimum period and maximum period are currently 30 days + * and 90 days, respectively. + */ + int64 auto_renew_seconds = 26; + + /** + * A count of smart contract key-value pairs.
    + * If this account is a smart-contract, this is the number of key-value + * pairs stored on the contract. + *

    + * If this account is not a smart contract, this field + * SHALL NOT be used.
    + * This value SHALL determine a portion of the storage rental + *fees for the contract. + */ + int32 contract_kv_pairs_number = 27; + + /** + * A list of crypto (HBAR) allowances approved by this account. + *

    + * If this is not empty, each allowance SHALL permit a specified "spender" + * account to spend this account's HBAR balance, up to a designated + * limit.
    + * This field SHALL permit spending only HBAR balance, not other tokens the + * account may hold. Allowances for other tokens SHALL be listed in the + * `token_allowances` field or the `approve_for_all_nft_allowances` field. + */ + repeated AccountCryptoAllowance crypto_allowances = 28; + + /** + * A list of non-fungible token (NFT) allowances approved by this account. + *

    + * If this is not empty, each allowance permits a specified "spender" + * account to transfer _all_ of this account's non-fungible tokens from a + * particular collection.
    + * Allowances for a specific serial number MUST be directly associated with + * that specific non-fungible token, rather than the holding account. + */ + repeated AccountApprovalForAllAllowance approve_for_all_nft_allowances = 29; + + /** + * A list of fungible token allowances approved by this account. + *

    + * If this is not empty, each allowance permits a specified "spender" to + * spend this account's fungible tokens, of the designated type, up to a + * designated limit. + */ + repeated AccountFungibleTokenAllowance token_allowances = 30; + + /** + * A count of tokens for which this account is the treasury account. + *

    + * Each native token is initially created with all tokens held by its + * treasury, and the owner of that account (which may be a smart contract) + * determines how those tokens are distributed. + */ + uint32 number_treasury_titles = 31; + + /** + * A flag indicating that the account is expired and pending removal. + *

    + * When the network checks for entity expiration, it SHALL set this flag if + * the account expiration time has past and the account has no HBAR + * sufficient to pay current renewal fees.
    + * If the account has an auto-renew account set with an HBAR balance that + * could pay for an auto-renewal, then this flag SHALL NOT be set. This + * ensures the account is not encumbered during the time between expiration + * and when the auto-renewal processing renews the account. + */ + bool expired_and_pending_removal = 32; + + /** + * A contract storage key.
    + * This is the first key in the doubly-linked list of this + * contract's storage mappings. + *

    + * This value SHALL be empty if the account is not a contract or the + * contract has no storage mappings. + */ + bytes first_contract_storage_key = 33; + + /** + * A pending airdrop ID.
    + * This is the head of the linked list for this account from the + * account airdrops map.
    + *

    + * The account airdrops SHALL be connected by including the "next" and + * "previous" `PendingAirdropID` in each `AccountAirdrop` message.
    + * This value SHALL NOT be empty if this account is "sender" for any + * pending airdrop, and SHALL be empty otherwise. + */ + PendingAirdropId head_pending_airdrop_id = 34; + + /** + * A number of pending airdrops. + *

    + * This count SHALL be used to calculate rent _without_ walking the linked + * list of pending airdrops associated to this account via the + * `head_pending_airdrop_id` field.
    + * This value MUST be updated for every airdrop, clam, or cancel transaction + * that designates this account as a receiver.
    + * This number MUST always match the count of entries in the "list" + * identified by `head_pending_airdrop_id`. + */ + uint64 number_pending_airdrops = 35; +} + +/** + * Permission granted by one account (the "funding" account) to another account + * (the "spender" account) that allows the spender to transfer all serial + * numbers of a specific non-fungible token (NFT) collection owned by the + * funding account.
    + * This is a broad permission, as it does not matter how many NFTs of the + * specified collection the funding account owns, the spender MAY dispose of + * any or all of them with this allowance.
    + * Each token type (typically a collection of NFTs) SHALL require a separate + * allowance.
    + * Allowances for a specific serial number MUST be directly associated with + * that specific non-fungible token, rather than the holding account. + * + * An allowance SHALL NOT transfer any tokens directly, it only permits + * transactions signed only by the spender account to transfer any non-fungible + * tokens of the specified type owned by the funding account. + */ +message AccountApprovalForAllAllowance { + /** + * The identifier for the token associated with this allowance. + *

    + * This token MUST be a non-fungible/unique token. + */ + TokenID token_id = 1; + + /** + * The identifier for the spending account associated with this allowance. + *

    + * This account SHALL be permitted to sign transactions to spend tokens of + * the associated token type from the funding/allowing account. + */ + AccountID spender_id = 2; +} + +/** + * Permission granted by one account (the "funding" account) to another account + * (the "spender" account) that allows the spender to spend a specified amount + * of a specific non-HBAR fungible token from the balance owned by the funding + * account. + * + * An allowance SHALL NOT transfer any tokens directly, it only permits + * transactions signed only by the spender account to transfer tokens of the + * specified type, up to the amount specified, from the funding account. + * + * Once the specified amount is spent, the allowance SHALL be consumed and a + * new allowance SHALL be required before that spending account may spend + * additional tokens from the funding account. + */ +message AccountFungibleTokenAllowance { + /** + * The identifier for the token associated with this allowance. + *

    + * This token MUST be a fungible/common token. + */ + TokenID token_id = 1; + + /** + * The identifier for the spending account associated with this allowance. + *

    + * This account SHALL be permitted to sign transactions to spend tokens of + * the associated token type from the funding/allowing account.
    + * This permission SHALL be limited to no more than the specified `amount`. + */ + AccountID spender_id = 2; + + /* + * The maximum amount that the spender account may transfer within the + * scope of this allowance. + *

    + * This allowance SHALL be consumed if any combination of transfers + * authorized via this allowance meet this value in total.
    + * This value MUST be specified in the smallest units of the relevant token + * (i.e. 10-decimals whole tokens). + */ + int64 amount = 3; +} + +/** + * Permission granted by one account (the "funding" account) to another account + * (the "spender" account) that allows the spender to spend a specified amount + * of HBAR owned by the funding account. + * + * An allowance SHALL NOT transfer any HBAR directly, it only permits + * transactions signed only by the spender account to transfer HBAR, up to the + * amount specified, from the funding account. + * + * Once the specified amount is spent, the allowance SHALL be consumed and a + * new allowance SHALL be required before that spending account may spend + * additional HBAR from the funding account. + */ +message AccountCryptoAllowance { + /** + * The identifier for the spending account associated with this allowance. + *

    + * This account SHALL be permitted to sign transactions to spend HBAR from + * the funding/allowing account.
    + * This permission SHALL be limited to no more than the specified `amount`. + */ + AccountID spender_id = 1; + + /* + * The maximum amount that the spender account may transfer within the + * scope of this allowance. + *

    + * This allowance SHALL be consumed if any combination of transfers + * authorized via this allowance meet this value in total.
    + * This value MUST be specified in tinybar (i.e. 10-8 HBAR). + */ + int64 amount = 2; +} diff --git a/proto_src/services/state/token/account_pending_airdrop.proto b/proto_src/services/state/token/account_pending_airdrop.proto new file mode 100644 index 000000000..4496a1fe4 --- /dev/null +++ b/proto_src/services/state/token/account_pending_airdrop.proto @@ -0,0 +1,82 @@ +/** + * # Account Pending Airdrop. + * A single pending airdrop awaiting claim by the recipient. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2024 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 "basic_types.proto"; + +option java_package = "com.hederahashgraph.api.proto.java"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + + +/** + * A node within a doubly linked list of pending airdrop references.
    + * This internal state message forms the entries in a doubly-linked list + * of references to pending airdrop entries that are "owed" by a particular + * account as "sender". + * + * Each entry in this list MUST refer to an existing pending airdrop.
    + * The pending airdrop MUST NOT be claimed.
    + * The pending airdrop MUST NOT be canceled.
    + * The pending airdrop `sender` account's `head_pending_airdrop_id` field + * MUST match the `pending_airdrop_id` field in this message. + */ +message AccountPendingAirdrop { + /** + * An amount of fungible tokens to be sent for this pending airdrop. + *

    + * This field SHALL NOT be set for non-fungible/unique tokens. + */ + PendingAirdropValue pending_airdrop_value = 1; + + /** + * A pending airdrop identifier. + *

    + * This field SHALL identify the specific pending airdrop that + * precedes this position within the doubly linked list of pending + * airdrops "owed" by the sending account associated with this + * account airdrop "list".
    + * This SHALL match `pending_airdrop_id` if this is the only entry + * in the "list". + */ + PendingAirdropId previous_airdrop = 2; + + /** + * A pending airdrop identifier.
    + *

    + * This field SHALL identify the specific pending airdrop that + * follows this position within the doubly linked list of pending + * airdrops "owed" by the sending account associated with this + * account airdrop "list".
    + * This SHALL match `pending_airdrop_id` if this is the only entry + * in the "list". + */ + PendingAirdropId next_airdrop = 3; +} diff --git a/proto_src/services/state/token/network_staking_rewards.proto b/proto_src/services/state/token/network_staking_rewards.proto new file mode 100644 index 000000000..5669f77ae --- /dev/null +++ b/proto_src/services/state/token/network_staking_rewards.proto @@ -0,0 +1,93 @@ +/** + * # Network Staking Rewards + * The information needed to calculate the staking rewards for all nodes in + * the network. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in [RFC2119](https://www.ietf.org/rfc/rfc2119) + * and clarified in [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2023-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "timestamp.proto"; + +/** + * An Hedera Token Service staking reward entity. + * This stores values related to the aggregate staking rewards for all nodes in + * the network. It is calculated at the beginning of each staking period. + */ +message NetworkStakingRewards { + + /** + * A flag indicating that staking rewards are activated on the network. + *

    + * Among other criteria, this is set to true when the balance of 0.0.800 + * (the account that pays rewards) reaches a minimum required balance. + */ + bool staking_rewards_activated = 1; + + /** + * A global snapshot of the `stake_to_reward` value for all nodes at the + * beginning of the current staking period. + *

    + * The `stake_to_reward` value is the sum of balance and `staked_to_me` for + * all accounts staked to a node that do not decline staking rewards.
    + * This is needed for calculating rewards for current staking period without + * considering changes to `stake_to_reward` within the current staking period.
    + * This value SHALL be reset at the beginning of every staking period. + */ + int64 total_staked_reward_start = 2; + + /** + * A global snapshot of the `stake` value for all nodes at the beginning of + * the current staking period. + *

    + * The `stake` value is the sum of balance and `staked_to_me` for all + * accounts staked to a node, and SHALL NOT consider whether the account + * has accepted or declined rewards.
    + * This value SHALL be reset at the beginning of every staking period. + */ + int64 total_staked_start = 3; + + /** + * The total staking rewards, in tinybars, that may be collected by all + * accounts staking to all nodes after the end of this staking period. + *

    + * This SHALL be calculated assuming that no account "renounces" its + * rewards by setting `decline_reward` to true, or is ineligible for some + * other reason.
    + * If a node is removed, the `pending_rewards` value of that node SHALL be + * subtracted from this value. + */ + int64 pending_rewards = 4; + + /** + * The last time a node reward payment was made. This will be set at the + * end of a staking period. + */ + proto.Timestamp last_node_reward_payments_time = 5; +} diff --git a/proto_src/services/state/token/nft.proto b/proto_src/services/state/token/nft.proto new file mode 100644 index 000000000..23f158466 --- /dev/null +++ b/proto_src/services/state/token/nft.proto @@ -0,0 +1,102 @@ +/** + * # NFT. + * This is a single, whole, unique, non-fungible token within the Hedera network. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in [RFC2119](https://www.ietf.org/rfc/rfc2119) + * and clarified in [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2023-2024 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"; +import "basic_types.proto"; + +option java_package = "com.hederahashgraph.api.proto.java"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +/** + * An Hedera Token Service non-fungible token (NFT).
    + * Every NFT is a unique instance of a token with non-fungible type. + * + * The NFT SHALL be identified by token ID and serial number.
    + * The token treasury account SHALL own all minted NFTs of that token type + * initially.
    + * NFTs owned by the token treasury SHALL NOT be linked into that account's + * virtual linked list of NFTs.
    + * NFTs not owned by the token treasury SHALL be linked into the owner + * account's virtual linked list of NFTs. + */ +message Nft { + + /** + * The id of this NFT, consisting of a Token ID and serial number. + */ + NftID nft_id = 1; + + /** + * The account or contract id that owns this NFT. + *

    + * If this NFT is owned by its token type's current treasury account, + * this value SHALL be zero. + */ + AccountID owner_id = 2; + + /** + * The account or contract id approved to spend this NFT. + *

    + * If there is no approved spender, this value SHALL be null. + */ + AccountID spender_id = 3; + + /** + * The consensus time of the TokenMint that created this NFT as + * offset from the epoch. + *

    + * For this purpose, `epoch` SHALL be the UNIX epoch with 0 at `1970-01-01T00:00:00.000Z`. + */ + Timestamp mint_time = 4; + + /** + * The metadata bytes for this NFT. This is often a URI value. + *

    + * This value, if set, SHALL NOT exceed 100 bytes. + */ + bytes metadata = 5; + + /** + * The NFT ID of the previous entry in the current owner's "virtual + * double-linked list" of owned NFTs. + *

    + * If the owner of this NFT is the token treasury, this SHALL be unset. + */ + NftID owner_previous_nft_id = 6; + + /** + * The NFT ID of the next entry in the current owner's "virtual + * double-linked list" of owned NFTs. + *

    + * If the owner of this NFT is the token treasury, this SHALL be unset. + */ + NftID owner_next_nft_id = 7; +} diff --git a/proto_src/services/state/token/node_rewards.proto b/proto_src/services/state/token/node_rewards.proto new file mode 100644 index 000000000..2ed58cc1a --- /dev/null +++ b/proto_src/services/state/token/node_rewards.proto @@ -0,0 +1,84 @@ +syntax = "proto3"; + +package proto; + +/*- + * ‌ + * Hedera Token Services Protobuf + * ​ + * Copyright (C) 2018 - 2023 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +/** + * A record of node rewards status.
    + * This is used to record the number of "active" nodes in a staking + * period based on number of judges each node created in that period. + * It also records the number of rounds so far in the staking period. + * + * A Node SHALL be considered "active" if it produced "judges" according + * to the consensus algorithm in a percentage of rounds, during the + * staking period, greater than the network configuration value for + * `nodes.activeRoundsPercent`. + */ +message NodeRewards { + /** + * A number of rounds so far, in this staking period. + */ + uint64 num_rounds_in_staking_period = 1; + + /** + * The fees collected by node accounts in this period. + */ + uint64 node_fees_collected = 2; + + /** + * A list of node activities.
    + * This records the number of rounds when each node created + * judges for the consensus algorithm. + *

    + * This list SHALL contain one entry for each node participating + * in consensus during this staking period. + */ + repeated NodeActivity node_activities = 3; +} + +/** + * A record of judge rounds missed by a single node.
    + * This records, for a single node, the number of rounds so far, during this staking + * period that missed creating judges. This is used to determine if the node is + * "active" or not. + * + * This message SHALL NOT record the total number of rounds in a staking + * period.
    + * This message SHALL record a count of rounds for a single node that missed creating judges. + */ +message NodeActivity { + /** + * A node identifier. + */ + uint64 node_id = 1; + + /** + * A count of rounds.
    + * This is the count of rounds so far, in this staking period in which the node identified + * by `node_id` did not create judges. + */ + uint64 num_missed_judge_rounds = 2; +} diff --git a/proto_src/services/state/token/staking_node_info.proto b/proto_src/services/state/token/staking_node_info.proto new file mode 100644 index 000000000..3e3f222ef --- /dev/null +++ b/proto_src/services/state/token/staking_node_info.proto @@ -0,0 +1,169 @@ +/** + * # Staking Node Information + * This is an entry describing the staking characteristics of a single active + * node. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in [RFC2119](https://www.ietf.org/rfc/rfc2119) + * and clarified in [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2023-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +/** + * An Hedera Token Service staking info entity. + * + * Staking info is per node. Shard and Realm are implied based on the network + * address book entry for this node. + */ +message StakingNodeInfo { + /** + * The entity number of this node.
    + * The shard and realm numbers are implied, based on the network address + * book entry for this node. + *

    + * This value SHALL be unique within a given shard and realm.
    + * This value MAY be repeated across shards and/or realms. + */ + int64 node_number = 1; + + /** + * The minimum stake, in tinybar, that is required for this node to have a + * non-zero weight in the network consensus. + *

    + * If the current value of `stake` is below this value, this node SHALL have + * a zero weight in network consensus. + */ + int64 min_stake = 2; + + /** + * The maximum stake to this node that is considered to calculate its weight + * in the network consensus. + *

    + * If the current `stake` value is above this limit, the excess staked HBAR + * SHALL NOT be considered when determining consensus weight. + */ + int64 max_stake = 3; + + /** + * The sum of balances of all accounts staked to this node, considering only + * accounts that choose to receive rewards. + */ + int64 stake_to_reward = 4; + + /** + * The sum of balances of all accounts staked to this node, considering only + * accounts that decline to receive rewards. + */ + int64 stake_to_not_reward = 5; + + /** + * The snapshot of stake_to_reward value at the beginning of the current + * staking period. + *

    + * This is necessary when calculating rewards for the current staking period + * without considering changes to `stake_to_reward` _within_ the current + * staking period.
    + * This value SHALL be reset at the beginning of every staking period. + */ + int64 stake_reward_start = 6; + + /** + * The amount of staked HBAR from `stake_reward_start` that will have + * unclaimed rewards due to accounts changing their staking metadata in a + * way that disqualifies them for the current staking period. + *

    + * This value SHALL be reset at the beginning of every staking period. + */ + int64 unclaimed_stake_reward_start = 7; + + /** + * The total amount of HBAR staked to this node. + *

    + * This is sum of stake_to_reward and stake_to_not_reward.
    + * If the sum is greater than `max_stake`, then the _effective_ stake + * SHALL be `max_stake`.
    + * If the sum is less than `min_stake`, then the _effective_ stake + * SHALL be `0`. + */ + int64 stake = 8; + + /** + * A running list of reward amounts for the last 365+1 staking periods + * (typically a year and a day). + *

    + * The first element SHALL be the reward up to and including the last full + * period prior to the present reward period.
    + * The second element SHALL be the reward up to and including the period + * before the last full period prior to the present period.
    + * The list SHALL continue in reverse chronological order until the reward + * history limit is reached. + */ + repeated int64 reward_sum_history = 9; + + /** + * The consensus weight of this node in the network. + *

    + * This is recomputed based on the `stake` of this node at midnight UTC of + * each day. If the `stake` of this node at that time is less than + * `min_stake`, then the weight SHALL be 0.
    + *

    + * Given the following: + *

      + *
    • The `effective stake` of a single node SHALL be `0` if the node + * `stake` is less than `min_stake`.
    • + *
    • The `effective stake` SHALL be `max_stake` if the node `stake` is + * greater than `max_stake`.
    • + *
    • The `effective stake` SHALL be the actual value of `stake` if + * `min_stake` < `stake` < `max_stake`.
    • + *
    • The `effective network stake` SHALL be calculated as ∑(`effective + * stake` of each node) for all nodes in the network address book.
    • + *
    + *

    + * This field is deprecated and SHALL NOT be used when RosterLifecycle + * is enabled. The weight SHALL be same as the `effective_stake` described above. + */ + int32 weight = 10 [deprecated = true]; + + /** + * The total staking rewards in tinybars that MAY be collected by all + * accounts staking to the current node after the end of this staking + * period. + *

    + * This SHALL be calculated assuming that no account "renounces" its + * rewards by setting `decline_reward` to true, or is ineligible for + * some other reason.
    + * When the current node is deleted, this amount SHALL be subtracted from + * the total pending rewards of all accounts staking to all nodes in the + * network in NetworkStakingRewards. + */ + int64 pending_rewards = 11; + + /** + * A flag indicating that this node has been removed from this network. + */ + bool deleted = 12; +} diff --git a/proto_src/services/state/token/token.proto b/proto_src/services/state/token/token.proto new file mode 100644 index 000000000..c73938cde --- /dev/null +++ b/proto_src/services/state/token/token.proto @@ -0,0 +1,365 @@ +/** + * ## Token + * Tokens represent both fungible and non-fungible units of exchange. + * The `Token` here represents a token within the network state. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in [RFC2119](https://www.ietf.org/rfc/rfc2119) + * and clarified in [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2023-2024 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 "basic_types.proto"; +import "custom_fees.proto"; + +option java_package = "com.hederahashgraph.api.proto.java"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +/** + * An Hedera Token Service(HTS) token. + * + * A token SHALL represent a fungible or non-fungible unit of exchange.
    + * The specified Treasury Account SHALL receive the initial supply of tokens and + * SHALL determine distribution of all tokens once minted. + * + */ +message Token { + /** + * A unique identifier for this token. + */ + TokenID token_id = 1; + + /** + * A human-readable name for this token. + *

    + * This value MAY NOT be unique.
    + * This value SHALL NOT exceed 100 bytes when encoded as UTF-8. + */ + string name = 2; + + /** + * A human-readable symbol for the token. + *

    + * This value SHALL NOT be unique.
    + * This value SHALL NOT exceed 100 bytes when encoded as UTF-8. + */ + string symbol = 3; + + /** + * A number of decimal places for this token. + *

    + * If decimals are 8 or 11, then the number of whole tokens can be at most + * billions or millions, respectively. More decimals allows for a more + * finely-divided token, but also limits the maximum total supply. + *

    + * Examples + *

      + *
    • Bitcoin satoshis (21 million whole tokens with 8 decimals).
    • + *
    • Hedera tinybar (50 billion whole tokens with 8 decimals).
    • + *
    • Bitcoin milli-satoshis (21 million whole tokens with 11 decimals).
    • + *
    • Theoretical limit is roughly 92.2 billion with 8 decimals, or + * 92.2 million with 11 decimals.
    • + *
    + * All token amounts in the network are stored as integer amounts, with each + * unit representing 10-decimals whole tokens. + *

    + * For tokens with `token_type` set to `NON_FUNGIBLE_UNIQUE` this MUST be 0. + */ + int32 decimals = 4; + + /** + * A _current_ total supply of this token, expressed in the smallest unit + * of the token. + *

    + * The number of _whole_ tokens this represents is (total_supply / + * 10decimals). The value of total supply, MUST be within the + * positive range of a twos-compliment signed 64-bit integer. + * The `total_supply`, therefore MUST be between 1, and + * 9,223,372,036,854,775,807, inclusive. + *

    + * This value SHALL be reduced when a `token_burn` or `token_wipe_account` + * operation is executed, and SHALL be increased when a `token_mint` + * operation is executed. + */ + int64 total_supply = 5; + + /** + * A treasury account identifier for this token. + *

    + * When the token is created, the initial supply given in the token create + * transaction SHALL be minted and deposited in the treasury account.
    + * All token mint transactions for this token SHALL deposit the new minted + * tokens in the treasury account.
    + * All token burn transactions for this token SHALL remove the tokens to be + * burned from the treasury account. + */ + AccountID treasury_account_id = 6; + + /** + * Access control for general modification of this token. + *

    + * This key MUST sign any `token_update` transaction that + * changes any attribute of the token other than expiration_time. + * Other attributes of this token MAY be changed by transactions other than + * `token_update`, and MUST be signed by one of the other purpose-specific + * keys assigned to the token.
    + * This value can be set during token creation, and SHALL NOT be + * modified thereafter, unless the update transaction is signed by both + * the existing `admin_key` and the new `admin_key`.
    + * If the `admin_key` is not set for a token, that token SHALL be immutable. + */ + Key admin_key = 7; + + /** + * Access control for KYC for this token. + *

    + * Know Your Customer (KYC) status may be granted for an account by a token + * grant kyc transaction signed by this key.
    + * If this key is not set, then KYC status cannot be granted to an account + * for this token, and any `TokenGrantKyc` transaction attempting to grant + * kyc to an account for this token SHALL NOT succeed.
    + * This key MAY be set when the token is created, and MAY be set or modified + * via a token update transaction signed by the `admin_key`.
    + * If `admin_key` is not set, this value, whether set or unset, + * SHALL be immutable. + */ + Key kyc_key = 8; + + /** + * Access control to freeze this token. + *

    + * A token may be frozen for an account, preventing any transaction from + * transferring that token for that specified account, by a token freeze + * account transaction signed by this key.
    + * If this key is not set, the token cannot be frozen, and any transaction + * attempting to freeze the token for an account SHALL NOT succeed.
    + * This key MAY be set when the token is created, and MAY be set or modified + * via a token update transaction signed by the `admin_key`.
    + * If `admin_key` is not set, this value, whether set or unset, + * SHALL be immutable. + */ + Key freeze_key = 9; + + /** + * Access control of account wipe for this token. + *

    + * A token may be wiped, removing and burning tokens from a specific + * account, by a token wipe transaction, which MUST be signed by this key. + * The `treasury_account` cannot be subjected to a token wipe. A token burn + * transaction, signed by the `supply_key`, serves to burn tokens held by + * the `treasury_account` instead.
    + * If this key is not set, the token cannot be wiped, and any transaction + * attempting to wipe the token from an account SHALL NOT succeed.
    + * This key MAY be set when the token is created, and MAY be set or modified + * via a token update transaction signed by the `admin_key`.
    + * If `admin_key` is not set, this value, whether set or unset, + * SHALL be immutable. + */ + Key wipe_key = 10; + + /** + * Access control of token mint/burn for this token. + *

    + * A token mint transaction MUST be signed by this key, and any token mint + * transaction not signed by the current `supply_key` for that token + * SHALL NOT succeed.
    + * A token burn transaction MUST be signed by this key, and any token burn + * transaction not signed by the current `supply_key` for that token + * SHALL NOT succeed.
    + * This key MAY be set when the token is created, and MAY be set or modified + * via a token update transaction signed by the `admin_key`.
    + * If `admin_key` is not set, this value, whether set or unset, + * SHALL be immutable. + */ + Key supply_key = 11; + + /** + * Access control of the `custom_fees` field for this token. + *

    + * The token custom fee schedule may be changed, modifying the fees charged + * for transferring that token, by a token update transaction, which MUST + * be signed by this key.
    + * If this key is not set, the token custom fee schedule cannot be changed, + * and any transaction attempting to change the custom fee schedule for + * this token SHALL NOT succeed.
    + * This key MAY be set when the token is created, and MAY be set or modified + * via a token update transaction signed by the `admin_key`.
    + * If `admin_key` is not set, this value, whether set or unset, + * SHALL be immutable. + */ + Key fee_schedule_key = 12; + + /** + * Access control of pause/unpause for this token. + *

    + * A token may be paused, preventing any transaction from transferring that + * token, by a token update transaction signed by this key.
    + * If this key is not set, the token cannot be paused, and any transaction + * attempting to pause the token SHALL NOT succeed.
    + * This key MAY be set when the token is created, and MAY be set or modified + * via a token update transaction signed by the `admin_key`.
    + * If `admin_key` is not set, this value, whether set or unset, + * SHALL be immutable. + */ + Key pause_key = 13; + + /** + * A last used serial number for this token. + *

    + * This SHALL apply only to non-fungible tokens.
    + * When a new NFT is minted, the serial number to apply SHALL be calculated + * from this value. + */ + int64 last_used_serial_number = 14; + + /** + * A flag indicating that this token is deleted. + *

    + * A transaction involving a deleted token MUST NOT succeed. + */ + bool deleted = 15; + + /** + * A type for this token. + *

    + * A token SHALL be either `FUNGIBLE_COMMON` or `NON_FUNGIBLE_UNIQUE`.
    + * If this value was omitted during token creation, `FUNGIBLE_COMMON` + * SHALL be used. + */ + TokenType token_type = 16; + + /** + * A supply type for this token. + *

    + * A token SHALL have either `INFINITE` or `FINITE` supply type.
    + * If this value was omitted during token creation, the value `INFINITE` + * SHALL be used. + */ + TokenSupplyType supply_type = 17; + + /** + * An identifier for the account (if any) that the network will attempt + * to charge for this token's auto-renewal upon expiration. + *

    + * This field is OPTIONAL. If it is not set then renewal fees SHALL be + * charged to the account identified by `treasury_account_id`. + */ + AccountID auto_renew_account_id = 18; + + /** + * A number of seconds by which the network should automatically extend + * this token's expiration. + *

    + * If the token has a valid auto-renew account, and is not deleted upon + * expiration, the network SHALL attempt to automatically renew this + * token.
    + * If this is not provided in an allowed range on token creation, the + * transaction SHALL fail with `INVALID_AUTO_RENEWAL_PERIOD`.
    + * The default values for the minimum period and maximum period are 30 days + * and 90 days, respectively. + */ + int64 auto_renew_seconds = 19; + + /** + * An expiration time for this token, in seconds since the epoch. + *

    + * For this purpose, `epoch` SHALL be the + * UNIX epoch with 0 at `1970-01-01T00:00:00.000Z`. + */ + int64 expiration_second = 20; + + /** + * A short description of this token. + *

    + * This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes` + * (default 100) bytes when encoded as UTF-8. + */ + string memo = 21; + + /** + * A maximum supply of this token.
    + * This is the maximum number of tokens of this type that may be issued. + *

    + * This limit SHALL apply regardless of `token_type`.
    + * If `supply_type` is `INFINITE` then this value MUST be 0.
    + * If `supply_type` is `FINITE`, then this value MUST be greater than 0. + */ + int64 max_supply = 22; + + /** + * A flag indicating that this token is paused. + *

    + * A transaction involving a paused token, other than token_unpause, + * MUST NOT succeed. + */ + bool paused = 23; + + /** + * A flag indicating that accounts associated to this token are frozen by + * default. + *

    + * Accounts newly associated with this token CANNOT transact in the token + * until unfrozen.
    + * This SHALL NOT prevent a `tokenReject` transaction to return the tokens + * from an account to the treasury account. + */ + bool accounts_frozen_by_default = 24; + + /** + * A flag indicating that accounts associated with this token are granted + * KYC by default. + */ + bool accounts_kyc_granted_by_default = 25; + + /** + * A custom fee schedule for this token. + */ + repeated CustomFee custom_fees = 26; + + /** + * A Token "Metadata". + *

    + * This value, if set, SHALL NOT exceed 100 bytes. + */ + bytes metadata = 27; + + /** + * Access Control of metadata update for this token. + *

    + * A transaction to update the `metadata` field of this token MUST be + * signed by this key.
    + * If this token is a non-fungible/unique token type, a transaction to + * update the `metadata` field of any individual serialized unique token + * of this type MUST be signed by this key.
    + * If this key is not set, the token metadata SHALL NOT be changed after it + * is created.
    + * If this key is not set, the metadata for any individual serialized token + * of this type SHALL NOT be changed after it is created.
    + * This key MAY be set when the token is created, and MAY be set or modified + * via a token update transaction signed by the `admin_key`.
    + * If `admin_key` is not set, this value, whether set or unset, + * SHALL be immutable. + */ + Key metadata_key = 28; +} diff --git a/proto_src/services/state/token/token_relation.proto b/proto_src/services/state/token/token_relation.proto new file mode 100644 index 000000000..ec6be187e --- /dev/null +++ b/proto_src/services/state/token/token_relation.proto @@ -0,0 +1,138 @@ +/** + * # Token Relationship. + * This is a connection between one Account, one _fungible_ Token, and + * associated balance within the Hedera network. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in [RFC2119](https://www.ietf.org/rfc/rfc2119) + * and clarified in [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2023-2024 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 "basic_types.proto"; + +option java_package = "com.hederahashgraph.api.proto.java"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +/** + * An Hedera Token Service token relationship. + * + * A token relationship connects an Account with a Token and is necessary for + * that Account to transact in that Token. TokenRelationship defines a + * connection between one account and one token type. + * + * A TokenRelation SHALL be identified by the combination of token_id and + * account_id.
    + * A TokenRelation SHALL contain, for the referenced token,
    + * The account's current balance, whether the account has KYC granted, + * and whether the assets are frozen. + * + * TokenRelation entries SHALL be connected via a "virtual linked list" with the + * next TokenID and previous TokenID stored in the TokenRelation. + * These TokenIDs MUST be combined with the AccountID to find the next or + * previous relationship in the list. + */ +message TokenRelation { + /** + * A token identifier. + *

    + * This SHALL identify the token involved in this association. + */ + TokenID token_id = 1; + + /** + * An account identifier. + *

    + * This SHALL identify the account involved in this association. + */ + AccountID account_id = 2; + + /** + * The fungible token balance of this token relationship. + *

    + * This MUST be a whole number. + */ + int64 balance = 3; + + /** + * A flag indicating that this token relationship is frozen. + *

    + * When a token relationship is frozen the associated account SHALL NOT be + * permitted to transfer to or from the associated balance. + *

    + * This flag is associated with the Token value `freeze_key`, and any + * transaction to set this flag MUST be signed by that key. If the Token + * does not have a `freeze_key` set, then this flag SHALL NOT be set true + * for relationships between accounts and that token. + */ + bool frozen = 4; + + /** + * A flag indicating that this token relationship has been granted KYC status. + *

    + * If the token flag `accounts_kyc_granted_by_default` is set true, then + * this flag SHALL be set true for all accounts subsequently associated to + * that token. Otherwise this flag SHALL NOT be set until a transaction + * is submitted, and signed with the Token `kyc_key` to + * set the flag true.
    + * If the Token does not have a `kyc_key` set and the token flag + * `accounts_kyc_granted_by_default` is not set true, then this value MUST + * be false for all accounts subsequently associated to that token. + *

    + * Typically a transaction to set this value to true is considered + * equivalent to asserting that the "Know Your Customer" (KYC) requirements + * have been met for this combination of account and token and the relevant + * records are available as required. + */ + bool kyc_granted = 5; + + /** + * A flag indicating that this token relationship was created using + * automatic association. + *

    + * If this is true then there MUST NOT exist a customer-signed transaction + * associating this account and token combination and the account + * `used_auto_associations` SHALL be incremented when this relationship + * is created. + */ + bool automatic_association = 6; + + /** + * The Token ID of the previous entry in the associated Account's + * "virtual double-linked list" of token relationships. + *

    + * This must be combined with the value of `account_id` to identify the + * actual `TokenRelation` referenced. + */ + TokenID previous_token = 7; + + /** + * The Token ID of the next entry in the associated Account's "virtual + * double-linked list" of token relationships. + *

    + * This must be combined with the value of `account_id` to identify the + * actual `TokenRelation` referenced. + */ + TokenID next_token = 8; +} diff --git a/proto_src/services/state/tss/tss_encryption_keys.proto b/proto_src/services/state/tss/tss_encryption_keys.proto new file mode 100644 index 000000000..0b65d892e --- /dev/null +++ b/proto_src/services/state/tss/tss_encryption_keys.proto @@ -0,0 +1,51 @@ +/** + * # Current and next TSS encryption keys + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package com.hedera.hapi.node.state.tss; + +/* + * Copyright (C) 2024 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.hapi.node.state.tss.legacy"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +/** + * A message containing a node's current and next TSS encryption keys, where + * the next key (if present) will be switched to the node's current key during + * the first transaction at the beginning of a staking period.
    + */ +message TssEncryptionKeys { + + /** + * If non-empty, a node's current TSS encryption key. + */ + bytes current_encryption_key = 1; + + /** + * If non-empty, the same node's next TSS encryption key. + */ + bytes next_encryption_key = 2; +} diff --git a/proto_src/services/state/tss/tss_message_map_key.proto b/proto_src/services/state/tss/tss_message_map_key.proto new file mode 100644 index 000000000..bd3343156 --- /dev/null +++ b/proto_src/services/state/tss/tss_message_map_key.proto @@ -0,0 +1,59 @@ +/** + * # Tss Message Map Key + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package com.hedera.hapi.node.state.tss; + +/* + * Copyright (C) 2024 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.hapi.node.state.tss.legacy"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +/** + * A key for use in the Threshold Signature Scheme (TSS) TssMessageMaps. + * + * This key SHALL be used to uniquely identify entries in the Message Maps. + */ +message TssMessageMapKey { + + /** + * A hash that uniquely identifies the target roster for the associated value + * in the map. + *

    + * This value MUST be set.
    + * This value MUST NOT be empty.
    + * This value MUST contain a valid hash. + */ + bytes roster_hash = 1; + + /** + * A number representing consensus order.
    + * This declares the order in which the mapped value came to consensus. + *

    This value MUST be set.
    + * This value MUST be a valid sequence number. + */ + uint64 sequence_number = 2; +} diff --git a/proto_src/services/state/tss/tss_vote_map_key.proto b/proto_src/services/state/tss/tss_vote_map_key.proto new file mode 100644 index 000000000..d5a0d6692 --- /dev/null +++ b/proto_src/services/state/tss/tss_vote_map_key.proto @@ -0,0 +1,58 @@ +/** + * # Tss Vote Map Key + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package com.hedera.hapi.node.state.tss; + +/* + * Copyright (C) 2024 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.hapi.node.state.tss.legacy"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +/** + * A key for use in the Threshold Signature Scheme (TSS) TssVoteMaps. + * + * This key SHALL be used to uniquely identify entries in the Vote Maps. + */ +message TssVoteMapKey { + + /** + * A hash of the target roster for the associated value in the map.
    + * This hash uniquely identifies the target roster. + *

    + * This value MUST be set.
    + * This value MUST contain a valid hash. + */ + bytes roster_hash = 1; + + /** The node id of the node that created the TssVote.
    + * This id uniquely identifies the node. + *

    + * This value MUST be set.
    + * This value MUST be a valid node id. + */ + uint64 node_id = 2; +} diff --git a/proto_src/services/system_delete.proto b/proto_src/services/system_delete.proto new file mode 100644 index 000000000..2a16cb47a --- /dev/null +++ b/proto_src/services/system_delete.proto @@ -0,0 +1,104 @@ +/** + * # System Delete + * A system transaction to remove a file from the Hedera File + * Service (HFS).
    + * This transaction is a privileged operation restricted to "system" + * accounts. + * + * > Note + * >> System delete is defined here for a smart contract (to delete + * >> the bytecode), but was never implemented. + * > + * >> Currently, system delete and system undelete specifying a smart + * >> contract identifier SHALL return `INVALID_FILE_ID` + * >> or `MISSING_ENTITY_ID`. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; +import "timestamp.proto"; + +/** + * Delete a file or contract bytecode as an administrative transaction. + * + * > Note + * >> A system delete/undelete for a `contractID` is not supported and + * >> SHALL return `INVALID_FILE_ID` or `MISSING_ENTITY_ID`. + * + * This transaction MAY be reversed by the `systemUndelete` transaction. + * A file deleted via `fileDelete`, however SHALL be irrecoverable.
    + * This transaction MUST specify an expiration timestamp (with seconds + * precision). The file SHALL be permanently removed from state when + * network consensus time exceeds the specified expiration time.
    + * This transaction MUST be signed by an Hedera administrative ("system") + * account. + * + * ### What is a "system" file + * A "system" file is any file with a file number less than or equal to the + * current configuration value for `ledger.numReservedSystemEntities`, + * typically `750`. + * + * ### Block Stream Effects + * None + */ +message SystemDeleteTransactionBody { + oneof id { + /** + * A file identifier. + *

    + * The identified file MUST exist in the HFS.
    + * The identified file MUST NOT be deleted.
    + * The identified file MUST NOT be a "system" file.
    + * This field is REQUIRED. + */ + FileID fileID = 1; + + /** + * A contract identifier. + *

    + * The identified contract MUST exist in network state.
    + * The identified contract bytecode MUST NOT be deleted.
    + *

    + * This option is _unsupported_. + */ + ContractID contractID = 2; + } + + /** + * A timestamp indicating when the file will be removed from state. + *

    + * This value SHALL be expressed in seconds since the `epoch`. The `epoch` + * SHALL be the UNIX epoch with 0 at `1970-01-01T00:00:00.000Z`.
    + * This field is REQUIRED. + */ + TimestampSeconds expirationTime = 3; +} diff --git a/proto_src/services/system_undelete.proto b/proto_src/services/system_undelete.proto new file mode 100644 index 000000000..afbebbceb --- /dev/null +++ b/proto_src/services/system_undelete.proto @@ -0,0 +1,95 @@ +/** + * # System Undelete + * A system transaction to "undo" a `systemDelete` transaction.
    + * This transaction is a privileged operation restricted to "system" + * accounts. + * + * > Note + * >> System undelete is defined here for a smart contract (to delete + * >> the bytecode), but was never implemented. + * > + * >> Currently, system delete and system undelete specifying a smart + * >> contract identifier SHALL return `INVALID_FILE_ID` + * >> or `MISSING_ENTITY_ID`. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; + +/** + * Recover a file or contract bytecode deleted from the Hedera File + * System (HFS) by a `systemDelete` transaction. + * + * > Note + * >> A system delete/undelete for a `contractID` is not supported and + * >> SHALL return `INVALID_FILE_ID` or `MISSING_ENTITY_ID`. + * + * This transaction can _only_ recover a file removed with the `systemDelete` + * transaction. A file deleted via `fileDelete` SHALL be irrecoverable.
    + * This transaction MUST be signed by an Hedera administrative ("system") + * account. + * + * ### What is a "system" file + * A "system" file is any file with a file number less than or equal to the + * current configuration value for `ledger.numReservedSystemEntities`, + * typically `750`. + * + * ### Block Stream Effects + * None + */ +message SystemUndeleteTransactionBody { + oneof id { + /** + * A file identifier. + *

    + * The identified file MUST exist in the HFS.
    + * The identified file MUST be deleted.
    + * The identified file deletion MUST be a result of a + * `systemDelete` transaction.
    + * The identified file MUST NOT be a "system" file.
    + * This field is REQUIRED. + */ + FileID fileID = 1; + + /** + * A contract identifier. + *

    + * The identified contract MUST exist in network state.
    + * The identified contract bytecode MUST be deleted.
    + * The identified contract deletion MUST be a result of a + * `systemDelete` transaction. + *

    + * This option is _unsupported_. + */ + ContractID contractID = 2; + } +} diff --git a/proto_src/services/throttle_definitions.proto b/proto_src/services/throttle_definitions.proto new file mode 100644 index 000000000..953cfb4e4 --- /dev/null +++ b/proto_src/services/throttle_definitions.proto @@ -0,0 +1,149 @@ +/** + * # Throttle Definitions + * A set of messages that support maintaining throttling limits on network + * transactions to ensure no one transaction type consumes the entirety of + * network resources. Also used to charge congestion fees when network load + * is exceptionally high, as an incentive to delay transactions that are + * not time-sensitive. + * + * For details behind this throttling design, please see the + * `docs/throttle-design.md` document in the + * [Hedera Services](https://github.com/hashgraph/hedera-services) repository. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; + +/** + * A single throttle limit applied to one or more operations. + * + * The list of operations MUST contain at least one entry.
    + * The throttle limit SHALL be specified in thousandths of an operation + * per second; one operation per second for the network would be `1000`.
    + * The throttle limit MUST be greater than zero (`0`). + */ +message ThrottleGroup { + /** + * A list of operations to be throttled. + *

    + * This list MUST contain at least one item.
    + * This list SHOULD NOT contain any item included in any other + * active `ThrottleGroup`. + */ + repeated HederaFunctionality operations = 1; + + /** + * A throttle limit for this group.
    + * This is a total number of operations, in thousandths, the network may + * perform each second for this group. Every node executes every transaction, + * so this limit effectively applies individually to each node as well.
    + *

    + * This value MUST be greater than zero (`0`).
    + * This value SHOULD be less than `9,223,372`.
    + */ + uint64 milliOpsPerSec = 2; +} + +/** + * A "bucket" of performance allocated across one or more throttle groups.
    + * This entry combines one or more throttle groups into a single unit to + * calculate limitations and congestion. Each "bucket" "fills" as operations + * are completed, then "drains" over a period of time defined for each bucket. + * This fill-and-drain characteristic enables the network to process sudden + * bursts of heavy traffic while still observing throttle limits over longer + * timeframes. + * + * The value of `burstPeriodMs` is combined with the `milliOpsPerSec` + * values for the individual throttle groups to determine the total + * bucket "capacity". This combination MUST be less than the maximum + * value of a signed long integer (`9223372036854775807`), when scaled to + * a nanosecond measurement resolution. + * + * > Note + * >> There is some question regarding the mechanism of calculating the + * >> combination of `burstPeriodMs` and `milliOpsPerSec`. The calculation + * >> Is implemented in difficult-to-find code, and very likely does not + * >> match the approach described here. + */ +message ThrottleBucket { + /** + * A name for this bucket.
    + * This is used for log entries. + *

    + * This value SHOULD NOT exceed 20 characters. + */ + string name = 1; + + /** + * A burst duration limit, in milliseconds.
    + * This value determines the total "capacity" of the bucket. The rate + * at which the bucket "drains" is set by the throttles, and this duration + * sets how long that rate must be sustained to empty a "full" bucket. + * That combination (calculated as the product of this value and the least + * common multiple of the `milliOpsPerSec` values for all throttle groups) + * determines the maximum amount of operations this bucket can "hold". + *

    + * The calculated capacity of this bucket MUST NOT exceed `9,223,372,036,854`. + */ + uint64 burstPeriodMs = 2; + + /** + * A list of throttle groups.
    + * These throttle groups combined define the effective throttle + * rate for the bucket. + *

    + * This list MUST contain at least one entry. + */ + repeated ThrottleGroup throttleGroups = 3; +} + +/** + * A list of throttle buckets.
    + * This list, simultaneously enforced, defines a complete throttling policy. + * + * 1. When an operation appears in more than one throttling bucket, + * that operation SHALL be throttled unless all of the buckets where + * the operation appears have "capacity" available. + * 1. An operation assigned to no buckets is SHALL be throttled in every + * instance. The _effective_ throttle for this case is `0`. + */ +message ThrottleDefinitions { + /** + * A list of throttle buckets. + *

    + * This list MUST be set, and SHOULD NOT be empty.
    + * An empty list SHALL have the effect of setting all operations to + * a single group with throttle limit of `0` operations per second for the + * entire network. + */ + repeated ThrottleBucket throttleBuckets = 1; +} diff --git a/proto_src/services/timestamp.proto b/proto_src/services/timestamp.proto new file mode 100644 index 000000000..d65a14c31 --- /dev/null +++ b/proto_src/services/timestamp.proto @@ -0,0 +1,79 @@ +/** + * # Timestamp + * Messages to describe exact date-time values, with resolution of seconds or + * nanoseconds, referenced to the UNIX epoch. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +/** + * An exact date and time.
    + * This is the same data structure as the Google protobuf Timestamp.proto. + * + * #### Additional Notes + * Useful information is present in comments on the + * [Google version](https://github.com/google/protobuf/blob/master/src/google/protobuf/timestamp.proto). + */ +message Timestamp { + /** + * The number of complete seconds since the start of the epoch. + *

    + * For this purpose, `epoch` SHALL be the UNIX epoch with 0 + * at `1970-01-01T00:00:00.000Z`.
    + * This value MUST be greater than 0.
    + * This value SHOULD be strictly greater than `946684800`. + */ + int64 seconds = 1; + + /** + * The number of nanoseconds after the start of the second referenced + * in `seconds`. + *

    + * This value MUST be greater than or equal to 0.
    + * This value MUST be strictly less than 1,000,000,000. + */ + int32 nanos = 2; +} + +/** + * An exact date and time, with a resolution of one second. + */ +message TimestampSeconds { + /** + * The number of complete seconds since the start of the epoch. + *

    + * For this purpose, `epoch` SHALL be the UNIX epoch with 0 + * at `1970-01-01T00:00:00.000Z`.
    + * This value MUST be greater than 0.
    + * This value SHOULD be strictly greater than `946684800`. + */ + int64 seconds = 1; +} diff --git a/proto_src/services/token_airdrop.proto b/proto_src/services/token_airdrop.proto new file mode 100644 index 000000000..c302dcdf1 --- /dev/null +++ b/proto_src/services/token_airdrop.proto @@ -0,0 +1,117 @@ +/** + * # Token Airdrop + * Messages used to implement a transaction to "airdrop" tokens.
    + * An "airdrop" is a distribution of tokens from a funding account + * to one or more recipient accounts, ideally with no action required + * by the recipient account(s). + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; + +/** + * Airdrop one or more tokens to one or more accounts. + * + * ### Effects + * This distributes tokens from the balance of one or more sending account(s) + * to the balance of one or more recipient accounts. Accounts MAY receive the + * tokens in one of four ways. + * + * - An account already associated to the token to be distributed SHALL + * receive the airdropped tokens immediately to the recipient account + * balance.
    + * The fee for this transfer SHALL include the transfer, the airdrop fee, + * and any custom fees. + * - An account with available automatic association slots SHALL be + * automatically associated to the token, and SHALL immediately receive + * the airdropped tokens to the recipient account balance.
    + * The fee for this transfer SHALL include the transfer, the association, + * the cost to renew that association once, the airdrop fee, and + * any custom fees. + * - An account with "receiver signature required" set SHALL have a + * "Pending Airdrop" created and must claim that airdrop with a + * `claimAirdrop` transaction.
    + * The fee for this transfer SHALL include the transfer, the association, + * the cost to renew that association once, the airdrop fee, and + * any custom fees.
    + * If the pending airdrop is not claimed immediately, the `sender` SHALL + * pay the cost to renew the token association, and the cost to maintain + * the pending airdrop, until the pending airdrop is claimed or cancelled. + * - An account with no available automatic association slots SHALL have a + * "Pending Airdrop" created and must claim that airdrop with a + * `claimAirdrop` transaction.
    + * The fee for this transfer SHALL include the transfer, the association, + * the cost to renew that association once, the airdrop fee, and any custom + * fees.
    + * If the pending airdrop is not claimed immediately, the `sender` SHALL + * pay the cost to renew the token association, and the cost to maintain + * the pending airdrop, until the pending airdrop is claimed or cancelled. + * + * If an airdrop would create a pending airdrop for a fungible/common token, + * and a pending airdrop for the same sender, receiver, and token already + * exists, the existing pending airdrop SHALL be updated to add the new + * amount to the existing airdrop, rather than creating + * a new pending airdrop.
    + * Any airdrop that completes immediately SHALL be irreversible. Any airdrop + * that results in a "Pending Airdrop" MAY be canceled via a `cancelAirdrop` + * transaction.
    + * All transfer fees (including custom fees and royalties), as well as the + * rent cost for the first auto-renewal period for any automatic-association + * slot occupied by the airdropped tokens, SHALL be charged to the account + * paying for this transaction.
    + * + * ### Block Stream Effects + * - Each successful transfer SHALL be recorded in `token_transfer_list` + * for the transaction record. + * - Each successful transfer that consumes an automatic association slot + * SHALL populate the `automatic_association` field for the record. + * - Each pending transfer _created_ SHALL be added to the + * `pending_airdrops` field for the record. + * - Each pending transfer _updated_ SHALL be added to the + * `pending_airdrops` field for the record. + */ +message TokenAirdropTransactionBody { + /** + * A list of token transfers representing one or more airdrops. + *

    + * The sender for each transfer MUST have sufficient balance to complete + * the transfers.
    + * All token transfers MUST successfully transfer tokens or create a + * pending airdrop for this transaction to succeed.
    + * This list MUST contain between 1 and 10 transfers, inclusive. + *

    + * Note that each transfer of fungible/common tokens requires both a debit + * and a credit, so each _fungible_ token transfer MUST have _balanced_ + * entries in the TokenTransferList for that transfer. + */ + repeated TokenTransferList token_transfers = 1; +} diff --git a/proto_src/services/token_associate.proto b/proto_src/services/token_associate.proto new file mode 100644 index 000000000..1136f65a9 --- /dev/null +++ b/proto_src/services/token_associate.proto @@ -0,0 +1,94 @@ +/** + * # Token Associate + * Transaction to associate an Hedera Token Service (HTS) token with an + * account.
    + * Accounts cannot transact in a token (send or receive) until the account + * and token are associated. + * + * > Note + * >> An "airdrop" transaction MAY initiate sending tokens to an + * >> unassociated account, but the transfer remains in a "pending" + * >> state until the recipient executes a "claim" transaction + * >> that both accepts the tokens and associates that account + * >> with the token type. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; + +/** + * Associate an Hedera Token Service (HTS) token and an account. + * + * An association MUST exist between an account and a token before that + * account may transfer or receive that token.
    + * If the identified account is not found, + * the transaction SHALL return `INVALID_ACCOUNT_ID`.
    + * If the identified account has been deleted, + * the transaction SHALL return `ACCOUNT_DELETED`.
    + * If any of the identified tokens is not found, + * the transaction SHALL return `INVALID_TOKEN_REF`.
    + * If any of the identified tokens has been deleted, + * the transaction SHALL return `TOKEN_WAS_DELETED`.
    + * If an association already exists for any of the identified tokens, + * the transaction SHALL return `TOKEN_ALREADY_ASSOCIATED_TO_ACCOUNT`.
    + * The identified account MUST sign this transaction. + * + * ### Block Stream Effects + * None + */ +message TokenAssociateTransactionBody { + /** + * An account identifier. + *

    + * The identified account SHALL be associated to each of the + * tokens identified in the `tokens` field.
    + * This field is REQUIRED and MUST be a valid account identifier.
    + * The identified account MUST exist in state.
    + * The identified account MUST NOT be deleted.
    + * The identified account MUST NOT be expired. + */ + AccountID account = 1; + + /** + * A list of token identifiers. + *

    + * Each token identified in this list SHALL be separately associated with + * the account identified in the `account` field.
    + * This list MUST NOT be empty. + * Each entry in this list MUST be a valid token identifier.
    + * Each entry in this list MUST NOT be currently associated to the + * account identified in `account`.
    + * Each entry in this list MUST NOT be expired.
    + * Each entry in this list MUST NOT be deleted. + */ + repeated TokenID tokens = 2; +} diff --git a/proto_src/services/token_burn.proto b/proto_src/services/token_burn.proto new file mode 100644 index 000000000..2f783093e --- /dev/null +++ b/proto_src/services/token_burn.proto @@ -0,0 +1,94 @@ +/** + * # Token Burn + * Permanently remove tokens from circulation, akin to how a fiat treasury + * will physically burn worn out bank notes. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; + +/** + * Burns tokens from the Token's treasury Account. + * + * The token MUST have a `supply_key` set and that key MUST NOT + * be an empty `KeyList`.
    + * The token `supply_key` MUST sign this transaction.
    + * This operation SHALL decrease the total supply for the token type by + * the number of tokens "burned".
    + * The total supply for the token type MUST NOT be reduced below zero (`0`) + * by this transaction.
    + * The tokens to burn SHALL be deducted from the token treasury account.
    + * If the token is a fungible/common type, the amount MUST be specified.
    + * If the token is a non-fungible/unique type, the specific serial numbers + * MUST be specified.
    + * The global batch size limit (`tokens.nfts.maxBatchSizeBurn`) SHALL set + * the maximum number of individual NFT serial numbers permitted in a single + * `tokenBurn` transaction. + * + * ### Block Stream Effects + * None + */ +message TokenBurnTransactionBody { + /** + * A token identifier. + *

    + * This SHALL identify the token type to "burn".
    + * The identified token MUST exist, and MUST NOT be deleted. + */ + TokenID token = 1; + + /** + * An amount to burn from the Treasury Account. + *

    + * This is interpreted as an amount in the smallest possible denomination + * for the token (10-decimals whole tokens).
    + * The balance for the token treasury account MUST contain sufficient + * tokens to complete this transaction with a non-negative balance.
    + * If this value is equal to zero (`0`), the token SHOULD be a + * non-fungible/unique type.
    + * If this value is non-zero, the token MUST be a fungible/common type. + */ + uint64 amount = 2; + + /** + * A list of serial numbers to burn from the Treasury Account. + *

    + * This list MUST NOT contain more entries than the current limit set by + * the network configuration value `tokens.nfts.maxBatchSizeBurn`.
    + * The treasury account for the token MUST hold each unique token + * identified in this list.
    + * If this list is not empty, the token MUST be a + * non-fungible/unique type.
    + * If this list is empty, the token MUST be a fungible/common type. + */ + repeated int64 serialNumbers = 3; +} diff --git a/proto_src/services/token_cancel_airdrop.proto b/proto_src/services/token_cancel_airdrop.proto new file mode 100644 index 000000000..5632d0e42 --- /dev/null +++ b/proto_src/services/token_cancel_airdrop.proto @@ -0,0 +1,65 @@ +/** + * # Token Cancel Airdrop + * Messages used to implement a transaction to cancel a pending airdrop. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; + +/** + * Token cancel airdrop
    + * Remove one or more pending airdrops from state on behalf of the + * sender(s) for each airdrop. + * + * Each pending airdrop canceled SHALL be removed from state and + * SHALL NOT be available to claim.
    + * Each cancellation SHALL be represented in the transaction body and + * SHALL NOT be restated in the record file.
    + * All cancellations MUST succeed for this transaction to succeed. + * + * ### Block Stream Effects + * None + */ +message TokenCancelAirdropTransactionBody { + /** + * A list of one or more pending airdrop identifiers.
    + * This list declares the set of pending airdrop entries that the client + * wishes to cancel; on success all listed pending airdrop entries + * will be removed. + *

    + * This transaction MUST be signed by the account identified by a + * `sender_id` for each entry in this list.
    + * This list MUST NOT have any duplicate entries.
    + * This list MUST contain between 1 and 10 entries, inclusive. + */ + repeated PendingAirdropId pending_airdrops = 1; +} diff --git a/proto_src/services/token_claim_airdrop.proto b/proto_src/services/token_claim_airdrop.proto new file mode 100644 index 000000000..4d02203fd --- /dev/null +++ b/proto_src/services/token_claim_airdrop.proto @@ -0,0 +1,65 @@ +/** + * # Token Claim Airdrop + * Messages used to implement a transaction to claim a pending airdrop. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; + +/** + * Token claim airdrop
    + * Complete one or more pending transfers on behalf of the + * recipient(s) for an airdrop. + * + * The sender MUST have sufficient balance to fulfill the airdrop at the + * time of claim. If the sender does not have sufficient balance, the + * claim SHALL fail.
    + * Each pending airdrop successfully claimed SHALL be removed from state and + * SHALL NOT be available to claim again.
    + * Each claim SHALL be represented in the transaction body and + * SHALL NOT be restated in the record file.
    + * All claims MUST succeed for this transaction to succeed. + * + * ### Block Stream Effects + * The completed transfers SHALL be present in the transfer list. + */ +message TokenClaimAirdropTransactionBody { + /** + * A list of one or more pending airdrop identifiers. + *

    + * This transaction MUST be signed by the account identified by + * the `receiver_id` for each entry in this list.
    + * This list MUST contain between 1 and 10 entries, inclusive.
    + * This list MUST NOT have any duplicate entries. + */ + repeated PendingAirdropId pending_airdrops = 1; +} diff --git a/proto_src/services/token_create.proto b/proto_src/services/token_create.proto new file mode 100644 index 000000000..0d26fbbf7 --- /dev/null +++ b/proto_src/services/token_create.proto @@ -0,0 +1,357 @@ +/** + * # Token Create + * Create an Hedera Token Service (HTS) token. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "duration.proto"; +import "basic_types.proto"; +import "custom_fees.proto"; +import "timestamp.proto"; + +/** + * Create an HTS token. + * + * #### Keys + * Each token has several keys that, separately, control different functions + * for that token. It is *_strongly_* recommended that each key assigned to + * a token be unique, or disabled by assigning an empty `KeyList`. + * Keys and purpose + * - `adminKey` is a general access and may authorize a token update + * transaction as well as _update the other keys_. Even the admin key + * cannot authorize _adding_ a key that is not present, however.
    + * The admin key may also delete the token entirely. + * - `fee_schedule` may authorize updating the token custom fees. If this + * key is not present, the custom fees for the token are fixed and immutable. + * - `freeze` may authorize a token freeze or unfreeze transaction. + * If this key is not present, accounts holding this token cannot have + * their tokens frozen or unfrozen. + * - `kyc` may authorize a token grant KYC or revoke KYC transaction. + * If this key is not present, accounts holding this token cannot have + * KYC status granted or revoked. + * - `metadata` may authorize token update nfts transactions. + * If this key is not present, the token metadata values for that + * non-fungible/unique token _type_ will be immutable. + * - `pause` may authorize a token pause or token unpause transaction. + * If this key is not present, the token cannot be paused (preventing any + * account from transacting in that token) or resumed. + * - `supply` may authorize a token mint or burn transaction. + * If this key is not present, the token cannot mint additional supply and + * existing tokens cannot be "burned" from the treasury (but _might_ still be + * "burned" from individual accounts, c.f. `wipeKey` and `tokenWipe`). + * - `wipe` may authorize a token wipe account transaction. + * If this key is not present, accounts holding this token cannot have + * their balance or NFTs wiped (effectively burned). + * + * #### Requirements + * If `tokenType` is fungible/common, the `initialSupply` MUST be strictly + * greater than zero(`0`).
    + * If `tokenType` is non-fungible/unique, the `initialSupply` MUST + * be zero(`0`).
    + * If `tokenSupplyType` is "infinite", the `maxSupply` MUST be zero(`0`).
    + * If `tokenSupplyType` is "finite", the `maxSupply` MUST be strictly + * greater than zero(`0`).
    + * + * ### Block Stream Effects + * If the token is created, the Token Identifier SHALL be in the receipt.
    + */ +message TokenCreateTransactionBody { + /** + * A name for the token.
    + * This is generally the "full name" displayed in wallet software. + *

    + * This field is REQUIRED.
    + * This value MUST NOT exceed 100 bytes when encoded as UTF-8.
    + * This value MUST NOT contain the Unicode NUL codepoint. + */ + string name = 1; + + /** + * A symbol to use for the token. + *

    + * This field is REQUIRED.
    + * This value MUST NOT exceed 100 bytes when encoded as UTF-8.
    + * This value MUST NOT contain the Unicode NUL codepoint. + */ + string symbol = 2; + + /** + * A decimal precision of the token's smallest denomination.
    + * Most values are described in terms of this smallest denomination, + * so the token initial supply, for instance, must be divided by + * 10decimals to get whole tokens. + *

    + * This MUST be zero(`0`) for non-fungible/unique tokens. + */ + uint32 decimals = 3; + + /** + * An initial supply, in the smallest denomination for the token. + *

    + * This amount SHALL be transferred to the treasury account as part + * of this transaction.
    + * This amount MUST be specified in the smallest denomination for the + * token (i.e. 10-decimals whole tokens).
    + * This MUST be zero(`0`) for a non-fungible/unique token. + */ + uint64 initialSupply = 4; + + /** + * A treasury account identifier. + *

    + * This field is REQUIRED.
    + * The identified account SHALL be designated the "treasury" for the + * new token, and all tokens "minted" SHALL be delivered to that account, + * including the initial supply, if any.
    + * The identified account MUST exist, MUST NOT be expired, and SHOULD + * have a non-zero HBAR balance.
    + * The identified account SHALL be associated to the new token. + */ + AccountID treasury = 5; + + /** + * An Hedera key for token administration. + *

    + * This key, if set, SHALL have administrative authority for this token and + * MAY authorize token update and/or token delete transactions.
    + * If this key is not set, or is an empty `KeyList`, this token SHALL be + * immutable, except for expiration and renewal. + */ + Key adminKey = 6; + + /** + * An Hedera key for managing account KYC. + *

    + * This key, if set, SHALL have KYC authority for this token and + * MAY authorize transactions to grant or revoke KYC for accounts.
    + * If this key is not set, or is an empty `KeyList`, KYC status for this + * token SHALL NOT be granted or revoked for any account.
    + * If this key is removed after granting KYC, those grants SHALL remain + * and cannot be revoked. + */ + Key kycKey = 7; + + /** + * An Hedera key for managing asset "freeze". + *

    + * This key, if set, SHALL have "freeze" authority for this token and + * MAY authorize transactions to freeze or unfreeze accounts + * with respect to this token.
    + * If this key is not set, or is an empty `KeyList`, this token + * SHALL NOT be frozen or unfrozen for any account.
    + * If this key is removed after freezing accounts, those accounts + * SHALL remain frozen and cannot be unfrozen. + */ + Key freezeKey = 8; + + /** + * An Hedera key for wiping tokens from accounts. + *

    + * This key, if set, SHALL have "wipe" authority for this token and + * MAY authorize transactions to "wipe" any amount of this token from + * any account, effectively burning the tokens "wiped".
    + * If this key is not set, or is an empty `KeyList`, it SHALL NOT be + * possible to "wipe" this token from an account. + */ + Key wipeKey = 9; + + /** + * An Hedera key for "minting" and "burning" tokens. + *

    + * This key, if set, MAY authorize transactions to "mint" new tokens to + * be delivered to the token treasury or "burn" tokens held by the + * token treasury.
    + * If this key is not set, or is an empty `KeyList`, it SHALL NOT be + * possible to change the supply of tokens and neither "mint" nor "burn" + * transactions SHALL be permitted. + */ + Key supplyKey = 10; + + /** + * An initial Freeze status for accounts associated to this token. + *

    + * If this value is set, an account MUST be the subject of a + * `tokenUnfreeze` transaction after associating to the token before + * that account can send or receive this token.
    + * If this value is set, the `freezeKey` SHOULD be set.
    + * If the `freezeKey` is not set, any account associated to this token + * while this value is set SHALL be permanently frozen. + *

    + *

    REVIEW NOTE
    + * Should we prevent setting this value true for tokens with no freeze + * key?
    + * Should we set this value to false if a freeze key is removed? + *
    + */ + bool freezeDefault = 11; + + /** + * An expiration timestamp. + *

    + * If the `autoRenewAccount` and `autoRenewPeriod` fields are set, this + * value SHALL be replaced with the current consensus time extended + * by the `autoRenewPeriod` duration.
    + * If this value is set and token expiration is enabled in network + * configuration, this token SHALL expire when consensus time exceeds + * this value, and MAY be subsequently removed from the network state.
    + * If this value is not set, and the automatic renewal account is also not + * set, then this value SHALL default to the current consensus time + * extended by the "default" expiration period from network configuration. + */ + Timestamp expiry = 13; + + /** + * An identifier for the account to be charged renewal fees at the token's + * expiry to extend the lifetime of the token. + *

    + * If this value is set, the token lifetime SHALL be extended by the + * _smallest_ of the following: + *

      + *
    • The current `autoRenewPeriod` duration.
    • + *
    • The maximum duration that this account has funds to purchase.
    • + *
    • The configured MAX_AUTORENEW_PERIOD at the time of automatic + * renewal.
    • + *
    + * If this account's HBAR balance is `0` when the token must be + * renewed, then the token SHALL be expired, and MAY be subsequently + * removed from state.
    + * If this value is set, the referenced account MUST sign this + * transaction. + */ + AccountID autoRenewAccount = 14; + + /** + * A duration between token automatic renewals.
    + * All entities in state may be charged "rent" occasionally (typically + * every 90 days) to prevent unnecessary growth of the ledger. This value + * sets the interval between such events for this token. + *

    + * This value MUST be set.
    + * This value MUST be greater than the configured + * MIN_AUTORENEW_PERIOD.
    + * This value MUST be less than the configured MAX_AUTORENEW_PERIOD. + */ + Duration autoRenewPeriod = 15; + + /** + * A short description for this token. + *

    + * This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes` + * (default 100) bytes when encoded as UTF-8. + */ + string memo = 16; + + /** + * A type for this token, according to IWA classification. + *

    + * If this value is not set, the token SHALL have the default type of + * fungible/common.
    + * This field SHALL be immutable. + */ + TokenType tokenType = 17; + + /** + * A supply type for this token, according to IWA classification. + *

    + * If this value is not set, the token SHALL have the default supply + * type of "infinite" (which is, as a practical matter, + * (263-1)/10decimals).
    + * This field SHALL be immutable. + */ + TokenSupplyType supplyType = 18; + + /** + * A maximum supply for this token. + *

    + * This SHALL be interpreted in terms of the smallest fractional unit for + * this token.
    + * If `supplyType` is "infinite", this MUST be `0`.
    + * This field SHALL be immutable. + */ + int64 maxSupply = 19; + + /** + * An Hedera key for managing the token custom fee schedule. + *

    + * This key, if set, MAY authorize transactions to modify the + * `custom_fees` for this token.
    + * If this key is not set, or is an empty `KeyList`, the `custom_fees` + * for this token SHALL NOT be modified. + */ + Key fee_schedule_key = 20; + + /** + * A list of custom fees representing a fee schedule. + *

    + * This list MAY be empty, which SHALL mean that there + * are no custom fees for this token.
    + * If this token is a non-fungible/unique type, the entries + * in this list MUST NOT declare a `fractional_fee`.
    + * If this token is a fungible/common type, the entries in this + * list MUST NOT declare a `royalty_fee`.
    + * Any token type MAY include entries that declare a `fixed_fee`. + */ + repeated CustomFee custom_fees = 21; + + /** + * An Hedera key for managing token "pause". + *

    + * This key, if set, SHALL have "pause" authority for this token and + * MAY authorize transactions to pause or unpause this token.
    + * If this key is not set, or is an empty `KeyList`, this token + * SHALL NOT be paused or unpaused.
    + * If this key is removed while the token is paused, the token cannot + * be unpaused and SHALL remain paused. + */ + Key pause_key = 22; + + /** + * Token "Metadata". + *

    + * The value, if set, MUST NOT exceed 100 bytes.
    + *

    Examples
    + *
    hcs://1/0.0.4896575
    + *
    ipfs://bafkreifd7tcjjuwxxf4qkaibkj62pj4mhfuud7plwrc3pfoygt55al6syi
    + *
    + */ + bytes metadata = 23; + + /** + * An Hedera key for managing the token `metadata`. + *

    + * This key, if set, MAY authorize transactions to modify the + * `metadata` for this token.
    + * If this key is not set, or is an empty `KeyList`, the `metadata` + * for this token SHALL NOT be modified. + */ + Key metadata_key = 24; +} diff --git a/proto_src/services/token_delete.proto b/proto_src/services/token_delete.proto new file mode 100644 index 000000000..dfdfc6637 --- /dev/null +++ b/proto_src/services/token_delete.proto @@ -0,0 +1,73 @@ +/** + * # Token Delete + * Delete an Hedera Token Service (HTS) token. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; + +/** + * Mark a token as deleted.
    + * A deleted token remains present in the network state, but is no longer + * active, cannot be held in a balance, and all operations on that token + * fail. A deleted token is removed from network state when it expires. + * + * #### Operations on a deleted token + * All operations on a deleted token SHALL fail with a + * status code `TOKEN_WAS_DELETED`.
    + * Any attempt to transfer a deleted token between accounts SHALL fail with + * a status code `TOKEN_WAS_DELETED`. + * + * > QUESTIONS + * >> What happens to existing balances/NFTs? + * >> Are these removed; are they stuck on the accounts? + * > + * >> If balances/NFTs remain, can a `tokenReject` remove them? + * + * #### Requirements + * The `admin_key` for the token MUST be set, and MUST + * sign this transaction.
    + * If the `admin_key` for the token is not set, this transaction SHALL + * fail with a status code `TOKEN_IS_IMMUTABlE`. + * + * ### Block Stream Effects + * None + */ +message TokenDeleteTransactionBody { + /** + * A token identifier. + *

    + * This SHALL identify the token type to delete.
    + * The identified token MUST exist, and MUST NOT be deleted. + */ + TokenID token = 1; +} diff --git a/proto_src/services/token_dissociate.proto b/proto_src/services/token_dissociate.proto new file mode 100644 index 000000000..78141480f --- /dev/null +++ b/proto_src/services/token_dissociate.proto @@ -0,0 +1,94 @@ +/** + * # Token Dissociate + * Remove association between an account and one or more Hedera Token + * Service (HTS) tokens. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; + +/** + * Dissociate an account from one or more HTS tokens. + * + * If the identified account is not found, + * the transaction SHALL return `INVALID_ACCOUNT_ID`.
    + * If the identified account has been deleted, + * the transaction SHALL return `ACCOUNT_DELETED`.
    + * If any of the identified tokens is not found, + * the transaction SHALL return `INVALID_TOKEN_REF`.
    + * If any of the identified tokens has been deleted, + * the transaction SHALL return `TOKEN_WAS_DELETED`.
    + * If an association does not exist for any of the identified tokens, + * the transaction SHALL return `TOKEN_NOT_ASSOCIATED_TO_ACCOUNT`.
    + * If the identified account has a nonzero balance for any of the identified + * tokens, and that token is neither deleted nor expired, the + * transaction SHALL return `TRANSACTION_REQUIRES_ZERO_TOKEN_BALANCES`.
    + * If one of the identified tokens is a fungible/common token that is expired, + * the account MAY disassociate from that token, even if that token balance is + * not zero for that account.
    + * If one of the identified tokens is a non-fungible/unique token that is + * expired, the account MUST NOT disassociate if that account holds any + * individual NFT of that token. In this situation the transaction SHALL + * return `TRANSACTION_REQUIRED_ZERO_TOKEN_BALANCES`.
    + * The identified account MUST sign this transaction. + * + * ### Block Stream Effects + * None + */ +message TokenDissociateTransactionBody { + /** + * An account identifier. + *

    + * The identified account SHALL be dissociated from each of the + * tokens identified in the `tokens` field. + * This field is REQUIRED and MUST be a valid account identifier.
    + * The identified account MUST exist in state.
    + * The identified account MUST NOT be deleted.
    + * The identified account MUST NOT be expired. + */ + AccountID account = 1; + + /** + * A list of token identifiers. + *

    + * Each token identified in this list SHALL be dissociated from + * the account identified in the `account` field.
    + * This list MUST NOT be empty. + * Each entry in this list MUST be a valid token identifier.
    + * Each entry in this list MUST be currently associated to the + * account identified in `account`.
    + * Entries in this list MAY be expired, if the token type is + * fungible/common.
    + * Each entry in this list MUST NOT be deleted. + */ + repeated TokenID tokens = 2; +} diff --git a/proto_src/services/token_fee_schedule_update.proto b/proto_src/services/token_fee_schedule_update.proto new file mode 100644 index 000000000..fbb2ec4fa --- /dev/null +++ b/proto_src/services/token_fee_schedule_update.proto @@ -0,0 +1,77 @@ +/** + * # Fee Schedule Update + * Transaction to update the fee schedule for a token. A token creator may + * wish to charge custom transaction fees for a token type, and if a + * `fee_schedule_key` is assigned, this transaction enables adding, removing, + * or updating those custom transaction fees. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; +import "custom_fees.proto"; + +/** + * Update the custom fee schedule for a token type. + * + * The token MUST have a `fee_schedule_key` set and that key MUST NOT + * be an empty `KeyList`.
    + * The token `fee_schedule_key` MUST sign this transaction.
    + * The token MUST exist, MUST NOT be deleted, and MUST NOT be expired.
    + * + * If the custom_fees list is empty, clears the fee schedule or resolves to + * CUSTOM_SCHEDULE_ALREADY_HAS_NO_FEES if the fee schedule was already empty. + * + * ### Block Stream Effects + * None + */ +message TokenFeeScheduleUpdateTransactionBody { + /** + * A token identifier. + *

    + * This SHALL identify the token type to modify with an updated + * custom fee schedule.
    + * The identified token MUST exist, and MUST NOT be deleted. + */ + TokenID token_id = 1; + + /** + * A list of custom fees representing a fee schedule. + *

    + * This list MAY be empty to remove custom fees from a token.
    + * If the identified token is a non-fungible/unique type, the entries + * in this list MUST NOT declare a `fractional_fee`.
    + * If the identified token is a fungible/common type, the entries in this + * list MUST NOT declare a `royalty_fee`.
    + * Any token type MAY include entries that declare a `fixed_fee`. + */ + repeated CustomFee custom_fees = 2; +} diff --git a/proto_src/services/token_freeze_account.proto b/proto_src/services/token_freeze_account.proto new file mode 100644 index 000000000..0f3a8fb6f --- /dev/null +++ b/proto_src/services/token_freeze_account.proto @@ -0,0 +1,79 @@ +/** + * # Token Freeze Account + * Freeze all tokens of an identified type for an identified account. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; + +/** + * Block transfers of a token type for an account.
    + * This, effectively, freezes assets of one account with respect to + * one token type. While frozen, that account cannot send or receive tokens + * of the identified type. + * + * The token MUST have a `freeze_key` set and that key MUST NOT + * be an empty `KeyList`.
    + * The token `freeze_key` MUST sign this transaction.
    + * The identified token MUST exist, MUST NOT be deleted, MUST NOT be paused, + * and MUST NOT be expired.
    + * The identified account MUST exist, MUST NOT be deleted, and + * MUST NOT be expired.
    + * If the identified account is already frozen with respect to the identified + * token, the transaction SHALL succeed, but no change SHALL be made.
    + * An association between the identified account and the identified + * token MUST exist. + * + * ### Block Stream Effects + * None + */ +message TokenFreezeAccountTransactionBody { + /** + * A token identifier. + *

    + * This SHALL identify the token type to "freeze".
    + * The identified token MUST exist, MUST NOT be deleted, and MUST be + * associated to the identified account. + */ + TokenID token = 1; + + /** + * An account identifier. + *

    + * This shall identify the account to "freeze".
    + * The identified account MUST exist, MUST NOT be deleted, MUST NOT be + * expired, and MUST be associated to the identified token.
    + * The identified account SHOULD NOT be "frozen" with respect to the + * identified token. + */ + AccountID account = 2; +} diff --git a/proto_src/services/token_get_account_nft_infos.proto b/proto_src/services/token_get_account_nft_infos.proto new file mode 100644 index 000000000..8ef2e67ec --- /dev/null +++ b/proto_src/services/token_get_account_nft_infos.proto @@ -0,0 +1,88 @@ +/** + * # Get Account NFT Infos + * Deprecated and permanently disabled + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; +import "token_get_nft_info.proto"; +import "query_header.proto"; +import "response_header.proto"; + +/** + * Deleted and unsupported. + * + * This query is not implemented and any query of this type submitted + * SHALL return a `NOT_SUPPORTED` response code. + */ +message TokenGetAccountNftInfosQuery { + /** + * Standard information sent with every query operation.
    + * This includes the signed payment and what kind of response is requested + * (cost, state proof, both, or neither). + */ + QueryHeader header = 1; + + /** + * The Account for which information is requested + */ + AccountID accountID = 2; + + /** + * Specifies the start index (inclusive) of the range of NFTs to query for. + * Value must be in the range [0; ownedNFTs-1] + */ + int64 start = 3; + + /** + * Specifies the end index (exclusive) of the range of NFTs to query for. + * Value must be in the range (start; ownedNFTs] + */ + int64 end = 4; +} + +/** + * Deleted and unsupported. + */ +message TokenGetAccountNftInfosResponse { + /** + * The standard response information for queries.
    + * This includes the values requested in the `QueryHeader` + * (cost, state proof, both, or neither). + */ + ResponseHeader header = 1; + + /** + * List of NFTs associated to the account + */ + repeated TokenNftInfo nfts = 2; +} diff --git a/proto_src/services/token_get_info.proto b/proto_src/services/token_get_info.proto new file mode 100644 index 000000000..3b9993594 --- /dev/null +++ b/proto_src/services/token_get_info.proto @@ -0,0 +1,407 @@ +/** + * # Get Token Info + * Query to retrieve information for a single token. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; +import "custom_fees.proto"; +import "query_header.proto"; +import "response_header.proto"; +import "timestamp.proto"; +import "duration.proto"; + +/** + * Request information for a token. + */ +message TokenGetInfoQuery { + /** + * Standard information sent with every query operation.
    + * This includes the signed payment and what kind of response is requested + * (cost, state proof, both, or neither). + */ + QueryHeader header = 1; + + /** + * A token identifier. + *

    + * This SHALL identify the token to query.
    + * The identified token MUST exist, and MUST NOT be deleted. + */ + TokenID token = 2; +} + +/** + * An Hedera Token Service(HTS) token. + * + * A token SHALL represent a fungible or non-fungible unit of exchange.
    + * The specified Treasury Account SHALL receive the initial supply of tokens and + * SHALL determine distribution of all tokens once minted. + */ +message TokenInfo { + /** + * A unique identifier for this token. + */ + TokenID tokenId = 1; + + /** + * A human-readable name for this token. + *

    + * This value MAY NOT be unique.
    + * This value SHALL NOT exceed 100 bytes when encoded as UTF-8. + */ + string name = 2; + + /** + * A human-readable symbol for the token. + *

    + * This value SHALL NOT be unique.
    + * This value SHALL NOT exceed 100 bytes when encoded as UTF-8. + */ + string symbol = 3; + + /** + * A number of decimal places for this token. + *

    + * If decimals are 8 or 11, then the number of whole tokens can be at most + * billions or millions, respectively. More decimals allows for a more + * finely-divided token, but also limits the maximum total supply. + *

    + * Examples + *

      + *
    • Bitcoin satoshis (21 million whole tokens with 8 decimals).
    • + *
    • Hedera tinybar (50 billion whole tokens with 8 decimals).
    • + *
    • Bitcoin milli-satoshis (21 million whole tokens with 11 + * decimals).
    • + *
    • Theoretical limit is roughly 92.2 billion with 8 decimals, or + * 92.2 million with 11 decimals.
    • + *
    + * All token amounts in the network are stored as integer amounts, with + * each unit representing 10-decimals whole tokens. + *

    + * For tokens with `token_type` set to `NON_FUNGIBLE_UNIQUE` this MUST be 0. + */ + uint32 decimals = 4; + + /** + * A _current_ total supply of this token, expressed in the smallest unit + * of the token. + *

    + * The number of _whole_ tokens this represents is (total_supply / + * 10decimals). The value of total supply, MUST be within the + * positive range of a twos-compliment signed 64-bit integer. + * The `total_supply`, therefore MUST be between 1, and + * 9,223,372,036,854,775,807, inclusive. + *

    + * This value SHALL be reduced when a `token_burn` or `token_wipe_account` + * operation is executed, and SHALL be increased when a `token_mint` + * operation is executed. + */ + uint64 totalSupply = 5; + + /** + * A treasury account identifier for this token. + *

    + * When the token is created, the initial supply given in the token create + * transaction SHALL be minted and deposited in the treasury account.
    + * All token mint transactions for this token SHALL deposit the new minted + * tokens in the treasury account.
    + * All token burn transactions for this token SHALL remove the tokens to be + * burned from the treasury account. + */ + AccountID treasury = 6; + + /** + * Access control for general modification of this token. + *

    + * This key MUST sign any `token_update` transaction that + * changes any attribute of the token other than expiration_time. + * Other attributes of this token MAY be changed by transactions other than + * `token_update`, and MUST be signed by one of the other purpose-specific + * keys assigned to the token.
    + * This value can be set during token creation, and SHALL NOT be + * modified thereafter, unless the update transaction is signed by both + * the existing `admin_key` and the new `admin_key`.
    + * If the `admin_key` is not set for a token, that token SHALL be immutable. + */ + Key adminKey = 7; + + /** + * Access control for KYC for this token. + *

    + * Know Your Customer (KYC) status may be granted for an account by a token + * grant kyc transaction signed by this key.
    + * If this key is not set, then KYC status cannot be granted to an account + * for this token, and any `TokenGrantKyc` transaction attempting to grant + * kyc to an account for this token SHALL NOT succeed.
    + * This key MAY be set when the token is created, and MAY be set or modified + * via a token update transaction signed by the `admin_key`.
    + * If `admin_key` is not set, this value, whether set or unset, + * SHALL be immutable. + */ + Key kycKey = 8; + + /** + * Access control to freeze this token. + *

    + * A token may be frozen for an account, preventing any transaction from + * transferring that token for that specified account, by a token freeze + * account transaction signed by this key.
    + * If this key is not set, the token cannot be frozen, and any transaction + * attempting to freeze the token for an account SHALL NOT succeed.
    + * This key MAY be set when the token is created, and MAY be set or modified + * via a token update transaction signed by the `admin_key`.
    + * If `admin_key` is not set, this value, whether set or unset, + * SHALL be immutable. + */ + Key freezeKey = 9; + + /** + * Access control of account wipe for this token. + *

    + * A token may be wiped, removing and burning tokens from a specific + * account, by a token wipe transaction, which MUST be signed by this key. + * The `treasury_account` cannot be subjected to a token wipe. A token burn + * transaction, signed by the `supply_key`, serves to burn tokens held by + * the `treasury_account` instead.
    + * If this key is not set, the token cannot be wiped, and any transaction + * attempting to wipe the token from an account SHALL NOT succeed.
    + * This key MAY be set when the token is created, and MAY be set or modified + * via a token update transaction signed by the `admin_key`.
    + * If `admin_key` is not set, this value, whether set or unset, + * SHALL be immutable. + */ + Key wipeKey = 10; + + /** + * Access control of token mint/burn for this token. + *

    + * A token mint transaction MUST be signed by this key, and any token mint + * transaction not signed by the current `supply_key` for that token + * SHALL NOT succeed.
    + * A token burn transaction MUST be signed by this key, and any token burn + * transaction not signed by the current `supply_key` for that token + * SHALL NOT succeed.
    + * This key MAY be set when the token is created, and MAY be set or modified + * via a token update transaction signed by the `admin_key`.
    + * If `admin_key` is not set, this value, whether set or unset, + * SHALL be immutable. + */ + Key supplyKey = 11; + + /** + * A flag indicating if accounts associated to this token are frozen by + * default, not frozen, or freeze is not applicable. + *

    + * Accounts frozen by default and newly associated with this token CANNOT + * transact in the token until unfrozen.
    + * This SHALL NOT prevent a `tokenReject` transaction to return the tokens + * from an account to the treasury account. + */ + TokenFreezeStatus defaultFreezeStatus = 12; + + /** + * A flag indicating if accounts associated with this token are granted + * KYC by default, revoked by default, or KYC is not applicable. + */ + TokenKycStatus defaultKycStatus = 13; + + /** + * A flag indicating that this token is deleted. + *

    + * A transaction involving a deleted token MUST NOT succeed. + */ + bool deleted = 14; + + /** + * An identifier for the account (if any) that the network will attempt + * to charge for this token's auto-renewal upon expiration. + *

    + * This field is OPTIONAL. If it is not set then renewal fees SHALL be + * charged to the account identified by `treasury`. + */ + AccountID autoRenewAccount = 15; + + /** + * A duration by which the network should automatically extend + * this token's expiration. + *

    + * If the token has a valid auto-renew account, and is not deleted upon + * expiration, the network SHALL attempt to automatically renew this + * token.
    + * The default values for the minimum period and maximum period are 30 days + * and 90 days, respectively. + */ + Duration autoRenewPeriod = 16; + + /** + * An expiration time for this token, in seconds since the epoch. + *

    + * For this purpose, `epoch` SHALL be the + * UNIX epoch with 0 at `1970-01-01T00:00:00.000Z`. + */ + Timestamp expiry = 17; + + /** + * A short description of this token. + *

    + * This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes` + * (default 100) bytes when encoded as UTF-8. + */ + string memo = 18; + + /** + * A type for this token. + *

    + * A token SHALL be either `FUNGIBLE_COMMON` or `NON_FUNGIBLE_UNIQUE`.
    + * If this value was omitted during token creation, `FUNGIBLE_COMMON` + * SHALL be used.
    + * The value `FUNGIBLE_COMMON` SHALL represent a fungible/common token. + * The value `NON_FUNGIBLE_UNIQUE` SHALL represent a + * non-fungible/unique token. + */ + TokenType tokenType = 19; + + /** + * A supply type for this token. + *

    + * A token SHALL have either `INFINITE` or `FINITE` supply type.
    + * If this value was omitted during token creation, the value `INFINITE` + * SHALL be used. + */ + TokenSupplyType supplyType = 20; + + /** + * A maximum supply of this token.
    + * This is the maximum number of tokens of this type that may be issued. + *

    + * This limit SHALL apply regardless of `token_type`.
    + * If `supply_type` is `INFINITE` then this value MUST be 0.
    + * If `supply_type` is `FINITE`, then this value MUST be greater than 0. + */ + int64 maxSupply = 21; + + /** + * Access control of the `custom_fees` field for this token. + *

    + * The token custom fee schedule may be changed, modifying the fees charged + * for transferring that token, by a token update transaction, which MUST + * be signed by this key.
    + * If this key is not set, the token custom fee schedule cannot be changed, + * and any transaction attempting to change the custom fee schedule for + * this token SHALL NOT succeed.
    + * This key MAY be set when the token is created, and MAY be set or modified + * via a token update transaction signed by the `admin_key`.
    + * If `admin_key` is not set, this value, whether set or unset, + * SHALL be immutable. + */ + Key fee_schedule_key = 22; + + /** + * A custom fee schedule for this token. + */ + repeated CustomFee custom_fees = 23; + + /** + * Access control of pause/unpause for this token. + *

    + * A token may be paused, preventing any transaction from transferring that + * token, by a token update transaction signed by this key.
    + * If this key is not set, the token cannot be paused, and any transaction + * attempting to pause the token SHALL NOT succeed.
    + * This key MAY be set when the token is created, and MAY be set or modified + * via a token update transaction signed by the `admin_key`.
    + * If `admin_key` is not set, this value, whether set or unset, + * SHALL be immutable. + */ + Key pause_key = 24; + + /** + * A flag indicating that this token is paused.
    + * A token may be paused, unpaused, or pause not applicable. + *

    + * A transaction involving a paused token, other than token_unpause, + * MUST NOT succeed. + */ + TokenPauseStatus pause_status = 25; + + /** + * The ledger ID of the network that generated this response. + *

    + * This value SHALL identify the distributed ledger that responded to + * this query. + */ + bytes ledger_id = 26; + + /** + * A Token "Metadata". + *

    + * This value, if set, SHALL NOT exceed 100 bytes. + */ + bytes metadata = 27; + + /** + * Access Control of metadata update for this token. + *

    + * A transaction to update the `metadata` field of this token MUST be + * signed by this key.
    + * If this token is a non-fungible/unique token type, a transaction to + * update the `metadata` field of any individual serialized unique token + * of this type MUST be signed by this key.
    + * If this key is not set, the token metadata SHALL NOT be changed after it + * is created.
    + * If this key is not set, the metadata for any individual serialized token + * of this type SHALL NOT be changed after it is created.
    + * This key MAY be set when the token is created, and MAY be set or modified + * via a token update transaction signed by the `admin_key`.
    + * If `admin_key` is not set, this value, whether set or unset, + * SHALL be immutable. + */ + Key metadata_key = 28; +} + +/** + * A response message for the `getTokenInfo` query. + */ +message TokenGetInfoResponse { + /** + * The standard response information for queries.
    + * This includes the values requested in the `QueryHeader` + * (cost, state proof, both, or neither). + */ + ResponseHeader header = 1; + + /** + * The information requested for the identified token. + */ + TokenInfo tokenInfo = 2; +} diff --git a/proto_src/services/token_get_nft_info.proto b/proto_src/services/token_get_nft_info.proto new file mode 100644 index 000000000..b949505cc --- /dev/null +++ b/proto_src/services/token_get_nft_info.proto @@ -0,0 +1,117 @@ +/** + * # Get NFT Info Query + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; +import "query_header.proto"; +import "response_header.proto"; +import "timestamp.proto"; + +/** + * Applicable only to tokens of type NON_FUNGIBLE_UNIQUE. Gets info on a NFT for a given TokenID (of + * type NON_FUNGIBLE_UNIQUE) and serial number + */ +message TokenGetNftInfoQuery { + /** + * Standard information sent with every query operation.
    + * This includes the signed payment and what kind of response is requested + * (cost, state proof, both, or neither). + */ + QueryHeader header = 1; + + /** + * A non-fungible/unique token (NFT) identifier. + *

    + * This SHALL identify the NFT to query.
    + * The identified NFT MUST exist, and MUST NOT be deleted. + */ + NftID nftID = 2; +} + +/** + * Information for one non-fungible/unique token (NFT). + * + */ +message TokenNftInfo { + /** + * A non-fungible/unique token (NFT) identifier. + *

    + * This SHALL match the NFT requested.
    + */ + NftID nftID = 1; + + /** + * The current owner of the NFT + */ + AccountID accountID = 2; + + /** + * The effective consensus timestamp at which the NFT was minted + */ + Timestamp creationTime = 3; + + /** + * Represents the unique metadata of the NFT + */ + bytes metadata = 4; + + /** + * The ledger ID of the network that generated this response. + *

    + * This value SHALL identify the distributed ledger that responded to + * this query. + */ + bytes ledger_id = 5; + + /** + * If an allowance is granted for the NFT, its corresponding spender account + */ + AccountID spender_id = 6; +} + +/** + * UNDOCUMENTED + */ +message TokenGetNftInfoResponse { + /** + * The standard response information for queries.
    + * This includes the values requested in the `QueryHeader` + * (cost, state proof, both, or neither). + */ + ResponseHeader header = 1; + + /** + * The information about this NFT + */ + TokenNftInfo nft = 2; +} diff --git a/proto_src/services/token_get_nft_infos.proto b/proto_src/services/token_get_nft_infos.proto new file mode 100644 index 000000000..7f371867f --- /dev/null +++ b/proto_src/services/token_get_nft_infos.proto @@ -0,0 +1,101 @@ +/** + * # Token Get NFT Infos + * Deprecated and permanently disabled + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; +import "token_get_nft_info.proto"; +import "query_header.proto"; +import "response_header.proto"; + +/** + * Deleted and unsupported. + * + * This query is not implemented and any query of this type submitted + * SHALL return a `NOT_SUPPORTED` response code. + */ +message TokenGetNftInfosQuery { + /** + * Standard information sent with every query operation.
    + * This includes the signed payment and what kind of response is requested + * (cost, state proof, both, or neither). + */ + QueryHeader header = 1; + + /** + * A token identifier. + *

    + * This SHALL identify the token to query.
    + * The identified token MUST exist, MUST NOT be deleted, and MUST be + * a non-fungible/unique type. + */ + TokenID tokenID = 2; + + /** + * Specifies the start index (inclusive) of the range of NFTs to query for. + * Value must be in the range [0; mintedNFTs-1] + */ + int64 start = 3; + + /** + * Specifies the end index (exclusive) of the range of NFTs to query for. + * Value must be in the range (start; mintedNFTs] + */ + int64 end = 4; +} + +/** + * Deleted and unsupported. + */ +message TokenGetNftInfosResponse { + /** + * The standard response information for queries.
    + * This includes the values requested in the `QueryHeader` + * (cost, state proof, both, or neither). + */ + ResponseHeader header = 1; + + /** + * A token identifier. + *

    + * This SHALL identify the token type to query.
    + * The identified token MUST exist, and MUST NOT be deleted. + * The identified token MUST be a non-fungible/unique type. + */ + TokenID tokenID = 2; + + /** + * A list of messages, each of which describes one NFT. + */ + repeated TokenNftInfo nfts = 3; +} diff --git a/proto_src/services/token_grant_kyc.proto b/proto_src/services/token_grant_kyc.proto new file mode 100644 index 000000000..eabf09bc7 --- /dev/null +++ b/proto_src/services/token_grant_kyc.proto @@ -0,0 +1,82 @@ +/** + * # Token Grant KYC + * Grant "KYC" status to an account with respect to a token. + * + * The "KYC' property is named for the "Know Your Customer" requirements in + * US federal regulations (FINRA 2090 and related US Code) that was subsequently + * incorporated into laws and regulations for many worldwide jurisdictions. + * The process requires a regulated financial entity to positively identify + * customers and certain other entities. + * + * This transaction enables a token administrator to track whether KYC + * requirements are met for a given account transacting in that token. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; + +/** + * Grant "Know Your Customer"(KYC) for one account for a single token. + * + * This transaction MUST be signed by the `kyc_key` for the token.
    + * The identified token MUST have a `kyc_key` set to a valid `Key` value.
    + * The token `kyc_key` MUST NOT be an empty `KeyList`.
    + * The identified token MUST exist and MUST NOT be deleted.
    + * The identified account MUST exist and MUST NOT be deleted.
    + * The identified account MUST have an association to the identified token.
    + * On success the association between the identified account and the identified + * token SHALL be marked as "KYC granted". + * + * ### Block Stream Effects + * None + */ +message TokenGrantKycTransactionBody { + /** + * A token identifier. + *

    + * The identified token SHALL grant "KYC" for the account + * identified by the `account` field.
    + * The identified token MUST be associated to the account identified + * by the `account` field. + */ + TokenID token = 1; + + /** + * An account identifier. + *

    + * The token identified by the `token` field SHALL grant "KYC" for the + * identified account.
    + * This account MUST be associated to the token identified + * by the `token` field. + */ + AccountID account = 2; +} diff --git a/proto_src/services/token_mint.proto b/proto_src/services/token_mint.proto new file mode 100644 index 000000000..981c73602 --- /dev/null +++ b/proto_src/services/token_mint.proto @@ -0,0 +1,98 @@ +/** + * # Token Mint + * Mint new tokens and deliver them to the token treasury. This is akin + * to how a fiat treasury will mint new coinage for circulation. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; + +/** + * Mint tokens and deliver the new tokens to the token treasury account. + * + * The token MUST have a `supply_key` set and that key MUST NOT + * be an empty `KeyList`.
    + * The token `supply_key` MUST sign this transaction.
    + * This operation SHALL increase the total supply for the token type by + * the number of tokens "minted".
    + * The total supply for the token type MUST NOT be increased above the + * maximum supply limit (2^63-1) by this transaction.
    + * The tokens minted SHALL be credited to the token treasury account.
    + * If the token is a fungible/common type, the amount MUST be specified.
    + * If the token is a non-fungible/unique type, the metadata bytes for each + * unique token MUST be specified in the `metadata` list.
    + * Each unique metadata MUST not exceed the global metadata size limit defined + * by the network configuration value `tokens.maxMetadataBytes`.
    + * The global batch size limit (`tokens.nfts.maxBatchSizeMint`) SHALL set + * the maximum number of individual NFT metadata permitted in a single + * `tokenMint` transaction. + * + * ### Block Stream Effects + * None + */ +message TokenMintTransactionBody { + /** + * A token identifier. + *

    + * This SHALL identify the token type to "mint".
    + * The identified token MUST exist, and MUST NOT be deleted. + */ + TokenID token = 1; + + /** + * An amount to mint to the Treasury Account. + *

    + * This is interpreted as an amount in the smallest possible denomination + * for the token (10-decimals whole tokens).
    + * The balance for the token treasury account SHALL receive the newly + * minted tokens.
    + * If this value is equal to zero (`0`), the token SHOULD be a + * non-fungible/unique type.
    + * If this value is non-zero, the token MUST be a fungible/common type. + */ + uint64 amount = 2; + + /** + * A list of metadata bytes.
    + *

    + * One non-fungible/unique token SHALL be minted for each entry + * in this list.
    + * Each entry in this list MUST NOT be larger than the limit set by the + * current network configuration value `tokens.maxMetadataBytes`.
    + * This list MUST NOT contain more entries than the current limit set by + * the network configuration value `tokens.nfts.maxBatchSizeMint`.
    + * If this list is not empty, the token MUST be a + * non-fungible/unique type.
    + * If this list is empty, the token MUST be a fungible/common type. + */ + repeated bytes metadata = 3; +} diff --git a/proto_src/services/token_pause.proto b/proto_src/services/token_pause.proto new file mode 100644 index 000000000..8b9742565 --- /dev/null +++ b/proto_src/services/token_pause.proto @@ -0,0 +1,63 @@ +/** + * # Token Pause + * A transaction to "pause" all activity for a token. While a token is paused + * it cannot be transferred between accounts by any transaction other than + * `rejectToken`. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; + +/** + * Pause transaction activity for a token. + * + * This transaction MUST be signed by the Token `pause_key`.
    + * The `token` identified MUST exist, and MUST NOT be deleted.
    + * The `token` identified MAY be paused; if the token is already paused, + * this transaction SHALL have no effect. + * The `token` identified MUST have a `pause_key` set, the `pause_key` MUST be + * a valid `Key`, and the `pause_key` MUST NOT be an empty `KeyList`.
    + * A `paused` token SHALL NOT be transferred or otherwise modified except to + * "up-pause" the token with `unpauseToken` or in a `rejectToken` transaction. + * + * ### Block Stream Effects + * None + */ +message TokenPauseTransactionBody { + /** + * A token identifier. + *

    + * The identified token SHALL be paused. Subsequent transactions + * involving that token SHALL fail until the token is "unpaused". + */ + TokenID token = 1; +} diff --git a/proto_src/services/token_reject.proto b/proto_src/services/token_reject.proto new file mode 100644 index 000000000..24f785ef3 --- /dev/null +++ b/proto_src/services/token_reject.proto @@ -0,0 +1,105 @@ +/** + * # Token Reject + * Messages used to implement a transaction to reject a token type from an + * account. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; + +/** + * Reject undesired token(s).
    + * Transfer one or more token balances held by the requesting account to the + * treasury for each token type. + * + * Each transfer SHALL be one of the following + * - A single non-fungible/unique token. + * - The full balance held for a fungible/common token. + * A single `tokenReject` transaction SHALL support a maximum + * of 10 transfers.
    + * A token that is `pause`d MUST NOT be rejected.
    + * If the `owner` account is `frozen` with respect to the identified token(s) + * the token(s) MUST NOT be rejected.
    + * The `payer` for this transaction, and `owner` if set, SHALL NOT be charged + * any custom fees or other fees beyond the `tokenReject` transaction fee. + * + * ### Block Stream Effects + * - Each successful transfer from `payer` to `treasury` SHALL be recorded in + * the `token_transfer_list` for the transaction record. + */ +message TokenRejectTransactionBody { + /** + * An account identifier.
    + * This OPTIONAL field identifies the account holding the + * tokens to be rejected. + *

    + * If set, this account MUST sign this transaction. + * If not set, the `payer` for this transaction SHALL be the effective + * `owner` for this transaction. + */ + AccountID owner = 1; + + /** + * A list of one or more token rejections. + *

    + * On success each rejected token serial number or balance SHALL be + * transferred from the requesting account to the treasury account for + * that token type.
    + * After rejection the requesting account SHALL continue to be associated + * with the token.
    + * If dissociation is desired then a separate `TokenDissociate` transaction + * MUST be submitted to remove the association.
    + * This list MUST contain at least one (1) entry and MUST NOT contain more + * than ten (10) entries. + */ + repeated TokenReference rejections = 2; +} + +/** + * A union token identifier. + * + * Identify a fungible/common token type, or a single + * non-fungible/unique token serial. + */ +message TokenReference { + oneof token_identifier { + /** + * A fungible/common token type. + */ + TokenID fungible_token = 1; + + /** + * A single specific serialized non-fungible/unique token. + */ + NftID nft = 2; + } +} diff --git a/proto_src/services/token_revoke_kyc.proto b/proto_src/services/token_revoke_kyc.proto new file mode 100644 index 000000000..e197b4a5b --- /dev/null +++ b/proto_src/services/token_revoke_kyc.proto @@ -0,0 +1,82 @@ +/** + * # Token Revoke KYC + * Revoke "KYC" status from an account with respect to a token. + * + * The "KYC' property is named for the "Know Your Customer" requirements in + * US federal regulations (FINRA 2090 and related US Code) that was subsequently + * incorporated into laws and regulations for many worldwide jurisdictions. + * The process requires a regulated financial entity to positively identify + * customers and certain other entities. + * + * This transaction enables a token administrator to track whether KYC + * requirements are met for a given account transacting in that token. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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; +// <<>> This comment is special code for setting PBJ Compiler java package + +import "basic_types.proto"; + +/** + * Revoke "Know Your Customer"(KYC) from one account for a single token. + * + * This transaction MUST be signed by the `kyc_key` for the token.
    + * The identified token MUST have a `kyc_key` set to a valid `Key` value.
    + * The token `kyc_key` MUST NOT be an empty `KeyList`.
    + * The identified token MUST exist and MUST NOT be deleted.
    + * The identified account MUST exist and MUST NOT be deleted.
    + * The identified account MUST have an association to the identified token.
    + * On success the association between the identified account and the identified + * token SHALL NOT be marked as "KYC granted". + * + * ### Block Stream Effects + * None + */ +message TokenRevokeKycTransactionBody { + /** + * A token identifier. + *

    + * The identified token SHALL revoke "KYC" for the account + * identified by the `account` field.
    + * The identified token MUST be associated to the account identified + * by the `account` field. + */ + TokenID token = 1; + + /** + * An account identifier. + *

    + * The token identified by the `token` field SHALL revoke "KYC" for the + * identified account.
    + * This account MUST be associated to the token identified + * by the `token` field. + */ + AccountID account = 2; +} diff --git a/proto_src/services/token_service.proto b/proto_src/services/token_service.proto new file mode 100644 index 000000000..a0a484ef9 --- /dev/null +++ b/proto_src/services/token_service.proto @@ -0,0 +1,235 @@ +/** + * # Token Service + * gRPC definitions for token service transactions. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package + +import "query.proto"; +import "response.proto"; +import "transaction_response.proto"; +import "transaction.proto"; + +/** + * Transactions and queries for the Token Service + */ +service TokenService { + // The following queries are permanently removed + // getAccountNftInfos, getTokenNftInfos + + /** + * Create a new token. + */ + rpc createToken (Transaction) returns (TransactionResponse); + + /** + * Update a token. + */ + rpc updateToken (Transaction) returns (TransactionResponse); + + /** + * Mint one or more tokens to the treasury account. + *

    + * This MAY specify a quantity of fungible/common tokens or + * a list of specific non-fungible/unique tokes, but + * MUST NOT specify both. + */ + rpc mintToken (Transaction) returns (TransactionResponse); + + /** + * Burn one or more tokens from the treasury account. + *

    + * This MAY specify a quantity of fungible/common tokens or + * a list of specific non-fungible/unique tokes, but + * MUST NOT specify both. + */ + rpc burnToken (Transaction) returns (TransactionResponse); + + /** + * Delete a token. + */ + rpc deleteToken (Transaction) returns (TransactionResponse); + + /** + * Wipe one or more tokens from an identified Account. + *

    + * This MAY specify a quantity of fungible/common tokens or + * a list of specific non-fungible/unique tokes, but + * MUST NOT specify both. + */ + rpc wipeTokenAccount (Transaction) returns (TransactionResponse); + + /** + * Freeze the transfer of tokens to or from an identified Account. + */ + rpc freezeTokenAccount (Transaction) returns (TransactionResponse); + + /** + * Unfreeze the transfer of tokens to or from an identified Account. + */ + rpc unfreezeTokenAccount (Transaction) returns (TransactionResponse); + + /** + * Assert that KYC requirements are met for a specific account with + * respect to a specific token. + */ + rpc grantKycToTokenAccount (Transaction) returns (TransactionResponse); + + /** + * Assert that KYC requirements are _not_ met for a specific account with + * respect to a specific token. + */ + rpc revokeKycFromTokenAccount (Transaction) returns (TransactionResponse); + + /** + * Associate one or more tokens to an account. + */ + rpc associateTokens (Transaction) returns (TransactionResponse); + + /** + * Dissociate one or more tokens from an account. + */ + rpc dissociateTokens (Transaction) returns (TransactionResponse); + + /** + * Update the custom fee schedule for a token. + */ + rpc updateTokenFeeSchedule (Transaction) returns (TransactionResponse); + + /** + * Retrieve the detail characteristics for a token. + *

    + * This query SHALL return information for the token type as a whole.
    + * This query SHALL NOT return information for individual tokens. + */ + rpc getTokenInfo (Query) returns (Response); + + /** + * Retrieve the metadata for a specific non-fungible/unique token.
    + * The NFT to query is identified by token identifier and serial number. + *

    + * This query SHALL return token metadata and, if an allowance is defined, + * the designated "spender" account for the queried NFT. + */ + rpc getTokenNftInfo (Query) returns (Response); + + /** + * Pause a token. + */ + rpc pauseToken (Transaction) returns (TransactionResponse); + + /** + * Unpause (resume) a token. + */ + rpc unpauseToken (Transaction) returns (TransactionResponse); + + /** + * Update multiple non-fungible/unique tokens (NFTs) in a collection.
    + * The NFTs are identified by token identifier and one or more + * serial numbers. + *

    + * This transaction SHALL update NFT metadata only.
    + * This transaction MUST be signed by the token `metadata_key`. + */ + rpc updateNfts (Transaction) returns (TransactionResponse); + + /** + * Reject one or more tokens. + *

    + * This transaction SHALL transfer the full balance of one or more tokens + * from the requesting account to the treasury for each token.
    + * This transfer SHALL NOT charge any custom fee or royalty defined for + * the token(s) to be rejected.
    + * ### Effects on success + *

      + *
    • If the rejected token is fungible/common, the requesting account + * SHALL have a balance of 0 for the rejected token.
      + * The treasury balance SHALL increase by the amount that the + * requesting account decreased.
    • + *
    • If the rejected token is non-fungible/unique the requesting + * account SHALL NOT hold the specific serialized token that + * is rejected.
      + * The treasury account SHALL hold each specific serialized token + * that was rejected.
    • + * + */ + rpc rejectToken (Transaction) returns (TransactionResponse); + + /** + * Airdrop one or more tokens to one or more accounts. + *

      + * This transaction SHALL distribute tokens from the balance of one or + * more sending account(s) to the balance of one or more + * recipient accounts.
      + * Accounts SHALL receive the tokens in one of four ways. + *

        + *
      • An account already associated to the token to be distributed + * SHALL receive the airdropped tokens immediately to the + * recipient account balance.
      • + *
      • An account with available automatic association slots SHALL + * be automatically associated to the token, and SHALL + * immediately receive the airdropped tokens to the recipient + * account balance.
      • + *
      • An account with "receiver signature required" set SHALL have + * a "Pending Airdrop" created and MUST claim that airdrop with + * a `claimAirdrop` transaction.
      • + *
      • An account with no available automatic association slots SHALL + * have a "Pending Airdrop" created and MUST claim that airdrop + * with a `claimAirdrop` transaction.
      • + *
      + * Any airdrop that completes immediately SHALL be irreversible.
      + * Any airdrop that results in a "Pending Airdrop" MAY be canceled via + * a `cancelAirdrop` transaction.
      + * All transfer fees (including custom fees and royalties), as well as + * the rent cost for the first auto-renewal period for any + * automatic-association slot occupied by the airdropped tokens, + * SHALL be charged to the account submitting this transaction. + */ + rpc airdropTokens (Transaction) returns (TransactionResponse); + + /** + * Cancel one or more pending airdrops. + *

      + * This transaction MUST be signed by _each_ account *sending* an + * airdrop to be canceled. + */ + rpc cancelAirdrop (Transaction) returns (TransactionResponse); + + /** + * Claim one or more pending airdrops. + *

      + * This transaction MUST be signed by _each_ account **receiving** + * an airdrop to be claimed.
      + * If a "Sender" lacks sufficient balance to fulfill the airdrop at + * the time the claim is made, that claim SHALL fail. + */ + rpc claimAirdrop (Transaction) returns (TransactionResponse); + +} diff --git a/proto_src/services/token_unfreeze_account.proto b/proto_src/services/token_unfreeze_account.proto new file mode 100644 index 000000000..0523cdf5d --- /dev/null +++ b/proto_src/services/token_unfreeze_account.proto @@ -0,0 +1,79 @@ +/** + * # Token Unfreeze + * Release a freeze on tokens of an identified type for an identified account. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; + +/** + * Resume transfers of a token type for an account.
      + * This releases previously frozen assets of one account with respect to + * one token type. Once unfrozen, that account can once again send or + * receive tokens of the identified type. + * + * The token MUST have a `freeze_key` set and that key MUST NOT + * be an empty `KeyList`.
      + * The token `freeze_key` MUST sign this transaction.
      + * The identified token MUST exist, MUST NOT be deleted, MUST NOT be paused, + * and MUST NOT be expired.
      + * The identified account MUST exist, MUST NOT be deleted, and + * MUST NOT be expired.
      + * If the identified account is not frozen with respect to the identified + * token, the transaction SHALL succeed, but no change SHALL be made.
      + * An association between the identified account and the identified + * token MUST exist. + * + * ### Block Stream Effects + * None + */ +message TokenUnfreezeAccountTransactionBody { + /** + * A token identifier. + *

      + * This SHALL identify the token type to "unfreeze".
      + * The identified token MUST exist, MUST NOT be deleted, and MUST be + * associated to the identified account. + */ + TokenID token = 1; + + /** + * An account identifier. + *

      + * This shall identify the account to "unfreeze".
      + * The identified account MUST exist, MUST NOT be deleted, MUST NOT be + * expired, and MUST be associated to the identified token.
      + * The identified account SHOULD be "frozen" with respect to the + * identified token. + */ + AccountID account = 2; +} diff --git a/proto_src/services/token_unpause.proto b/proto_src/services/token_unpause.proto new file mode 100644 index 000000000..c9727f5db --- /dev/null +++ b/proto_src/services/token_unpause.proto @@ -0,0 +1,63 @@ +/** + * # Token Un-Pause + * A transaction to "unpause" (i.e. resume) all activity for a token. While + * a token is "paused" it cannot be transferred between accounts by any + * transaction other than `rejectToken`. Once "unpaused", transactions involving + * that token may resume. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; + +/** + * Resume transaction activity for a token. + * + * This transaction MUST be signed by the Token `pause_key`.
      + * The `token` identified MUST exist, and MUST NOT be deleted.
      + * The `token` identified MAY not be paused; if the token is not paused, + * this transaction SHALL have no effect. + * The `token` identified MUST have a `pause_key` set, the `pause_key` MUST be + * a valid `Key`, and the `pause_key` MUST NOT be an empty `KeyList`.
      + * An `unpaused` token MAY be transferred or otherwise modified. + * + * ### Block Stream Effects + * None + */ +message TokenUnpauseTransactionBody { + /** + * A token identifier. + *

      + * The identified token SHALL be "unpaused". Subsequent transactions + * involving that token MAY succeed. + */ + TokenID token = 1; +} diff --git a/proto_src/services/token_update.proto b/proto_src/services/token_update.proto new file mode 100644 index 000000000..d6336c9a1 --- /dev/null +++ b/proto_src/services/token_update.proto @@ -0,0 +1,319 @@ +/** + * # Token Update + * Modify the characteristics of an existing token. Most changes require that + * the transaction be signed by an `admin_key`, and if that key is not valid + * the only change permitted is to extend the token expiration. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; +import "duration.proto"; +import "timestamp.proto"; +import "google/protobuf/wrappers.proto"; + +/** + * Update an existing token. + * + * This transaction SHALL NOT update any field that is not set.
      + * Most changes MUST be signed by the current `admin_key` of the token. If the + * token does not currently have a valid `admin_key`, then this transaction + * MUST NOT set any value other than `expiry` or a non-admin key.
      + * If the `treasury` is set to a new account, the new account MUST sign this + * transaction.
      + * If the `treasury` is set to a new account for a _non-fungible/unique_ token, + * The current treasury MUST NOT hold any tokens, or the network configuration + * property `tokens.nfts.useTreasuryWildcards` MUST be set. + * + * #### Requirements for Keys + * Any of the key values may be changed, even without an admin key, but the + * key to be changed MUST have an existing valid key assigned, and both the + * current key and the new key MUST sign the transaction.
      + * A key value MAY be set to an empty `KeyList`. In this case the existing + * key MUST sign this transaction, but the new value is not a valid key, and the + * update SHALL effectively remove the existing key. + * + * ### Block Stream Effects + * None + */ +message TokenUpdateTransactionBody { + /** + * A token identifier. + *

      + * This SHALL identify the token type to delete.
      + * The identified token MUST exist, and MUST NOT be deleted.
      + * If any field other than `expiry` is set, the identified token MUST + * have a valid `admin_key`. + */ + TokenID token = 1; + + /** + * A new symbol to use for the token. + *

      + * This value, if set, MUST NOT exceed 100 bytes when encoded as UTF-8.
      + * This value, if set, MUST NOT contain the Unicode NUL codepoint. + */ + string symbol = 2; + + /** + * A new name for the token.
      + * This is generally the "full name" displayed in wallet software. + *

      + * This value, if set, MUST NOT exceed 100 bytes when encoded as UTF-8.
      + * This value, if set, MUST NOT contain the Unicode NUL codepoint. + */ + string name = 3; + + /** + * A new treasury account identifier. + *

      + * If set, + * - The identified account SHALL be designated the "treasury" for the + * token, and all tokens "minted" SHALL be delivered to that account + * following this transaction.
      + * - The identified account MUST exist, MUST NOT be expired, MUST NOT be + * deleted, and SHOULD have a non-zero HBAR balance.
      + * - The identified account SHALL be associated to this token. + * - The full balance of this token held by the prior treasury account + * SHALL be transferred to the new treasury account, if the token type + * is fungible/common. + * - If the token type is non-fungible/unique, the previous treasury + * account MUST NOT hold any tokens of this type. + * - The new treasury account key MUST sign this transaction. + */ + AccountID treasury = 4; + + /** + * An Hedera key for token administration. + *

      + * This key, if set, SHALL have administrative authority for this token and + * MAY authorize token update and/or token delete transactions.
      + * If this key is set to an empty `KeyList`, this token SHALL be + * immutable thereafter, except for expiration and renewal.
      + * If set, this key MUST be a valid key or an empty `KeyList`.
      + * If set to a valid key, the previous key and new key MUST both + * sign this transaction. + */ + Key adminKey = 5; + + /** + * An Hedera key for managing account KYC. + *

      + * This key, if set, SHALL have KYC authority for this token and + * MAY authorize transactions to grant or revoke KYC for accounts.
      + * If this key is not set, or is an empty `KeyList`, KYC status for this + * token SHALL NOT be granted or revoked for any account.
      + * If this key is removed after granting KYC, those grants SHALL remain + * and cannot be revoked.
      + * If set, this key MUST be a valid key or an empty `KeyList`.
      + * If set to a valid key, the previous key and new key MUST both + * sign this transaction. + */ + Key kycKey = 6; + + /** + * An Hedera key for managing asset "freeze". + *

      + * This key, if set, SHALL have "freeze" authority for this token and + * MAY authorize transactions to freeze or unfreeze accounts + * with respect to this token.
      + * If this key is set to an empty `KeyList`, this token + * SHALL NOT be frozen or unfrozen for any account.
      + * If this key is removed after freezing accounts, those accounts + * SHALL remain frozen and cannot be unfrozen.
      + * If set, this key MUST be a valid key or an empty `KeyList`.
      + * If set to a valid key, the previous key and new key MUST both + * sign this transaction. + */ + Key freezeKey = 7; + + /** + * An Hedera key for wiping tokens from accounts. + *

      + * This key, if set, SHALL have "wipe" authority for this token and + * MAY authorize transactions to "wipe" any amount of this token from + * any account, effectively burning the tokens "wiped".
      + * If this key is set to an empty `KeyList`, it SHALL NOT be + * possible to "wipe" this token from an account.
      + * If set, this key MUST be a valid key or an empty `KeyList`.
      + * If set to a valid key, the previous key and new key MUST both + * sign this transaction. + */ + Key wipeKey = 8; + + /** + * An Hedera key for "minting" and "burning" tokens. + *

      + * This key, if set, MAY authorize transactions to "mint" new tokens to + * be delivered to the token treasury or "burn" tokens held by the + * token treasury.
      + * If this key is set to an empty `KeyList`, it SHALL NOT be + * possible to change the supply of tokens and neither "mint" nor "burn" + * transactions SHALL be permitted.
      + * If set, this key MUST be a valid key or an empty `KeyList`.
      + * If set to a valid key, the previous key and new key MUST both + * sign this transaction. + */ + Key supplyKey = 9; + + /** + * An identifier for the account to be charged renewal fees at the token's + * expiry to extend the lifetime of the token. + *

      + * If this value is set for the identified token, the token lifetime SHALL + * be extended by the _smallest_ of the following at expiration: + *

        + *
      • The current `autoRenewPeriod` duration.
      • + *
      • The maximum duration that this account has funds to purchase.
      • + *
      • The configured MAX_AUTORENEW_PERIOD at the time of automatic + * renewal.
      • + *
      + * If this account's HBAR balance is `0` when the token must be + * renewed, then the token SHALL be expired, and MAY be subsequently + * removed from state.
      + * If this value is set, the referenced account MUST sign this + * transaction. + *

      + *

      Note
      + * It is not currently possible to remove an automatic renewal account. + * Once set, it can only be replaced by a valid account. + *
      + */ + AccountID autoRenewAccount = 10; + + /** + * A duration between token automatic renewals.
      + * All entities in state may be charged "rent" occasionally (typically + * every 90 days) to prevent unnecessary growth of the ledger. This value + * sets the interval between such events for this token. + *

      + * If set, this value MUST be greater than the configured + * `MIN_AUTORENEW_PERIOD`.
      + * If set, this value MUST be less than the configured + * `MAX_AUTORENEW_PERIOD`. + */ + Duration autoRenewPeriod = 11; + + /** + * An expiration timestamp. + *

      + * If this value is set, the automatic renewal account is not set for the + * identified token, and token expiration is enabled in network + * configuration, this token SHALL expire when the consensus time exceeds + * this value, and MAY be subsequently removed from the network state.
      + * If `autoRenewAccount` is set or the `auto_renew_account_id` is set for + * the identified token, the token SHALL be subject to automatic renewal + * when the consensus time exceeds this value. + */ + Timestamp expiry = 12; + + /** + * A short description for this token. + *

      + * This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes` + * (default 100) bytes when encoded as UTF-8. + */ + google.protobuf.StringValue memo = 13; + + /** + * An Hedera key for managing the token custom fee schedule. + *

      + * This key, if set, MAY authorize transactions to modify the + * `custom_fees` for this token.
      + * If this key is set to an empty `KeyList`, the `custom_fees` + * for this token SHALL NOT be modified.
      + * If set, this key MUST be a valid key or an empty `KeyList`.
      + * If set to a valid key, the previous key and new key MUST both + * sign this transaction. + */ + Key fee_schedule_key = 14; + + /** + * An Hedera key for managing token "pause". + *

      + * This key, if set, SHALL have "pause" authority for this token and + * MAY authorize transactions to pause or unpause this token.
      + * If this key is set to an empty `KeyList`, this token + * SHALL NOT be paused or unpaused.
      + * If this key is removed while the token is paused, the token cannot + * be unpaused and SHALL remain paused.
      + * If set, this key MUST be a valid key or an empty `KeyList`.
      + * If set to a valid key, the previous key and new key MUST both + * sign this transaction. + */ + Key pause_key = 15; + + /** + * Token "Metadata". + *

      + * The value, if set, MUST NOT exceed 100 bytes.
      + *

      Examples
      + *
      hcs://1/0.0.4896575
      + *
      ipfs://bafkreifd7tcjjuwxxf4qkaibkj62pj4mhfuud7plwrc3pfoygt55al6syi
      + *
      + */ + google.protobuf.BytesValue metadata = 16; + + /** + * An Hedera key for managing the token `metadata`. + *

      + * This key, if set, MAY authorize transactions to modify the + * `metadata` for this token.
      + * If this key is set to an empty `KeyList`, the `metadata` + * for this token SHALL NOT be modified.
      + * If set, this key MUST be a valid key or an empty `KeyList`.
      + * If set to a valid key, the previous key and new key MUST both + * sign this transaction. + */ + Key metadata_key = 17; + + /** + * Set a key validation mode.
      + * Any key may be updated by a transaction signed by the token `admin_key`. + * Each role key may _also_ sign a transaction to update that key. + * If a role key signs an update to change that role key both old + * and new key must sign the transaction, _unless_ this field is set + * to `NO_VALIDATION`, in which case the _new_ key is not required to + * sign the transaction (the existing key is still required).
      + * The primary intent for this field is to allow a role key (e.g. a + * `pause_key`) holder to "remove" that key from the token by signing + * a transaction to set that role key to an empty `KeyList`. + *

      + * If set to `FULL_VALIDATION`, either the `admin_key` or _both_ current + * and new key MUST sign this transaction to update a "key" field for the + * identified token.
      + * If set to `NO_VALIDATION`, either the `admin_key` or the current + * key MUST sign this transaction to update a "key" field for the + * identified token.
      + * This field SHALL be treated as `FULL_VALIDATION` if not set. + */ + TokenKeyValidation key_verification_mode = 18; +} diff --git a/proto_src/services/token_update_nfts.proto b/proto_src/services/token_update_nfts.proto new file mode 100644 index 000000000..1190a78e5 --- /dev/null +++ b/proto_src/services/token_update_nfts.proto @@ -0,0 +1,82 @@ +/** + * # Token Update NFTs + * Given a token identifier and a metadata block, change the metadata for + * one or more non-fungible/unique token instances. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; +import "google/protobuf/wrappers.proto"; + +/** + * Modify the metadata field for an individual non-fungible/unique token (NFT). + * + * Updating the metadata of an NFT SHALL NOT affect ownership or + * the ability to transfer that NFT.
      + * This transaction SHALL affect only the specific serial numbered tokens + * identified. + * This transaction SHALL modify individual token metadata.
      + * This transaction MUST be signed by the token `metadata_key`.
      + * The token `metadata_key` MUST be a valid `Key`.
      + * The token `metadata_key` MUST NOT be an empty `KeyList`. + * + * ### Block Stream Effects + * None + */ +message TokenUpdateNftsTransactionBody { + /** + * A token identifier.
      + * This is the token type (i.e. collection) for which to update NFTs. + *

      + * This field is REQUIRED.
      + * The identified token MUST exist, MUST NOT be paused, MUST have the type + * non-fungible/unique, and MUST have a valid `metadata_key`. + */ + TokenID token = 1; + + /** + * A list of serial numbers to be updated. + *

      + * This field is REQUIRED.
      + * This list MUST have at least one(1) entry.
      + * This list MUST NOT have more than ten(10) entries. + */ + repeated int64 serial_numbers = 2; + + /** + * A new value for the metadata. + *

      + * If this field is not set, the metadata SHALL NOT change.
      + * This value, if set, MUST NOT exceed 100 bytes. + */ + google.protobuf.BytesValue metadata = 3; +} diff --git a/proto_src/services/token_wipe_account.proto b/proto_src/services/token_wipe_account.proto new file mode 100644 index 000000000..16e3ac6f7 --- /dev/null +++ b/proto_src/services/token_wipe_account.proto @@ -0,0 +1,124 @@ +/** + * # Token Wipe Account + * Administratively burn tokens owned by a single, non-treasury, account. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; + +/** + * Wipe (administratively burn) tokens held by a non-treasury account.
      + * On success, the requested tokens will be removed from the identified account + * and the token supply will be reduced by the amount "wiped". + * + * This transaction MUST be signed by the token `wipe_key`.
      + * The identified token MUST exist, MUST NOT be deleted, + * and MUST NOT be paused.
      + * The identified token MUST have a valid `Key` set for the `wipe_key` field, + * and that key MUST NOT be an empty `KeyList`.
      + * The identified account MUST exist, MUST NOT be deleted, MUST be + * associated to the identified token, MUST NOT be frozen for the identified + * token, MUST NOT be the token `treasury`, and MUST hold a balance for the + * token or the specific serial numbers provided.
      + * This transaction SHOULD provide a value for `amount` or `serialNumbers`, + * but MUST NOT set both fields. + * + * ### Block Stream Effects + * The new total supply for the wiped token type SHALL be recorded. + */ +message TokenWipeAccountTransactionBody { + /** + * A token identifier. + *

      + * This field is REQUIRED.
      + * The identified token MUST exist, MUST NOT be paused, MUST NOT be + * deleted, and MUST NOT be expired. + */ + TokenID token = 1; + + /** + * An account identifier.
      + * This identifies the account from which tokens will be wiped. + *

      + * This field is REQUIRED.
      + * The identified account MUST NOT be deleted or expired.
      + * If the identified token `kyc_key` is set to a valid key, the + * identified account MUST have "KYC" granted.
      + * The identified account MUST NOT be the `treasury` account for the + * identified token. + */ + AccountID account = 2; + + /** + * An amount of fungible/common tokens to wipe. + *

      + * If the identified token is a non-fungible/unique token type, + * this value MUST be exactly zero(`0`).
      + * If the identified token type is fungible/common: + *

        + *
      • This value SHALL be specified in units of the smallest + * denomination possible for the identified token + * (10-decimals whole tokens).
      • + *
      • This value MUST be strictly less than `Long.MAX_VALUE`.
      • + *
      • This value MUST be less than or equal to the current total + * supply for the identified token.
      • + *
      • This value MUST be less than or equal to the current balance + * held by the identified account.
      • + *
      • This value MAY be zero(`0`).
      • + *
      + */ + uint64 amount = 3; + + /** + * A list of serial numbers to wipe.
      + * The non-fungible/unique tokens with these serial numbers will be + * destroyed and cannot be recovered or reused. + *

      + * If the identified token type is a fungible/common type, this + * list MUST be empty.
      + * If the identified token type is non-fungible/unique: + *

        + *
      • This list MUST contain at least one entry if the identified token + * type is non-fungible/unique.>/li> + *
      • This list MUST NOT contain more entries than the current total + * supply for the identified token.
      • + *
      • Every entry in this list MUST be a valid serial number for the + * identified token (i.e. "collection").
      • + *
      • Every entry in this list MUST be owned by the + * identified account
      • + *
      • + *
      + * This list MUST NOT contain more entries than the network configuration + * value for batch size limit, typically ten(`10`). + */ + repeated int64 serialNumbers = 4; +} diff --git a/proto_src/services/transaction.proto b/proto_src/services/transaction.proto new file mode 100644 index 000000000..e90e4c9e5 --- /dev/null +++ b/proto_src/services/transaction.proto @@ -0,0 +1,686 @@ +/** + * # Transaction + * A (mostly legacy) wrapper around the bytes of a + * serialized `SignedTransaction` message. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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 "basic_types.proto"; + +import "system_delete.proto"; +import "system_undelete.proto"; +import "freeze.proto"; + +import "contract_call.proto"; +import "contract_create.proto"; +import "contract_update.proto"; + +import "crypto_add_live_hash.proto"; +import "crypto_create.proto"; +import "crypto_delete.proto"; +import "crypto_delete_live_hash.proto"; +import "crypto_transfer.proto"; +import "crypto_update.proto"; +import "crypto_approve_allowance.proto"; +import "crypto_delete_allowance.proto"; + +import "ethereum_transaction.proto"; + +import "file_append.proto"; +import "file_create.proto"; +import "file_delete.proto"; +import "file_update.proto"; + +import "duration.proto"; +import "contract_delete.proto"; + +import "consensus_create_topic.proto"; +import "consensus_update_topic.proto"; +import "consensus_delete_topic.proto"; +import "consensus_submit_message.proto"; + +import "unchecked_submit.proto"; + +import "token_create.proto"; +import "token_freeze_account.proto"; +import "token_unfreeze_account.proto"; +import "token_grant_kyc.proto"; +import "token_revoke_kyc.proto"; +import "token_delete.proto"; +import "token_update.proto"; +import "token_mint.proto"; +import "token_burn.proto"; +import "token_wipe_account.proto"; +import "token_associate.proto"; +import "token_dissociate.proto"; +import "token_fee_schedule_update.proto"; +import "token_pause.proto"; +import "token_unpause.proto"; +import "token_update_nfts.proto"; +import "token_reject.proto"; +import "token_airdrop.proto"; +import "token_cancel_airdrop.proto"; +import "token_claim_airdrop.proto"; + +import "schedule_create.proto"; +import "schedule_delete.proto"; +import "schedule_sign.proto"; + +import "node_stake_update.proto"; +import "util_prng.proto"; + +import "node_create.proto"; +import "node_update.proto"; +import "node_delete.proto"; + +import "custom_fees.proto"; +import "event/state_signature_transaction.proto"; +import "auxiliary/hints/hints_key_publication.proto"; +import "auxiliary/hints/hints_preprocessing_vote.proto"; +import "auxiliary/hints/hints_partial_signature.proto"; +import "auxiliary/hints/crs_publication.proto"; + +import "auxiliary/history/history_proof_signature.proto"; +import "auxiliary/history/history_proof_key_publication.proto"; +import "auxiliary/history/history_proof_vote.proto"; + +/** + * A wrapper around signed transaction bytes.
      + * This was originally a transaction with body, signatures, and/or bytes, + * but is not only a wrapper around a byte array containing signed transction + * bytes. + * + * The `signedTransactionBytes` field is REQUIRED and MUST contain a valid, + * serialized, `SignedTransaction` message.
      + * All other fields are deprecated and MUST NOT be set. + * + * #### Additional Notes + * The four deprecated fields will be removed and reserved in a future release. + */ +message Transaction { + // <<>> This comment is special code for setting PBJ Compiler java package + /** + * Replaced with `signedTransactionBytes`.
      + * The body of the transaction. + */ + TransactionBody body = 1 [deprecated = true]; + + /** + * Replaced with `signedTransactionBytes`.
      + * The signatures on the body. + */ + SignatureList sigs = 2 [deprecated = true]; + + /** + * Replaced with `signedTransactionBytes`.
      + * The signatures on the body with a newer format. + */ + SignatureMap sigMap = 3 [deprecated = true]; + + /** + * Replaced with `signedTransactionBytes`.
      + * TransactionBody serialized into bytes. + */ + bytes bodyBytes = 4 [deprecated = true]; + + /** + * A valid, serialized, `SignedTransaction` message. + *

      + * This field MUST be present. + * This field MUST NOT exceed the current network transaction size limit + * (currently 6144 bytes). + */ + bytes signedTransactionBytes = 5; +} + +/** + * A transaction body. + * + * Every transaction is structured as a signed byte array. That byte array + * is a serialized `TransactionBody`. The transaction body contains the full + * content of the transaction, while the `SignedTransaction` includes a + * signature map for signatures authenticating that byte array, and that is + * serialized and transmitted wrapped in a `Transaction` message.
      + * The bulk of this message is a `oneof` block which offers the option for + * any one of the transaction messages for the network. + * This message also includes several additional fields to specify + * various parameters required to process a transaction. + */ +message TransactionBody { + // <<>> This comment is special code for setting PBJ Compiler java package + reserved 30, 61, 62, 63, 64; + + reserved "tssMessage", "tssVote", "tssShareSignature", "tssEncryptionKey"; + + /** + * A transaction identifier.
      + * Each transaction is uniquely identified by its transaction + * identifier. + *

      + * Each transaction identifier MUST be unique.
      + * Multiple transactions MAY be submitted with the same transaction + * identifier, but all except the first SHALL be rejected as duplicate + * transactions.
      + * This identifier MUST specify a `payer` account to be charged + * all fees associated with the transaction.
      + * This identifier MUST specify a "valid start time".
      + * The "valid start time" MUST be strictly _earlier_ than the current + * network consensus time.
      + * The "valid start time" MUST NOT be more than the current network + * configuration value for `transaction.maxValidDuration` seconds + * before the current network consensus time.
      + * This identifier MUST NOT set the `scheduled` flag.
      + * This identifier MUST NOT set a nonce value. + */ + TransactionID transactionID = 1; + + /** + * A node account identifier. + *

      + * This MUST identify the account of the consensus node to which + * this transaction is submitted. + */ + AccountID nodeAccountID = 2; + + /** + * A maximum transaction fee, in tinybar. + *

      + * The network SHALL NOT charge a transaction fee that exceeds this + * amount.
      + * The network MAY charge up to this amount, and reject the transaction, + * if the amount offered is insufficient to cover the required fees.
      + * The network MAY charge a minimum fee equal to 80% of the amount offered + * if the amount offered is much larger than the required fees. + */ + uint64 transactionFee = 3; + + /** + * A maximum duration in which to execute this transaction. + *

      + * This transaction SHALL be rejected as expired if the valid start time, + * extended by this duration, is less than the current network consensus + * time when the transaction is submitted.
      + * This transaction SHALL be rejected with an invalid duration if this + * value is greater than the current network configuration value for + * `transaction.maxValidDuration`. + */ + Duration transactionValidDuration = 4; + + /** + * Records are always generated.
      + * Obsolete option to not generate a record. + *

      + * This flag SHALL be ignored. Every transaction SHALL generate a record, + * or block stream equivalent. + */ + bool generateRecord = 5 [deprecated = true]; + + /** + * A short description for this transaction. + *

      + * This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes` + * (default 100) bytes when encoded as UTF-8. + */ + string memo = 6; + + /** + * The public key of the trusted batch assembler. + */ + Key batch_key = 73; + + // The fields here are ordered in strictly ascending field ordinal + // order due to limitations in PBJ. + oneof data { + /** + * Call a function defined on a smart contract. + */ + ContractCallTransactionBody contractCall = 7; + + /** + * Create a smart contract. + */ + ContractCreateTransactionBody contractCreateInstance = 8; + + /** + * Update a smart contract. + */ + ContractUpdateTransactionBody contractUpdateInstance = 9; + + /** + * An obsolete, and unsupported, operation to add a "live hash" to + * an account. + */ + CryptoAddLiveHashTransactionBody cryptoAddLiveHash = 10 [deprecated = true]; + + /** + * Create a new Hedera account. + */ + CryptoCreateTransactionBody cryptoCreateAccount = 11; + + /** + * Delete an Hedera account.
      + * This will mark the account as deleted, and transfer all remaining + * HBAR to a receiver account. + */ + CryptoDeleteTransactionBody cryptoDelete = 12; + + /** + * An obsolete, and unsupported, operation to remove a "live hash" from + * an account. + */ + CryptoDeleteLiveHashTransactionBody cryptoDeleteLiveHash = 13 [deprecated = true]; + + /** + * Transfer HBAR between accounts. + */ + CryptoTransferTransactionBody cryptoTransfer = 14; + + /** + * Modify an Hedera account. + */ + CryptoUpdateTransactionBody cryptoUpdateAccount = 15; + + /** + * Append data to the end of a file. + */ + FileAppendTransactionBody fileAppend = 16; + + /** + * Create a new file. + */ + FileCreateTransactionBody fileCreate = 17; + + /** + * Delete a file.
      + * This will remove the content of the file, and mark the file as + * deleted. + */ + FileDeleteTransactionBody fileDelete = 18; + + /** + * Modify a file.
      + * This may modify any metadata, and/or _replace_ the content. + */ + FileUpdateTransactionBody fileUpdate = 19; + + /** + * Delete a file as an Hedera administrative function.
      + * This is a privileged operation. + */ + SystemDeleteTransactionBody systemDelete = 20; + + /** + * Restore a file deleted via `systemDelete`.
      + * This is a privileged operation. + */ + SystemUndeleteTransactionBody systemUndelete = 21; + + /** + * Delete a smart contract and transfer remaining balance + * to a specified account. + */ + ContractDeleteTransactionBody contractDeleteInstance = 22; + + /** + * Freeze the network.
      + * This is actually several possible operations, and the caller + * should examine the "freeze service" for more detail.
      + * This is a privileged operation. + */ + FreezeTransactionBody freeze = 23; + + /** + * Create a topic. + */ + ConsensusCreateTopicTransactionBody consensusCreateTopic = 24; + + /** + * Update a topic. + */ + ConsensusUpdateTopicTransactionBody consensusUpdateTopic = 25; + + /** + * Delete a topic. + */ + ConsensusDeleteTopicTransactionBody consensusDeleteTopic = 26; + + /** + * Submit a message to a topic.
      + * A message may be "chunked", and submitted in parts, if the total + * message size exceeds the limit for a single transaction. + */ + ConsensusSubmitMessageTransactionBody consensusSubmitMessage = 27; + + /** + * Unsupported system transaction. + *

      + * This transaction MAY be implemented in testing networks, but + * SHALL NOT be enabled or supported in production environments.
      + * Clients MUST NOT call this method, and any such transaction SHALL + * be rejected.
      + * A network MAY choose to charge punitive fees for attempting to + * execute an `uncheckedSubmit`. + */ + UncheckedSubmitBody uncheckedSubmit = 28; + + /** + * Create a new Hedera token. + */ + TokenCreateTransactionBody tokenCreation = 29; + + /** + * Freeze an account with respect to a token.
      + * A frozen account cannot transact in that token until unfrozen. + */ + TokenFreezeAccountTransactionBody tokenFreeze = 31; + + /** + * Unfreeze an account with respect to a token. + */ + TokenUnfreezeAccountTransactionBody tokenUnfreeze = 32; + + /** + * Grant KYC to an account with respect to a token.
      + * KYC is generally a "know your customer" assertion that a + * responsible entity has sufficient information to positively + * identify the account holder to relevant authorities. + */ + TokenGrantKycTransactionBody tokenGrantKyc = 33; + + /** + * Revoke KYC from an account with respect to a token. + */ + TokenRevokeKycTransactionBody tokenRevokeKyc = 34; + + /** + * Delete an Hedera token.
      + * The token will be marked deleted. + */ + TokenDeleteTransactionBody tokenDeletion = 35; + + /** + * Update an Hedera token.
      + * Depending on what fields are to be modified, the signature + * requirements will vary. See `TokenUpdateTransactionBody` for + * further detail. + */ + TokenUpdateTransactionBody tokenUpdate = 36; + + /** + * Mint new tokens.
      + * All minted tokens will be delivered to the treasury account for + * the token type. The "mint key" for the token must sign this + * transaction. + */ + TokenMintTransactionBody tokenMint = 37; + + /** + * Burn tokens from the treasury account.
      + * The "burn key" for the token must sign this transaction. + */ + TokenBurnTransactionBody tokenBurn = 38; + + /** + * Wipe tokens from an account.
      + * This will remove a specified amount of fungible/common tokens or + * a specified list of non-fungible/unique serial numbered tokens + * of a given token type from an Hedera account. The removed tokens + * are _burned_ as if by a `tokenBurn` transaction.
      + * The "wipe key" for the token must sign this transaction. + */ + TokenWipeAccountTransactionBody tokenWipe = 39; + + /** + * Associate tokens to an account. + */ + TokenAssociateTransactionBody tokenAssociate = 40; + + /** + * Dissociate tokens from an account. + */ + TokenDissociateTransactionBody tokenDissociate = 41; + + /** + * Create a schedule.
      + * A schedule is a request to execute a specific transaction, included + * in the create body, in the future. The scheduled transaction may + * execute as soon as all signature requirements are met with the + * schedule create or a subsequent schedule sign transaction. + * A schedule may, alternatively, execute on expiration if + * long-term schedules are enabled and the schedule meets signature + * requirements at that time. + */ + ScheduleCreateTransactionBody scheduleCreate = 42; + + /** + * Delete a schedule.
      + * The schedule will be marked as deleted. + */ + ScheduleDeleteTransactionBody scheduleDelete = 43; + + /** + * Sign a schedule.
      + * Add one or more cryptographic keys to the list of keys that have + * signed a schedule, and which may serve to meet the signature + * requirements for the scheduled transaction. + */ + ScheduleSignTransactionBody scheduleSign = 44; + + /** + * Update the custom fee schedule for a token.
      + * This transaction must be signed by the "fee schedule key" + * for the token. + */ + TokenFeeScheduleUpdateTransactionBody token_fee_schedule_update = 45; + + /** + * Pause a Token. + *

      + * This transaction MUST be signed by the "pause key" for the token. + */ + TokenPauseTransactionBody token_pause = 46; + + /** + * Unpause a Token. + *

      + * This transaction MUST be signed by the "pause key" for the token. + */ + TokenUnpauseTransactionBody token_unpause = 47; + + /** + * Add one or more approved allowances for spenders to transfer the + * paying account's hbar or tokens. + */ + CryptoApproveAllowanceTransactionBody cryptoApproveAllowance = 48; + + /** + * Delete one or more approvals for spenders to transfer the + * paying account's hbar or tokens. + */ + CryptoDeleteAllowanceTransactionBody cryptoDeleteAllowance = 49; + + /** + * Perform an Ethereum encoded transaction. + */ + EthereumTransactionBody ethereumTransaction = 50; + + /** + * Update the staking information.
      + * This internal transaction is performed at the end of a staking + * period to complete staking calculations and indicate that new + * staking period has started. + */ + NodeStakeUpdateTransactionBody node_stake_update = 51; + + /** + * Provide a deterministic pseudorandom number based on network state. + */ + UtilPrngTransactionBody util_prng = 52; + + /** + * Update one or more non-fungible/unique tokens.
      + * This will update metadata for one or more serial numbers within + * a collection (token type). + */ + TokenUpdateNftsTransactionBody token_update_nfts = 53; + + /** + * Create a new node in the network address book.
      + * This is a privileged operation. + *

      + * This transaction SHALL create a new consensus node record and add + * that record to the network address book. + */ + com.hedera.hapi.node.addressbook.NodeCreateTransactionBody nodeCreate = 54; + + /** + * Update a node in the network address book.
      + * This is a privileged operation. + *

      + * This transaction SHALL update an existing consensus node record in + * the network address book. + */ + com.hedera.hapi.node.addressbook.NodeUpdateTransactionBody nodeUpdate = 55; + + /** + * Delete a node from the network address book.
      + * This is a privileged operation. + *

      + * This transaction SHALL mark an existing consensus node record as + * deleted and remove that node from the network address book. + */ + com.hedera.hapi.node.addressbook.NodeDeleteTransactionBody nodeDelete = 56; + + /** + * Reject and return a token to treasury.
      + * This transaction will transfer one or more tokens or token + * balances held by the requesting account to the treasury + * for each token type. + *

      + * Each transfer MUST be one of the following: + *

        + *
      • A single non-fungible/unique token.
      • + *
      • The full balance held for a fungible/common + * token type.
      • + *
      + * When complete, the requesting account SHALL NOT hold the + * rejected tokens.
      + * Custom fees and royalties defined for the tokens rejected + * SHALL NOT be charged for this transaction. + */ + TokenRejectTransactionBody tokenReject = 57; + + /** + * "Airdrop" tokens.
      + * This transaction sends tokens from one or more "sender" accounts + * to one or more "recipient" accounts. + *

      + * If a recipient account cannot immediately receive the token(s) sent, + * a "pending" airdrop SHALL be created and MUST be claimed. + */ + TokenAirdropTransactionBody tokenAirdrop = 58; + + /** + * Cancel one or more "pending" airdrops that are not yet claimed. + */ + TokenCancelAirdropTransactionBody tokenCancelAirdrop = 59; + + /** + * Claim one or more "pending" airdrops. + */ + TokenClaimAirdropTransactionBody tokenClaimAirdrop = 60; + + /** + * A transaction body for signature of a state root hash gossiped to other nodes + */ + com.hedera.hapi.platform.event.StateSignatureTransaction state_signature_transaction = 65; + + /** + * A transaction body for voting on hinTS aggregation keys. + */ + com.hedera.hapi.services.auxiliary.hints.HintsPreprocessingVoteTransactionBody hints_preprocessing_vote = 66; + + /** + * A transaction body for publishing a node's hintTS key. + */ + com.hedera.hapi.services.auxiliary.hints.HintsKeyPublicationTransactionBody hints_key_publication = 67; + + /** + * A transaction body for broadcasting a node's hintTS partial signature on a message. + */ + com.hedera.hapi.services.auxiliary.hints.HintsPartialSignatureTransactionBody hints_partial_signature = 68; + + /** + * A transaction body for contributed a signature with a node's proof key to a history proof. + */ + com.hedera.hapi.services.auxiliary.history.HistoryProofSignatureTransactionBody history_proof_signature = 69; + + /** + * A transaction body for publishing a node's metadata proof key. + */ + com.hedera.hapi.services.auxiliary.history.HistoryProofKeyPublicationTransactionBody history_proof_key_publication = 70; + + /** + * A transaction body for voting on a metadata proof descending from the ledger id. + */ + com.hedera.hapi.services.auxiliary.history.HistoryProofVoteTransactionBody history_proof_vote = 71; + + /** + * A transaction body for broadcasting a node's crs publication + */ + com.hedera.hapi.services.auxiliary.hints.CrsPublicationTransactionBody crs_publication = 72; + + /** + * A transaction body for handling a set of transactions atomically. + */ + AtomicBatchTransactionBody atomic_batch = 74; + } + + /** + * A list of maximum custom fees that the users are willing to pay. + *

      + * This field is OPTIONAL.
      + * If left empty, the users are accepting to pay any custom fee.
      + * If used with a transaction type that does not support custom fee limits, the transaction will fail. + */ + repeated CustomFeeLimit max_custom_fees = 1001; +} + +/** + * A transaction body for handling a set of transactions atomically. + */ +message AtomicBatchTransactionBody { + // <<>> This comment is special code for setting PBJ Compiler java package + /** + * A list of signed bytes that represent the batch transactions. + */ + repeated bytes transactions = 1; +} diff --git a/proto_src/services/transaction_contents.proto b/proto_src/services/transaction_contents.proto new file mode 100644 index 000000000..0bc03e26a --- /dev/null +++ b/proto_src/services/transaction_contents.proto @@ -0,0 +1,65 @@ +/** + * # Transaction Contents + * The Signed Transaction message which forms the content of a transaction + * `signedTransactionBytes`. This message is the result of several changes + * to transaction message structure over time. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; + +/** + * A combination transaction bytes and a map of signatures.
      + * This message contains a serialized `TransactionBody` in a byte array + * and a `SignatureMap` that contains all of the signatures offered to + * authenticate the transaction. + * + * ### Block Stream Effects + * This content is recorded in the record stream exactly as received. + */ +message SignedTransaction { + /** + * A byte array containing a serialized `TransactionBody`. + *

      + * This content is what the signatures in `sigMap` MUST sign. + */ + bytes bodyBytes = 1; + + /** + * A set of cryptographic signatures. + *

      + * This set MUST contain all signatures required to authenticate + * and authorize the transaction.
      + * This set MAY contain additional signatures. + */ + SignatureMap sigMap = 2; +} diff --git a/proto_src/services/transaction_get_fast_record.proto b/proto_src/services/transaction_get_fast_record.proto new file mode 100644 index 000000000..08e262f6a --- /dev/null +++ b/proto_src/services/transaction_get_fast_record.proto @@ -0,0 +1,95 @@ +/** + * # Get Fast Record + * Get a recent transaction record "fast". + * + * > Important + * >> This query is obsolete and not supported.
      + * >> Any query of this type that is submitted SHALL fail with a `PRE_CHECK` + * >> result of `NOT_SUPPORTED`. + * + * > Implementation Note + * >> This query is _defined_ for "Crypto" service, but is _implemented_ by + * >> the "Network Admin" service. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "transaction_record.proto"; +import "basic_types.proto"; +import "query_header.proto"; +import "response_header.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 { + option deprecated = true; + /** + * Standard information sent with every query operation.
      + * This includes the signed payment and what kind of response is requested + * (cost, state proof, both, or neither). + */ + QueryHeader header = 1; + + /** + * The ID of the transaction for which the record is requested. + */ + TransactionID transactionID = 2; +} + +/** + * 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 { + option deprecated = true; + /** + * The standard response information for queries.
      + * This includes the values requested in the `QueryHeader` + * (cost, state proof, both, or neither). + */ + ResponseHeader header = 1; + + /** + * The requested transaction records + */ + TransactionRecord transactionRecord = 2; +} diff --git a/proto_src/services/transaction_get_receipt.proto b/proto_src/services/transaction_get_receipt.proto new file mode 100644 index 000000000..44000f2a1 --- /dev/null +++ b/proto_src/services/transaction_get_receipt.proto @@ -0,0 +1,199 @@ +/** + * # Get Transaction Receipt + * This query is central to client interactions. A client must query + * the network for the "receipt" after a transaction is submitted to know + * whether the transaction succeeded and the consensus result. + * + * > Implementation Note + * >> This query is _defined_ for "Crypto" service, but is _implemented_ by + * >> the "Network Admin" service. + * + * > Note + * >> The mechanism for transaction receipts and results is subject to + * >> considerable change in the near future. Clients heavily dependent + * >> on direct network queries for transaction receipts may consider + * >> changes needed to query a mirror node for transaction receipts + * >> and results instead. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "transaction_receipt.proto"; +import "basic_types.proto"; +import "query_header.proto"; +import "response_header.proto"; + +/** + * A query to retrieve a transaction receipt. + * This query retrieves the post-consensus (final) result of a transaction. + * A transaction receipt may not be available if queried too early + * (less than 5-10 seconds), or too late (more than 3 minutes). If a receipt + * is available, it contains basic transaction results. A query to a mirror + * node (or other archival system) is required to obtain full detail for a + * transaction, or any result after the basic receipt time period. + * + * This query is "free". The payment field in the header MUST be empty.
      + * If a receipt is not available, the response SHALL be `UNKNOWN`.
      + * A transaction receipt SHALL be available after the network reaches + * consensus for a transaction.
      + * A transaction receipt SHALL NOT be available after the end of the network + * configured "receipt period", typically three(3) minutes. + * + *

      + *
      What is the "first" transaction?
      + *
      The "first" transaction SHALL be the the transaction with + * the earliest consensus time and a status that is neither + * `INVALID_NODE_ACCOUNT` nor `INVALID_PAYER_SIGNATURE`.
      + * If no transaction is found meeting this status criteria, the + * "first" transaction SHALL be the transaction with the earliest + * consensus time.
      + *
      What is a "child" transaction?
      + *
      A "child" transaction is any transaction created in the process of + * completing another transaction. These are most common with a smart + * contract call, where a call to a contract may initiate one or more + * additional transactions to complete a complex process.
      + *
      + */ +message TransactionGetReceiptQuery { + /** + * Standard information sent with every query operation.
      + * This includes the signed payment and what kind of response is requested + * (cost, state proof, both, or neither). + */ + QueryHeader header = 1; + + /** + * A transaction identifier. + *

      + * This MUST contain the full identifier, as submitted, for the + * transaction to query. + */ + TransactionID transactionID = 2; + + /** + * A flag to request duplicates. + *

      + * If set, every transaction receipt within the receipt period that + * matches the requested transaction identifier SHALL be returned.
      + * If not set, duplicate transactions SHALL NOT be returned.
      + * If not set, only the receipt for the first matching transaction to + * reach consensus SHALL be returned. + */ + bool includeDuplicates = 3; + + /** + * A flag to request "child" receipts. + *

      + * If set, the response SHALL include receipts for each child transaction + * executed as part of the requested parent transaction.
      + * If not set, the response SHALL NOT include any receipts for child + * transactions. + */ + bool include_child_receipts = 4; +} + +/** + * Response message for a `getTransactionReceipts` query. + * + * The `receipt` field SHALL return the receipt for the "first" transaction + * that matches the transaction identifier requested.
      + * If receipts for duplicate transactions are requested, those duplicate + * receipts SHALL be present in the `duplicateTransactionReceipts` list.
      + * If receipts for child transactions are requested, those child receipts + * SHALL be present in the `child_transaction_receipts` list.
      + * A state proof SHALL NOT be provided for this response; transaction receipts + * are not retained in network state. + * + *

      + *
      What is the "first" transaction?
      + *
      The "first" transaction receipt SHALL be the receipt for the + * first transaction with status that is neither + * `INVALID_NODE_ACCOUNT` nor `INVALID_PAYER_SIGNATURE`.
      + * If no transaction is found meeting the status criteria, the + * "first" transaction SHALL be the first transaction by + * consensus time.
      + *
      What is a "child" transaction?
      + *
      A "child" transaction is any transaction created in the process of + * completing another transaction. These are most common with a smart + * contract call, where a call to a contract may initiate one or more + * additional transactions to complete a complex process.
      + *
      + */ +message TransactionGetReceiptResponse { + /** + * The standard response information for queries.
      + * This includes the values requested in the `QueryHeader` + * (cost, state proof, both, or neither). + */ + ResponseHeader header = 1; + + /** + * A transaction receipt. + *

      + * This SHALL be the receipt for the "first" transaction that matches + * the transaction identifier requested.
      + * If the identified transaction has not reached consensus, this receipt + * SHALL have a `status` of `UNKNOWN`.
      + * If the identified transaction reached consensus prior to the current + * configured receipt period (typically the last 180 seconds), this receipt + * SHALL have a `status` of `UNKNOWN`. + */ + TransactionReceipt receipt = 2; + + /** + * A list of duplicate transaction receipts. + *

      + * If the request set the `includeDuplicates` flat, this list SHALL + * include the receipts for each duplicate transaction associated to the + * requested transaction identifier. + * If the request did not set the `includeDuplicates` flag, this list + * SHALL be empty.
      + * If the `receipt` status is `UNKNOWN`, this list SHALL be empty.
      + * This list SHALL be in order by consensus timestamp. + */ + repeated TransactionReceipt duplicateTransactionReceipts = 4; + + /** + * A list of receipts for all child transactions spawned by the requested + * transaction. + *

      + * If the request set the `include_child_receipts` flag, this list SHALL + * include receipts for each child transaction executed as part of the + * requested parent transaction.
      + * If the request did not set the `include_child_receipts` flag, this + * list SHALL be empty.
      + * If the parent transaction did not initiate any child transactions + * this list SHALL be empty.
      + * If the `receipt` status is `UNKNOWN`, this list SHALL be empty.
      + * This list SHALL be in order by consensus timestamp. + */ + repeated TransactionReceipt child_transaction_receipts = 5; +} diff --git a/proto_src/services/transaction_get_record.proto b/proto_src/services/transaction_get_record.proto new file mode 100644 index 000000000..b77456b40 --- /dev/null +++ b/proto_src/services/transaction_get_record.proto @@ -0,0 +1,193 @@ +/** + * # Get Transaction Record + * Messages for a query to obtain a transaction record. This particular + * query is used by `getTxRecordByTxID` in the "Crypto" service API. + * + * > Note + * >> Much more detailed information for transaction records is available + * >> from a mirror node, and the mirror node retains transaction records + * >> long term, rather than for a short "cache" duration. Clients may + * >> prefer the mirror node graph API to query transaction records, rather + * >> than this query. + * + * > Implementation Note + * >> This query is _defined_ for "Crypto" service, but is _implemented_ by + * >> the "Network Admin" service. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "transaction_record.proto"; +import "basic_types.proto"; +import "query_header.proto"; +import "response_header.proto"; + +/** + * Request for a `TransactionGetRecord` (a.k.a. `getTxRecordByTxID`) query. + *

      + * A transaction record SHALL be available after the network reaches + * consensus and completes execution for a transaction.
      + * A transaction record SHALL NOT be available after the end of the network + * configured "record cache duration". + * + *

      + *
      What is the "first" transaction?
      + *
      The "first" transaction SHALL be the the transaction with + * the earliest consensus time and a status that is neither + * `INVALID_NODE_ACCOUNT` nor `INVALID_PAYER_SIGNATURE`.
      + * If no transaction is found meeting this status criteria, the + * "first" transaction SHALL be the transaction with the earliest + * consensus time.
      + *
      What is a "child" transaction?
      + *
      A "child" transaction is any transaction created in the process of + * completing another transaction. These are most common with a smart + * contract call, where a call to a contract may initiate one or more + * additional transactions to complete a complex process.
      + *
      + */ +message TransactionGetRecordQuery { + /** + * Standard information sent with every query operation.
      + * This includes the signed payment and what kind of response is requested + * (cost, state proof, both, or neither). + */ + QueryHeader header = 1; + + /** + * A transaction identifier. + *

      + * This MUST contain the full identifier, as submitted, for the + * transaction to query. + */ + TransactionID transactionID = 2; + + /** + * A flag to request duplicates. + *

      + * If set, every transaction record within the record cache duration that + * matches the requested transaction identifier SHALL be returned.
      + * If not set, duplicate transactions SHALL NOT be returned.
      + * If not set, only the record for the first matching transaction to + * reach consensus SHALL be returned. + */ + bool includeDuplicates = 3; + + /** + * A flag to request "child" records. + *

      + * If set, the response SHALL include records for each child transaction + * executed as part of the requested parent transaction.
      + * If not set, the response SHALL NOT include any records for child + * transactions. + */ + bool include_child_records = 4; +} + +/** + * Response message for a `getTxRecordByTxID` query. + * + * The `transactionRecord` field SHALL return the record for the "first" + * transaction that matches the transaction identifier requested.
      + * If records for duplicate transactions are requested, those duplicate + * records SHALL be present in the `duplicateTransactionReceipts` list.
      + * If records for child transactions are requested, those child records SHALL + * be present in the `child_transaction_records` list.
      + * A state proof MAY be provided for this response; provided the record is + * still available from the consensus nodes. + * + *

      + *
      What is the "first" transaction?
      + *
      The "first" transaction receipt SHALL be the receipt for the + * first transaction with status that is neither + * `INVALID_NODE_ACCOUNT` nor `INVALID_PAYER_SIGNATURE`.
      + * If no transaction is found meeting the status criteria, the + * "first" transaction SHALL be the first transaction by + * consensus time.
      + *
      What is a "child" transaction?
      + *
      A "child" transaction is any transaction created in the process of + * completing another transaction. These are most common with a smart + * contract call, where a call to a contract may initiate one or more + * additional transactions to complete a complex process.
      + *
      + * + */ +message TransactionGetRecordResponse { + /** + * The standard response information for queries.
      + * This includes the values requested in the `QueryHeader` + * (cost, state proof, both, or neither). + */ + ResponseHeader header = 1; + + /** + * A transaction record. + *

      + * This SHALL be the record for the "first" transaction that matches + * the transaction identifier requested.
      + * If the identified transaction has not reached consensus, this + * record SHALL have a `status` of `UNKNOWN`.
      + * If the identified transaction reached consensus prior to the + * current configured record cache duration, this record SHALL + * have a `status` of `UNKNOWN`. + */ + TransactionRecord transactionRecord = 3; + + /** + * A list of duplicate transaction records. + *

      + * If the request set the `includeDuplicates` flat, this list SHALL + * include the records for each duplicate transaction associated to the + * requested transaction identifier. + * If the request did not set the `includeDuplicates` flag, this list + * SHALL be empty.
      + * If the `transactionRecord` status is `UNKNOWN`, this list + * SHALL be empty.
      + * This list SHALL be in order by consensus timestamp. + */ + repeated TransactionRecord duplicateTransactionRecords = 4; + + /** + * A list of records for all child transactions spawned by the requested + * transaction. + *

      + * If the request set the `include_child_records` flag, this list SHALL + * include records for each child transaction executed as part of the + * requested parent transaction.
      + * If the request did not set the `include_child_records` flag, this + * list SHALL be empty.
      + * If the parent transaction did not initiate any child transactions + * this list SHALL be empty.
      + * If the `transactionRecord` status is `UNKNOWN`, this list + * SHALL be empty.
      + * This list SHALL be in order by consensus timestamp. + */ + repeated TransactionRecord child_transaction_records = 5; +} diff --git a/proto_src/services/transaction_receipt.proto b/proto_src/services/transaction_receipt.proto new file mode 100644 index 000000000..64e163c71 --- /dev/null +++ b/proto_src/services/transaction_receipt.proto @@ -0,0 +1,212 @@ +/** + * # Transaction Receipt + * The receipt returned when the results of a transaction are requested via + * `TransactionGetReceiptQuery`. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; +import "response_code.proto"; +import "exchange_rate.proto"; + +/** + * The summary of a transaction's result so far.
      + * If the transaction has not reached consensus, this result will + * be necessarily incomplete. + * + * Most items in this object are only set for specific transactions. + * Those values SHALL be unset for all other transactions. + */ +message TransactionReceipt { + /** + * The consensus status of the transaction. + *

      + * This SHALL be `UNKNOWN` if consensus has not been reached.
      + * This SHALL be `UNKNOWN` 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 for 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.
      + *

      + * The inputs to the topic running hash have changed over time.
      + * This 48-byte field is the output of a SHA-384 digest with input data + * determined by the value of the `topicRunningHashVersion` field.
      + * All new transactions SHALL use `topicRunningHashVersion` `3`.
      + * The bytes of each uint64 or uint32 encoded for the hash input MUST be + * in Big-Endian format. + *

      + *


      + *

      + * The most recent version is denoted by `topicRunningHashVersion = 3`. + *

      + * This version SHALL include, in order + *

        + *
      1. The previous running hash of the topic (48 bytes)
      2. + *
      3. The `topic_running_hash_version` field (8 bytes)
      4. + *
      5. The payer account's shard (8 bytes)
      6. + *
      7. The payer account's realm (8 bytes)
      8. + *
      9. The payer account's number (8 bytes)
      10. + *
      11. The topic's shard (8 bytes)
      12. + *
      13. The topic's realm (8 bytes)
      14. + *
      15. The topic's number (8 bytes)
      16. + *
      17. The number of seconds since the epoch when the + * `ConsensusSubmitMessage` reached consensus (8 bytes)
      18. + *
      19. The number of nanoseconds within the second when the + * `ConsensusSubmitMessage` reached consensus (4 bytes)
      20. + *
      21. The `topic_sequence_number` field (8 bytes)
      22. + *
      23. The output of a SHA-384 digest of the message bytes from the + * `ConsensusSubmitMessage` (48 bytes)
      24. + *
      + *
      + *

      + * The next older version is denoted by `topicRunningHashVersion = 2`. + *

      + * This version SHALL include, in order + *

        + *
      1. The previous running hash of the topic (48 bytes)
      2. + *
      3. The `topic_running_hash_version` field (8 bytes)
      4. + *
      5. The topic's shard (8 bytes)
      6. + *
      7. The topic's realm (8 bytes)
      8. + *
      9. The topic's number (8 bytes)
      10. + *
      11. The number of seconds since the epoch when the + * `ConsensusSubmitMessage` reached consensus (8 bytes)
      12. + *
      13. The number of nanoseconds within the second when the + * `ConsensusSubmitMessage` reached consensus (4 bytes)
      14. + *
      15. The `topic_sequence_number` field (8 bytes)
      16. + *
      17. The output of a SHA-384 digest of the message bytes from the + * `ConsensusSubmitMessage` (48 bytes)
      18. + *
      + *
      + *

      + * The original version, used at genesis, is denoted + * by `topicRunningHashVersion = 1` or `topicRunningHashVersion = 0`. + *

      + * This version SHALL include, in order + *

        + *
      1. The previous running hash of the topic (48 bytes)
      2. + *
      3. The topic's shard (8 bytes)
      4. + *
      5. The topic's realm (8 bytes)
      6. + *
      7. The topic's number (8 bytes)
      8. + *
      9. The number of seconds since the epoch when the + * `ConsensusSubmitMessage` reached consensus (8 bytes)
      10. + *
      11. The number of nanoseconds within the second when the + * `ConsensusSubmitMessage` reached consensus (4 bytes)
      12. + *
      13. The `topic_sequence_number` field (8 bytes)
      14. + *
      15. The message bytes from the `ConsensusSubmitMessage` + * (variable)
      16. + *
      + */ + bytes topicRunningHash = 8; + + /** + * In the receipt of a `ConsensusSubmitMessage`, the version of the + * SHA-384 digest inputs 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`, or `TokenBurn`.
      + * For non-unique tokens, the current total supply of that token.
      + * For unique tokens,the total number of NFTs issued for that 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 enables the + * scheduled transaction to execute immediately, the `TransactionID` that + * should be used to query for the receipt or record of the scheduled + * transaction that was executed. + */ + TransactionID scheduledTransactionID = 13; + + /** + * In the receipt of a `TokenMint` for non-fungible/unique tokens, + * the serial numbers of the newly created tokens. + */ + repeated int64 serialNumbers = 14; + + /** + * An affected node identifier.
      + * In the receipt of a NodeCreate, the id of the newly created node. + *

      + * This value SHALL be set following a `createNode` transaction.
      + * This value SHALL NOT be set following any other transaction. + */ + uint64 node_id = 15; +} diff --git a/proto_src/services/transaction_record.proto b/proto_src/services/transaction_record.proto new file mode 100644 index 000000000..5f966a00a --- /dev/null +++ b/proto_src/services/transaction_record.proto @@ -0,0 +1,248 @@ +/** + * # Transaction Record + * The record of a single transaction, including receipt and transaction + * results such as transfer lists, entropy, contract call result, etc...
      + * The record also includes fees, consensus time, EVM information, and + * other result metadata.
      + * Only values appropriate to the requested transaction are populated, all + * other fields will not be set (i.e. null or default values). + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "timestamp.proto"; +import "basic_types.proto"; +import "custom_fees.proto"; +import "transaction_receipt.proto"; +import "contract_types.proto"; + +/** + * Response when the client sends the node TransactionGetRecordResponse + */ +message TransactionRecord { + /** + * A transaction receipt. + *

      + * This SHALL report consensus status (reach consensus, failed, + * unknown) and the ID of any new entity (i.e. account, file, + * contract, schedule, etc...) created. + */ + TransactionReceipt receipt = 1; + + /** + * A transaction hash value. + *

      + * This SHALL be the hash of the Transaction that executed and + * SHALL NOT be the hash of any Transaction that failed for + * having a duplicate TransactionID. + */ + bytes transactionHash = 2; + + /** + * A consensus timestamp. + *

      + * This SHALL be null if the transaction did not reach consensus yet. + */ + Timestamp consensusTimestamp = 3; + + /** + * A transaction identifier to the transaction associated to this record. + */ + TransactionID transactionID = 4; + + /** + * A transaction memo.
      + * This is the memo that was submitted as part of the transaction. + *

      + * This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes` + * (default 100) bytes when encoded as UTF-8. + */ + string memo = 5; + + /** + * A transaction fee charged. + *

      + * This SHALL be the actual transaction fee charged.
      + * This MAY NOT match the original `transactionFee` value + * from the `TransactionBody`. + */ + uint64 transactionFee = 6; + + oneof body { + /** + * A contract call result.
      + * A record of the value returned by the smart contract function (if + * it completed and didn't fail) from a `ContractCallTransaction`. + */ + ContractFunctionResult contractCallResult = 7; + + /** + * A contract creation result.
      + * A record of the value returned by the smart contract constructor (if + * it completed and didn't fail) from a `ContractCreateTransaction`. + */ + ContractFunctionResult contractCreateResult = 8; + } + + /** + * A transfer list for this transaction.
      + * This is a list of all HBAR transfers completed for this transaction. + *

      + * This MAY include fees, transfers performed by the transaction, + * transfers initiated by a smart contract it calls, or the creation + * of threshold records that it triggers. + */ + TransferList transferList = 10; + + /** + * A token transfer list for this transaction.
      + * This is a list of all non-HBAR token transfers + * completed for this transaction.
      + */ + repeated TokenTransferList tokenTransferLists = 11; + + /** + * A schedule reference.
      + * The reference to a schedule ID for the schedule that initiated this + * transaction, if this this transaction record represents a scheduled + * transaction. + */ + ScheduleID scheduleRef = 12; + + /** + * A list of all custom fees that were assessed during a CryptoTransfer. + *

      + * These SHALL be paid if the transaction status resolved to SUCCESS. + */ + repeated AssessedCustomFee assessed_custom_fees = 13; + + /** + * A list of all token associations implicitly or automatically + * created while handling this transaction. + */ + repeated TokenAssociation automatic_token_associations = 14; + + /** + * A consensus timestamp for a child record. + *

      + * This SHALL be the consensus timestamp of a user transaction that + * spawned an internal child transaction. + */ + Timestamp parent_consensus_timestamp = 15; + + /** + * A new account alias.
      + *

      + * This is the new alias assigned to an account created as part + * of a CryptoCreate transaction triggered by a user transaction + * with a (previously unused) alias. + */ + bytes alias = 16; + + /** + * A keccak256 hash of the ethereumData. + *

      + * This field SHALL only be populated for EthereumTransaction. + */ + bytes ethereum_hash = 17; + + /** + * A list of staking rewards paid. + *

      + * This SHALL be a list accounts with the corresponding staking + * rewards paid as a result of this transaction. + */ + repeated AccountAmount paid_staking_rewards = 18; + + oneof entropy { + /** + * A pseudorandom 384-bit sequence. + *

      + * This SHALL be returned in the record of a UtilPrng transaction + * with no output range, + */ + bytes prng_bytes = 19; + + /** + * A pseudorandom 32-bit integer.
      + *

      + * This SHALL be returned in the record of a PRNG transaction with + * an output range specified. + */ + int32 prng_number = 20; + } + + /** + * A new default EVM address for an account created by + * this transaction. + *

      + * This field SHALL be populated only when the EVM address is not + * specified in the related transaction body. + */ + bytes evm_address = 21; + + /** + * A list of pending token airdrops. + *

      + * Each pending airdrop SHALL represent a single requested transfer + * from a sending account to a recipient account.
      + * These pending transfers are issued unilaterally by the sending + * account, and MUST be claimed by the recipient account before + * the transfer SHALL complete.
      + * A sender MAY cancel a pending airdrop before it is claimed.
      + * An airdrop transaction SHALL emit a pending airdrop when the + * recipient has no available automatic association slots available + * or when the recipient has set `receiver_sig_required`. + */ + repeated PendingAirdropRecord new_pending_airdrops = 22; +} + +/** + * A record of a new pending airdrop. + */ +message PendingAirdropRecord { + /** + * A unique, composite, identifier for a pending airdrop. + *

      + * This field is REQUIRED. + */ + PendingAirdropId pending_airdrop_id = 1; + + /** + * A single pending airdrop amount. + *

      + * If the pending airdrop is for a fungible/common token this field + * is REQUIRED and SHALL be the current amount of tokens offered.
      + * If the pending airdrop is for a non-fungible/unique token, + * this field SHALL NOT be set. + */ + PendingAirdropValue pending_airdrop_value = 2; +} diff --git a/proto_src/services/transaction_response.proto b/proto_src/services/transaction_response.proto new file mode 100644 index 000000000..8ec4e490a --- /dev/null +++ b/proto_src/services/transaction_response.proto @@ -0,0 +1,76 @@ +/** + * # Transaction Response + * Message(s) sent in response to submitting a transaction. + * The response(s) detailed here SHALL only represent that the transaction + * was received and checked by the single node to which it was submitted.
      + * To obtain the result from _network consensus_, a client MUST submit a + * `getTransactionReceipts` query. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "response_code.proto"; + +/** + * A message sent by a node in response to a transaction submission.
      + * This message only acknowledges that the individual node has checked + * the transaction, completed pre-check, and checked the fee offered. + * + * If the transaction fee is not sufficient, the `nodeTransactionPrecheckCode` + * value SHALL be `INSUFFICIENT_TX_FEE` and the `cost` field SHALL be the + * actual transaction fee, in tinybar, required.
      + * If the client requires acknowledgement of the network consensus result + * for a transaction, the client SHOULD request a transaction receipt or + * detailed transaction record. A client MAY also obtain network consensus + * results from a mirror node. + */ +message TransactionResponse { + /** + * A pre-consensus response code. + *

      + * This response SHALL represent the response of the individual node, and + * SHALL NOT represent the consensus of the network. + */ + ResponseCodeEnum nodeTransactionPrecheckCode = 1; + + /** + * An approximate transaction fee. + *

      + * This value SHALL be `0` unless the `nodeTransactionPrecheckCode` is + * `INSUFFICIENT_TX_FEE`.
      + * This value SHOULD be an amount, in tinybar, that _would have_ succeeded + * at the time the transaction was submitted.
      + * Note that this amount is not guaranteed to succeed in a future + * transaction due to uncontrolled variables, such as network congestion, + * but should be considered a close approximation. + */ + uint64 cost = 2; +} diff --git a/proto_src/services/unchecked_submit.proto b/proto_src/services/unchecked_submit.proto new file mode 100644 index 000000000..746c6ff7b --- /dev/null +++ b/proto_src/services/unchecked_submit.proto @@ -0,0 +1,61 @@ +/** + * # Unchecked Submit + * Submit a transaction to the network, bypassing all but the most minimal + * validation. + * + * > Important + * >> This transaction is obsolete and not supported.
      + * >> Any transaction of this type that is submitted SHALL fail with a + * >> `PRE_CHECK` result of `NOT_SUPPORTED`. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +/** + * Submit an arbitrary (serialized) Transaction to the network + * without pre-check. + * + * This transaction SHALL require `superuser` privileges + * (e.g. the `treasury` or `systemAdmin` accounts). + */ +message UncheckedSubmitBody { + option deprecated = true; + /** + * The serialized bytes of a `Transaction`. + *

      + * This transaction SHALL be deserialized and submitted for consensus + * with no further validation.
      + * Specifically, the transaction may violate basic limits and + * constraints such as size limits, minimum or maximum values, + * valid start time, fee calculations, etc... + */ + bytes transactionBytes = 1; +} diff --git a/proto_src/services/util_prng.proto b/proto_src/services/util_prng.proto new file mode 100644 index 000000000..1db5be023 --- /dev/null +++ b/proto_src/services/util_prng.proto @@ -0,0 +1,56 @@ +/** + * # Utility PRNG query + * A query to retrieve a deterministic pseudo-random value. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +/** + * Request a deterministic pseudo-random number. + * + * The value returned SHALL be deterministic, but not easily predicted. + * The value returned SHALL NOT be suitable for cryptographic use. + * + * ### Block Stream Effects + * The result of this transaction is reported in a `UtilPrngOutput` message. + */ +message UtilPrngTransactionBody { + /** + * A range for the requested value. + *

      + * If this is greater than `0`, the service SHALL return a 32-bit + * pseudo-random number between 0 and the value provided in the + * transaction record.
      + * If this is unset, zero, or negative; the service SHALL return a + * 384-bit unsigned pseudo-random number in the record. + */ + int32 range = 1; +} diff --git a/proto_src/services/util_service.proto b/proto_src/services/util_service.proto new file mode 100644 index 000000000..a2be64afb --- /dev/null +++ b/proto_src/services/util_service.proto @@ -0,0 +1,67 @@ +/** + * # Utility Service + * This service provides a transaction to generate a deterministic + * pseudo-random value, either a 32-bit integer within a requested range + * or a 384-bit byte array. + * + * ### Keywords + * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", + * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this + * document are to be interpreted as described in + * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in + * [RFC8174](https://www.ietf.org/rfc/rfc8174). + */ +syntax = "proto3"; + +package proto; + +/* + * Copyright (C) 2018-2024 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"; +// <<>> This comment is special code for setting PBJ Compiler java package + +import "transaction_response.proto"; +import "transaction.proto"; + +/** + * The Utility Service provides a pseudo-random number generator. + * + * The single gRPC call defined for this service simply reports a single + * pseudo-random number in the transaction record. That value may either + * be a 32-bit integer within a requested range, or a 384-bit byte array. + * + * ### Block Stream Effects + * The requested value is reported exclusively in a `UtilPrngOutput` message. + */ +service UtilService { + /** + * Generate a pseudo-random value. + *

      + * The request body MUST be a + * [UtilPrngTransactionBody](#proto.UtilPrngTransactionBody) + */ + rpc prng (Transaction) returns (TransactionResponse); + + + /** + * Execute a batch of transactions atomically. + *

      + * All transactions in the batch will be executed in order, and if any + * transaction fails, the entire batch will fail. + */ + rpc atomicBatch (Transaction) returns (TransactionResponse); +} diff --git a/proto_src/streams/account_balance_file.proto b/proto_src/streams/account_balance_file.proto new file mode 100644 index 000000000..093ac34fc --- /dev/null +++ b/proto_src/streams/account_balance_file.proto @@ -0,0 +1,80 @@ +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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; +import "timestamp.proto"; + +message TokenUnitBalance { + /** + * A unique token id + */ + TokenID tokenId = 1; + + /** + * Number of transferable units of the identified token. For token of type FUNGIBLE_COMMON - + * balance in the smallest denomination. For token of type NON_FUNGIBLE_UNIQUE - the number of + * NFTs held by the account + */ + uint64 balance = 2; +} + +/** + * Includes all currency balances (both hbar and token) of a single account in the ledger. + */ +message SingleAccountBalances { + /** + * The account + */ + AccountID accountID = 1; + + /** + * The account's hbar balance + */ + uint64 hbarBalance = 2; + + /** + * The list of the account's token balances + */ + repeated TokenUnitBalance tokenUnitBalances = 3; +} + +/** + * Includes all currency balances (both hbar and token) of all accounts in the ledger. + */ +message AllAccountBalances { + /** + * An instant in consensus time + */ + Timestamp consensusTimestamp = 1; + + /** + * The list of account balances for all accounts, after handling all transactions with consensus + * timestamp up to and including the above instant + */ + repeated SingleAccountBalances allAccounts = 2; +} diff --git a/proto_src/streams/contract_action.proto b/proto_src/streams/contract_action.proto new file mode 100644 index 000000000..f44ef878e --- /dev/null +++ b/proto_src/streams/contract_action.proto @@ -0,0 +1,212 @@ +syntax = "proto3"; + +package proto; + +/*- + * ‌ + * Hedera Network Services Protobuf + * ​ + * Copyright (C) 2018 - 2022 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; + + +message ContractActions { + repeated ContractAction contract_actions = 1; +} + +/** + * The type of action described by the action proto. + */ +enum ContractActionType { + /** + * default non-value. + */ + NO_ACTION = 0; + + /** + * Most CALL, CALLCODE, DELEGATECALL, and STATICCALL, and first action of ContractCall/ContractCallLocal to deployed + * contracts. This does not include calls to system or precompiled contracts. + */ + CALL = 1; + + /** + * CREATE, CREATE2, and first action of ContractCreate. + */ + + CREATE = 2; + + /** + * like Call, but to precompiled contracts (0x1 to 0x9 as of Berlin) + */ + PRECOMPILE = 3; + + /** + * Call, but to system contract like HTS or ERC20 facades over Token accounts + */ + SYSTEM = 4; +} + +/** + * The specific operation type of a call. The OP prefix has been added to avoid name collisions for + * the CALL and CREATE operation types since both ContractActionType and CallOperationType enums are + * used in ContractAction + */ +enum CallOperationType { + /** + * default operation type is UNKNOWN + */ + OP_UNKNOWN = 0; + + /** + * CALL operation type. + */ + OP_CALL = 1; + + /** + * CALLCODE operation type + */ + OP_CALLCODE = 2; + + /** + * DELEGATECALL operation type + */ + OP_DELEGATECALL = 3; + + /** + * STATICCALL operation type + */ + OP_STATICCALL = 4; + + /** + * CREATE operation type + */ + OP_CREATE = 5; + + /** + * CREATE2 operation type + */ + OP_CREATE2 = 6; +} + +/** + * A finer grained action with a function result. Sometimes called "internal transactions." The function call itself + * will be the first action in a list, followed by sub-action in the order they were executed. + */ +message ContractAction { + + /** + * The type of this action. + */ + ContractActionType call_type = 1; + + /** + * Only the first action can come from an account, the rest will come from contracts. Because of DELEGATECALL + * and CALLCODE the caller of actions whose parent is an account may also be an account. + */ + oneof caller { + /** + * If the caller was a regular account, the AccountID. + */ + AccountID calling_account = 2; + + /** + * If the caller was a smart contract account, the ContractID. + */ + ContractID calling_contract = 3; + } + + /** + * The upper limit of gas this action can spend. + */ + int64 gas = 4; + + /** + * Bytes passed in as input data to this action. + */ + bytes input = 5; + + /** + * Who this action is directed to. + */ + oneof recipient { + /** + * The AccountID of the recipient if the recipient is an account. Only HBars will be transferred, no other side + * effects should be expected. + */ + AccountID recipient_account = 6; + + /** + * The ContractID of the recipient if the recipient is a smart contract. + */ + ContractID recipient_contract = 7; + + /** + * The bytes of the targeted by the action address. + * Only set on failed executions. If set, denotes that the address did not + * correspond to any account or contract at the time of finalization of + * this action. + * An example would be a failed lazy create as per HIP-583. + */ + bytes targeted_address = 8; + } + + /** + * The value (in tinybars) that is associated with this action. + */ + int64 value = 9; + + /** + * The actual gas spent by this action. + */ + int64 gas_used = 10; + + /** + * The result data of the action. + */ + oneof result_data { + + /** + * If successful, the output bytes of the action. + */ + bytes output = 11; + + /** + * The contract itself caused the transaction to fail via the `REVERT` operation + */ + bytes revert_reason = 12; + + /** + * The transaction itself failed without an explicit `REVERT` + */ + bytes error = 13; + } + + /** + * The nesting depth of this call. The original action is at depth=0. + */ + int32 call_depth = 14; + + /** + * The call operation type + */ + CallOperationType call_operation_type = 15; +} diff --git a/proto_src/streams/contract_bytecode.proto b/proto_src/streams/contract_bytecode.proto new file mode 100644 index 000000000..02683c545 --- /dev/null +++ b/proto_src/streams/contract_bytecode.proto @@ -0,0 +1,46 @@ +syntax = "proto3"; + +package proto; + +/*- + * ‌ + * Hedera Network Services Protobuf + * ​ + * Copyright (C) 2018 - 2022 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; + +message ContractBytecode { + /** + * The contract to which the bytecodes apply to + */ + ContractID contract_id = 1; + + /** + * Contract bytecode during deployment + */ + bytes initcode = 2; + + /** + * Contract bytecode after deployment + */ + bytes runtime_bytecode = 3; +} diff --git a/proto_src/streams/contract_state_change.proto b/proto_src/streams/contract_state_change.proto new file mode 100644 index 000000000..42b14706b --- /dev/null +++ b/proto_src/streams/contract_state_change.proto @@ -0,0 +1,78 @@ +syntax = "proto3"; + +package proto; + +/*- + * ‌ + * Hedera Network Services Protobuf + * ​ + * Copyright (C) 2018 - 2022 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; + +import "google/protobuf/wrappers.proto"; + + +message ContractStateChanges { + repeated ContractStateChange contract_state_changes = 1; +} + +/** + * The storage changes to a smart contract's storage as a side effect of the function call. + */ +message ContractStateChange { + + /** + * The contract to which the storage changes apply to + */ + ContractID contract_id = 1; + + /** + * The list of storage changes. + */ + repeated StorageChange storage_changes = 2; +} + +/** + * A storage slot change description. + */ +message StorageChange { + /** + * The storage slot changed. Up to 32 bytes, big-endian, zero bytes left trimmed. + */ + bytes slot = 1; + + /** + * The value read from the storage slot. Up to 32 bytes, big-endian, zero bytes left trimmed. + * + * Because of the way SSTORE operations are charged the slot is always read before being written to. + */ + bytes value_read = 2; + + /** + * The new value written to the slot. Up to 32 bytes, big-endian, zero bytes left trimmed. + * + * If a value of zero is written the valueWritten will be present but the inner value will be absent. + * + * If a value was read and not written this value will not be present. + */ + google.protobuf.BytesValue value_written = 3; +} diff --git a/proto_src/streams/hash_object.proto b/proto_src/streams/hash_object.proto new file mode 100644 index 000000000..e6e304ba2 --- /dev/null +++ b/proto_src/streams/hash_object.proto @@ -0,0 +1,57 @@ +syntax = "proto3"; + +package proto; + +/*- + * ‌ + * Hedera Network Services Protobuf + * ​ + * Copyright (C) 2018 - 2022 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +/** + * List of hash algorithms + */ +enum HashAlgorithm { + HASH_ALGORITHM_UNKNOWN = 0; + SHA_384 = 1; +} + +/** + * Encapsulates an object hash so that additional hash algorithms + * can be added in the future without requiring a breaking change. + */ +message HashObject { + + /** + * Specifies the hashing algorithm + */ + HashAlgorithm algorithm = 1; + + /** + * Hash length + */ + int32 length = 2; + + /** + * Specifies the result of the hashing operation in bytes + */ + bytes hash = 3; +} diff --git a/proto_src/streams/record_stream_file.proto b/proto_src/streams/record_stream_file.proto new file mode 100644 index 000000000..217f95ae5 --- /dev/null +++ b/proto_src/streams/record_stream_file.proto @@ -0,0 +1,109 @@ +syntax = "proto3"; + +package proto; + +/*- + * ‌ + * Hedera Network Services Protobuf + * ​ + * Copyright (C) 2018 - 2022 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; +import "transaction.proto"; +import "transaction_record.proto"; +import "hash_object.proto"; + +/** + * RecordStreamFile is used to serialize all RecordStreamItems that are part of the + * same period into record stream files. + * This structure represents a block in Hedera (HIP-415). + */ +message RecordStreamFile { + /** + * Version of HAPI that was used to serialize the file. + */ + SemanticVersion hapi_proto_version = 1; + + /** + * Running Hash of all RecordStreamItems before writing this file. + */ + HashObject start_object_running_hash = 2; + + /** + * List of all the record stream items from that period. + */ + repeated RecordStreamItem record_stream_items = 3; + + /** + * Running Hash of all RecordStreamItems before closing this file. + */ + HashObject end_object_running_hash = 4; + + /** + * The block number associated with this period. + */ + int64 block_number = 5; + + /** + * List of the hashes of all the sidecar record files created for the same period. + * Allows multiple sidecar files to be linked to this RecordStreamFile. + */ + repeated SidecarMetadata sidecars = 6; +} + +/** + * A RecordStreamItem consists of a Transaction and a TransactionRecord, + * which are already defined protobuf messages. + */ +message RecordStreamItem { + Transaction transaction = 1; + TransactionRecord record = 2; +} + +/** + * Information about a single sidecar file. + */ +message SidecarMetadata { + /** + * The hash of the entire file. + */ + HashObject hash = 1; + + /** + * The id of the sidecar record file + */ + int32 id = 2; + + /** + * The types of sidecar records that will be included in the file. + */ + repeated SidecarType types = 3; +} + +/** + * The type of sidecar records contained in the sidecar record file + */ +enum SidecarType { + SIDECAR_TYPE_UNKNOWN = 0; + CONTRACT_STATE_CHANGE = 1; + CONTRACT_ACTION = 2; + CONTRACT_BYTECODE = 3; +} diff --git a/proto_src/streams/sidecar_file.proto b/proto_src/streams/sidecar_file.proto new file mode 100644 index 000000000..4b739a3c5 --- /dev/null +++ b/proto_src/streams/sidecar_file.proto @@ -0,0 +1,73 @@ +syntax = "proto3"; + +package proto; + +/*- + * ‌ + * Hedera Network Services Protobuf + * ​ + * Copyright (C) 2018 - 2022 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; +import "timestamp.proto"; +import "contract_state_change.proto"; +import "contract_action.proto"; +import "contract_bytecode.proto"; + +/** + * A SidecarFile contains a list of TransactionSidecarRecords that are all created + * in the same period and related to the same RecordStreamFile. + */ +message SidecarFile { + + /** + * List of sidecar records + */ + repeated TransactionSidecarRecord sidecar_records = 1; +} + +/** + * TransactionSidecarRecord is used to create sidecar records complementing + * TransactionRecord and storing additional information about a transaction's execution. + */ +message TransactionSidecarRecord { + /** + * Consensus timestamp will be the same as the consensus timestamp of the + * transaction the side car is related to. This offers a convenient + * way to match record to sidecar. + */ + Timestamp consensus_timestamp = 1; + + /** + * Whether sidecar is from migration. + */ + bool migration = 2; + + /* + * List of sidecar types. + * In future there will be other categories. + */ + oneof sidecar_records { + ContractStateChanges state_changes = 3; + ContractActions actions = 4; + ContractBytecode bytecode = 5; + } +} diff --git a/proto_src/streams/signature_file.proto b/proto_src/streams/signature_file.proto new file mode 100644 index 000000000..99f615562 --- /dev/null +++ b/proto_src/streams/signature_file.proto @@ -0,0 +1,85 @@ +syntax = "proto3"; + +package proto; + +/*- + * ‌ + * Hedera Network Services Protobuf + * ​ + * Copyright (C) 2018 - 2022 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"; +// <<>> This comment is special code for setting PBJ Compiler java package +option java_multiple_files = true; + +import "basic_types.proto"; +import "hash_object.proto"; + +/** + * The record signature file which is created for each record stream file + * that signs the hash of the entire corresponding stream file. + */ +message SignatureFile { + + /** + * Signature for the file + */ + SignatureObject file_signature = 1; + + /** + * Metadata signature + */ + SignatureObject metadata_signature = 2; +} + +/** + * A Signature defined by its type, length, checksum and signature bytes and the hash that is signed + */ +message SignatureObject { + /** + * The signature type + */ + SignatureType type = 1; + + /** + * Signature length + */ + int32 length = 2; + + /** + * Signature checksum + */ + int32 checksum = 3; + + /** + * Signature bytes + */ + bytes signature = 4; + + /** + * The hash that is signed by this signature + */ + HashObject hash_object = 5; +} + +/** + * The signature type + */ +enum SignatureType { + SIGNATURE_TYPE_UNKNOWN = 0; + SHA_384_WITH_RSA = 1; +} diff --git a/scripts/sync_proto.sh b/scripts/sync_proto.sh new file mode 100755 index 000000000..d838f8488 --- /dev/null +++ b/scripts/sync_proto.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash +set -euo pipefail + +echo "Syncing services protos..." + +rm -rf proto +mkdir -p proto + +cp -r proto_src/services/*.proto proto/ + +echo "Done." diff --git a/src/hiero_sdk_python/account/account_info.py b/src/hiero_sdk_python/account/account_info.py index e6844a9f8..6f61befcb 100644 --- a/src/hiero_sdk_python/account/account_info.py +++ b/src/hiero_sdk_python/account/account_info.py @@ -9,7 +9,7 @@ from hiero_sdk_python.account.account_id import AccountId from hiero_sdk_python.crypto.public_key import PublicKey from hiero_sdk_python.Duration import Duration -from hiero_sdk_python.hapi.services.basic_types_pb2 import StakingInfo +from hiero_sdk_python.staking_info import StakingInfo from hiero_sdk_python.hapi.services.crypto_get_info_pb2 import CryptoGetInfoResponse from hiero_sdk_python.hbar import Hbar from hiero_sdk_python.timestamp import Timestamp @@ -56,9 +56,8 @@ class AccountInfo: account_memo: Optional[str] = None owned_nfts: Optional[int] = None max_automatic_token_associations: Optional[int] = None - staked_account_id: Optional[AccountId] = None - staked_node_id: Optional[int] = None - decline_staking_reward: Optional[bool] = None + staking_info: Optional[StakingInfo] = None + @classmethod def _from_proto(cls, proto: CryptoGetInfoResponse.AccountInfo) -> "AccountInfo": @@ -100,20 +99,14 @@ def _from_proto(cls, proto: CryptoGetInfoResponse.AccountInfo) -> "AccountInfo": account_memo=proto.memo, owned_nfts=proto.ownedNfts, max_automatic_token_associations=proto.max_automatic_token_associations, + staking_info=( + StakingInfo._from_proto(proto.staking_info) + if proto.HasField("staking_info") + else None + ) ) - staking_info = proto.staking_info if proto.HasField('staking_info') else None - - if staking_info: - account_info.staked_account_id = ( - AccountId._from_proto(staking_info.staked_account_id) - if staking_info.HasField('staked_account_id') else None - ) - account_info.staked_node_id = ( - staking_info.staked_node_id - if staking_info.HasField('staked_node_id') else None - ) - account_info.decline_staking_reward = staking_info.decline_reward + return account_info @@ -147,11 +140,11 @@ def _to_proto(self) -> CryptoGetInfoResponse.AccountInfo: memo=self.account_memo, ownedNfts=self.owned_nfts, max_automatic_token_associations=self.max_automatic_token_associations, - staking_info=StakingInfo( - staked_account_id=self.staked_account_id._to_proto() if self.staked_account_id else None, - staked_node_id=self.staked_node_id if self.staked_node_id else None, - decline_reward=self.decline_staking_reward - ), + staking_info=( + self.staking_info._to_proto() + if self.staking_info is not None + else None + ), ) def __str__(self) -> str: @@ -166,8 +159,7 @@ def __str__(self) -> str: (self.account_memo, "Memo"), (self.owned_nfts, "Owned NFTs"), (self.max_automatic_token_associations, "Max Automatic Token Associations"), - (self.staked_account_id, "Staked Account ID"), - (self.staked_node_id, "Staked Node ID"), + (self.staking_info, "Staked Info"), (self.proxy_received, "Proxy Received"), (self.expiration_time, "Expiration Time"), (self.auto_renew_period, "Auto Renew Period"), @@ -182,9 +174,6 @@ def __str__(self) -> str: if self.receiver_signature_required is not None: lines.append(f"Receiver Signature Required: {self.receiver_signature_required}") - - if self.decline_staking_reward is not None: - lines.append(f"Decline Staking Reward: {self.decline_staking_reward}") if self.token_relationships: lines.append(f"Token Relationships: {len(self.token_relationships)}") @@ -202,7 +191,6 @@ def __repr__(self) -> str: f"receiver_signature_required={self.receiver_signature_required!r}, " f"owned_nfts={self.owned_nfts!r}, " f"account_memo={self.account_memo!r}, " - f"staked_node_id={self.staked_node_id!r}, " - f"staked_account_id={self.staked_account_id!r}" + f"staked_info={self.staking_info!r}, " f")" ) \ No newline at end of file diff --git a/src/hiero_sdk_python/hapi/__init__.py b/src/hiero_sdk_python/hapi/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/src/hiero_sdk_python/hapi/mirror/__init__.py b/src/hiero_sdk_python/hapi/mirror/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/src/hiero_sdk_python/hapi/mirror/consensus_service_pb2.py b/src/hiero_sdk_python/hapi/mirror/consensus_service_pb2.py new file mode 100644 index 000000000..75b069558 --- /dev/null +++ b/src/hiero_sdk_python/hapi/mirror/consensus_service_pb2.py @@ -0,0 +1,42 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: mirror/consensus_service.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'mirror/consensus_service.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from ..services import basic_types_pb2 as services_dot_basic__types__pb2 +from ..services import timestamp_pb2 as services_dot_timestamp__pb2 +from ..services import consensus_submit_message_pb2 as services_dot_consensus__submit__message__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1emirror/consensus_service.proto\x12\x1b\x63om.hedera.mirror.api.proto\x1a\x1aservices/basic_types.proto\x1a\x18services/timestamp.proto\x1a\'services/consensus_submit_message.proto\"\x9f\x01\n\x13\x43onsensusTopicQuery\x12\x1f\n\x07topicID\x18\x01 \x01(\x0b\x32\x0e.proto.TopicID\x12,\n\x12\x63onsensusStartTime\x18\x02 \x01(\x0b\x32\x10.proto.Timestamp\x12*\n\x10\x63onsensusEndTime\x18\x03 \x01(\x0b\x32\x10.proto.Timestamp\x12\r\n\x05limit\x18\x04 \x01(\x04\"\xd5\x01\n\x16\x43onsensusTopicResponse\x12,\n\x12\x63onsensusTimestamp\x18\x01 \x01(\x0b\x32\x10.proto.Timestamp\x12\x0f\n\x07message\x18\x02 \x01(\x0c\x12\x13\n\x0brunningHash\x18\x03 \x01(\x0c\x12\x16\n\x0esequenceNumber\x18\x04 \x01(\x04\x12\x1a\n\x12runningHashVersion\x18\x05 \x01(\x04\x12\x33\n\tchunkInfo\x18\x06 \x01(\x0b\x32 .proto.ConsensusMessageChunkInfo2\x8d\x01\n\x10\x43onsensusService\x12y\n\x0esubscribeTopic\x12\x30.com.hedera.mirror.api.proto.ConsensusTopicQuery\x1a\x33.com.hedera.mirror.api.proto.ConsensusTopicResponse0\x01\x42\x1f\n\x1b\x63om.hedera.mirror.api.protoP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'mirror.consensus_service_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\033com.hedera.mirror.api.protoP\001' + _globals['_CONSENSUSTOPICQUERY']._serialized_start=159 + _globals['_CONSENSUSTOPICQUERY']._serialized_end=318 + _globals['_CONSENSUSTOPICRESPONSE']._serialized_start=321 + _globals['_CONSENSUSTOPICRESPONSE']._serialized_end=534 + _globals['_CONSENSUSSERVICE']._serialized_start=537 + _globals['_CONSENSUSSERVICE']._serialized_end=678 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/mirror/consensus_service_pb2_grpc.py b/src/hiero_sdk_python/hapi/mirror/consensus_service_pb2_grpc.py new file mode 100644 index 000000000..231518329 --- /dev/null +++ b/src/hiero_sdk_python/hapi/mirror/consensus_service_pb2_grpc.py @@ -0,0 +1,105 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings +from . import consensus_service_pb2 as mirror_dot_consensus__service__pb2 + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in mirror/consensus_service_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) + + +class ConsensusServiceStub(object): + """* + The Mirror Service provides the ability to query a stream of Hedera Consensus Service (HCS) + messages for an HCS Topic via a specific (possibly open-ended) time range. + """ + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.subscribeTopic = channel.unary_stream( + '/com.hedera.mirror.api.proto.ConsensusService/subscribeTopic', + request_serializer=mirror_dot_consensus__service__pb2.ConsensusTopicQuery.SerializeToString, + response_deserializer=mirror_dot_consensus__service__pb2.ConsensusTopicResponse.FromString, + _registered_method=True) + + +class ConsensusServiceServicer(object): + """* + The Mirror Service provides the ability to query a stream of Hedera Consensus Service (HCS) + messages for an HCS Topic via a specific (possibly open-ended) time range. + """ + + def subscribeTopic(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_ConsensusServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'subscribeTopic': grpc.unary_stream_rpc_method_handler( + servicer.subscribeTopic, + request_deserializer=mirror_dot_consensus__service__pb2.ConsensusTopicQuery.FromString, + response_serializer=mirror_dot_consensus__service__pb2.ConsensusTopicResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'com.hedera.mirror.api.proto.ConsensusService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + server.add_registered_method_handlers('com.hedera.mirror.api.proto.ConsensusService', rpc_method_handlers) + + + # This class is part of an EXPERIMENTAL API. +class ConsensusService(object): + """* + The Mirror Service provides the ability to query a stream of Hedera Consensus Service (HCS) + messages for an HCS Topic via a specific (possibly open-ended) time range. + """ + + @staticmethod + def subscribeTopic(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_stream( + request, + target, + '/com.hedera.mirror.api.proto.ConsensusService/subscribeTopic', + mirror_dot_consensus__service__pb2.ConsensusTopicQuery.SerializeToString, + mirror_dot_consensus__service__pb2.ConsensusTopicResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) diff --git a/src/hiero_sdk_python/hapi/mirror/mirror_network_service_pb2.py b/src/hiero_sdk_python/hapi/mirror/mirror_network_service_pb2.py new file mode 100644 index 000000000..3bf09a57d --- /dev/null +++ b/src/hiero_sdk_python/hapi/mirror/mirror_network_service_pb2.py @@ -0,0 +1,39 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: mirror/mirror_network_service.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'mirror/mirror_network_service.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from ..services import basic_types_pb2 as services_dot_basic__types__pb2 +from ..services import timestamp_pb2 as services_dot_timestamp__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n#mirror/mirror_network_service.proto\x12\x1b\x63om.hedera.mirror.api.proto\x1a\x1aservices/basic_types.proto\x1a\x18services/timestamp.proto\"A\n\x10\x41\x64\x64ressBookQuery\x12\x1e\n\x07\x66ile_id\x18\x01 \x01(\x0b\x32\r.proto.FileID\x12\r\n\x05limit\x18\x02 \x01(\x05\x32\x61\n\x0eNetworkService\x12O\n\x08getNodes\x12-.com.hedera.mirror.api.proto.AddressBookQuery\x1a\x12.proto.NodeAddress0\x01\x42\x1f\n\x1b\x63om.hedera.mirror.api.protoP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'mirror.mirror_network_service_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\033com.hedera.mirror.api.protoP\001' + _globals['_ADDRESSBOOKQUERY']._serialized_start=122 + _globals['_ADDRESSBOOKQUERY']._serialized_end=187 + _globals['_NETWORKSERVICE']._serialized_start=189 + _globals['_NETWORKSERVICE']._serialized_end=286 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/mirror/mirror_network_service_pb2_grpc.py b/src/hiero_sdk_python/hapi/mirror/mirror_network_service_pb2_grpc.py new file mode 100644 index 000000000..16272133b --- /dev/null +++ b/src/hiero_sdk_python/hapi/mirror/mirror_network_service_pb2_grpc.py @@ -0,0 +1,107 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings +from . import mirror_network_service_pb2 as mirror_dot_mirror__network__service__pb2 +from ..services import basic_types_pb2 as services_dot_basic__types__pb2 + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in mirror/mirror_network_service_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) + + +class NetworkServiceStub(object): + """* + Provides cross network APIs like address book queries + """ + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.getNodes = channel.unary_stream( + '/com.hedera.mirror.api.proto.NetworkService/getNodes', + request_serializer=mirror_dot_mirror__network__service__pb2.AddressBookQuery.SerializeToString, + response_deserializer=services_dot_basic__types__pb2.NodeAddress.FromString, + _registered_method=True) + + +class NetworkServiceServicer(object): + """* + Provides cross network APIs like address book queries + """ + + def getNodes(self, request, context): + """ + Query for an address book and return its nodes. The nodes are returned in ascending order by node ID. The + response is not guaranteed to be a byte-for-byte equivalent to the NodeAddress in the Hedera file on + the network since it is reconstructed from a normalized database table. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_NetworkServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'getNodes': grpc.unary_stream_rpc_method_handler( + servicer.getNodes, + request_deserializer=mirror_dot_mirror__network__service__pb2.AddressBookQuery.FromString, + response_serializer=services_dot_basic__types__pb2.NodeAddress.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'com.hedera.mirror.api.proto.NetworkService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + server.add_registered_method_handlers('com.hedera.mirror.api.proto.NetworkService', rpc_method_handlers) + + + # This class is part of an EXPERIMENTAL API. +class NetworkService(object): + """* + Provides cross network APIs like address book queries + """ + + @staticmethod + def getNodes(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_stream( + request, + target, + '/com.hedera.mirror.api.proto.NetworkService/getNodes', + mirror_dot_mirror__network__service__pb2.AddressBookQuery.SerializeToString, + services_dot_basic__types__pb2.NodeAddress.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) diff --git a/src/hiero_sdk_python/hapi/platform/__init__.py b/src/hiero_sdk_python/hapi/platform/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/src/hiero_sdk_python/hapi/platform/event/__init__.py b/src/hiero_sdk_python/hapi/platform/event/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/src/hiero_sdk_python/hapi/platform/event/event_consensus_data_pb2.py b/src/hiero_sdk_python/hapi/platform/event/event_consensus_data_pb2.py new file mode 100644 index 000000000..eb53ecb1c --- /dev/null +++ b/src/hiero_sdk_python/hapi/platform/event/event_consensus_data_pb2.py @@ -0,0 +1,38 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: platform/event/event_consensus_data.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'platform/event/event_consensus_data.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from ...services import basic_types_pb2 as services_dot_basic__types__pb2 +from . import event_descriptor_pb2 as platform_dot_event_dot_event__descriptor__pb2 +from ...services import timestamp_pb2 as services_dot_timestamp__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n)platform/event/event_consensus_data.proto\x12\x1e\x63om.hedera.hapi.platform.event\x1a\x1aservices/basic_types.proto\x1a%platform/event/event_descriptor.proto\x1a\x18services/timestamp.proto\"\\\n\x12\x45ventConsensusData\x12-\n\x13\x63onsensus_timestamp\x18\x01 \x01(\x0b\x32\x10.proto.Timestamp\x12\x17\n\x0f\x63onsensus_order\x18\x02 \x01(\x04\x42)\n%com.hedera.hapi.platform.event.legacyP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'platform.event.event_consensus_data_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n%com.hedera.hapi.platform.event.legacyP\001' + _globals['_EVENTCONSENSUSDATA']._serialized_start=170 + _globals['_EVENTCONSENSUSDATA']._serialized_end=262 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/platform/event/event_consensus_data_pb2.pyi b/src/hiero_sdk_python/hapi/platform/event/event_consensus_data_pb2.pyi new file mode 100644 index 000000000..5aea5d9b8 --- /dev/null +++ b/src/hiero_sdk_python/hapi/platform/event/event_consensus_data_pb2.pyi @@ -0,0 +1,17 @@ +from ...services import basic_types_pb2 as _basic_types_pb2 +from . import event_descriptor_pb2 as _event_descriptor_pb2 +from ...services import timestamp_pb2 as _timestamp_pb2 +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class EventConsensusData(_message.Message): + __slots__ = ("consensus_timestamp", "consensus_order") + CONSENSUS_TIMESTAMP_FIELD_NUMBER: _ClassVar[int] + CONSENSUS_ORDER_FIELD_NUMBER: _ClassVar[int] + consensus_timestamp: _timestamp_pb2.Timestamp + consensus_order: int + def __init__(self, consensus_timestamp: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., consensus_order: _Optional[int] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/platform/event/event_consensus_data_pb2_grpc.py b/src/hiero_sdk_python/hapi/platform/event/event_consensus_data_pb2_grpc.py new file mode 100644 index 000000000..3b8b3f9e4 --- /dev/null +++ b/src/hiero_sdk_python/hapi/platform/event/event_consensus_data_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in platform/event/event_consensus_data_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/platform/event/event_core_pb2.py b/src/hiero_sdk_python/hapi/platform/event/event_core_pb2.py new file mode 100644 index 000000000..21c1c0cc7 --- /dev/null +++ b/src/hiero_sdk_python/hapi/platform/event/event_core_pb2.py @@ -0,0 +1,40 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: platform/event/event_core.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'platform/event/event_core.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from ...services import basic_types_pb2 as services_dot_basic__types__pb2 +from . import event_descriptor_pb2 as platform_dot_event_dot_event__descriptor__pb2 +from ...services import timestamp_pb2 as services_dot_timestamp__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1fplatform/event/event_core.proto\x12\x1e\x63om.hedera.hapi.platform.event\x1a\x1aservices/basic_types.proto\x1a%platform/event/event_descriptor.proto\x1a\x18services/timestamp.proto\"\xd0\x01\n\tEventCore\x12\x17\n\x0f\x63reator_node_id\x18\x01 \x01(\x03\x12\x13\n\x0b\x62irth_round\x18\x02 \x01(\x03\x12&\n\x0ctime_created\x18\x03 \x01(\x0b\x32\x10.proto.Timestamp\x12\x44\n\x07parents\x18\x04 \x03(\x0b\x32/.com.hedera.hapi.platform.event.EventDescriptorB\x02\x18\x01\x12\'\n\x07version\x18\x11 \x01(\x0b\x32\x16.proto.SemanticVersionB)\n%com.hedera.hapi.platform.event.legacyP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'platform.event.event_core_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n%com.hedera.hapi.platform.event.legacyP\001' + _globals['_EVENTCORE'].fields_by_name['parents']._loaded_options = None + _globals['_EVENTCORE'].fields_by_name['parents']._serialized_options = b'\030\001' + _globals['_EVENTCORE']._serialized_start=161 + _globals['_EVENTCORE']._serialized_end=369 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/platform/event/event_core_pb2.pyi b/src/hiero_sdk_python/hapi/platform/event/event_core_pb2.pyi new file mode 100644 index 000000000..8230b78e3 --- /dev/null +++ b/src/hiero_sdk_python/hapi/platform/event/event_core_pb2.pyi @@ -0,0 +1,24 @@ +from ...services import basic_types_pb2 as _basic_types_pb2 +from . import event_descriptor_pb2 as _event_descriptor_pb2 +from ...services import timestamp_pb2 as _timestamp_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Iterable as _Iterable, Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class EventCore(_message.Message): + __slots__ = ("creator_node_id", "birth_round", "time_created", "parents", "version") + CREATOR_NODE_ID_FIELD_NUMBER: _ClassVar[int] + BIRTH_ROUND_FIELD_NUMBER: _ClassVar[int] + TIME_CREATED_FIELD_NUMBER: _ClassVar[int] + PARENTS_FIELD_NUMBER: _ClassVar[int] + VERSION_FIELD_NUMBER: _ClassVar[int] + creator_node_id: int + birth_round: int + time_created: _timestamp_pb2.Timestamp + parents: _containers.RepeatedCompositeFieldContainer[_event_descriptor_pb2.EventDescriptor] + version: _basic_types_pb2.SemanticVersion + def __init__(self, creator_node_id: _Optional[int] = ..., birth_round: _Optional[int] = ..., time_created: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., parents: _Optional[_Iterable[_Union[_event_descriptor_pb2.EventDescriptor, _Mapping]]] = ..., version: _Optional[_Union[_basic_types_pb2.SemanticVersion, _Mapping]] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/platform/event/event_core_pb2_grpc.py b/src/hiero_sdk_python/hapi/platform/event/event_core_pb2_grpc.py new file mode 100644 index 000000000..ef4079070 --- /dev/null +++ b/src/hiero_sdk_python/hapi/platform/event/event_core_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in platform/event/event_core_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/platform/event/event_descriptor_pb2.py b/src/hiero_sdk_python/hapi/platform/event/event_descriptor_pb2.py new file mode 100644 index 000000000..709abef19 --- /dev/null +++ b/src/hiero_sdk_python/hapi/platform/event/event_descriptor_pb2.py @@ -0,0 +1,37 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: platform/event/event_descriptor.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'platform/event/event_descriptor.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n%platform/event/event_descriptor.proto\x12\x1e\x63om.hedera.hapi.platform.event\"a\n\x0f\x45ventDescriptor\x12\x0c\n\x04hash\x18\x01 \x01(\x0c\x12\x17\n\x0f\x63reator_node_id\x18\x02 \x01(\x03\x12\x13\n\x0b\x62irth_round\x18\x03 \x01(\x03\x12\x12\n\ngeneration\x18\x11 \x01(\x03\x42)\n%com.hedera.hapi.platform.event.legacyP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'platform.event.event_descriptor_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n%com.hedera.hapi.platform.event.legacyP\001' + _globals['_EVENTDESCRIPTOR']._serialized_start=73 + _globals['_EVENTDESCRIPTOR']._serialized_end=170 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/platform/event/event_descriptor_pb2.pyi b/src/hiero_sdk_python/hapi/platform/event/event_descriptor_pb2.pyi new file mode 100644 index 000000000..ff32c7343 --- /dev/null +++ b/src/hiero_sdk_python/hapi/platform/event/event_descriptor_pb2.pyi @@ -0,0 +1,17 @@ +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Optional as _Optional + +DESCRIPTOR: _descriptor.FileDescriptor + +class EventDescriptor(_message.Message): + __slots__ = ("hash", "creator_node_id", "birth_round", "generation") + HASH_FIELD_NUMBER: _ClassVar[int] + CREATOR_NODE_ID_FIELD_NUMBER: _ClassVar[int] + BIRTH_ROUND_FIELD_NUMBER: _ClassVar[int] + GENERATION_FIELD_NUMBER: _ClassVar[int] + hash: bytes + creator_node_id: int + birth_round: int + generation: int + def __init__(self, hash: _Optional[bytes] = ..., creator_node_id: _Optional[int] = ..., birth_round: _Optional[int] = ..., generation: _Optional[int] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/platform/event/event_descriptor_pb2_grpc.py b/src/hiero_sdk_python/hapi/platform/event/event_descriptor_pb2_grpc.py new file mode 100644 index 000000000..958f5964b --- /dev/null +++ b/src/hiero_sdk_python/hapi/platform/event/event_descriptor_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in platform/event/event_descriptor_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/platform/event/event_transaction_pb2.py b/src/hiero_sdk_python/hapi/platform/event/event_transaction_pb2.py new file mode 100644 index 000000000..9f4284d99 --- /dev/null +++ b/src/hiero_sdk_python/hapi/platform/event/event_transaction_pb2.py @@ -0,0 +1,38 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: platform/event/event_transaction.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'platform/event/event_transaction.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import state_signature_transaction_pb2 as platform_dot_event_dot_state__signature__transaction__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n&platform/event/event_transaction.proto\x12\x1e\x63om.hedera.hapi.platform.event\x1a\x30platform/event/state_signature_transaction.proto\"\xfc\x01\n\x10\x45ventTransaction\x12!\n\x17\x61pplication_transaction\x18\x01 \x01(\x0cH\x00\x12`\n\x1bstate_signature_transaction\x18\x02 \x01(\x0b\x32\x39.com.hedera.hapi.platform.event.StateSignatureTransactionH\x00\x12T\n\x16transaction_group_role\x18\x03 \x01(\x0e\x32\x34.com.hedera.hapi.platform.event.TransactionGroupRoleB\r\n\x0btransaction*\x8d\x01\n\x14TransactionGroupRole\x12\x0e\n\nSTANDALONE\x10\x00\x12\x0f\n\x0b\x46IRST_CHILD\x10\x01\x12\x10\n\x0cMIDDLE_CHILD\x10\x02\x12\x0e\n\nLAST_CHILD\x10\x03\x12\x13\n\x0fSTARTING_PARENT\x10\x04\x12\n\n\x06PARENT\x10\x05\x12\x11\n\rENDING_PARENT\x10\x06\x42)\n%com.hedera.hapi.platform.event.legacyP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'platform.event.event_transaction_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n%com.hedera.hapi.platform.event.legacyP\001' + _globals['_TRANSACTIONGROUPROLE']._serialized_start=380 + _globals['_TRANSACTIONGROUPROLE']._serialized_end=521 + _globals['_EVENTTRANSACTION']._serialized_start=125 + _globals['_EVENTTRANSACTION']._serialized_end=377 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/platform/event/event_transaction_pb2.pyi b/src/hiero_sdk_python/hapi/platform/event/event_transaction_pb2.pyi new file mode 100644 index 000000000..bb63d0a64 --- /dev/null +++ b/src/hiero_sdk_python/hapi/platform/event/event_transaction_pb2.pyi @@ -0,0 +1,35 @@ +from . import state_signature_transaction_pb2 as _state_signature_transaction_pb2 +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class TransactionGroupRole(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = () + STANDALONE: _ClassVar[TransactionGroupRole] + FIRST_CHILD: _ClassVar[TransactionGroupRole] + MIDDLE_CHILD: _ClassVar[TransactionGroupRole] + LAST_CHILD: _ClassVar[TransactionGroupRole] + STARTING_PARENT: _ClassVar[TransactionGroupRole] + PARENT: _ClassVar[TransactionGroupRole] + ENDING_PARENT: _ClassVar[TransactionGroupRole] +STANDALONE: TransactionGroupRole +FIRST_CHILD: TransactionGroupRole +MIDDLE_CHILD: TransactionGroupRole +LAST_CHILD: TransactionGroupRole +STARTING_PARENT: TransactionGroupRole +PARENT: TransactionGroupRole +ENDING_PARENT: TransactionGroupRole + +class EventTransaction(_message.Message): + __slots__ = ("application_transaction", "state_signature_transaction", "transaction_group_role") + APPLICATION_TRANSACTION_FIELD_NUMBER: _ClassVar[int] + STATE_SIGNATURE_TRANSACTION_FIELD_NUMBER: _ClassVar[int] + TRANSACTION_GROUP_ROLE_FIELD_NUMBER: _ClassVar[int] + application_transaction: bytes + state_signature_transaction: _state_signature_transaction_pb2.StateSignatureTransaction + transaction_group_role: TransactionGroupRole + def __init__(self, application_transaction: _Optional[bytes] = ..., state_signature_transaction: _Optional[_Union[_state_signature_transaction_pb2.StateSignatureTransaction, _Mapping]] = ..., transaction_group_role: _Optional[_Union[TransactionGroupRole, str]] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/platform/event/event_transaction_pb2_grpc.py b/src/hiero_sdk_python/hapi/platform/event/event_transaction_pb2_grpc.py new file mode 100644 index 000000000..dcd3abb75 --- /dev/null +++ b/src/hiero_sdk_python/hapi/platform/event/event_transaction_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in platform/event/event_transaction_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/platform/event/gossip_event_pb2.py b/src/hiero_sdk_python/hapi/platform/event/gossip_event_pb2.py new file mode 100644 index 000000000..d86230710 --- /dev/null +++ b/src/hiero_sdk_python/hapi/platform/event/gossip_event_pb2.py @@ -0,0 +1,37 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: platform/event/gossip_event.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'platform/event/gossip_event.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import event_core_pb2 as platform_dot_event_dot_event__core__pb2 +from . import event_descriptor_pb2 as platform_dot_event_dot_event__descriptor__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!platform/event/gossip_event.proto\x12\x1e\x63om.hedera.hapi.platform.event\x1a\x1fplatform/event/event_core.proto\x1a%platform/event/event_descriptor.proto\"\xbd\x01\n\x0bGossipEvent\x12=\n\nevent_core\x18\x01 \x01(\x0b\x32).com.hedera.hapi.platform.event.EventCore\x12\x11\n\tsignature\x18\x02 \x01(\x0c\x12\x14\n\x0ctransactions\x18\x04 \x03(\x0c\x12@\n\x07parents\x18\x05 \x03(\x0b\x32/.com.hedera.hapi.platform.event.EventDescriptorJ\x04\x08\x03\x10\x04\x42)\n%com.hedera.hapi.platform.event.legacyP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'platform.event.gossip_event_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n%com.hedera.hapi.platform.event.legacyP\001' + _globals['_GOSSIPEVENT']._serialized_start=142 + _globals['_GOSSIPEVENT']._serialized_end=331 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/platform/event/gossip_event_pb2.pyi b/src/hiero_sdk_python/hapi/platform/event/gossip_event_pb2.pyi new file mode 100644 index 000000000..7c2bb90ae --- /dev/null +++ b/src/hiero_sdk_python/hapi/platform/event/gossip_event_pb2.pyi @@ -0,0 +1,21 @@ +from . import event_core_pb2 as _event_core_pb2 +from . import event_descriptor_pb2 as _event_descriptor_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Iterable as _Iterable, Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class GossipEvent(_message.Message): + __slots__ = ("event_core", "signature", "transactions", "parents") + EVENT_CORE_FIELD_NUMBER: _ClassVar[int] + SIGNATURE_FIELD_NUMBER: _ClassVar[int] + TRANSACTIONS_FIELD_NUMBER: _ClassVar[int] + PARENTS_FIELD_NUMBER: _ClassVar[int] + event_core: _event_core_pb2.EventCore + signature: bytes + transactions: _containers.RepeatedScalarFieldContainer[bytes] + parents: _containers.RepeatedCompositeFieldContainer[_event_descriptor_pb2.EventDescriptor] + def __init__(self, event_core: _Optional[_Union[_event_core_pb2.EventCore, _Mapping]] = ..., signature: _Optional[bytes] = ..., transactions: _Optional[_Iterable[bytes]] = ..., parents: _Optional[_Iterable[_Union[_event_descriptor_pb2.EventDescriptor, _Mapping]]] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/platform/event/gossip_event_pb2_grpc.py b/src/hiero_sdk_python/hapi/platform/event/gossip_event_pb2_grpc.py new file mode 100644 index 000000000..fe17c3299 --- /dev/null +++ b/src/hiero_sdk_python/hapi/platform/event/gossip_event_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in platform/event/gossip_event_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/platform/event/state_signature_transaction_pb2.py b/src/hiero_sdk_python/hapi/platform/event/state_signature_transaction_pb2.py new file mode 100644 index 000000000..e84b58b29 --- /dev/null +++ b/src/hiero_sdk_python/hapi/platform/event/state_signature_transaction_pb2.py @@ -0,0 +1,37 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: platform/event/state_signature_transaction.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'platform/event/state_signature_transaction.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n0platform/event/state_signature_transaction.proto\x12\x1e\x63om.hedera.hapi.platform.event\"K\n\x19StateSignatureTransaction\x12\r\n\x05round\x18\x01 \x01(\x03\x12\x11\n\tsignature\x18\x02 \x01(\x0c\x12\x0c\n\x04hash\x18\x03 \x01(\x0c\x42)\n%com.hedera.hapi.platform.event.legacyP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'platform.event.state_signature_transaction_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n%com.hedera.hapi.platform.event.legacyP\001' + _globals['_STATESIGNATURETRANSACTION']._serialized_start=84 + _globals['_STATESIGNATURETRANSACTION']._serialized_end=159 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/platform/event/state_signature_transaction_pb2.pyi b/src/hiero_sdk_python/hapi/platform/event/state_signature_transaction_pb2.pyi new file mode 100644 index 000000000..5e457a27d --- /dev/null +++ b/src/hiero_sdk_python/hapi/platform/event/state_signature_transaction_pb2.pyi @@ -0,0 +1,15 @@ +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Optional as _Optional + +DESCRIPTOR: _descriptor.FileDescriptor + +class StateSignatureTransaction(_message.Message): + __slots__ = ("round", "signature", "hash") + ROUND_FIELD_NUMBER: _ClassVar[int] + SIGNATURE_FIELD_NUMBER: _ClassVar[int] + HASH_FIELD_NUMBER: _ClassVar[int] + round: int + signature: bytes + hash: bytes + def __init__(self, round: _Optional[int] = ..., signature: _Optional[bytes] = ..., hash: _Optional[bytes] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/platform/event/state_signature_transaction_pb2_grpc.py b/src/hiero_sdk_python/hapi/platform/event/state_signature_transaction_pb2_grpc.py new file mode 100644 index 000000000..3a26cd459 --- /dev/null +++ b/src/hiero_sdk_python/hapi/platform/event/state_signature_transaction_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in platform/event/state_signature_transaction_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/__init__.py b/src/hiero_sdk_python/hapi/services/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/src/hiero_sdk_python/hapi/services/address_book_service_pb2.py b/src/hiero_sdk_python/hapi/services/address_book_service_pb2.py new file mode 100644 index 000000000..475544697 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/address_book_service_pb2.py @@ -0,0 +1,35 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/address_book_service.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/address_book_service.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import transaction_response_pb2 as services_dot_transaction__response__pb2 +from . import transaction_pb2 as services_dot_transaction__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n#services/address_book_service.proto\x12\x05proto\x1a#services/transaction_response.proto\x1a\x1aservices/transaction.proto2\xce\x01\n\x12\x41\x64\x64ressBookService\x12<\n\ncreateNode\x12\x12.proto.Transaction\x1a\x1a.proto.TransactionResponse\x12<\n\ndeleteNode\x12\x12.proto.Transaction\x1a\x1a.proto.TransactionResponse\x12<\n\nupdateNode\x12\x12.proto.Transaction\x1a\x1a.proto.TransactionResponseB(\n&com.hederahashgraph.service.proto.javab\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.address_book_service_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n&com.hederahashgraph.service.proto.java' + _globals['_ADDRESSBOOKSERVICE']._serialized_start=112 + _globals['_ADDRESSBOOKSERVICE']._serialized_end=318 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/address_book_service_pb2.pyi b/src/hiero_sdk_python/hapi/services/address_book_service_pb2.pyi new file mode 100644 index 000000000..4119f125c --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/address_book_service_pb2.pyi @@ -0,0 +1,6 @@ +from . import transaction_response_pb2 as _transaction_response_pb2 +from . import transaction_pb2 as _transaction_pb2 +from google.protobuf import descriptor as _descriptor +from typing import ClassVar as _ClassVar + +DESCRIPTOR: _descriptor.FileDescriptor diff --git a/src/hiero_sdk_python/hapi/services/address_book_service_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/address_book_service_pb2_grpc.py new file mode 100644 index 000000000..3924804ab --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/address_book_service_pb2_grpc.py @@ -0,0 +1,442 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings +from . import transaction_pb2 as services_dot_transaction__pb2 +from . import transaction_response_pb2 as services_dot_transaction__response__pb2 +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/address_book_service_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) + + +class AddressBookServiceStub(object): + """* + The Address Book service provides the ability for Hedera network node + administrators to add, update, and remove consensus nodes. This addition, + update, or removal of a consensus node requires governing council approval, + but each node operator may update their own operational attributes without + additional approval, reducing overhead for routine operations. + + Most operations are `privileged operations` and require governing council + approval. + + ### For a node creation transaction. + - The node operator SHALL create a `createNode` transaction. + - The node operator MUST sign this transaction with the `Key` + set as the `admin_key` for the new `Node`. + - The node operator SHALL deliver the signed transaction to the Hedera + council representative. + - The Hedera council representative SHALL arrange for council members to + review and sign the transaction. + - Once sufficient council members have signed the transaction, the + Hedera council representative SHALL submit the transaction to the + network. + - Upon receipt of a valid and signed node creation transaction the network + software SHALL + - Validate the threshold signature for the Hedera governing council + - Validate the signature of the `Key` provided as the new `admin_key` + for the `Node`. + - Create the new node in state, this new node SHALL NOT be active in the + network at this time. + - When executing the next `freeze` transaction with `freeze_type` set to + `PREPARE_UPGRADE`, update network configuration and bring the + new node to an active status within the network. The node to be added + SHALL be active in the network following this upgrade. + + ### For a node deletion transaction. + - The node operator or Hedera council representative SHALL create a + `deleteNode` transaction. + - If the node operator creates the transaction + - The node operator MUST sign this transaction with the `Key` + set as the `admin_key` for the existing `Node`. + - The node operator SHALL deliver the signed transaction to the Hedera + council representative. + - The Hedera council representative SHALL arrange for council members to + review and sign the transaction. + - Once sufficient council members have signed the transaction, the + Hedera council representative SHALL submit the transaction to the + network. + - Upon receipt of a valid and signed node deletion transaction the network + software SHALL + - Validate the signature for the Hedera governing council + - Remove the existing node from network state. The node SHALL still + be active in the network at this time. + - When executing the next `freeze` transaction with `freeze_type` set to + `PREPARE_UPGRADE`, update network configuration and remove the + node to be deleted from the network. The node to be deleted SHALL NOT + be active in the network following this upgrade. + + ### For a node update transaction. + - The node operator SHALL create an `updateNode` transaction. + - The node operator MUST sign this transaction with the active `key` + assigned as the `admin_key`. + - The node operator SHALL submit the transaction to the + network. Hedera council approval SHALL NOT be sought for this + transaction + - Upon receipt of a valid and signed node update transaction the network + software SHALL + - If the transaction modifies the value of the "node account", + - Validate the signature of the active `key` for the account + assigned as the _current_ "node account". + - Validate the signature of the active `key` for the account to be + assigned as the _new_ "node account". + - Modify the node information held in network state with the changes + requested in the update transaction. The node changes SHALL NOT be + applied to network configuration, and SHALL NOT affect network + operation at this time. + - When executing the next `freeze` transaction with `freeze_type` set to + `PREPARE_UPGRADE`, update network configuration according to the + modified information in network state. The requested changes SHALL + affect network operation following this upgrade. + """ + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.createNode = channel.unary_unary( + '/proto.AddressBookService/createNode', + request_serializer=services_dot_transaction__pb2.Transaction.SerializeToString, + response_deserializer=services_dot_transaction__response__pb2.TransactionResponse.FromString, + _registered_method=True) + self.deleteNode = channel.unary_unary( + '/proto.AddressBookService/deleteNode', + request_serializer=services_dot_transaction__pb2.Transaction.SerializeToString, + response_deserializer=services_dot_transaction__response__pb2.TransactionResponse.FromString, + _registered_method=True) + self.updateNode = channel.unary_unary( + '/proto.AddressBookService/updateNode', + request_serializer=services_dot_transaction__pb2.Transaction.SerializeToString, + response_deserializer=services_dot_transaction__response__pb2.TransactionResponse.FromString, + _registered_method=True) + + +class AddressBookServiceServicer(object): + """* + The Address Book service provides the ability for Hedera network node + administrators to add, update, and remove consensus nodes. This addition, + update, or removal of a consensus node requires governing council approval, + but each node operator may update their own operational attributes without + additional approval, reducing overhead for routine operations. + + Most operations are `privileged operations` and require governing council + approval. + + ### For a node creation transaction. + - The node operator SHALL create a `createNode` transaction. + - The node operator MUST sign this transaction with the `Key` + set as the `admin_key` for the new `Node`. + - The node operator SHALL deliver the signed transaction to the Hedera + council representative. + - The Hedera council representative SHALL arrange for council members to + review and sign the transaction. + - Once sufficient council members have signed the transaction, the + Hedera council representative SHALL submit the transaction to the + network. + - Upon receipt of a valid and signed node creation transaction the network + software SHALL + - Validate the threshold signature for the Hedera governing council + - Validate the signature of the `Key` provided as the new `admin_key` + for the `Node`. + - Create the new node in state, this new node SHALL NOT be active in the + network at this time. + - When executing the next `freeze` transaction with `freeze_type` set to + `PREPARE_UPGRADE`, update network configuration and bring the + new node to an active status within the network. The node to be added + SHALL be active in the network following this upgrade. + + ### For a node deletion transaction. + - The node operator or Hedera council representative SHALL create a + `deleteNode` transaction. + - If the node operator creates the transaction + - The node operator MUST sign this transaction with the `Key` + set as the `admin_key` for the existing `Node`. + - The node operator SHALL deliver the signed transaction to the Hedera + council representative. + - The Hedera council representative SHALL arrange for council members to + review and sign the transaction. + - Once sufficient council members have signed the transaction, the + Hedera council representative SHALL submit the transaction to the + network. + - Upon receipt of a valid and signed node deletion transaction the network + software SHALL + - Validate the signature for the Hedera governing council + - Remove the existing node from network state. The node SHALL still + be active in the network at this time. + - When executing the next `freeze` transaction with `freeze_type` set to + `PREPARE_UPGRADE`, update network configuration and remove the + node to be deleted from the network. The node to be deleted SHALL NOT + be active in the network following this upgrade. + + ### For a node update transaction. + - The node operator SHALL create an `updateNode` transaction. + - The node operator MUST sign this transaction with the active `key` + assigned as the `admin_key`. + - The node operator SHALL submit the transaction to the + network. Hedera council approval SHALL NOT be sought for this + transaction + - Upon receipt of a valid and signed node update transaction the network + software SHALL + - If the transaction modifies the value of the "node account", + - Validate the signature of the active `key` for the account + assigned as the _current_ "node account". + - Validate the signature of the active `key` for the account to be + assigned as the _new_ "node account". + - Modify the node information held in network state with the changes + requested in the update transaction. The node changes SHALL NOT be + applied to network configuration, and SHALL NOT affect network + operation at this time. + - When executing the next `freeze` transaction with `freeze_type` set to + `PREPARE_UPGRADE`, update network configuration according to the + modified information in network state. The requested changes SHALL + affect network operation following this upgrade. + """ + + def createNode(self, request, context): + """* + A transaction to create a new consensus node in the network + address book. +

      + This transaction, once complete, SHALL add a new consensus node to the + network state.
      + The new consensus node SHALL remain in state, but SHALL NOT participate + in network consensus until the network updates the network configuration. +

      + Hedera governing council authorization is REQUIRED for this transaction. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def deleteNode(self, request, context): + """* + A transaction to remove a consensus node from the network address + book. +

      + This transaction, once complete, SHALL remove the identified consensus + node from the network state. +

      + Hedera governing council authorization is REQUIRED for this transaction. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def updateNode(self, request, context): + """* + A transaction to update an existing consensus node from the network + address book. +

      + This transaction, once complete, SHALL modify the identified consensus + node state as requested. +

      + This transaction is authorized by the node operator + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_AddressBookServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'createNode': grpc.unary_unary_rpc_method_handler( + servicer.createNode, + request_deserializer=services_dot_transaction__pb2.Transaction.FromString, + response_serializer=services_dot_transaction__response__pb2.TransactionResponse.SerializeToString, + ), + 'deleteNode': grpc.unary_unary_rpc_method_handler( + servicer.deleteNode, + request_deserializer=services_dot_transaction__pb2.Transaction.FromString, + response_serializer=services_dot_transaction__response__pb2.TransactionResponse.SerializeToString, + ), + 'updateNode': grpc.unary_unary_rpc_method_handler( + servicer.updateNode, + request_deserializer=services_dot_transaction__pb2.Transaction.FromString, + response_serializer=services_dot_transaction__response__pb2.TransactionResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'proto.AddressBookService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + server.add_registered_method_handlers('proto.AddressBookService', rpc_method_handlers) + + + # This class is part of an EXPERIMENTAL API. +class AddressBookService(object): + """* + The Address Book service provides the ability for Hedera network node + administrators to add, update, and remove consensus nodes. This addition, + update, or removal of a consensus node requires governing council approval, + but each node operator may update their own operational attributes without + additional approval, reducing overhead for routine operations. + + Most operations are `privileged operations` and require governing council + approval. + + ### For a node creation transaction. + - The node operator SHALL create a `createNode` transaction. + - The node operator MUST sign this transaction with the `Key` + set as the `admin_key` for the new `Node`. + - The node operator SHALL deliver the signed transaction to the Hedera + council representative. + - The Hedera council representative SHALL arrange for council members to + review and sign the transaction. + - Once sufficient council members have signed the transaction, the + Hedera council representative SHALL submit the transaction to the + network. + - Upon receipt of a valid and signed node creation transaction the network + software SHALL + - Validate the threshold signature for the Hedera governing council + - Validate the signature of the `Key` provided as the new `admin_key` + for the `Node`. + - Create the new node in state, this new node SHALL NOT be active in the + network at this time. + - When executing the next `freeze` transaction with `freeze_type` set to + `PREPARE_UPGRADE`, update network configuration and bring the + new node to an active status within the network. The node to be added + SHALL be active in the network following this upgrade. + + ### For a node deletion transaction. + - The node operator or Hedera council representative SHALL create a + `deleteNode` transaction. + - If the node operator creates the transaction + - The node operator MUST sign this transaction with the `Key` + set as the `admin_key` for the existing `Node`. + - The node operator SHALL deliver the signed transaction to the Hedera + council representative. + - The Hedera council representative SHALL arrange for council members to + review and sign the transaction. + - Once sufficient council members have signed the transaction, the + Hedera council representative SHALL submit the transaction to the + network. + - Upon receipt of a valid and signed node deletion transaction the network + software SHALL + - Validate the signature for the Hedera governing council + - Remove the existing node from network state. The node SHALL still + be active in the network at this time. + - When executing the next `freeze` transaction with `freeze_type` set to + `PREPARE_UPGRADE`, update network configuration and remove the + node to be deleted from the network. The node to be deleted SHALL NOT + be active in the network following this upgrade. + + ### For a node update transaction. + - The node operator SHALL create an `updateNode` transaction. + - The node operator MUST sign this transaction with the active `key` + assigned as the `admin_key`. + - The node operator SHALL submit the transaction to the + network. Hedera council approval SHALL NOT be sought for this + transaction + - Upon receipt of a valid and signed node update transaction the network + software SHALL + - If the transaction modifies the value of the "node account", + - Validate the signature of the active `key` for the account + assigned as the _current_ "node account". + - Validate the signature of the active `key` for the account to be + assigned as the _new_ "node account". + - Modify the node information held in network state with the changes + requested in the update transaction. The node changes SHALL NOT be + applied to network configuration, and SHALL NOT affect network + operation at this time. + - When executing the next `freeze` transaction with `freeze_type` set to + `PREPARE_UPGRADE`, update network configuration according to the + modified information in network state. The requested changes SHALL + affect network operation following this upgrade. + """ + + @staticmethod + def createNode(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/proto.AddressBookService/createNode', + services_dot_transaction__pb2.Transaction.SerializeToString, + services_dot_transaction__response__pb2.TransactionResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def deleteNode(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/proto.AddressBookService/deleteNode', + services_dot_transaction__pb2.Transaction.SerializeToString, + services_dot_transaction__response__pb2.TransactionResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def updateNode(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/proto.AddressBookService/updateNode', + services_dot_transaction__pb2.Transaction.SerializeToString, + services_dot_transaction__response__pb2.TransactionResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) diff --git a/src/hiero_sdk_python/hapi/services/auxiliary/__init__.py b/src/hiero_sdk_python/hapi/services/auxiliary/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/src/hiero_sdk_python/hapi/services/auxiliary/hints/__init__.py b/src/hiero_sdk_python/hapi/services/auxiliary/hints/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/src/hiero_sdk_python/hapi/services/auxiliary/hints/crs_publication_pb2.py b/src/hiero_sdk_python/hapi/services/auxiliary/hints/crs_publication_pb2.py new file mode 100644 index 000000000..fcd115703 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/auxiliary/hints/crs_publication_pb2.py @@ -0,0 +1,37 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/auxiliary/hints/crs_publication.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/auxiliary/hints/crs_publication.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n.services/auxiliary/hints/crs_publication.proto\x12(com.hedera.hapi.services.auxiliary.hints\"?\n\x1d\x43rsPublicationTransactionBody\x12\x0f\n\x07new_crs\x18\x01 \x01(\x0c\x12\r\n\x05proof\x18\x02 \x01(\x0c\x42\x33\n/com.hedera.hapi.services.auxiliary.hints.legacyP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.auxiliary.hints.crs_publication_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n/com.hedera.hapi.services.auxiliary.hints.legacyP\001' + _globals['_CRSPUBLICATIONTRANSACTIONBODY']._serialized_start=92 + _globals['_CRSPUBLICATIONTRANSACTIONBODY']._serialized_end=155 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/auxiliary/hints/crs_publication_pb2.pyi b/src/hiero_sdk_python/hapi/services/auxiliary/hints/crs_publication_pb2.pyi new file mode 100644 index 000000000..8f32f4b3a --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/auxiliary/hints/crs_publication_pb2.pyi @@ -0,0 +1,13 @@ +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Optional as _Optional + +DESCRIPTOR: _descriptor.FileDescriptor + +class CrsPublicationTransactionBody(_message.Message): + __slots__ = ("new_crs", "proof") + NEW_CRS_FIELD_NUMBER: _ClassVar[int] + PROOF_FIELD_NUMBER: _ClassVar[int] + new_crs: bytes + proof: bytes + def __init__(self, new_crs: _Optional[bytes] = ..., proof: _Optional[bytes] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/auxiliary/hints/crs_publication_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/auxiliary/hints/crs_publication_pb2_grpc.py new file mode 100644 index 000000000..302d47f63 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/auxiliary/hints/crs_publication_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/auxiliary/hints/crs_publication_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/auxiliary/hints/hints_key_publication_pb2.py b/src/hiero_sdk_python/hapi/services/auxiliary/hints/hints_key_publication_pb2.py new file mode 100644 index 000000000..a8247ad7e --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/auxiliary/hints/hints_key_publication_pb2.py @@ -0,0 +1,36 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/auxiliary/hints/hints_key_publication.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/auxiliary/hints/hints_key_publication.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from ...state.hints import hints_types_pb2 as services_dot_state_dot_hints_dot_hints__types__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n4services/auxiliary/hints/hints_key_publication.proto\x12(com.hedera.hapi.services.auxiliary.hints\x1a&services/state/hints/hints_types.proto\"^\n\"HintsKeyPublicationTransactionBody\x12\x10\n\x08party_id\x18\x01 \x01(\r\x12\x13\n\x0bnum_parties\x18\x02 \x01(\r\x12\x11\n\thints_key\x18\x03 \x01(\x0c\x42\x33\n/com.hedera.hapi.services.auxiliary.hints.legacyP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.auxiliary.hints.hints_key_publication_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n/com.hedera.hapi.services.auxiliary.hints.legacyP\001' + _globals['_HINTSKEYPUBLICATIONTRANSACTIONBODY']._serialized_start=138 + _globals['_HINTSKEYPUBLICATIONTRANSACTIONBODY']._serialized_end=232 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/auxiliary/hints/hints_key_publication_pb2.pyi b/src/hiero_sdk_python/hapi/services/auxiliary/hints/hints_key_publication_pb2.pyi new file mode 100644 index 000000000..cdb8b99ee --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/auxiliary/hints/hints_key_publication_pb2.pyi @@ -0,0 +1,16 @@ +from ...state.hints import hints_types_pb2 as _hints_types_pb2 +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Optional as _Optional + +DESCRIPTOR: _descriptor.FileDescriptor + +class HintsKeyPublicationTransactionBody(_message.Message): + __slots__ = ("party_id", "num_parties", "hints_key") + PARTY_ID_FIELD_NUMBER: _ClassVar[int] + NUM_PARTIES_FIELD_NUMBER: _ClassVar[int] + HINTS_KEY_FIELD_NUMBER: _ClassVar[int] + party_id: int + num_parties: int + hints_key: bytes + def __init__(self, party_id: _Optional[int] = ..., num_parties: _Optional[int] = ..., hints_key: _Optional[bytes] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/auxiliary/hints/hints_key_publication_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/auxiliary/hints/hints_key_publication_pb2_grpc.py new file mode 100644 index 000000000..1f61a45e1 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/auxiliary/hints/hints_key_publication_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/auxiliary/hints/hints_key_publication_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/auxiliary/hints/hints_partial_signature_pb2.py b/src/hiero_sdk_python/hapi/services/auxiliary/hints/hints_partial_signature_pb2.py new file mode 100644 index 000000000..7150d2849 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/auxiliary/hints/hints_partial_signature_pb2.py @@ -0,0 +1,37 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/auxiliary/hints/hints_partial_signature.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/auxiliary/hints/hints_partial_signature.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n6services/auxiliary/hints/hints_partial_signature.proto\x12(com.hedera.hapi.services.auxiliary.hints\"k\n$HintsPartialSignatureTransactionBody\x12\x17\n\x0f\x63onstruction_id\x18\x01 \x01(\x04\x12\x0f\n\x07message\x18\x02 \x01(\x0c\x12\x19\n\x11partial_signature\x18\x03 \x01(\x0c\x42\x33\n/com.hedera.hapi.services.auxiliary.hints.legacyP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.auxiliary.hints.hints_partial_signature_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n/com.hedera.hapi.services.auxiliary.hints.legacyP\001' + _globals['_HINTSPARTIALSIGNATURETRANSACTIONBODY']._serialized_start=100 + _globals['_HINTSPARTIALSIGNATURETRANSACTIONBODY']._serialized_end=207 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/auxiliary/hints/hints_partial_signature_pb2.pyi b/src/hiero_sdk_python/hapi/services/auxiliary/hints/hints_partial_signature_pb2.pyi new file mode 100644 index 000000000..de589fbac --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/auxiliary/hints/hints_partial_signature_pb2.pyi @@ -0,0 +1,15 @@ +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Optional as _Optional + +DESCRIPTOR: _descriptor.FileDescriptor + +class HintsPartialSignatureTransactionBody(_message.Message): + __slots__ = ("construction_id", "message", "partial_signature") + CONSTRUCTION_ID_FIELD_NUMBER: _ClassVar[int] + MESSAGE_FIELD_NUMBER: _ClassVar[int] + PARTIAL_SIGNATURE_FIELD_NUMBER: _ClassVar[int] + construction_id: int + message: bytes + partial_signature: bytes + def __init__(self, construction_id: _Optional[int] = ..., message: _Optional[bytes] = ..., partial_signature: _Optional[bytes] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/auxiliary/hints/hints_partial_signature_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/auxiliary/hints/hints_partial_signature_pb2_grpc.py new file mode 100644 index 000000000..e463225dd --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/auxiliary/hints/hints_partial_signature_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/auxiliary/hints/hints_partial_signature_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/auxiliary/hints/hints_preprocessing_vote_pb2.py b/src/hiero_sdk_python/hapi/services/auxiliary/hints/hints_preprocessing_vote_pb2.py new file mode 100644 index 000000000..3b38afa9b --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/auxiliary/hints/hints_preprocessing_vote_pb2.py @@ -0,0 +1,36 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/auxiliary/hints/hints_preprocessing_vote.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/auxiliary/hints/hints_preprocessing_vote.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from ...state.hints import hints_types_pb2 as services_dot_state_dot_hints_dot_hints__types__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n7services/auxiliary/hints/hints_preprocessing_vote.proto\x12(com.hedera.hapi.services.auxiliary.hints\x1a&services/state/hints/hints_types.proto\"\x83\x01\n%HintsPreprocessingVoteTransactionBody\x12\x17\n\x0f\x63onstruction_id\x18\x01 \x01(\x04\x12\x41\n\x04vote\x18\x02 \x01(\x0b\x32\x33.com.hedera.hapi.node.state.hints.PreprocessingVoteB3\n/com.hedera.hapi.services.auxiliary.hints.legacyP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.auxiliary.hints.hints_preprocessing_vote_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n/com.hedera.hapi.services.auxiliary.hints.legacyP\001' + _globals['_HINTSPREPROCESSINGVOTETRANSACTIONBODY']._serialized_start=142 + _globals['_HINTSPREPROCESSINGVOTETRANSACTIONBODY']._serialized_end=273 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/auxiliary/hints/hints_preprocessing_vote_pb2.pyi b/src/hiero_sdk_python/hapi/services/auxiliary/hints/hints_preprocessing_vote_pb2.pyi new file mode 100644 index 000000000..b4cf4dd84 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/auxiliary/hints/hints_preprocessing_vote_pb2.pyi @@ -0,0 +1,15 @@ +from ...state.hints import hints_types_pb2 as _hints_types_pb2 +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class HintsPreprocessingVoteTransactionBody(_message.Message): + __slots__ = ("construction_id", "vote") + CONSTRUCTION_ID_FIELD_NUMBER: _ClassVar[int] + VOTE_FIELD_NUMBER: _ClassVar[int] + construction_id: int + vote: _hints_types_pb2.PreprocessingVote + def __init__(self, construction_id: _Optional[int] = ..., vote: _Optional[_Union[_hints_types_pb2.PreprocessingVote, _Mapping]] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/auxiliary/hints/hints_preprocessing_vote_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/auxiliary/hints/hints_preprocessing_vote_pb2_grpc.py new file mode 100644 index 000000000..927df6d76 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/auxiliary/hints/hints_preprocessing_vote_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/auxiliary/hints/hints_preprocessing_vote_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/auxiliary/history/__init__.py b/src/hiero_sdk_python/hapi/services/auxiliary/history/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/src/hiero_sdk_python/hapi/services/auxiliary/history/history_proof_key_publication_pb2.py b/src/hiero_sdk_python/hapi/services/auxiliary/history/history_proof_key_publication_pb2.py new file mode 100644 index 000000000..7c9900b89 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/auxiliary/history/history_proof_key_publication_pb2.py @@ -0,0 +1,37 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/auxiliary/history/history_proof_key_publication.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/auxiliary/history/history_proof_key_publication.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n>services/auxiliary/history/history_proof_key_publication.proto\x12*com.hedera.hapi.services.auxiliary.history\">\n)HistoryProofKeyPublicationTransactionBody\x12\x11\n\tproof_key\x18\x01 \x01(\x0c\x42\x35\n1com.hedera.hapi.services.auxiliary.history.legacyP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.auxiliary.history.history_proof_key_publication_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n1com.hedera.hapi.services.auxiliary.history.legacyP\001' + _globals['_HISTORYPROOFKEYPUBLICATIONTRANSACTIONBODY']._serialized_start=110 + _globals['_HISTORYPROOFKEYPUBLICATIONTRANSACTIONBODY']._serialized_end=172 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/auxiliary/history/history_proof_key_publication_pb2.pyi b/src/hiero_sdk_python/hapi/services/auxiliary/history/history_proof_key_publication_pb2.pyi new file mode 100644 index 000000000..df5c0cc2c --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/auxiliary/history/history_proof_key_publication_pb2.pyi @@ -0,0 +1,11 @@ +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Optional as _Optional + +DESCRIPTOR: _descriptor.FileDescriptor + +class HistoryProofKeyPublicationTransactionBody(_message.Message): + __slots__ = ("proof_key",) + PROOF_KEY_FIELD_NUMBER: _ClassVar[int] + proof_key: bytes + def __init__(self, proof_key: _Optional[bytes] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/auxiliary/history/history_proof_key_publication_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/auxiliary/history/history_proof_key_publication_pb2_grpc.py new file mode 100644 index 000000000..e0f37fefa --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/auxiliary/history/history_proof_key_publication_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/auxiliary/history/history_proof_key_publication_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/auxiliary/history/history_proof_signature_pb2.py b/src/hiero_sdk_python/hapi/services/auxiliary/history/history_proof_signature_pb2.py new file mode 100644 index 000000000..44b1e3559 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/auxiliary/history/history_proof_signature_pb2.py @@ -0,0 +1,36 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/auxiliary/history/history_proof_signature.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/auxiliary/history/history_proof_signature.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from ...state.history import history_types_pb2 as services_dot_state_dot_history_dot_history__types__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n8services/auxiliary/history/history_proof_signature.proto\x12*com.hedera.hapi.services.auxiliary.history\x1a*services/state/history/history_types.proto\"\x88\x01\n$HistoryProofSignatureTransactionBody\x12\x17\n\x0f\x63onstruction_id\x18\x01 \x01(\x04\x12G\n\tsignature\x18\x02 \x01(\x0b\x32\x34.com.hedera.hapi.node.state.history.HistorySignatureB5\n1com.hedera.hapi.services.auxiliary.history.legacyP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.auxiliary.history.history_proof_signature_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n1com.hedera.hapi.services.auxiliary.history.legacyP\001' + _globals['_HISTORYPROOFSIGNATURETRANSACTIONBODY']._serialized_start=149 + _globals['_HISTORYPROOFSIGNATURETRANSACTIONBODY']._serialized_end=285 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/auxiliary/history/history_proof_signature_pb2.pyi b/src/hiero_sdk_python/hapi/services/auxiliary/history/history_proof_signature_pb2.pyi new file mode 100644 index 000000000..517634693 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/auxiliary/history/history_proof_signature_pb2.pyi @@ -0,0 +1,15 @@ +from ...state.history import history_types_pb2 as _history_types_pb2 +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class HistoryProofSignatureTransactionBody(_message.Message): + __slots__ = ("construction_id", "signature") + CONSTRUCTION_ID_FIELD_NUMBER: _ClassVar[int] + SIGNATURE_FIELD_NUMBER: _ClassVar[int] + construction_id: int + signature: _history_types_pb2.HistorySignature + def __init__(self, construction_id: _Optional[int] = ..., signature: _Optional[_Union[_history_types_pb2.HistorySignature, _Mapping]] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/auxiliary/history/history_proof_signature_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/auxiliary/history/history_proof_signature_pb2_grpc.py new file mode 100644 index 000000000..b166dc230 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/auxiliary/history/history_proof_signature_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/auxiliary/history/history_proof_signature_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/auxiliary/history/history_proof_vote_pb2.py b/src/hiero_sdk_python/hapi/services/auxiliary/history/history_proof_vote_pb2.py new file mode 100644 index 000000000..65259fd5b --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/auxiliary/history/history_proof_vote_pb2.py @@ -0,0 +1,36 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/auxiliary/history/history_proof_vote.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/auxiliary/history/history_proof_vote.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from ...state.history import history_types_pb2 as services_dot_state_dot_history_dot_history__types__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n3services/auxiliary/history/history_proof_vote.proto\x12*com.hedera.hapi.services.auxiliary.history\x1a*services/state/history/history_types.proto\"~\n\x1fHistoryProofVoteTransactionBody\x12\x17\n\x0f\x63onstruction_id\x18\x01 \x01(\x04\x12\x42\n\x04vote\x18\x02 \x01(\x0b\x32\x34.com.hedera.hapi.node.state.history.HistoryProofVoteB5\n1com.hedera.hapi.services.auxiliary.history.legacyP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.auxiliary.history.history_proof_vote_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n1com.hedera.hapi.services.auxiliary.history.legacyP\001' + _globals['_HISTORYPROOFVOTETRANSACTIONBODY']._serialized_start=143 + _globals['_HISTORYPROOFVOTETRANSACTIONBODY']._serialized_end=269 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/auxiliary/history/history_proof_vote_pb2.pyi b/src/hiero_sdk_python/hapi/services/auxiliary/history/history_proof_vote_pb2.pyi new file mode 100644 index 000000000..753a06891 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/auxiliary/history/history_proof_vote_pb2.pyi @@ -0,0 +1,15 @@ +from ...state.history import history_types_pb2 as _history_types_pb2 +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class HistoryProofVoteTransactionBody(_message.Message): + __slots__ = ("construction_id", "vote") + CONSTRUCTION_ID_FIELD_NUMBER: _ClassVar[int] + VOTE_FIELD_NUMBER: _ClassVar[int] + construction_id: int + vote: _history_types_pb2.HistoryProofVote + def __init__(self, construction_id: _Optional[int] = ..., vote: _Optional[_Union[_history_types_pb2.HistoryProofVote, _Mapping]] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/auxiliary/history/history_proof_vote_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/auxiliary/history/history_proof_vote_pb2_grpc.py new file mode 100644 index 000000000..ab3c8f99f --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/auxiliary/history/history_proof_vote_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/auxiliary/history/history_proof_vote_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/auxiliary/tss/__init__.py b/src/hiero_sdk_python/hapi/services/auxiliary/tss/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/src/hiero_sdk_python/hapi/services/auxiliary/tss/tss_encryption_key_pb2.py b/src/hiero_sdk_python/hapi/services/auxiliary/tss/tss_encryption_key_pb2.py new file mode 100644 index 000000000..096f93590 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/auxiliary/tss/tss_encryption_key_pb2.py @@ -0,0 +1,37 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/auxiliary/tss/tss_encryption_key.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/auxiliary/tss/tss_encryption_key.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n/services/auxiliary/tss/tss_encryption_key.proto\x12&com.hedera.hapi.services.auxiliary.tss\"A\n\x1fTssEncryptionKeyTransactionBody\x12\x1e\n\x16publicTssEncryptionKey\x18\x01 \x01(\x0c\x42\x31\n-com.hedera.hapi.services.auxiliary.tss.legacyP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.auxiliary.tss.tss_encryption_key_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n-com.hedera.hapi.services.auxiliary.tss.legacyP\001' + _globals['_TSSENCRYPTIONKEYTRANSACTIONBODY']._serialized_start=91 + _globals['_TSSENCRYPTIONKEYTRANSACTIONBODY']._serialized_end=156 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/auxiliary/tss/tss_encryption_key_pb2.pyi b/src/hiero_sdk_python/hapi/services/auxiliary/tss/tss_encryption_key_pb2.pyi new file mode 100644 index 000000000..e5cfe6aa7 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/auxiliary/tss/tss_encryption_key_pb2.pyi @@ -0,0 +1,11 @@ +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Optional as _Optional + +DESCRIPTOR: _descriptor.FileDescriptor + +class TssEncryptionKeyTransactionBody(_message.Message): + __slots__ = ("publicTssEncryptionKey",) + PUBLICTSSENCRYPTIONKEY_FIELD_NUMBER: _ClassVar[int] + publicTssEncryptionKey: bytes + def __init__(self, publicTssEncryptionKey: _Optional[bytes] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/auxiliary/tss/tss_encryption_key_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/auxiliary/tss/tss_encryption_key_pb2_grpc.py new file mode 100644 index 000000000..e15574db5 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/auxiliary/tss/tss_encryption_key_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/auxiliary/tss/tss_encryption_key_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/auxiliary/tss/tss_message_pb2.py b/src/hiero_sdk_python/hapi/services/auxiliary/tss/tss_message_pb2.py new file mode 100644 index 000000000..5902007b6 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/auxiliary/tss/tss_message_pb2.py @@ -0,0 +1,37 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/auxiliary/tss/tss_message.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/auxiliary/tss/tss_message.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n(services/auxiliary/tss/tss_message.proto\x12&com.hedera.hapi.services.auxiliary.tss\"}\n\x19TssMessageTransactionBody\x12\x1a\n\x12source_roster_hash\x18\x01 \x01(\x0c\x12\x1a\n\x12target_roster_hash\x18\x02 \x01(\x0c\x12\x13\n\x0bshare_index\x18\x03 \x01(\x04\x12\x13\n\x0btss_message\x18\x04 \x01(\x0c\x42\x31\n-com.hedera.hapi.services.auxiliary.tss.legacyP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.auxiliary.tss.tss_message_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n-com.hedera.hapi.services.auxiliary.tss.legacyP\001' + _globals['_TSSMESSAGETRANSACTIONBODY']._serialized_start=84 + _globals['_TSSMESSAGETRANSACTIONBODY']._serialized_end=209 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/auxiliary/tss/tss_message_pb2.pyi b/src/hiero_sdk_python/hapi/services/auxiliary/tss/tss_message_pb2.pyi new file mode 100644 index 000000000..4a16064d2 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/auxiliary/tss/tss_message_pb2.pyi @@ -0,0 +1,17 @@ +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Optional as _Optional + +DESCRIPTOR: _descriptor.FileDescriptor + +class TssMessageTransactionBody(_message.Message): + __slots__ = ("source_roster_hash", "target_roster_hash", "share_index", "tss_message") + SOURCE_ROSTER_HASH_FIELD_NUMBER: _ClassVar[int] + TARGET_ROSTER_HASH_FIELD_NUMBER: _ClassVar[int] + SHARE_INDEX_FIELD_NUMBER: _ClassVar[int] + TSS_MESSAGE_FIELD_NUMBER: _ClassVar[int] + source_roster_hash: bytes + target_roster_hash: bytes + share_index: int + tss_message: bytes + def __init__(self, source_roster_hash: _Optional[bytes] = ..., target_roster_hash: _Optional[bytes] = ..., share_index: _Optional[int] = ..., tss_message: _Optional[bytes] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/auxiliary/tss/tss_message_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/auxiliary/tss/tss_message_pb2_grpc.py new file mode 100644 index 000000000..a35b6000a --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/auxiliary/tss/tss_message_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/auxiliary/tss/tss_message_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/auxiliary/tss/tss_vote_pb2.py b/src/hiero_sdk_python/hapi/services/auxiliary/tss/tss_vote_pb2.py new file mode 100644 index 000000000..e415e2963 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/auxiliary/tss/tss_vote_pb2.py @@ -0,0 +1,37 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/auxiliary/tss/tss_vote.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/auxiliary/tss/tss_vote.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n%services/auxiliary/tss/tss_vote.proto\x12&com.hedera.hapi.services.auxiliary.tss\"\x8d\x01\n\x16TssVoteTransactionBody\x12\x1a\n\x12source_roster_hash\x18\x01 \x01(\x0c\x12\x1a\n\x12target_roster_hash\x18\x02 \x01(\x0c\x12\x11\n\tledger_id\x18\x03 \x01(\x0c\x12\x16\n\x0enode_signature\x18\x04 \x01(\x0c\x12\x10\n\x08tss_vote\x18\x05 \x01(\x0c\x42\x31\n-com.hedera.hapi.services.auxiliary.tss.legacyP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.auxiliary.tss.tss_vote_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n-com.hedera.hapi.services.auxiliary.tss.legacyP\001' + _globals['_TSSVOTETRANSACTIONBODY']._serialized_start=82 + _globals['_TSSVOTETRANSACTIONBODY']._serialized_end=223 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/auxiliary/tss/tss_vote_pb2.pyi b/src/hiero_sdk_python/hapi/services/auxiliary/tss/tss_vote_pb2.pyi new file mode 100644 index 000000000..ae2561465 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/auxiliary/tss/tss_vote_pb2.pyi @@ -0,0 +1,19 @@ +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Optional as _Optional + +DESCRIPTOR: _descriptor.FileDescriptor + +class TssVoteTransactionBody(_message.Message): + __slots__ = ("source_roster_hash", "target_roster_hash", "ledger_id", "node_signature", "tss_vote") + SOURCE_ROSTER_HASH_FIELD_NUMBER: _ClassVar[int] + TARGET_ROSTER_HASH_FIELD_NUMBER: _ClassVar[int] + LEDGER_ID_FIELD_NUMBER: _ClassVar[int] + NODE_SIGNATURE_FIELD_NUMBER: _ClassVar[int] + TSS_VOTE_FIELD_NUMBER: _ClassVar[int] + source_roster_hash: bytes + target_roster_hash: bytes + ledger_id: bytes + node_signature: bytes + tss_vote: bytes + def __init__(self, source_roster_hash: _Optional[bytes] = ..., target_roster_hash: _Optional[bytes] = ..., ledger_id: _Optional[bytes] = ..., node_signature: _Optional[bytes] = ..., tss_vote: _Optional[bytes] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/auxiliary/tss/tss_vote_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/auxiliary/tss/tss_vote_pb2_grpc.py new file mode 100644 index 000000000..1c5ce977b --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/auxiliary/tss/tss_vote_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/auxiliary/tss/tss_vote_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/basic_types_pb2.py b/src/hiero_sdk_python/hapi/services/basic_types_pb2.py new file mode 100644 index 000000000..61065e5d3 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/basic_types_pb2.py @@ -0,0 +1,185 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/basic_types.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/basic_types.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import timestamp_pb2 as services_dot_timestamp__pb2 +from google.protobuf import wrappers_pb2 as google_dot_protobuf_dot_wrappers__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1aservices/basic_types.proto\x12\x05proto\x1a\x18services/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\"\x1b\n\x07ShardID\x12\x10\n\x08shardNum\x18\x01 \x01(\x03\"-\n\x07RealmID\x12\x10\n\x08shardNum\x18\x01 \x01(\x03\x12\x10\n\x08realmNum\x18\x02 \x01(\x03\"?\n\x07TokenID\x12\x10\n\x08shardNum\x18\x01 \x01(\x03\x12\x10\n\x08realmNum\x18\x02 \x01(\x03\x12\x10\n\x08tokenNum\x18\x03 \x01(\x03\"a\n\tAccountID\x12\x10\n\x08shardNum\x18\x01 \x01(\x03\x12\x10\n\x08realmNum\x18\x02 \x01(\x03\x12\x14\n\naccountNum\x18\x03 \x01(\x03H\x00\x12\x0f\n\x05\x61lias\x18\x04 \x01(\x0cH\x00\x42\t\n\x07\x61\x63\x63ount\"@\n\x05NftID\x12 \n\x08token_ID\x18\x01 \x01(\x0b\x32\x0e.proto.TokenID\x12\x15\n\rserial_number\x18\x02 \x01(\x03\"=\n\x06\x46ileID\x12\x10\n\x08shardNum\x18\x01 \x01(\x03\x12\x10\n\x08realmNum\x18\x02 \x01(\x03\x12\x0f\n\x07\x66ileNum\x18\x03 \x01(\x03\"j\n\nContractID\x12\x10\n\x08shardNum\x18\x01 \x01(\x03\x12\x10\n\x08realmNum\x18\x02 \x01(\x03\x12\x15\n\x0b\x63ontractNum\x18\x03 \x01(\x03H\x00\x12\x15\n\x0b\x65vm_address\x18\x04 \x01(\x0cH\x00\x42\n\n\x08\x63ontract\"?\n\x07TopicID\x12\x10\n\x08shardNum\x18\x01 \x01(\x03\x12\x10\n\x08realmNum\x18\x02 \x01(\x03\x12\x10\n\x08topicNum\x18\x03 \x01(\x03\"E\n\nScheduleID\x12\x10\n\x08shardNum\x18\x01 \x01(\x03\x12\x10\n\x08realmNum\x18\x02 \x01(\x03\x12\x13\n\x0bscheduleNum\x18\x03 \x01(\x03\"\x87\x01\n\rTransactionID\x12/\n\x15transactionValidStart\x18\x01 \x01(\x0b\x32\x10.proto.Timestamp\x12#\n\taccountID\x18\x02 \x01(\x0b\x32\x10.proto.AccountID\x12\x11\n\tscheduled\x18\x03 \x01(\x08\x12\r\n\x05nonce\x18\x04 \x01(\x05\"A\n\x06HookId\x12&\n\tentity_id\x18\x01 \x01(\x0b\x32\x13.proto.HookEntityId\x12\x0f\n\x07hook_id\x18\x02 \x01(\x03\"C\n\x0cHookEntityId\x12&\n\naccount_id\x18\x01 \x01(\x0b\x32\x10.proto.AccountIDH\x00\x42\x0b\n\tentity_id\"\x84\x01\n\x08HookCall\x12%\n\x0c\x66ull_hook_id\x18\x01 \x01(\x0b\x32\r.proto.HookIdH\x00\x12\x11\n\x07hook_id\x18\x02 \x01(\x03H\x00\x12+\n\revm_hook_call\x18\x03 \x01(\x0b\x32\x12.proto.EvmHookCallH\x01\x42\x04\n\x02idB\x0b\n\tcall_spec\".\n\x0b\x45vmHookCall\x12\x0c\n\x04\x64\x61ta\x18\x01 \x01(\x0c\x12\x11\n\tgas_limit\x18\x02 \x01(\x04\"\xcf\x01\n\rAccountAmount\x12#\n\taccountID\x18\x01 \x01(\x0b\x32\x10.proto.AccountID\x12\x0e\n\x06\x61mount\x18\x02 \x01(\x12\x12\x13\n\x0bis_approval\x18\x03 \x01(\x08\x12\x30\n\x15pre_tx_allowance_hook\x18\x04 \x01(\x0b\x32\x0f.proto.HookCallH\x00\x12\x35\n\x1apre_post_tx_allowance_hook\x18\x05 \x01(\x0b\x32\x0f.proto.HookCallH\x00\x42\x0b\n\thook_call\"<\n\x0cTransferList\x12,\n\x0e\x61\x63\x63ountAmounts\x18\x01 \x03(\x0b\x32\x14.proto.AccountAmount\"\xc0\x03\n\x0bNftTransfer\x12)\n\x0fsenderAccountID\x18\x01 \x01(\x0b\x32\x10.proto.AccountID\x12+\n\x11receiverAccountID\x18\x02 \x01(\x0b\x32\x10.proto.AccountID\x12\x14\n\x0cserialNumber\x18\x03 \x01(\x03\x12\x13\n\x0bis_approval\x18\x04 \x01(\x08\x12\x37\n\x1cpre_tx_sender_allowance_hook\x18\x05 \x01(\x0b\x32\x0f.proto.HookCallH\x00\x12<\n!pre_post_tx_sender_allowance_hook\x18\x06 \x01(\x0b\x32\x0f.proto.HookCallH\x00\x12\x39\n\x1epre_tx_receiver_allowance_hook\x18\x07 \x01(\x0b\x32\x0f.proto.HookCallH\x01\x12>\n#pre_post_tx_receiver_allowance_hook\x18\x08 \x01(\x0b\x32\x0f.proto.HookCallH\x01\x42\x1c\n\x1asender_allowance_hook_callB\x1e\n\x1creceiver_allowance_hook_call\"\xbe\x01\n\x11TokenTransferList\x12\x1d\n\x05token\x18\x01 \x01(\x0b\x32\x0e.proto.TokenID\x12\'\n\ttransfers\x18\x02 \x03(\x0b\x32\x14.proto.AccountAmount\x12(\n\x0cnftTransfers\x18\x03 \x03(\x0b\x32\x12.proto.NftTransfer\x12\x37\n\x11\x65xpected_decimals\x18\x04 \x01(\x0b\x32\x1c.google.protobuf.UInt32Value\"2\n\x08\x46raction\x12\x11\n\tnumerator\x18\x01 \x01(\x03\x12\x13\n\x0b\x64\x65nominator\x18\x02 \x01(\x03\"\x9a\x02\n\x03Key\x12\'\n\ncontractID\x18\x01 \x01(\x0b\x32\x11.proto.ContractIDH\x00\x12\x11\n\x07\x65\x64\x32\x35\x35\x31\x39\x18\x02 \x01(\x0cH\x00\x12\x16\n\x08RSA_3072\x18\x03 \x01(\x0c\x42\x02\x18\x01H\x00\x12\x17\n\tECDSA_384\x18\x04 \x01(\x0c\x42\x02\x18\x01H\x00\x12+\n\x0cthresholdKey\x18\x05 \x01(\x0b\x32\x13.proto.ThresholdKeyH\x00\x12!\n\x07keyList\x18\x06 \x01(\x0b\x32\x0e.proto.KeyListH\x00\x12\x19\n\x0f\x45\x43\x44SA_secp256k1\x18\x07 \x01(\x0cH\x00\x12\x34\n\x17\x64\x65legatable_contract_id\x18\x08 \x01(\x0b\x32\x11.proto.ContractIDH\x00\x42\x05\n\x03key\"?\n\x0cThresholdKey\x12\x11\n\tthreshold\x18\x01 \x01(\r\x12\x1c\n\x04keys\x18\x02 \x01(\x0b\x32\x0e.proto.KeyList\"#\n\x07KeyList\x12\x18\n\x04keys\x18\x01 \x03(\x0b\x32\n.proto.Key\"\xd4\x01\n\tSignature\x12\x12\n\x08\x63ontract\x18\x01 \x01(\x0cH\x00\x12\x11\n\x07\x65\x64\x32\x35\x35\x31\x39\x18\x02 \x01(\x0cH\x00\x12\x12\n\x08RSA_3072\x18\x03 \x01(\x0cH\x00\x12\x13\n\tECDSA_384\x18\x04 \x01(\x0cH\x00\x12\x37\n\x12thresholdSignature\x18\x05 \x01(\x0b\x32\x19.proto.ThresholdSignatureH\x00\x12-\n\rsignatureList\x18\x06 \x01(\x0b\x32\x14.proto.SignatureListH\x00:\x02\x18\x01\x42\x0b\n\tsignature\"<\n\x12ThresholdSignature\x12\"\n\x04sigs\x18\x02 \x01(\x0b\x32\x14.proto.SignatureList:\x02\x18\x01\"3\n\rSignatureList\x12\x1e\n\x04sigs\x18\x02 \x03(\x0b\x32\x10.proto.Signature:\x02\x18\x01\"\xa5\x01\n\rSignaturePair\x12\x14\n\x0cpubKeyPrefix\x18\x01 \x01(\x0c\x12\x12\n\x08\x63ontract\x18\x02 \x01(\x0cH\x00\x12\x11\n\x07\x65\x64\x32\x35\x35\x31\x39\x18\x03 \x01(\x0cH\x00\x12\x16\n\x08RSA_3072\x18\x04 \x01(\x0c\x42\x02\x18\x01H\x00\x12\x17\n\tECDSA_384\x18\x05 \x01(\x0c\x42\x02\x18\x01H\x00\x12\x19\n\x0f\x45\x43\x44SA_secp256k1\x18\x06 \x01(\x0cH\x00\x42\x0b\n\tsignature\"5\n\x0cSignatureMap\x12%\n\x07sigPair\x18\x01 \x03(\x0b\x32\x14.proto.SignaturePair\"\xa3\x01\n\rFeeComponents\x12\x0b\n\x03min\x18\x01 \x01(\x03\x12\x0b\n\x03max\x18\x02 \x01(\x03\x12\x10\n\x08\x63onstant\x18\x03 \x01(\x03\x12\x0b\n\x03\x62pt\x18\x04 \x01(\x03\x12\x0b\n\x03vpt\x18\x05 \x01(\x03\x12\x0b\n\x03rbh\x18\x06 \x01(\x03\x12\x0b\n\x03sbh\x18\x07 \x01(\x03\x12\x0b\n\x03gas\x18\x08 \x01(\x03\x12\n\n\x02tv\x18\t \x01(\x03\x12\x0b\n\x03\x62pr\x18\n \x01(\x03\x12\x0c\n\x04sbpr\x18\x0b \x01(\x03\"\x94\x01\n\x16TransactionFeeSchedule\x12\x37\n\x13hederaFunctionality\x18\x01 \x01(\x0e\x32\x1a.proto.HederaFunctionality\x12#\n\x07\x66\x65\x65\x44\x61ta\x18\x02 \x01(\x0b\x32\x0e.proto.FeeDataB\x02\x18\x01\x12\x1c\n\x04\x66\x65\x65s\x18\x03 \x03(\x0b\x32\x0e.proto.FeeData\"\xa8\x01\n\x07\x46\x65\x65\x44\x61ta\x12&\n\x08nodedata\x18\x01 \x01(\x0b\x32\x14.proto.FeeComponents\x12)\n\x0bnetworkdata\x18\x02 \x01(\x0b\x32\x14.proto.FeeComponents\x12)\n\x0bservicedata\x18\x03 \x01(\x0b\x32\x14.proto.FeeComponents\x12\x1f\n\x07subType\x18\x04 \x01(\x0e\x32\x0e.proto.SubType\"y\n\x0b\x46\x65\x65Schedule\x12=\n\x16transactionFeeSchedule\x18\x01 \x03(\x0b\x32\x1d.proto.TransactionFeeSchedule\x12+\n\nexpiryTime\x18\x02 \x01(\x0b\x32\x17.proto.TimestampSeconds\"x\n\x19\x43urrentAndNextFeeSchedule\x12.\n\x12\x63urrentFeeSchedule\x18\x01 \x01(\x0b\x32\x12.proto.FeeSchedule\x12+\n\x0fnextFeeSchedule\x18\x02 \x01(\x0b\x32\x12.proto.FeeSchedule\"I\n\x0fServiceEndpoint\x12\x13\n\x0bipAddressV4\x18\x01 \x01(\x0c\x12\x0c\n\x04port\x18\x02 \x01(\x05\x12\x13\n\x0b\x64omain_name\x18\x03 \x01(\t\"\x86\x02\n\x0bNodeAddress\x12\x15\n\tipAddress\x18\x01 \x01(\x0c\x42\x02\x18\x01\x12\x12\n\x06portno\x18\x02 \x01(\x05\x42\x02\x18\x01\x12\x10\n\x04memo\x18\x03 \x01(\x0c\x42\x02\x18\x01\x12\x12\n\nRSA_PubKey\x18\x04 \x01(\t\x12\x0e\n\x06nodeId\x18\x05 \x01(\x03\x12\'\n\rnodeAccountId\x18\x06 \x01(\x0b\x32\x10.proto.AccountID\x12\x14\n\x0cnodeCertHash\x18\x07 \x01(\x0c\x12/\n\x0fserviceEndpoint\x18\x08 \x03(\x0b\x32\x16.proto.ServiceEndpoint\x12\x13\n\x0b\x64\x65scription\x18\t \x01(\t\x12\x11\n\x05stake\x18\n \x01(\x03\x42\x02\x18\x01\":\n\x0fNodeAddressBook\x12\'\n\x0bnodeAddress\x18\x01 \x03(\x0b\x32\x12.proto.NodeAddress\"Z\n\x0fSemanticVersion\x12\r\n\x05major\x18\x01 \x01(\x05\x12\r\n\x05minor\x18\x02 \x01(\x05\x12\r\n\x05patch\x18\x03 \x01(\x05\x12\x0b\n\x03pre\x18\x04 \x01(\t\x12\r\n\x05\x62uild\x18\x05 \x01(\t\"4\n\x07Setting\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\x12\x0c\n\x04\x64\x61ta\x18\x03 \x01(\x0c\">\n\x19ServicesConfigurationList\x12!\n\tnameValue\x18\x01 \x03(\x0b\x32\x0e.proto.Setting\"\xe0\x01\n\x11TokenRelationship\x12\x1f\n\x07tokenId\x18\x01 \x01(\x0b\x32\x0e.proto.TokenID\x12\x0e\n\x06symbol\x18\x02 \x01(\t\x12\x0f\n\x07\x62\x61lance\x18\x03 \x01(\x04\x12(\n\tkycStatus\x18\x04 \x01(\x0e\x32\x15.proto.TokenKycStatus\x12.\n\x0c\x66reezeStatus\x18\x05 \x01(\x0e\x32\x18.proto.TokenFreezeStatus\x12\x10\n\x08\x64\x65\x63imals\x18\x06 \x01(\r\x12\x1d\n\x15\x61utomatic_association\x18\x07 \x01(\x08\"R\n\x0cTokenBalance\x12\x1f\n\x07tokenId\x18\x01 \x01(\x0b\x32\x0e.proto.TokenID\x12\x0f\n\x07\x62\x61lance\x18\x02 \x01(\x04\x12\x10\n\x08\x64\x65\x63imals\x18\x03 \x01(\r\";\n\rTokenBalances\x12*\n\rtokenBalances\x18\x01 \x03(\x0b\x32\x13.proto.TokenBalance\"Z\n\x10TokenAssociation\x12 \n\x08token_id\x18\x01 \x01(\x0b\x32\x0e.proto.TokenID\x12$\n\naccount_id\x18\x02 \x01(\x0b\x32\x10.proto.AccountID\"\xd7\x01\n\x0bStakingInfo\x12\x16\n\x0e\x64\x65\x63line_reward\x18\x01 \x01(\x08\x12,\n\x12stake_period_start\x18\x02 \x01(\x0b\x32\x10.proto.Timestamp\x12\x16\n\x0epending_reward\x18\x03 \x01(\x03\x12\x14\n\x0cstaked_to_me\x18\x04 \x01(\x03\x12-\n\x11staked_account_id\x18\x05 \x01(\x0b\x32\x10.proto.AccountIDH\x00\x12\x18\n\x0estaked_node_id\x18\x06 \x01(\x03H\x00\x42\x0b\n\tstaked_id\"\xcc\x01\n\x10PendingAirdropId\x12#\n\tsender_id\x18\x01 \x01(\x0b\x32\x10.proto.AccountID\x12%\n\x0breceiver_id\x18\x02 \x01(\x0b\x32\x10.proto.AccountID\x12-\n\x13\x66ungible_token_type\x18\x03 \x01(\x0b\x32\x0e.proto.TokenIDH\x00\x12*\n\x12non_fungible_token\x18\x04 \x01(\x0b\x32\x0c.proto.NftIDH\x00\x42\x11\n\x0ftoken_reference\"%\n\x13PendingAirdropValue\x12\x0e\n\x06\x61mount\x18\x01 \x01(\x04*\"\n\x12\x42lockHashAlgorithm\x12\x0c\n\x08SHA2_384\x10\x00*9\n\tTokenType\x12\x13\n\x0f\x46UNGIBLE_COMMON\x10\x00\x12\x17\n\x13NON_FUNGIBLE_UNIQUE\x10\x01*\x97\x02\n\x07SubType\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x00\x12\x19\n\x15TOKEN_FUNGIBLE_COMMON\x10\x01\x12\x1d\n\x19TOKEN_NON_FUNGIBLE_UNIQUE\x10\x02\x12*\n&TOKEN_FUNGIBLE_COMMON_WITH_CUSTOM_FEES\x10\x03\x12.\n*TOKEN_NON_FUNGIBLE_UNIQUE_WITH_CUSTOM_FEES\x10\x04\x12!\n\x1dSCHEDULE_CREATE_CONTRACT_CALL\x10\x05\x12!\n\x1dTOPIC_CREATE_WITH_CUSTOM_FEES\x10\x06\x12#\n\x1fSUBMIT_MESSAGE_WITH_CUSTOM_FEES\x10\x07*+\n\x0fTokenSupplyType\x12\x0c\n\x08INFINITE\x10\x00\x12\n\n\x06\x46INITE\x10\x01*<\n\x12TokenKeyValidation\x12\x13\n\x0f\x46ULL_VALIDATION\x10\x00\x12\x11\n\rNO_VALIDATION\x10\x01*F\n\x11TokenFreezeStatus\x12\x17\n\x13\x46reezeNotApplicable\x10\x00\x12\n\n\x06\x46rozen\x10\x01\x12\x0c\n\x08Unfrozen\x10\x02*@\n\x0eTokenKycStatus\x12\x14\n\x10KycNotApplicable\x10\x00\x12\x0b\n\x07Granted\x10\x01\x12\x0b\n\x07Revoked\x10\x02*D\n\x10TokenPauseStatus\x12\x16\n\x12PauseNotApplicable\x10\x00\x12\n\n\x06Paused\x10\x01\x12\x0c\n\x08Unpaused\x10\x02*\xb1\x10\n\x13HederaFunctionality\x12\x08\n\x04NONE\x10\x00\x12\x12\n\x0e\x43ryptoTransfer\x10\x01\x12\x10\n\x0c\x43ryptoUpdate\x10\x02\x12\x10\n\x0c\x43ryptoDelete\x10\x03\x12\x19\n\x11\x43ryptoAddLiveHash\x10\x04\x1a\x02\x08\x01\x12\x1c\n\x14\x43ryptoDeleteLiveHash\x10\x05\x1a\x02\x08\x01\x12\x10\n\x0c\x43ontractCall\x10\x06\x12\x12\n\x0e\x43ontractCreate\x10\x07\x12\x12\n\x0e\x43ontractUpdate\x10\x08\x12\x0e\n\nFileCreate\x10\t\x12\x0e\n\nFileAppend\x10\n\x12\x0e\n\nFileUpdate\x10\x0b\x12\x0e\n\nFileDelete\x10\x0c\x12\x1b\n\x17\x43ryptoGetAccountBalance\x10\r\x12\x1b\n\x17\x43ryptoGetAccountRecords\x10\x0e\x12\x11\n\rCryptoGetInfo\x10\x0f\x12\x15\n\x11\x43ontractCallLocal\x10\x10\x12\x13\n\x0f\x43ontractGetInfo\x10\x11\x12\x17\n\x13\x43ontractGetBytecode\x10\x12\x12\x13\n\x0fGetBySolidityID\x10\x13\x12\x0c\n\x08GetByKey\x10\x14\x12\x19\n\x11\x43ryptoGetLiveHash\x10\x15\x1a\x02\x08\x01\x12\x18\n\x10\x43ryptoGetStakers\x10\x16\x1a\x02\x08\x01\x12\x13\n\x0f\x46ileGetContents\x10\x17\x12\x0f\n\x0b\x46ileGetInfo\x10\x18\x12\x18\n\x14TransactionGetRecord\x10\x19\x12\x1a\n\x12\x43ontractGetRecords\x10\x1a\x1a\x02\x08\x01\x12\x10\n\x0c\x43ryptoCreate\x10\x1b\x12\x10\n\x0cSystemDelete\x10\x1c\x12\x12\n\x0eSystemUndelete\x10\x1d\x12\x12\n\x0e\x43ontractDelete\x10\x1e\x12\n\n\x06\x46reeze\x10\x1f\x12\x1b\n\x17\x43reateTransactionRecord\x10 \x12\x1a\n\x16\x43ryptoAccountAutoRenew\x10!\x12\x15\n\x11\x43ontractAutoRenew\x10\"\x12\x12\n\x0eGetVersionInfo\x10#\x12\x19\n\x15TransactionGetReceipt\x10$\x12\x18\n\x14\x43onsensusCreateTopic\x10\x32\x12\x18\n\x14\x43onsensusUpdateTopic\x10\x33\x12\x18\n\x14\x43onsensusDeleteTopic\x10\x34\x12\x19\n\x15\x43onsensusGetTopicInfo\x10\x35\x12\x1a\n\x16\x43onsensusSubmitMessage\x10\x36\x12\x13\n\x0fUncheckedSubmit\x10\x37\x12\x0f\n\x0bTokenCreate\x10\x38\x12\x10\n\x0cTokenGetInfo\x10:\x12\x16\n\x12TokenFreezeAccount\x10;\x12\x18\n\x14TokenUnfreezeAccount\x10<\x12\x1a\n\x16TokenGrantKycToAccount\x10=\x12\x1d\n\x19TokenRevokeKycFromAccount\x10>\x12\x0f\n\x0bTokenDelete\x10?\x12\x0f\n\x0bTokenUpdate\x10@\x12\r\n\tTokenMint\x10\x41\x12\r\n\tTokenBurn\x10\x42\x12\x14\n\x10TokenAccountWipe\x10\x43\x12\x1b\n\x17TokenAssociateToAccount\x10\x44\x12\x1e\n\x1aTokenDissociateFromAccount\x10\x45\x12\x12\n\x0eScheduleCreate\x10\x46\x12\x12\n\x0eScheduleDelete\x10G\x12\x10\n\x0cScheduleSign\x10H\x12\x13\n\x0fScheduleGetInfo\x10I\x12\x1f\n\x17TokenGetAccountNftInfos\x10J\x1a\x02\x08\x01\x12\x17\n\x0fTokenGetNftInfo\x10K\x1a\x02\x08\x01\x12\x14\n\x10TokenGetNftInfos\x10L\x12\x1a\n\x16TokenFeeScheduleUpdate\x10M\x12\x1f\n\x17NetworkGetExecutionTime\x10N\x1a\x02\x08\x01\x12\x0e\n\nTokenPause\x10O\x12\x10\n\x0cTokenUnpause\x10P\x12\x1a\n\x16\x43ryptoApproveAllowance\x10Q\x12\x19\n\x15\x43ryptoDeleteAllowance\x10R\x12\x15\n\x11GetAccountDetails\x10S\x12\x17\n\x13\x45thereumTransaction\x10T\x12\x13\n\x0fNodeStakeUpdate\x10U\x12\x0c\n\x08UtilPrng\x10V\x12 \n\x18TransactionGetFastRecord\x10W\x1a\x02\x08\x01\x12\x13\n\x0fTokenUpdateNfts\x10X\x12\x0e\n\nNodeCreate\x10Y\x12\x0e\n\nNodeUpdate\x10Z\x12\x0e\n\nNodeDelete\x10[\x12\x0f\n\x0bTokenReject\x10\\\x12\x10\n\x0cTokenAirdrop\x10]\x12\x16\n\x12TokenCancelAirdrop\x10^\x12\x15\n\x11TokenClaimAirdrop\x10_\x12\x1d\n\x19StateSignatureTransaction\x10\x64\x12\x17\n\x13HintsKeyPublication\x10\x65\x12\x1a\n\x16HintsPreprocessingVote\x10\x66\x12\x19\n\x15HintsPartialSignature\x10g\x12\x1c\n\x18HistoryAssemblySignature\x10h\x12\x1e\n\x1aHistoryProofKeyPublication\x10i\x12\x14\n\x10HistoryProofVote\x10j\x12\x12\n\x0e\x43rsPublication\x10k\x12\x0f\n\x0b\x41tomicBatch\x10l\x12\x10\n\x0cLambdaSStore\x10m\x12\x10\n\x0cHookDispatch\x10nB&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.basic_types_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_HEDERAFUNCTIONALITY'].values_by_name["CryptoAddLiveHash"]._loaded_options = None + _globals['_HEDERAFUNCTIONALITY'].values_by_name["CryptoAddLiveHash"]._serialized_options = b'\010\001' + _globals['_HEDERAFUNCTIONALITY'].values_by_name["CryptoDeleteLiveHash"]._loaded_options = None + _globals['_HEDERAFUNCTIONALITY'].values_by_name["CryptoDeleteLiveHash"]._serialized_options = b'\010\001' + _globals['_HEDERAFUNCTIONALITY'].values_by_name["CryptoGetLiveHash"]._loaded_options = None + _globals['_HEDERAFUNCTIONALITY'].values_by_name["CryptoGetLiveHash"]._serialized_options = b'\010\001' + _globals['_HEDERAFUNCTIONALITY'].values_by_name["CryptoGetStakers"]._loaded_options = None + _globals['_HEDERAFUNCTIONALITY'].values_by_name["CryptoGetStakers"]._serialized_options = b'\010\001' + _globals['_HEDERAFUNCTIONALITY'].values_by_name["ContractGetRecords"]._loaded_options = None + _globals['_HEDERAFUNCTIONALITY'].values_by_name["ContractGetRecords"]._serialized_options = b'\010\001' + _globals['_HEDERAFUNCTIONALITY'].values_by_name["TokenGetAccountNftInfos"]._loaded_options = None + _globals['_HEDERAFUNCTIONALITY'].values_by_name["TokenGetAccountNftInfos"]._serialized_options = b'\010\001' + _globals['_HEDERAFUNCTIONALITY'].values_by_name["TokenGetNftInfo"]._loaded_options = None + _globals['_HEDERAFUNCTIONALITY'].values_by_name["TokenGetNftInfo"]._serialized_options = b'\010\001' + _globals['_HEDERAFUNCTIONALITY'].values_by_name["NetworkGetExecutionTime"]._loaded_options = None + _globals['_HEDERAFUNCTIONALITY'].values_by_name["NetworkGetExecutionTime"]._serialized_options = b'\010\001' + _globals['_HEDERAFUNCTIONALITY'].values_by_name["TransactionGetFastRecord"]._loaded_options = None + _globals['_HEDERAFUNCTIONALITY'].values_by_name["TransactionGetFastRecord"]._serialized_options = b'\010\001' + _globals['_KEY'].fields_by_name['RSA_3072']._loaded_options = None + _globals['_KEY'].fields_by_name['RSA_3072']._serialized_options = b'\030\001' + _globals['_KEY'].fields_by_name['ECDSA_384']._loaded_options = None + _globals['_KEY'].fields_by_name['ECDSA_384']._serialized_options = b'\030\001' + _globals['_SIGNATURE']._loaded_options = None + _globals['_SIGNATURE']._serialized_options = b'\030\001' + _globals['_THRESHOLDSIGNATURE']._loaded_options = None + _globals['_THRESHOLDSIGNATURE']._serialized_options = b'\030\001' + _globals['_SIGNATURELIST']._loaded_options = None + _globals['_SIGNATURELIST']._serialized_options = b'\030\001' + _globals['_SIGNATUREPAIR'].fields_by_name['RSA_3072']._loaded_options = None + _globals['_SIGNATUREPAIR'].fields_by_name['RSA_3072']._serialized_options = b'\030\001' + _globals['_SIGNATUREPAIR'].fields_by_name['ECDSA_384']._loaded_options = None + _globals['_SIGNATUREPAIR'].fields_by_name['ECDSA_384']._serialized_options = b'\030\001' + _globals['_TRANSACTIONFEESCHEDULE'].fields_by_name['feeData']._loaded_options = None + _globals['_TRANSACTIONFEESCHEDULE'].fields_by_name['feeData']._serialized_options = b'\030\001' + _globals['_NODEADDRESS'].fields_by_name['ipAddress']._loaded_options = None + _globals['_NODEADDRESS'].fields_by_name['ipAddress']._serialized_options = b'\030\001' + _globals['_NODEADDRESS'].fields_by_name['portno']._loaded_options = None + _globals['_NODEADDRESS'].fields_by_name['portno']._serialized_options = b'\030\001' + _globals['_NODEADDRESS'].fields_by_name['memo']._loaded_options = None + _globals['_NODEADDRESS'].fields_by_name['memo']._serialized_options = b'\030\001' + _globals['_NODEADDRESS'].fields_by_name['stake']._loaded_options = None + _globals['_NODEADDRESS'].fields_by_name['stake']._serialized_options = b'\030\001' + _globals['_BLOCKHASHALGORITHM']._serialized_start=5344 + _globals['_BLOCKHASHALGORITHM']._serialized_end=5378 + _globals['_TOKENTYPE']._serialized_start=5380 + _globals['_TOKENTYPE']._serialized_end=5437 + _globals['_SUBTYPE']._serialized_start=5440 + _globals['_SUBTYPE']._serialized_end=5719 + _globals['_TOKENSUPPLYTYPE']._serialized_start=5721 + _globals['_TOKENSUPPLYTYPE']._serialized_end=5764 + _globals['_TOKENKEYVALIDATION']._serialized_start=5766 + _globals['_TOKENKEYVALIDATION']._serialized_end=5826 + _globals['_TOKENFREEZESTATUS']._serialized_start=5828 + _globals['_TOKENFREEZESTATUS']._serialized_end=5898 + _globals['_TOKENKYCSTATUS']._serialized_start=5900 + _globals['_TOKENKYCSTATUS']._serialized_end=5964 + _globals['_TOKENPAUSESTATUS']._serialized_start=5966 + _globals['_TOKENPAUSESTATUS']._serialized_end=6034 + _globals['_HEDERAFUNCTIONALITY']._serialized_start=6037 + _globals['_HEDERAFUNCTIONALITY']._serialized_end=8134 + _globals['_SHARDID']._serialized_start=95 + _globals['_SHARDID']._serialized_end=122 + _globals['_REALMID']._serialized_start=124 + _globals['_REALMID']._serialized_end=169 + _globals['_TOKENID']._serialized_start=171 + _globals['_TOKENID']._serialized_end=234 + _globals['_ACCOUNTID']._serialized_start=236 + _globals['_ACCOUNTID']._serialized_end=333 + _globals['_NFTID']._serialized_start=335 + _globals['_NFTID']._serialized_end=399 + _globals['_FILEID']._serialized_start=401 + _globals['_FILEID']._serialized_end=462 + _globals['_CONTRACTID']._serialized_start=464 + _globals['_CONTRACTID']._serialized_end=570 + _globals['_TOPICID']._serialized_start=572 + _globals['_TOPICID']._serialized_end=635 + _globals['_SCHEDULEID']._serialized_start=637 + _globals['_SCHEDULEID']._serialized_end=706 + _globals['_TRANSACTIONID']._serialized_start=709 + _globals['_TRANSACTIONID']._serialized_end=844 + _globals['_HOOKID']._serialized_start=846 + _globals['_HOOKID']._serialized_end=911 + _globals['_HOOKENTITYID']._serialized_start=913 + _globals['_HOOKENTITYID']._serialized_end=980 + _globals['_HOOKCALL']._serialized_start=983 + _globals['_HOOKCALL']._serialized_end=1115 + _globals['_EVMHOOKCALL']._serialized_start=1117 + _globals['_EVMHOOKCALL']._serialized_end=1163 + _globals['_ACCOUNTAMOUNT']._serialized_start=1166 + _globals['_ACCOUNTAMOUNT']._serialized_end=1373 + _globals['_TRANSFERLIST']._serialized_start=1375 + _globals['_TRANSFERLIST']._serialized_end=1435 + _globals['_NFTTRANSFER']._serialized_start=1438 + _globals['_NFTTRANSFER']._serialized_end=1886 + _globals['_TOKENTRANSFERLIST']._serialized_start=1889 + _globals['_TOKENTRANSFERLIST']._serialized_end=2079 + _globals['_FRACTION']._serialized_start=2081 + _globals['_FRACTION']._serialized_end=2131 + _globals['_KEY']._serialized_start=2134 + _globals['_KEY']._serialized_end=2416 + _globals['_THRESHOLDKEY']._serialized_start=2418 + _globals['_THRESHOLDKEY']._serialized_end=2481 + _globals['_KEYLIST']._serialized_start=2483 + _globals['_KEYLIST']._serialized_end=2518 + _globals['_SIGNATURE']._serialized_start=2521 + _globals['_SIGNATURE']._serialized_end=2733 + _globals['_THRESHOLDSIGNATURE']._serialized_start=2735 + _globals['_THRESHOLDSIGNATURE']._serialized_end=2795 + _globals['_SIGNATURELIST']._serialized_start=2797 + _globals['_SIGNATURELIST']._serialized_end=2848 + _globals['_SIGNATUREPAIR']._serialized_start=2851 + _globals['_SIGNATUREPAIR']._serialized_end=3016 + _globals['_SIGNATUREMAP']._serialized_start=3018 + _globals['_SIGNATUREMAP']._serialized_end=3071 + _globals['_FEECOMPONENTS']._serialized_start=3074 + _globals['_FEECOMPONENTS']._serialized_end=3237 + _globals['_TRANSACTIONFEESCHEDULE']._serialized_start=3240 + _globals['_TRANSACTIONFEESCHEDULE']._serialized_end=3388 + _globals['_FEEDATA']._serialized_start=3391 + _globals['_FEEDATA']._serialized_end=3559 + _globals['_FEESCHEDULE']._serialized_start=3561 + _globals['_FEESCHEDULE']._serialized_end=3682 + _globals['_CURRENTANDNEXTFEESCHEDULE']._serialized_start=3684 + _globals['_CURRENTANDNEXTFEESCHEDULE']._serialized_end=3804 + _globals['_SERVICEENDPOINT']._serialized_start=3806 + _globals['_SERVICEENDPOINT']._serialized_end=3879 + _globals['_NODEADDRESS']._serialized_start=3882 + _globals['_NODEADDRESS']._serialized_end=4144 + _globals['_NODEADDRESSBOOK']._serialized_start=4146 + _globals['_NODEADDRESSBOOK']._serialized_end=4204 + _globals['_SEMANTICVERSION']._serialized_start=4206 + _globals['_SEMANTICVERSION']._serialized_end=4296 + _globals['_SETTING']._serialized_start=4298 + _globals['_SETTING']._serialized_end=4350 + _globals['_SERVICESCONFIGURATIONLIST']._serialized_start=4352 + _globals['_SERVICESCONFIGURATIONLIST']._serialized_end=4414 + _globals['_TOKENRELATIONSHIP']._serialized_start=4417 + _globals['_TOKENRELATIONSHIP']._serialized_end=4641 + _globals['_TOKENBALANCE']._serialized_start=4643 + _globals['_TOKENBALANCE']._serialized_end=4725 + _globals['_TOKENBALANCES']._serialized_start=4727 + _globals['_TOKENBALANCES']._serialized_end=4786 + _globals['_TOKENASSOCIATION']._serialized_start=4788 + _globals['_TOKENASSOCIATION']._serialized_end=4878 + _globals['_STAKINGINFO']._serialized_start=4881 + _globals['_STAKINGINFO']._serialized_end=5096 + _globals['_PENDINGAIRDROPID']._serialized_start=5099 + _globals['_PENDINGAIRDROPID']._serialized_end=5303 + _globals['_PENDINGAIRDROPVALUE']._serialized_start=5305 + _globals['_PENDINGAIRDROPVALUE']._serialized_end=5342 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/basic_types_pb2.pyi b/src/hiero_sdk_python/hapi/services/basic_types_pb2.pyi new file mode 100644 index 000000000..fb7ace77c --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/basic_types_pb2.pyi @@ -0,0 +1,755 @@ +from . import timestamp_pb2 as _timestamp_pb2 +from google.protobuf import wrappers_pb2 as _wrappers_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Iterable as _Iterable, Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class BlockHashAlgorithm(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = () + SHA2_384: _ClassVar[BlockHashAlgorithm] + +class TokenType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = () + FUNGIBLE_COMMON: _ClassVar[TokenType] + NON_FUNGIBLE_UNIQUE: _ClassVar[TokenType] + +class SubType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = () + DEFAULT: _ClassVar[SubType] + TOKEN_FUNGIBLE_COMMON: _ClassVar[SubType] + TOKEN_NON_FUNGIBLE_UNIQUE: _ClassVar[SubType] + TOKEN_FUNGIBLE_COMMON_WITH_CUSTOM_FEES: _ClassVar[SubType] + TOKEN_NON_FUNGIBLE_UNIQUE_WITH_CUSTOM_FEES: _ClassVar[SubType] + SCHEDULE_CREATE_CONTRACT_CALL: _ClassVar[SubType] + TOPIC_CREATE_WITH_CUSTOM_FEES: _ClassVar[SubType] + SUBMIT_MESSAGE_WITH_CUSTOM_FEES: _ClassVar[SubType] + +class TokenSupplyType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = () + INFINITE: _ClassVar[TokenSupplyType] + FINITE: _ClassVar[TokenSupplyType] + +class TokenKeyValidation(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = () + FULL_VALIDATION: _ClassVar[TokenKeyValidation] + NO_VALIDATION: _ClassVar[TokenKeyValidation] + +class TokenFreezeStatus(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = () + FreezeNotApplicable: _ClassVar[TokenFreezeStatus] + Frozen: _ClassVar[TokenFreezeStatus] + Unfrozen: _ClassVar[TokenFreezeStatus] + +class TokenKycStatus(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = () + KycNotApplicable: _ClassVar[TokenKycStatus] + Granted: _ClassVar[TokenKycStatus] + Revoked: _ClassVar[TokenKycStatus] + +class TokenPauseStatus(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = () + PauseNotApplicable: _ClassVar[TokenPauseStatus] + Paused: _ClassVar[TokenPauseStatus] + Unpaused: _ClassVar[TokenPauseStatus] + +class HederaFunctionality(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = () + NONE: _ClassVar[HederaFunctionality] + CryptoTransfer: _ClassVar[HederaFunctionality] + CryptoUpdate: _ClassVar[HederaFunctionality] + CryptoDelete: _ClassVar[HederaFunctionality] + CryptoAddLiveHash: _ClassVar[HederaFunctionality] + CryptoDeleteLiveHash: _ClassVar[HederaFunctionality] + ContractCall: _ClassVar[HederaFunctionality] + ContractCreate: _ClassVar[HederaFunctionality] + ContractUpdate: _ClassVar[HederaFunctionality] + FileCreate: _ClassVar[HederaFunctionality] + FileAppend: _ClassVar[HederaFunctionality] + FileUpdate: _ClassVar[HederaFunctionality] + FileDelete: _ClassVar[HederaFunctionality] + CryptoGetAccountBalance: _ClassVar[HederaFunctionality] + CryptoGetAccountRecords: _ClassVar[HederaFunctionality] + CryptoGetInfo: _ClassVar[HederaFunctionality] + ContractCallLocal: _ClassVar[HederaFunctionality] + ContractGetInfo: _ClassVar[HederaFunctionality] + ContractGetBytecode: _ClassVar[HederaFunctionality] + GetBySolidityID: _ClassVar[HederaFunctionality] + GetByKey: _ClassVar[HederaFunctionality] + CryptoGetLiveHash: _ClassVar[HederaFunctionality] + CryptoGetStakers: _ClassVar[HederaFunctionality] + FileGetContents: _ClassVar[HederaFunctionality] + FileGetInfo: _ClassVar[HederaFunctionality] + TransactionGetRecord: _ClassVar[HederaFunctionality] + ContractGetRecords: _ClassVar[HederaFunctionality] + CryptoCreate: _ClassVar[HederaFunctionality] + SystemDelete: _ClassVar[HederaFunctionality] + SystemUndelete: _ClassVar[HederaFunctionality] + ContractDelete: _ClassVar[HederaFunctionality] + Freeze: _ClassVar[HederaFunctionality] + CreateTransactionRecord: _ClassVar[HederaFunctionality] + CryptoAccountAutoRenew: _ClassVar[HederaFunctionality] + ContractAutoRenew: _ClassVar[HederaFunctionality] + GetVersionInfo: _ClassVar[HederaFunctionality] + TransactionGetReceipt: _ClassVar[HederaFunctionality] + ConsensusCreateTopic: _ClassVar[HederaFunctionality] + ConsensusUpdateTopic: _ClassVar[HederaFunctionality] + ConsensusDeleteTopic: _ClassVar[HederaFunctionality] + ConsensusGetTopicInfo: _ClassVar[HederaFunctionality] + ConsensusSubmitMessage: _ClassVar[HederaFunctionality] + UncheckedSubmit: _ClassVar[HederaFunctionality] + TokenCreate: _ClassVar[HederaFunctionality] + TokenGetInfo: _ClassVar[HederaFunctionality] + TokenFreezeAccount: _ClassVar[HederaFunctionality] + TokenUnfreezeAccount: _ClassVar[HederaFunctionality] + TokenGrantKycToAccount: _ClassVar[HederaFunctionality] + TokenRevokeKycFromAccount: _ClassVar[HederaFunctionality] + TokenDelete: _ClassVar[HederaFunctionality] + TokenUpdate: _ClassVar[HederaFunctionality] + TokenMint: _ClassVar[HederaFunctionality] + TokenBurn: _ClassVar[HederaFunctionality] + TokenAccountWipe: _ClassVar[HederaFunctionality] + TokenAssociateToAccount: _ClassVar[HederaFunctionality] + TokenDissociateFromAccount: _ClassVar[HederaFunctionality] + ScheduleCreate: _ClassVar[HederaFunctionality] + ScheduleDelete: _ClassVar[HederaFunctionality] + ScheduleSign: _ClassVar[HederaFunctionality] + ScheduleGetInfo: _ClassVar[HederaFunctionality] + TokenGetAccountNftInfos: _ClassVar[HederaFunctionality] + TokenGetNftInfo: _ClassVar[HederaFunctionality] + TokenGetNftInfos: _ClassVar[HederaFunctionality] + TokenFeeScheduleUpdate: _ClassVar[HederaFunctionality] + NetworkGetExecutionTime: _ClassVar[HederaFunctionality] + TokenPause: _ClassVar[HederaFunctionality] + TokenUnpause: _ClassVar[HederaFunctionality] + CryptoApproveAllowance: _ClassVar[HederaFunctionality] + CryptoDeleteAllowance: _ClassVar[HederaFunctionality] + GetAccountDetails: _ClassVar[HederaFunctionality] + EthereumTransaction: _ClassVar[HederaFunctionality] + NodeStakeUpdate: _ClassVar[HederaFunctionality] + UtilPrng: _ClassVar[HederaFunctionality] + TransactionGetFastRecord: _ClassVar[HederaFunctionality] + TokenUpdateNfts: _ClassVar[HederaFunctionality] + NodeCreate: _ClassVar[HederaFunctionality] + NodeUpdate: _ClassVar[HederaFunctionality] + NodeDelete: _ClassVar[HederaFunctionality] + TokenReject: _ClassVar[HederaFunctionality] + TokenAirdrop: _ClassVar[HederaFunctionality] + TokenCancelAirdrop: _ClassVar[HederaFunctionality] + TokenClaimAirdrop: _ClassVar[HederaFunctionality] + StateSignatureTransaction: _ClassVar[HederaFunctionality] + HintsKeyPublication: _ClassVar[HederaFunctionality] + HintsPreprocessingVote: _ClassVar[HederaFunctionality] + HintsPartialSignature: _ClassVar[HederaFunctionality] + HistoryAssemblySignature: _ClassVar[HederaFunctionality] + HistoryProofKeyPublication: _ClassVar[HederaFunctionality] + HistoryProofVote: _ClassVar[HederaFunctionality] + CrsPublication: _ClassVar[HederaFunctionality] + AtomicBatch: _ClassVar[HederaFunctionality] + LambdaSStore: _ClassVar[HederaFunctionality] + HookDispatch: _ClassVar[HederaFunctionality] +SHA2_384: BlockHashAlgorithm +FUNGIBLE_COMMON: TokenType +NON_FUNGIBLE_UNIQUE: TokenType +DEFAULT: SubType +TOKEN_FUNGIBLE_COMMON: SubType +TOKEN_NON_FUNGIBLE_UNIQUE: SubType +TOKEN_FUNGIBLE_COMMON_WITH_CUSTOM_FEES: SubType +TOKEN_NON_FUNGIBLE_UNIQUE_WITH_CUSTOM_FEES: SubType +SCHEDULE_CREATE_CONTRACT_CALL: SubType +TOPIC_CREATE_WITH_CUSTOM_FEES: SubType +SUBMIT_MESSAGE_WITH_CUSTOM_FEES: SubType +INFINITE: TokenSupplyType +FINITE: TokenSupplyType +FULL_VALIDATION: TokenKeyValidation +NO_VALIDATION: TokenKeyValidation +FreezeNotApplicable: TokenFreezeStatus +Frozen: TokenFreezeStatus +Unfrozen: TokenFreezeStatus +KycNotApplicable: TokenKycStatus +Granted: TokenKycStatus +Revoked: TokenKycStatus +PauseNotApplicable: TokenPauseStatus +Paused: TokenPauseStatus +Unpaused: TokenPauseStatus +NONE: HederaFunctionality +CryptoTransfer: HederaFunctionality +CryptoUpdate: HederaFunctionality +CryptoDelete: HederaFunctionality +CryptoAddLiveHash: HederaFunctionality +CryptoDeleteLiveHash: HederaFunctionality +ContractCall: HederaFunctionality +ContractCreate: HederaFunctionality +ContractUpdate: HederaFunctionality +FileCreate: HederaFunctionality +FileAppend: HederaFunctionality +FileUpdate: HederaFunctionality +FileDelete: HederaFunctionality +CryptoGetAccountBalance: HederaFunctionality +CryptoGetAccountRecords: HederaFunctionality +CryptoGetInfo: HederaFunctionality +ContractCallLocal: HederaFunctionality +ContractGetInfo: HederaFunctionality +ContractGetBytecode: HederaFunctionality +GetBySolidityID: HederaFunctionality +GetByKey: HederaFunctionality +CryptoGetLiveHash: HederaFunctionality +CryptoGetStakers: HederaFunctionality +FileGetContents: HederaFunctionality +FileGetInfo: HederaFunctionality +TransactionGetRecord: HederaFunctionality +ContractGetRecords: HederaFunctionality +CryptoCreate: HederaFunctionality +SystemDelete: HederaFunctionality +SystemUndelete: HederaFunctionality +ContractDelete: HederaFunctionality +Freeze: HederaFunctionality +CreateTransactionRecord: HederaFunctionality +CryptoAccountAutoRenew: HederaFunctionality +ContractAutoRenew: HederaFunctionality +GetVersionInfo: HederaFunctionality +TransactionGetReceipt: HederaFunctionality +ConsensusCreateTopic: HederaFunctionality +ConsensusUpdateTopic: HederaFunctionality +ConsensusDeleteTopic: HederaFunctionality +ConsensusGetTopicInfo: HederaFunctionality +ConsensusSubmitMessage: HederaFunctionality +UncheckedSubmit: HederaFunctionality +TokenCreate: HederaFunctionality +TokenGetInfo: HederaFunctionality +TokenFreezeAccount: HederaFunctionality +TokenUnfreezeAccount: HederaFunctionality +TokenGrantKycToAccount: HederaFunctionality +TokenRevokeKycFromAccount: HederaFunctionality +TokenDelete: HederaFunctionality +TokenUpdate: HederaFunctionality +TokenMint: HederaFunctionality +TokenBurn: HederaFunctionality +TokenAccountWipe: HederaFunctionality +TokenAssociateToAccount: HederaFunctionality +TokenDissociateFromAccount: HederaFunctionality +ScheduleCreate: HederaFunctionality +ScheduleDelete: HederaFunctionality +ScheduleSign: HederaFunctionality +ScheduleGetInfo: HederaFunctionality +TokenGetAccountNftInfos: HederaFunctionality +TokenGetNftInfo: HederaFunctionality +TokenGetNftInfos: HederaFunctionality +TokenFeeScheduleUpdate: HederaFunctionality +NetworkGetExecutionTime: HederaFunctionality +TokenPause: HederaFunctionality +TokenUnpause: HederaFunctionality +CryptoApproveAllowance: HederaFunctionality +CryptoDeleteAllowance: HederaFunctionality +GetAccountDetails: HederaFunctionality +EthereumTransaction: HederaFunctionality +NodeStakeUpdate: HederaFunctionality +UtilPrng: HederaFunctionality +TransactionGetFastRecord: HederaFunctionality +TokenUpdateNfts: HederaFunctionality +NodeCreate: HederaFunctionality +NodeUpdate: HederaFunctionality +NodeDelete: HederaFunctionality +TokenReject: HederaFunctionality +TokenAirdrop: HederaFunctionality +TokenCancelAirdrop: HederaFunctionality +TokenClaimAirdrop: HederaFunctionality +StateSignatureTransaction: HederaFunctionality +HintsKeyPublication: HederaFunctionality +HintsPreprocessingVote: HederaFunctionality +HintsPartialSignature: HederaFunctionality +HistoryAssemblySignature: HederaFunctionality +HistoryProofKeyPublication: HederaFunctionality +HistoryProofVote: HederaFunctionality +CrsPublication: HederaFunctionality +AtomicBatch: HederaFunctionality +LambdaSStore: HederaFunctionality +HookDispatch: HederaFunctionality + +class ShardID(_message.Message): + __slots__ = ("shardNum",) + SHARDNUM_FIELD_NUMBER: _ClassVar[int] + shardNum: int + def __init__(self, shardNum: _Optional[int] = ...) -> None: ... + +class RealmID(_message.Message): + __slots__ = ("shardNum", "realmNum") + SHARDNUM_FIELD_NUMBER: _ClassVar[int] + REALMNUM_FIELD_NUMBER: _ClassVar[int] + shardNum: int + realmNum: int + def __init__(self, shardNum: _Optional[int] = ..., realmNum: _Optional[int] = ...) -> None: ... + +class TokenID(_message.Message): + __slots__ = ("shardNum", "realmNum", "tokenNum") + SHARDNUM_FIELD_NUMBER: _ClassVar[int] + REALMNUM_FIELD_NUMBER: _ClassVar[int] + TOKENNUM_FIELD_NUMBER: _ClassVar[int] + shardNum: int + realmNum: int + tokenNum: int + def __init__(self, shardNum: _Optional[int] = ..., realmNum: _Optional[int] = ..., tokenNum: _Optional[int] = ...) -> None: ... + +class AccountID(_message.Message): + __slots__ = ("shardNum", "realmNum", "accountNum", "alias") + SHARDNUM_FIELD_NUMBER: _ClassVar[int] + REALMNUM_FIELD_NUMBER: _ClassVar[int] + ACCOUNTNUM_FIELD_NUMBER: _ClassVar[int] + ALIAS_FIELD_NUMBER: _ClassVar[int] + shardNum: int + realmNum: int + accountNum: int + alias: bytes + def __init__(self, shardNum: _Optional[int] = ..., realmNum: _Optional[int] = ..., accountNum: _Optional[int] = ..., alias: _Optional[bytes] = ...) -> None: ... + +class NftID(_message.Message): + __slots__ = ("token_ID", "serial_number") + TOKEN_ID_FIELD_NUMBER: _ClassVar[int] + SERIAL_NUMBER_FIELD_NUMBER: _ClassVar[int] + token_ID: TokenID + serial_number: int + def __init__(self, token_ID: _Optional[_Union[TokenID, _Mapping]] = ..., serial_number: _Optional[int] = ...) -> None: ... + +class FileID(_message.Message): + __slots__ = ("shardNum", "realmNum", "fileNum") + SHARDNUM_FIELD_NUMBER: _ClassVar[int] + REALMNUM_FIELD_NUMBER: _ClassVar[int] + FILENUM_FIELD_NUMBER: _ClassVar[int] + shardNum: int + realmNum: int + fileNum: int + def __init__(self, shardNum: _Optional[int] = ..., realmNum: _Optional[int] = ..., fileNum: _Optional[int] = ...) -> None: ... + +class ContractID(_message.Message): + __slots__ = ("shardNum", "realmNum", "contractNum", "evm_address") + SHARDNUM_FIELD_NUMBER: _ClassVar[int] + REALMNUM_FIELD_NUMBER: _ClassVar[int] + CONTRACTNUM_FIELD_NUMBER: _ClassVar[int] + EVM_ADDRESS_FIELD_NUMBER: _ClassVar[int] + shardNum: int + realmNum: int + contractNum: int + evm_address: bytes + def __init__(self, shardNum: _Optional[int] = ..., realmNum: _Optional[int] = ..., contractNum: _Optional[int] = ..., evm_address: _Optional[bytes] = ...) -> None: ... + +class TopicID(_message.Message): + __slots__ = ("shardNum", "realmNum", "topicNum") + SHARDNUM_FIELD_NUMBER: _ClassVar[int] + REALMNUM_FIELD_NUMBER: _ClassVar[int] + TOPICNUM_FIELD_NUMBER: _ClassVar[int] + shardNum: int + realmNum: int + topicNum: int + def __init__(self, shardNum: _Optional[int] = ..., realmNum: _Optional[int] = ..., topicNum: _Optional[int] = ...) -> None: ... + +class ScheduleID(_message.Message): + __slots__ = ("shardNum", "realmNum", "scheduleNum") + SHARDNUM_FIELD_NUMBER: _ClassVar[int] + REALMNUM_FIELD_NUMBER: _ClassVar[int] + SCHEDULENUM_FIELD_NUMBER: _ClassVar[int] + shardNum: int + realmNum: int + scheduleNum: int + def __init__(self, shardNum: _Optional[int] = ..., realmNum: _Optional[int] = ..., scheduleNum: _Optional[int] = ...) -> None: ... + +class TransactionID(_message.Message): + __slots__ = ("transactionValidStart", "accountID", "scheduled", "nonce") + TRANSACTIONVALIDSTART_FIELD_NUMBER: _ClassVar[int] + ACCOUNTID_FIELD_NUMBER: _ClassVar[int] + SCHEDULED_FIELD_NUMBER: _ClassVar[int] + NONCE_FIELD_NUMBER: _ClassVar[int] + transactionValidStart: _timestamp_pb2.Timestamp + accountID: AccountID + scheduled: bool + nonce: int + def __init__(self, transactionValidStart: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., accountID: _Optional[_Union[AccountID, _Mapping]] = ..., scheduled: bool = ..., nonce: _Optional[int] = ...) -> None: ... + +class HookId(_message.Message): + __slots__ = ("entity_id", "hook_id") + ENTITY_ID_FIELD_NUMBER: _ClassVar[int] + HOOK_ID_FIELD_NUMBER: _ClassVar[int] + entity_id: HookEntityId + hook_id: int + def __init__(self, entity_id: _Optional[_Union[HookEntityId, _Mapping]] = ..., hook_id: _Optional[int] = ...) -> None: ... + +class HookEntityId(_message.Message): + __slots__ = ("account_id",) + ACCOUNT_ID_FIELD_NUMBER: _ClassVar[int] + account_id: AccountID + def __init__(self, account_id: _Optional[_Union[AccountID, _Mapping]] = ...) -> None: ... + +class HookCall(_message.Message): + __slots__ = ("full_hook_id", "hook_id", "evm_hook_call") + FULL_HOOK_ID_FIELD_NUMBER: _ClassVar[int] + HOOK_ID_FIELD_NUMBER: _ClassVar[int] + EVM_HOOK_CALL_FIELD_NUMBER: _ClassVar[int] + full_hook_id: HookId + hook_id: int + evm_hook_call: EvmHookCall + def __init__(self, full_hook_id: _Optional[_Union[HookId, _Mapping]] = ..., hook_id: _Optional[int] = ..., evm_hook_call: _Optional[_Union[EvmHookCall, _Mapping]] = ...) -> None: ... + +class EvmHookCall(_message.Message): + __slots__ = ("data", "gas_limit") + DATA_FIELD_NUMBER: _ClassVar[int] + GAS_LIMIT_FIELD_NUMBER: _ClassVar[int] + data: bytes + gas_limit: int + def __init__(self, data: _Optional[bytes] = ..., gas_limit: _Optional[int] = ...) -> None: ... + +class AccountAmount(_message.Message): + __slots__ = ("accountID", "amount", "is_approval", "pre_tx_allowance_hook", "pre_post_tx_allowance_hook") + ACCOUNTID_FIELD_NUMBER: _ClassVar[int] + AMOUNT_FIELD_NUMBER: _ClassVar[int] + IS_APPROVAL_FIELD_NUMBER: _ClassVar[int] + PRE_TX_ALLOWANCE_HOOK_FIELD_NUMBER: _ClassVar[int] + PRE_POST_TX_ALLOWANCE_HOOK_FIELD_NUMBER: _ClassVar[int] + accountID: AccountID + amount: int + is_approval: bool + pre_tx_allowance_hook: HookCall + pre_post_tx_allowance_hook: HookCall + def __init__(self, accountID: _Optional[_Union[AccountID, _Mapping]] = ..., amount: _Optional[int] = ..., is_approval: bool = ..., pre_tx_allowance_hook: _Optional[_Union[HookCall, _Mapping]] = ..., pre_post_tx_allowance_hook: _Optional[_Union[HookCall, _Mapping]] = ...) -> None: ... + +class TransferList(_message.Message): + __slots__ = ("accountAmounts",) + ACCOUNTAMOUNTS_FIELD_NUMBER: _ClassVar[int] + accountAmounts: _containers.RepeatedCompositeFieldContainer[AccountAmount] + def __init__(self, accountAmounts: _Optional[_Iterable[_Union[AccountAmount, _Mapping]]] = ...) -> None: ... + +class NftTransfer(_message.Message): + __slots__ = ("senderAccountID", "receiverAccountID", "serialNumber", "is_approval", "pre_tx_sender_allowance_hook", "pre_post_tx_sender_allowance_hook", "pre_tx_receiver_allowance_hook", "pre_post_tx_receiver_allowance_hook") + SENDERACCOUNTID_FIELD_NUMBER: _ClassVar[int] + RECEIVERACCOUNTID_FIELD_NUMBER: _ClassVar[int] + SERIALNUMBER_FIELD_NUMBER: _ClassVar[int] + IS_APPROVAL_FIELD_NUMBER: _ClassVar[int] + PRE_TX_SENDER_ALLOWANCE_HOOK_FIELD_NUMBER: _ClassVar[int] + PRE_POST_TX_SENDER_ALLOWANCE_HOOK_FIELD_NUMBER: _ClassVar[int] + PRE_TX_RECEIVER_ALLOWANCE_HOOK_FIELD_NUMBER: _ClassVar[int] + PRE_POST_TX_RECEIVER_ALLOWANCE_HOOK_FIELD_NUMBER: _ClassVar[int] + senderAccountID: AccountID + receiverAccountID: AccountID + serialNumber: int + is_approval: bool + pre_tx_sender_allowance_hook: HookCall + pre_post_tx_sender_allowance_hook: HookCall + pre_tx_receiver_allowance_hook: HookCall + pre_post_tx_receiver_allowance_hook: HookCall + def __init__(self, senderAccountID: _Optional[_Union[AccountID, _Mapping]] = ..., receiverAccountID: _Optional[_Union[AccountID, _Mapping]] = ..., serialNumber: _Optional[int] = ..., is_approval: bool = ..., pre_tx_sender_allowance_hook: _Optional[_Union[HookCall, _Mapping]] = ..., pre_post_tx_sender_allowance_hook: _Optional[_Union[HookCall, _Mapping]] = ..., pre_tx_receiver_allowance_hook: _Optional[_Union[HookCall, _Mapping]] = ..., pre_post_tx_receiver_allowance_hook: _Optional[_Union[HookCall, _Mapping]] = ...) -> None: ... + +class TokenTransferList(_message.Message): + __slots__ = ("token", "transfers", "nftTransfers", "expected_decimals") + TOKEN_FIELD_NUMBER: _ClassVar[int] + TRANSFERS_FIELD_NUMBER: _ClassVar[int] + NFTTRANSFERS_FIELD_NUMBER: _ClassVar[int] + EXPECTED_DECIMALS_FIELD_NUMBER: _ClassVar[int] + token: TokenID + transfers: _containers.RepeatedCompositeFieldContainer[AccountAmount] + nftTransfers: _containers.RepeatedCompositeFieldContainer[NftTransfer] + expected_decimals: _wrappers_pb2.UInt32Value + def __init__(self, token: _Optional[_Union[TokenID, _Mapping]] = ..., transfers: _Optional[_Iterable[_Union[AccountAmount, _Mapping]]] = ..., nftTransfers: _Optional[_Iterable[_Union[NftTransfer, _Mapping]]] = ..., expected_decimals: _Optional[_Union[_wrappers_pb2.UInt32Value, _Mapping]] = ...) -> None: ... + +class Fraction(_message.Message): + __slots__ = ("numerator", "denominator") + NUMERATOR_FIELD_NUMBER: _ClassVar[int] + DENOMINATOR_FIELD_NUMBER: _ClassVar[int] + numerator: int + denominator: int + def __init__(self, numerator: _Optional[int] = ..., denominator: _Optional[int] = ...) -> None: ... + +class Key(_message.Message): + __slots__ = ("contractID", "ed25519", "RSA_3072", "ECDSA_384", "thresholdKey", "keyList", "ECDSA_secp256k1", "delegatable_contract_id") + CONTRACTID_FIELD_NUMBER: _ClassVar[int] + ED25519_FIELD_NUMBER: _ClassVar[int] + RSA_3072_FIELD_NUMBER: _ClassVar[int] + ECDSA_384_FIELD_NUMBER: _ClassVar[int] + THRESHOLDKEY_FIELD_NUMBER: _ClassVar[int] + KEYLIST_FIELD_NUMBER: _ClassVar[int] + ECDSA_SECP256K1_FIELD_NUMBER: _ClassVar[int] + DELEGATABLE_CONTRACT_ID_FIELD_NUMBER: _ClassVar[int] + contractID: ContractID + ed25519: bytes + RSA_3072: bytes + ECDSA_384: bytes + thresholdKey: ThresholdKey + keyList: KeyList + ECDSA_secp256k1: bytes + delegatable_contract_id: ContractID + def __init__(self, contractID: _Optional[_Union[ContractID, _Mapping]] = ..., ed25519: _Optional[bytes] = ..., RSA_3072: _Optional[bytes] = ..., ECDSA_384: _Optional[bytes] = ..., thresholdKey: _Optional[_Union[ThresholdKey, _Mapping]] = ..., keyList: _Optional[_Union[KeyList, _Mapping]] = ..., ECDSA_secp256k1: _Optional[bytes] = ..., delegatable_contract_id: _Optional[_Union[ContractID, _Mapping]] = ...) -> None: ... + +class ThresholdKey(_message.Message): + __slots__ = ("threshold", "keys") + THRESHOLD_FIELD_NUMBER: _ClassVar[int] + KEYS_FIELD_NUMBER: _ClassVar[int] + threshold: int + keys: KeyList + def __init__(self, threshold: _Optional[int] = ..., keys: _Optional[_Union[KeyList, _Mapping]] = ...) -> None: ... + +class KeyList(_message.Message): + __slots__ = ("keys",) + KEYS_FIELD_NUMBER: _ClassVar[int] + keys: _containers.RepeatedCompositeFieldContainer[Key] + def __init__(self, keys: _Optional[_Iterable[_Union[Key, _Mapping]]] = ...) -> None: ... + +class Signature(_message.Message): + __slots__ = ("contract", "ed25519", "RSA_3072", "ECDSA_384", "thresholdSignature", "signatureList") + CONTRACT_FIELD_NUMBER: _ClassVar[int] + ED25519_FIELD_NUMBER: _ClassVar[int] + RSA_3072_FIELD_NUMBER: _ClassVar[int] + ECDSA_384_FIELD_NUMBER: _ClassVar[int] + THRESHOLDSIGNATURE_FIELD_NUMBER: _ClassVar[int] + SIGNATURELIST_FIELD_NUMBER: _ClassVar[int] + contract: bytes + ed25519: bytes + RSA_3072: bytes + ECDSA_384: bytes + thresholdSignature: ThresholdSignature + signatureList: SignatureList + def __init__(self, contract: _Optional[bytes] = ..., ed25519: _Optional[bytes] = ..., RSA_3072: _Optional[bytes] = ..., ECDSA_384: _Optional[bytes] = ..., thresholdSignature: _Optional[_Union[ThresholdSignature, _Mapping]] = ..., signatureList: _Optional[_Union[SignatureList, _Mapping]] = ...) -> None: ... + +class ThresholdSignature(_message.Message): + __slots__ = ("sigs",) + SIGS_FIELD_NUMBER: _ClassVar[int] + sigs: SignatureList + def __init__(self, sigs: _Optional[_Union[SignatureList, _Mapping]] = ...) -> None: ... + +class SignatureList(_message.Message): + __slots__ = ("sigs",) + SIGS_FIELD_NUMBER: _ClassVar[int] + sigs: _containers.RepeatedCompositeFieldContainer[Signature] + def __init__(self, sigs: _Optional[_Iterable[_Union[Signature, _Mapping]]] = ...) -> None: ... + +class SignaturePair(_message.Message): + __slots__ = ("pubKeyPrefix", "contract", "ed25519", "RSA_3072", "ECDSA_384", "ECDSA_secp256k1") + PUBKEYPREFIX_FIELD_NUMBER: _ClassVar[int] + CONTRACT_FIELD_NUMBER: _ClassVar[int] + ED25519_FIELD_NUMBER: _ClassVar[int] + RSA_3072_FIELD_NUMBER: _ClassVar[int] + ECDSA_384_FIELD_NUMBER: _ClassVar[int] + ECDSA_SECP256K1_FIELD_NUMBER: _ClassVar[int] + pubKeyPrefix: bytes + contract: bytes + ed25519: bytes + RSA_3072: bytes + ECDSA_384: bytes + ECDSA_secp256k1: bytes + def __init__(self, pubKeyPrefix: _Optional[bytes] = ..., contract: _Optional[bytes] = ..., ed25519: _Optional[bytes] = ..., RSA_3072: _Optional[bytes] = ..., ECDSA_384: _Optional[bytes] = ..., ECDSA_secp256k1: _Optional[bytes] = ...) -> None: ... + +class SignatureMap(_message.Message): + __slots__ = ("sigPair",) + SIGPAIR_FIELD_NUMBER: _ClassVar[int] + sigPair: _containers.RepeatedCompositeFieldContainer[SignaturePair] + def __init__(self, sigPair: _Optional[_Iterable[_Union[SignaturePair, _Mapping]]] = ...) -> None: ... + +class FeeComponents(_message.Message): + __slots__ = ("min", "max", "constant", "bpt", "vpt", "rbh", "sbh", "gas", "tv", "bpr", "sbpr") + MIN_FIELD_NUMBER: _ClassVar[int] + MAX_FIELD_NUMBER: _ClassVar[int] + CONSTANT_FIELD_NUMBER: _ClassVar[int] + BPT_FIELD_NUMBER: _ClassVar[int] + VPT_FIELD_NUMBER: _ClassVar[int] + RBH_FIELD_NUMBER: _ClassVar[int] + SBH_FIELD_NUMBER: _ClassVar[int] + GAS_FIELD_NUMBER: _ClassVar[int] + TV_FIELD_NUMBER: _ClassVar[int] + BPR_FIELD_NUMBER: _ClassVar[int] + SBPR_FIELD_NUMBER: _ClassVar[int] + min: int + max: int + constant: int + bpt: int + vpt: int + rbh: int + sbh: int + gas: int + tv: int + bpr: int + sbpr: int + def __init__(self, min: _Optional[int] = ..., max: _Optional[int] = ..., constant: _Optional[int] = ..., bpt: _Optional[int] = ..., vpt: _Optional[int] = ..., rbh: _Optional[int] = ..., sbh: _Optional[int] = ..., gas: _Optional[int] = ..., tv: _Optional[int] = ..., bpr: _Optional[int] = ..., sbpr: _Optional[int] = ...) -> None: ... + +class TransactionFeeSchedule(_message.Message): + __slots__ = ("hederaFunctionality", "feeData", "fees") + HEDERAFUNCTIONALITY_FIELD_NUMBER: _ClassVar[int] + FEEDATA_FIELD_NUMBER: _ClassVar[int] + FEES_FIELD_NUMBER: _ClassVar[int] + hederaFunctionality: HederaFunctionality + feeData: FeeData + fees: _containers.RepeatedCompositeFieldContainer[FeeData] + def __init__(self, hederaFunctionality: _Optional[_Union[HederaFunctionality, str]] = ..., feeData: _Optional[_Union[FeeData, _Mapping]] = ..., fees: _Optional[_Iterable[_Union[FeeData, _Mapping]]] = ...) -> None: ... + +class FeeData(_message.Message): + __slots__ = ("nodedata", "networkdata", "servicedata", "subType") + NODEDATA_FIELD_NUMBER: _ClassVar[int] + NETWORKDATA_FIELD_NUMBER: _ClassVar[int] + SERVICEDATA_FIELD_NUMBER: _ClassVar[int] + SUBTYPE_FIELD_NUMBER: _ClassVar[int] + nodedata: FeeComponents + networkdata: FeeComponents + servicedata: FeeComponents + subType: SubType + def __init__(self, nodedata: _Optional[_Union[FeeComponents, _Mapping]] = ..., networkdata: _Optional[_Union[FeeComponents, _Mapping]] = ..., servicedata: _Optional[_Union[FeeComponents, _Mapping]] = ..., subType: _Optional[_Union[SubType, str]] = ...) -> None: ... + +class FeeSchedule(_message.Message): + __slots__ = ("transactionFeeSchedule", "expiryTime") + TRANSACTIONFEESCHEDULE_FIELD_NUMBER: _ClassVar[int] + EXPIRYTIME_FIELD_NUMBER: _ClassVar[int] + transactionFeeSchedule: _containers.RepeatedCompositeFieldContainer[TransactionFeeSchedule] + expiryTime: _timestamp_pb2.TimestampSeconds + def __init__(self, transactionFeeSchedule: _Optional[_Iterable[_Union[TransactionFeeSchedule, _Mapping]]] = ..., expiryTime: _Optional[_Union[_timestamp_pb2.TimestampSeconds, _Mapping]] = ...) -> None: ... + +class CurrentAndNextFeeSchedule(_message.Message): + __slots__ = ("currentFeeSchedule", "nextFeeSchedule") + CURRENTFEESCHEDULE_FIELD_NUMBER: _ClassVar[int] + NEXTFEESCHEDULE_FIELD_NUMBER: _ClassVar[int] + currentFeeSchedule: FeeSchedule + nextFeeSchedule: FeeSchedule + def __init__(self, currentFeeSchedule: _Optional[_Union[FeeSchedule, _Mapping]] = ..., nextFeeSchedule: _Optional[_Union[FeeSchedule, _Mapping]] = ...) -> None: ... + +class ServiceEndpoint(_message.Message): + __slots__ = ("ipAddressV4", "port", "domain_name") + IPADDRESSV4_FIELD_NUMBER: _ClassVar[int] + PORT_FIELD_NUMBER: _ClassVar[int] + DOMAIN_NAME_FIELD_NUMBER: _ClassVar[int] + ipAddressV4: bytes + port: int + domain_name: str + def __init__(self, ipAddressV4: _Optional[bytes] = ..., port: _Optional[int] = ..., domain_name: _Optional[str] = ...) -> None: ... + +class NodeAddress(_message.Message): + __slots__ = ("ipAddress", "portno", "memo", "RSA_PubKey", "nodeId", "nodeAccountId", "nodeCertHash", "serviceEndpoint", "description", "stake") + IPADDRESS_FIELD_NUMBER: _ClassVar[int] + PORTNO_FIELD_NUMBER: _ClassVar[int] + MEMO_FIELD_NUMBER: _ClassVar[int] + RSA_PUBKEY_FIELD_NUMBER: _ClassVar[int] + NODEID_FIELD_NUMBER: _ClassVar[int] + NODEACCOUNTID_FIELD_NUMBER: _ClassVar[int] + NODECERTHASH_FIELD_NUMBER: _ClassVar[int] + SERVICEENDPOINT_FIELD_NUMBER: _ClassVar[int] + DESCRIPTION_FIELD_NUMBER: _ClassVar[int] + STAKE_FIELD_NUMBER: _ClassVar[int] + ipAddress: bytes + portno: int + memo: bytes + RSA_PubKey: str + nodeId: int + nodeAccountId: AccountID + nodeCertHash: bytes + serviceEndpoint: _containers.RepeatedCompositeFieldContainer[ServiceEndpoint] + description: str + stake: int + def __init__(self, ipAddress: _Optional[bytes] = ..., portno: _Optional[int] = ..., memo: _Optional[bytes] = ..., RSA_PubKey: _Optional[str] = ..., nodeId: _Optional[int] = ..., nodeAccountId: _Optional[_Union[AccountID, _Mapping]] = ..., nodeCertHash: _Optional[bytes] = ..., serviceEndpoint: _Optional[_Iterable[_Union[ServiceEndpoint, _Mapping]]] = ..., description: _Optional[str] = ..., stake: _Optional[int] = ...) -> None: ... + +class NodeAddressBook(_message.Message): + __slots__ = ("nodeAddress",) + NODEADDRESS_FIELD_NUMBER: _ClassVar[int] + nodeAddress: _containers.RepeatedCompositeFieldContainer[NodeAddress] + def __init__(self, nodeAddress: _Optional[_Iterable[_Union[NodeAddress, _Mapping]]] = ...) -> None: ... + +class SemanticVersion(_message.Message): + __slots__ = ("major", "minor", "patch", "pre", "build") + MAJOR_FIELD_NUMBER: _ClassVar[int] + MINOR_FIELD_NUMBER: _ClassVar[int] + PATCH_FIELD_NUMBER: _ClassVar[int] + PRE_FIELD_NUMBER: _ClassVar[int] + BUILD_FIELD_NUMBER: _ClassVar[int] + major: int + minor: int + patch: int + pre: str + build: str + def __init__(self, major: _Optional[int] = ..., minor: _Optional[int] = ..., patch: _Optional[int] = ..., pre: _Optional[str] = ..., build: _Optional[str] = ...) -> None: ... + +class Setting(_message.Message): + __slots__ = ("name", "value", "data") + NAME_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + DATA_FIELD_NUMBER: _ClassVar[int] + name: str + value: str + data: bytes + def __init__(self, name: _Optional[str] = ..., value: _Optional[str] = ..., data: _Optional[bytes] = ...) -> None: ... + +class ServicesConfigurationList(_message.Message): + __slots__ = ("nameValue",) + NAMEVALUE_FIELD_NUMBER: _ClassVar[int] + nameValue: _containers.RepeatedCompositeFieldContainer[Setting] + def __init__(self, nameValue: _Optional[_Iterable[_Union[Setting, _Mapping]]] = ...) -> None: ... + +class TokenRelationship(_message.Message): + __slots__ = ("tokenId", "symbol", "balance", "kycStatus", "freezeStatus", "decimals", "automatic_association") + TOKENID_FIELD_NUMBER: _ClassVar[int] + SYMBOL_FIELD_NUMBER: _ClassVar[int] + BALANCE_FIELD_NUMBER: _ClassVar[int] + KYCSTATUS_FIELD_NUMBER: _ClassVar[int] + FREEZESTATUS_FIELD_NUMBER: _ClassVar[int] + DECIMALS_FIELD_NUMBER: _ClassVar[int] + AUTOMATIC_ASSOCIATION_FIELD_NUMBER: _ClassVar[int] + tokenId: TokenID + symbol: str + balance: int + kycStatus: TokenKycStatus + freezeStatus: TokenFreezeStatus + decimals: int + automatic_association: bool + def __init__(self, tokenId: _Optional[_Union[TokenID, _Mapping]] = ..., symbol: _Optional[str] = ..., balance: _Optional[int] = ..., kycStatus: _Optional[_Union[TokenKycStatus, str]] = ..., freezeStatus: _Optional[_Union[TokenFreezeStatus, str]] = ..., decimals: _Optional[int] = ..., automatic_association: bool = ...) -> None: ... + +class TokenBalance(_message.Message): + __slots__ = ("tokenId", "balance", "decimals") + TOKENID_FIELD_NUMBER: _ClassVar[int] + BALANCE_FIELD_NUMBER: _ClassVar[int] + DECIMALS_FIELD_NUMBER: _ClassVar[int] + tokenId: TokenID + balance: int + decimals: int + def __init__(self, tokenId: _Optional[_Union[TokenID, _Mapping]] = ..., balance: _Optional[int] = ..., decimals: _Optional[int] = ...) -> None: ... + +class TokenBalances(_message.Message): + __slots__ = ("tokenBalances",) + TOKENBALANCES_FIELD_NUMBER: _ClassVar[int] + tokenBalances: _containers.RepeatedCompositeFieldContainer[TokenBalance] + def __init__(self, tokenBalances: _Optional[_Iterable[_Union[TokenBalance, _Mapping]]] = ...) -> None: ... + +class TokenAssociation(_message.Message): + __slots__ = ("token_id", "account_id") + TOKEN_ID_FIELD_NUMBER: _ClassVar[int] + ACCOUNT_ID_FIELD_NUMBER: _ClassVar[int] + token_id: TokenID + account_id: AccountID + def __init__(self, token_id: _Optional[_Union[TokenID, _Mapping]] = ..., account_id: _Optional[_Union[AccountID, _Mapping]] = ...) -> None: ... + +class StakingInfo(_message.Message): + __slots__ = ("decline_reward", "stake_period_start", "pending_reward", "staked_to_me", "staked_account_id", "staked_node_id") + DECLINE_REWARD_FIELD_NUMBER: _ClassVar[int] + STAKE_PERIOD_START_FIELD_NUMBER: _ClassVar[int] + PENDING_REWARD_FIELD_NUMBER: _ClassVar[int] + STAKED_TO_ME_FIELD_NUMBER: _ClassVar[int] + STAKED_ACCOUNT_ID_FIELD_NUMBER: _ClassVar[int] + STAKED_NODE_ID_FIELD_NUMBER: _ClassVar[int] + decline_reward: bool + stake_period_start: _timestamp_pb2.Timestamp + pending_reward: int + staked_to_me: int + staked_account_id: AccountID + staked_node_id: int + def __init__(self, decline_reward: bool = ..., stake_period_start: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., pending_reward: _Optional[int] = ..., staked_to_me: _Optional[int] = ..., staked_account_id: _Optional[_Union[AccountID, _Mapping]] = ..., staked_node_id: _Optional[int] = ...) -> None: ... + +class PendingAirdropId(_message.Message): + __slots__ = ("sender_id", "receiver_id", "fungible_token_type", "non_fungible_token") + SENDER_ID_FIELD_NUMBER: _ClassVar[int] + RECEIVER_ID_FIELD_NUMBER: _ClassVar[int] + FUNGIBLE_TOKEN_TYPE_FIELD_NUMBER: _ClassVar[int] + NON_FUNGIBLE_TOKEN_FIELD_NUMBER: _ClassVar[int] + sender_id: AccountID + receiver_id: AccountID + fungible_token_type: TokenID + non_fungible_token: NftID + def __init__(self, sender_id: _Optional[_Union[AccountID, _Mapping]] = ..., receiver_id: _Optional[_Union[AccountID, _Mapping]] = ..., fungible_token_type: _Optional[_Union[TokenID, _Mapping]] = ..., non_fungible_token: _Optional[_Union[NftID, _Mapping]] = ...) -> None: ... + +class PendingAirdropValue(_message.Message): + __slots__ = ("amount",) + AMOUNT_FIELD_NUMBER: _ClassVar[int] + amount: int + def __init__(self, amount: _Optional[int] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/basic_types_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/basic_types_pb2_grpc.py new file mode 100644 index 000000000..208682480 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/basic_types_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/basic_types_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/consensus_create_topic_pb2.py b/src/hiero_sdk_python/hapi/services/consensus_create_topic_pb2.py new file mode 100644 index 000000000..44a482ae6 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/consensus_create_topic_pb2.py @@ -0,0 +1,36 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/consensus_create_topic.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/consensus_create_topic.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import basic_types_pb2 as services_dot_basic__types__pb2 +from . import custom_fees_pb2 as services_dot_custom__fees__pb2 +from . import duration_pb2 as services_dot_duration__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n%services/consensus_create_topic.proto\x12\x05proto\x1a\x1aservices/basic_types.proto\x1a\x1aservices/custom_fees.proto\x1a\x17services/duration.proto\"\xc1\x02\n#ConsensusCreateTopicTransactionBody\x12\x0c\n\x04memo\x18\x01 \x01(\t\x12\x1c\n\x08\x61\x64minKey\x18\x02 \x01(\x0b\x32\n.proto.Key\x12\x1d\n\tsubmitKey\x18\x03 \x01(\x0b\x32\n.proto.Key\x12(\n\x0f\x61utoRenewPeriod\x18\x06 \x01(\x0b\x32\x0f.proto.Duration\x12*\n\x10\x61utoRenewAccount\x18\x07 \x01(\x0b\x32\x10.proto.AccountID\x12$\n\x10\x66\x65\x65_schedule_key\x18\x08 \x01(\x0b\x32\n.proto.Key\x12\'\n\x13\x66\x65\x65_exempt_key_list\x18\t \x03(\x0b\x32\n.proto.Key\x12*\n\x0b\x63ustom_fees\x18\n \x03(\x0b\x32\x15.proto.FixedCustomFeeB&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.consensus_create_topic_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_CONSENSUSCREATETOPICTRANSACTIONBODY']._serialized_start=130 + _globals['_CONSENSUSCREATETOPICTRANSACTIONBODY']._serialized_end=451 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/consensus_create_topic_pb2.pyi b/src/hiero_sdk_python/hapi/services/consensus_create_topic_pb2.pyi new file mode 100644 index 000000000..61e5da57d --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/consensus_create_topic_pb2.pyi @@ -0,0 +1,30 @@ +from . import basic_types_pb2 as _basic_types_pb2 +from . import custom_fees_pb2 as _custom_fees_pb2 +from . import duration_pb2 as _duration_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Iterable as _Iterable, Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class ConsensusCreateTopicTransactionBody(_message.Message): + __slots__ = ("memo", "adminKey", "submitKey", "autoRenewPeriod", "autoRenewAccount", "fee_schedule_key", "fee_exempt_key_list", "custom_fees") + MEMO_FIELD_NUMBER: _ClassVar[int] + ADMINKEY_FIELD_NUMBER: _ClassVar[int] + SUBMITKEY_FIELD_NUMBER: _ClassVar[int] + AUTORENEWPERIOD_FIELD_NUMBER: _ClassVar[int] + AUTORENEWACCOUNT_FIELD_NUMBER: _ClassVar[int] + FEE_SCHEDULE_KEY_FIELD_NUMBER: _ClassVar[int] + FEE_EXEMPT_KEY_LIST_FIELD_NUMBER: _ClassVar[int] + CUSTOM_FEES_FIELD_NUMBER: _ClassVar[int] + memo: str + adminKey: _basic_types_pb2.Key + submitKey: _basic_types_pb2.Key + autoRenewPeriod: _duration_pb2.Duration + autoRenewAccount: _basic_types_pb2.AccountID + fee_schedule_key: _basic_types_pb2.Key + fee_exempt_key_list: _containers.RepeatedCompositeFieldContainer[_basic_types_pb2.Key] + custom_fees: _containers.RepeatedCompositeFieldContainer[_custom_fees_pb2.FixedCustomFee] + def __init__(self, memo: _Optional[str] = ..., adminKey: _Optional[_Union[_basic_types_pb2.Key, _Mapping]] = ..., submitKey: _Optional[_Union[_basic_types_pb2.Key, _Mapping]] = ..., autoRenewPeriod: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ..., autoRenewAccount: _Optional[_Union[_basic_types_pb2.AccountID, _Mapping]] = ..., fee_schedule_key: _Optional[_Union[_basic_types_pb2.Key, _Mapping]] = ..., fee_exempt_key_list: _Optional[_Iterable[_Union[_basic_types_pb2.Key, _Mapping]]] = ..., custom_fees: _Optional[_Iterable[_Union[_custom_fees_pb2.FixedCustomFee, _Mapping]]] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/consensus_create_topic_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/consensus_create_topic_pb2_grpc.py new file mode 100644 index 000000000..f4cde266b --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/consensus_create_topic_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/consensus_create_topic_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/consensus_delete_topic_pb2.py b/src/hiero_sdk_python/hapi/services/consensus_delete_topic_pb2.py new file mode 100644 index 000000000..aa97a2752 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/consensus_delete_topic_pb2.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/consensus_delete_topic.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/consensus_delete_topic.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import basic_types_pb2 as services_dot_basic__types__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n%services/consensus_delete_topic.proto\x12\x05proto\x1a\x1aservices/basic_types.proto\"F\n#ConsensusDeleteTopicTransactionBody\x12\x1f\n\x07topicID\x18\x01 \x01(\x0b\x32\x0e.proto.TopicIDB&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.consensus_delete_topic_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_CONSENSUSDELETETOPICTRANSACTIONBODY']._serialized_start=76 + _globals['_CONSENSUSDELETETOPICTRANSACTIONBODY']._serialized_end=146 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/consensus_delete_topic_pb2.pyi b/src/hiero_sdk_python/hapi/services/consensus_delete_topic_pb2.pyi new file mode 100644 index 000000000..a1f86a1c0 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/consensus_delete_topic_pb2.pyi @@ -0,0 +1,13 @@ +from . import basic_types_pb2 as _basic_types_pb2 +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class ConsensusDeleteTopicTransactionBody(_message.Message): + __slots__ = ("topicID",) + TOPICID_FIELD_NUMBER: _ClassVar[int] + topicID: _basic_types_pb2.TopicID + def __init__(self, topicID: _Optional[_Union[_basic_types_pb2.TopicID, _Mapping]] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/consensus_delete_topic_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/consensus_delete_topic_pb2_grpc.py new file mode 100644 index 000000000..02d5ed3a9 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/consensus_delete_topic_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/consensus_delete_topic_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/consensus_get_topic_info_pb2.py b/src/hiero_sdk_python/hapi/services/consensus_get_topic_info_pb2.py new file mode 100644 index 000000000..96396005b --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/consensus_get_topic_info_pb2.py @@ -0,0 +1,39 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/consensus_get_topic_info.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/consensus_get_topic_info.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import basic_types_pb2 as services_dot_basic__types__pb2 +from . import query_header_pb2 as services_dot_query__header__pb2 +from . import response_header_pb2 as services_dot_response__header__pb2 +from . import consensus_topic_info_pb2 as services_dot_consensus__topic__info__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\'services/consensus_get_topic_info.proto\x12\x05proto\x1a\x1aservices/basic_types.proto\x1a\x1bservices/query_header.proto\x1a\x1eservices/response_header.proto\x1a#services/consensus_topic_info.proto\"a\n\x1a\x43onsensusGetTopicInfoQuery\x12\"\n\x06header\x18\x01 \x01(\x0b\x32\x12.proto.QueryHeader\x12\x1f\n\x07topicID\x18\x02 \x01(\x0b\x32\x0e.proto.TopicID\"\x95\x01\n\x1d\x43onsensusGetTopicInfoResponse\x12%\n\x06header\x18\x01 \x01(\x0b\x32\x15.proto.ResponseHeader\x12\x1f\n\x07topicID\x18\x02 \x01(\x0b\x32\x0e.proto.TopicID\x12,\n\ttopicInfo\x18\x05 \x01(\x0b\x32\x19.proto.ConsensusTopicInfoB&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.consensus_get_topic_info_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_CONSENSUSGETTOPICINFOQUERY']._serialized_start=176 + _globals['_CONSENSUSGETTOPICINFOQUERY']._serialized_end=273 + _globals['_CONSENSUSGETTOPICINFORESPONSE']._serialized_start=276 + _globals['_CONSENSUSGETTOPICINFORESPONSE']._serialized_end=425 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/consensus_get_topic_info_pb2.pyi b/src/hiero_sdk_python/hapi/services/consensus_get_topic_info_pb2.pyi new file mode 100644 index 000000000..23b9b2dd4 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/consensus_get_topic_info_pb2.pyi @@ -0,0 +1,28 @@ +from . import basic_types_pb2 as _basic_types_pb2 +from . import query_header_pb2 as _query_header_pb2 +from . import response_header_pb2 as _response_header_pb2 +from . import consensus_topic_info_pb2 as _consensus_topic_info_pb2 +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class ConsensusGetTopicInfoQuery(_message.Message): + __slots__ = ("header", "topicID") + HEADER_FIELD_NUMBER: _ClassVar[int] + TOPICID_FIELD_NUMBER: _ClassVar[int] + header: _query_header_pb2.QueryHeader + topicID: _basic_types_pb2.TopicID + def __init__(self, header: _Optional[_Union[_query_header_pb2.QueryHeader, _Mapping]] = ..., topicID: _Optional[_Union[_basic_types_pb2.TopicID, _Mapping]] = ...) -> None: ... + +class ConsensusGetTopicInfoResponse(_message.Message): + __slots__ = ("header", "topicID", "topicInfo") + HEADER_FIELD_NUMBER: _ClassVar[int] + TOPICID_FIELD_NUMBER: _ClassVar[int] + TOPICINFO_FIELD_NUMBER: _ClassVar[int] + header: _response_header_pb2.ResponseHeader + topicID: _basic_types_pb2.TopicID + topicInfo: _consensus_topic_info_pb2.ConsensusTopicInfo + def __init__(self, header: _Optional[_Union[_response_header_pb2.ResponseHeader, _Mapping]] = ..., topicID: _Optional[_Union[_basic_types_pb2.TopicID, _Mapping]] = ..., topicInfo: _Optional[_Union[_consensus_topic_info_pb2.ConsensusTopicInfo, _Mapping]] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/consensus_get_topic_info_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/consensus_get_topic_info_pb2_grpc.py new file mode 100644 index 000000000..b25b39487 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/consensus_get_topic_info_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/consensus_get_topic_info_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/consensus_service_pb2.py b/src/hiero_sdk_python/hapi/services/consensus_service_pb2.py new file mode 100644 index 000000000..f78a21f65 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/consensus_service_pb2.py @@ -0,0 +1,37 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/consensus_service.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/consensus_service.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import query_pb2 as services_dot_query__pb2 +from . import response_pb2 as services_dot_response__pb2 +from . import transaction_response_pb2 as services_dot_transaction__response__pb2 +from . import transaction_pb2 as services_dot_transaction__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n services/consensus_service.proto\x12\x05proto\x1a\x14services/query.proto\x1a\x17services/response.proto\x1a#services/transaction_response.proto\x1a\x1aservices/transaction.proto2\xbf\x02\n\x10\x43onsensusService\x12=\n\x0b\x63reateTopic\x12\x12.proto.Transaction\x1a\x1a.proto.TransactionResponse\x12=\n\x0bupdateTopic\x12\x12.proto.Transaction\x1a\x1a.proto.TransactionResponse\x12=\n\x0b\x64\x65leteTopic\x12\x12.proto.Transaction\x1a\x1a.proto.TransactionResponse\x12?\n\rsubmitMessage\x12\x12.proto.Transaction\x1a\x1a.proto.TransactionResponse\x12-\n\x0cgetTopicInfo\x12\x0c.proto.Query\x1a\x0f.proto.ResponseB(\n&com.hederahashgraph.service.proto.javab\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.consensus_service_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n&com.hederahashgraph.service.proto.java' + _globals['_CONSENSUSSERVICE']._serialized_start=156 + _globals['_CONSENSUSSERVICE']._serialized_end=475 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/consensus_service_pb2.pyi b/src/hiero_sdk_python/hapi/services/consensus_service_pb2.pyi new file mode 100644 index 000000000..ce90eb498 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/consensus_service_pb2.pyi @@ -0,0 +1,8 @@ +from . import query_pb2 as _query_pb2 +from . import response_pb2 as _response_pb2 +from . import transaction_response_pb2 as _transaction_response_pb2 +from . import transaction_pb2 as _transaction_pb2 +from google.protobuf import descriptor as _descriptor +from typing import ClassVar as _ClassVar + +DESCRIPTOR: _descriptor.FileDescriptor diff --git a/src/hiero_sdk_python/hapi/services/consensus_service_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/consensus_service_pb2_grpc.py new file mode 100644 index 000000000..fe00934cd --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/consensus_service_pb2_grpc.py @@ -0,0 +1,350 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings +from . import query_pb2 as services_dot_query__pb2 +from . import response_pb2 as services_dot_response__pb2 +from . import transaction_pb2 as services_dot_transaction__pb2 +from . import transaction_response_pb2 as services_dot_transaction__response__pb2 +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/consensus_service_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) + + +class ConsensusServiceStub(object): + """* + The Hedera Consensus Service (HCS) provides the ability for a 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. + + """ + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.createTopic = channel.unary_unary( + '/proto.ConsensusService/createTopic', + request_serializer=services_dot_transaction__pb2.Transaction.SerializeToString, + response_deserializer=services_dot_transaction__response__pb2.TransactionResponse.FromString, + _registered_method=True) + self.updateTopic = channel.unary_unary( + '/proto.ConsensusService/updateTopic', + request_serializer=services_dot_transaction__pb2.Transaction.SerializeToString, + response_deserializer=services_dot_transaction__response__pb2.TransactionResponse.FromString, + _registered_method=True) + self.deleteTopic = channel.unary_unary( + '/proto.ConsensusService/deleteTopic', + request_serializer=services_dot_transaction__pb2.Transaction.SerializeToString, + response_deserializer=services_dot_transaction__response__pb2.TransactionResponse.FromString, + _registered_method=True) + self.submitMessage = channel.unary_unary( + '/proto.ConsensusService/submitMessage', + request_serializer=services_dot_transaction__pb2.Transaction.SerializeToString, + response_deserializer=services_dot_transaction__response__pb2.TransactionResponse.FromString, + _registered_method=True) + self.getTopicInfo = channel.unary_unary( + '/proto.ConsensusService/getTopicInfo', + request_serializer=services_dot_query__pb2.Query.SerializeToString, + response_deserializer=services_dot_response__pb2.Response.FromString, + _registered_method=True) + + +class ConsensusServiceServicer(object): + """* + The Hedera Consensus Service (HCS) provides the ability for a 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. + + """ + + def createTopic(self, request, context): + """* + Create an HCS topic. +

      + On success, the resulting TransactionReceipt SHALL contain the newly + created TopicId.
      + If the `adminKey` is set on the topic, this transaction MUST be signed + by that key.
      + If the `adminKey` is _not_ set on the topic, this transaction MUST NOT + set an `autoRenewAccount`. The new topic will be immutable and must be + renewed manually.
      + If the `autoRenewAccount` is set on the topic, this transaction MUST be + signed by that account.
      +

      + The request body MUST be a + [ConsensusCreateTopicTransactionBody](#proto.ConsensusCreateTopicTransactionBody) + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def updateTopic(self, request, context): + """* + Update an HCS topic. +

      + If the `adminKey` is not set on the topic, this transaction MUST extend + the `expirationTime` and MUST NOT modify any other field.
      + If the `adminKey` is set on the topic, this transaction MUST be signed + by that key.
      + If this transaction sets a new `adminKey`, this transaction MUST be + signed by _both_ keys, the pre-update `adminKey` and + the post-update `adminKey`.
      + If this transaction sets a new, non-null, `autoRenewAccount`, the newly + set account MUST sign this transaction.
      +

      + The request body MUST be a + [ConsensusUpdateTopicTransactionBody](#proto.ConsensusUpdateTopicTransactionBody) + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def deleteTopic(self, request, context): + """* + Delete an HCS topic. +

      + If this transaction succeeds, all subsequent transactions referencing + the deleted topic SHALL fail.
      + The `adminKey` MUST be set on the topic and this transaction MUST be + signed by that key.
      + If the `adminKey` is not set on the topic, this transaction SHALL fail + with a response code of `UNAUTHORIZED`. A topic without an `adminKey` + cannot be deleted, but MAY expire.
      +

      + The request body MUST be a + [ConsensusDeleteTopicTransactionBody](#proto.ConsensusDeleteTopicTransactionBody) + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def submitMessage(self, request, context): + """* + Submit a message to an HCS topic. +

      + Valid and authorized messages on valid topics will be ordered by the + consensus service, published in the block stream, and available to all + subscribers on this topic via the mirror nodes.
      + If this transaction succeeds the resulting TransactionReceipt SHALL + contain the latest topicSequenceNumber and topicRunningHash for the + topic.
      + If the topic has a `submitKey` then that key MUST sign this + transaction.
      +

      + The request body MUST be a + [ConsensusSubmitMessageTransactionBody](#proto.ConsensusSubmitMessageTransactionBody) + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def getTopicInfo(self, request, context): + """* + Retrieve the latest state of a topic. This method is unrestricted and + allowed on any topic by any payer account. +

      + The request body MUST be a + [ConsensusGetTopicInfoQuery](#proto.ConsensusGetTopicInfoQuery)
      + The response body SHALL be a + [ConsensusGetTopicInfoResponse](#proto.ConsensusGetTopicInfoResponse) + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_ConsensusServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'createTopic': grpc.unary_unary_rpc_method_handler( + servicer.createTopic, + request_deserializer=services_dot_transaction__pb2.Transaction.FromString, + response_serializer=services_dot_transaction__response__pb2.TransactionResponse.SerializeToString, + ), + 'updateTopic': grpc.unary_unary_rpc_method_handler( + servicer.updateTopic, + request_deserializer=services_dot_transaction__pb2.Transaction.FromString, + response_serializer=services_dot_transaction__response__pb2.TransactionResponse.SerializeToString, + ), + 'deleteTopic': grpc.unary_unary_rpc_method_handler( + servicer.deleteTopic, + request_deserializer=services_dot_transaction__pb2.Transaction.FromString, + response_serializer=services_dot_transaction__response__pb2.TransactionResponse.SerializeToString, + ), + 'submitMessage': grpc.unary_unary_rpc_method_handler( + servicer.submitMessage, + request_deserializer=services_dot_transaction__pb2.Transaction.FromString, + response_serializer=services_dot_transaction__response__pb2.TransactionResponse.SerializeToString, + ), + 'getTopicInfo': grpc.unary_unary_rpc_method_handler( + servicer.getTopicInfo, + request_deserializer=services_dot_query__pb2.Query.FromString, + response_serializer=services_dot_response__pb2.Response.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'proto.ConsensusService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + server.add_registered_method_handlers('proto.ConsensusService', rpc_method_handlers) + + + # This class is part of an EXPERIMENTAL API. +class ConsensusService(object): + """* + The Hedera Consensus Service (HCS) provides the ability for a 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. + + """ + + @staticmethod + def createTopic(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/proto.ConsensusService/createTopic', + services_dot_transaction__pb2.Transaction.SerializeToString, + services_dot_transaction__response__pb2.TransactionResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def updateTopic(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/proto.ConsensusService/updateTopic', + services_dot_transaction__pb2.Transaction.SerializeToString, + services_dot_transaction__response__pb2.TransactionResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def deleteTopic(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/proto.ConsensusService/deleteTopic', + services_dot_transaction__pb2.Transaction.SerializeToString, + services_dot_transaction__response__pb2.TransactionResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def submitMessage(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/proto.ConsensusService/submitMessage', + services_dot_transaction__pb2.Transaction.SerializeToString, + services_dot_transaction__response__pb2.TransactionResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def getTopicInfo(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/proto.ConsensusService/getTopicInfo', + services_dot_query__pb2.Query.SerializeToString, + services_dot_response__pb2.Response.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) diff --git a/src/hiero_sdk_python/hapi/services/consensus_submit_message_pb2.py b/src/hiero_sdk_python/hapi/services/consensus_submit_message_pb2.py new file mode 100644 index 000000000..0dd2da84a --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/consensus_submit_message_pb2.py @@ -0,0 +1,36 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/consensus_submit_message.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/consensus_submit_message.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import basic_types_pb2 as services_dot_basic__types__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\'services/consensus_submit_message.proto\x12\x05proto\x1a\x1aservices/basic_types.proto\"n\n\x19\x43onsensusMessageChunkInfo\x12\x32\n\x14initialTransactionID\x18\x01 \x01(\x0b\x32\x14.proto.TransactionID\x12\r\n\x05total\x18\x02 \x01(\x05\x12\x0e\n\x06number\x18\x03 \x01(\x05\"\x8e\x01\n%ConsensusSubmitMessageTransactionBody\x12\x1f\n\x07topicID\x18\x01 \x01(\x0b\x32\x0e.proto.TopicID\x12\x0f\n\x07message\x18\x02 \x01(\x0c\x12\x33\n\tchunkInfo\x18\x03 \x01(\x0b\x32 .proto.ConsensusMessageChunkInfoB&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.consensus_submit_message_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_CONSENSUSMESSAGECHUNKINFO']._serialized_start=78 + _globals['_CONSENSUSMESSAGECHUNKINFO']._serialized_end=188 + _globals['_CONSENSUSSUBMITMESSAGETRANSACTIONBODY']._serialized_start=191 + _globals['_CONSENSUSSUBMITMESSAGETRANSACTIONBODY']._serialized_end=333 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/consensus_submit_message_pb2.pyi b/src/hiero_sdk_python/hapi/services/consensus_submit_message_pb2.pyi new file mode 100644 index 000000000..92de462bf --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/consensus_submit_message_pb2.pyi @@ -0,0 +1,27 @@ +from . import basic_types_pb2 as _basic_types_pb2 +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class ConsensusMessageChunkInfo(_message.Message): + __slots__ = ("initialTransactionID", "total", "number") + INITIALTRANSACTIONID_FIELD_NUMBER: _ClassVar[int] + TOTAL_FIELD_NUMBER: _ClassVar[int] + NUMBER_FIELD_NUMBER: _ClassVar[int] + initialTransactionID: _basic_types_pb2.TransactionID + total: int + number: int + def __init__(self, initialTransactionID: _Optional[_Union[_basic_types_pb2.TransactionID, _Mapping]] = ..., total: _Optional[int] = ..., number: _Optional[int] = ...) -> None: ... + +class ConsensusSubmitMessageTransactionBody(_message.Message): + __slots__ = ("topicID", "message", "chunkInfo") + TOPICID_FIELD_NUMBER: _ClassVar[int] + MESSAGE_FIELD_NUMBER: _ClassVar[int] + CHUNKINFO_FIELD_NUMBER: _ClassVar[int] + topicID: _basic_types_pb2.TopicID + message: bytes + chunkInfo: ConsensusMessageChunkInfo + def __init__(self, topicID: _Optional[_Union[_basic_types_pb2.TopicID, _Mapping]] = ..., message: _Optional[bytes] = ..., chunkInfo: _Optional[_Union[ConsensusMessageChunkInfo, _Mapping]] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/consensus_submit_message_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/consensus_submit_message_pb2_grpc.py new file mode 100644 index 000000000..a753aed35 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/consensus_submit_message_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/consensus_submit_message_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/consensus_topic_info_pb2.py b/src/hiero_sdk_python/hapi/services/consensus_topic_info_pb2.py new file mode 100644 index 000000000..9456511ee --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/consensus_topic_info_pb2.py @@ -0,0 +1,37 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/consensus_topic_info.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/consensus_topic_info.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import basic_types_pb2 as services_dot_basic__types__pb2 +from . import custom_fees_pb2 as services_dot_custom__fees__pb2 +from . import duration_pb2 as services_dot_duration__pb2 +from . import timestamp_pb2 as services_dot_timestamp__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n#services/consensus_topic_info.proto\x12\x05proto\x1a\x1aservices/basic_types.proto\x1a\x1aservices/custom_fees.proto\x1a\x17services/duration.proto\x1a\x18services/timestamp.proto\"\x9a\x03\n\x12\x43onsensusTopicInfo\x12\x0c\n\x04memo\x18\x01 \x01(\t\x12\x13\n\x0brunningHash\x18\x02 \x01(\x0c\x12\x16\n\x0esequenceNumber\x18\x03 \x01(\x04\x12(\n\x0e\x65xpirationTime\x18\x04 \x01(\x0b\x32\x10.proto.Timestamp\x12\x1c\n\x08\x61\x64minKey\x18\x05 \x01(\x0b\x32\n.proto.Key\x12\x1d\n\tsubmitKey\x18\x06 \x01(\x0b\x32\n.proto.Key\x12(\n\x0f\x61utoRenewPeriod\x18\x07 \x01(\x0b\x32\x0f.proto.Duration\x12*\n\x10\x61utoRenewAccount\x18\x08 \x01(\x0b\x32\x10.proto.AccountID\x12\x11\n\tledger_id\x18\t \x01(\x0c\x12$\n\x10\x66\x65\x65_schedule_key\x18\n \x01(\x0b\x32\n.proto.Key\x12\'\n\x13\x66\x65\x65_exempt_key_list\x18\x0b \x03(\x0b\x32\n.proto.Key\x12*\n\x0b\x63ustom_fees\x18\x0c \x03(\x0b\x32\x15.proto.FixedCustomFeeB&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.consensus_topic_info_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_CONSENSUSTOPICINFO']._serialized_start=154 + _globals['_CONSENSUSTOPICINFO']._serialized_end=564 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/consensus_topic_info_pb2.pyi b/src/hiero_sdk_python/hapi/services/consensus_topic_info_pb2.pyi new file mode 100644 index 000000000..753b37e90 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/consensus_topic_info_pb2.pyi @@ -0,0 +1,39 @@ +from . import basic_types_pb2 as _basic_types_pb2 +from . import custom_fees_pb2 as _custom_fees_pb2 +from . import duration_pb2 as _duration_pb2 +from . import timestamp_pb2 as _timestamp_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Iterable as _Iterable, Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class ConsensusTopicInfo(_message.Message): + __slots__ = ("memo", "runningHash", "sequenceNumber", "expirationTime", "adminKey", "submitKey", "autoRenewPeriod", "autoRenewAccount", "ledger_id", "fee_schedule_key", "fee_exempt_key_list", "custom_fees") + MEMO_FIELD_NUMBER: _ClassVar[int] + RUNNINGHASH_FIELD_NUMBER: _ClassVar[int] + SEQUENCENUMBER_FIELD_NUMBER: _ClassVar[int] + EXPIRATIONTIME_FIELD_NUMBER: _ClassVar[int] + ADMINKEY_FIELD_NUMBER: _ClassVar[int] + SUBMITKEY_FIELD_NUMBER: _ClassVar[int] + AUTORENEWPERIOD_FIELD_NUMBER: _ClassVar[int] + AUTORENEWACCOUNT_FIELD_NUMBER: _ClassVar[int] + LEDGER_ID_FIELD_NUMBER: _ClassVar[int] + FEE_SCHEDULE_KEY_FIELD_NUMBER: _ClassVar[int] + FEE_EXEMPT_KEY_LIST_FIELD_NUMBER: _ClassVar[int] + CUSTOM_FEES_FIELD_NUMBER: _ClassVar[int] + memo: str + runningHash: bytes + sequenceNumber: int + expirationTime: _timestamp_pb2.Timestamp + adminKey: _basic_types_pb2.Key + submitKey: _basic_types_pb2.Key + autoRenewPeriod: _duration_pb2.Duration + autoRenewAccount: _basic_types_pb2.AccountID + ledger_id: bytes + fee_schedule_key: _basic_types_pb2.Key + fee_exempt_key_list: _containers.RepeatedCompositeFieldContainer[_basic_types_pb2.Key] + custom_fees: _containers.RepeatedCompositeFieldContainer[_custom_fees_pb2.FixedCustomFee] + def __init__(self, memo: _Optional[str] = ..., runningHash: _Optional[bytes] = ..., sequenceNumber: _Optional[int] = ..., expirationTime: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., adminKey: _Optional[_Union[_basic_types_pb2.Key, _Mapping]] = ..., submitKey: _Optional[_Union[_basic_types_pb2.Key, _Mapping]] = ..., autoRenewPeriod: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ..., autoRenewAccount: _Optional[_Union[_basic_types_pb2.AccountID, _Mapping]] = ..., ledger_id: _Optional[bytes] = ..., fee_schedule_key: _Optional[_Union[_basic_types_pb2.Key, _Mapping]] = ..., fee_exempt_key_list: _Optional[_Iterable[_Union[_basic_types_pb2.Key, _Mapping]]] = ..., custom_fees: _Optional[_Iterable[_Union[_custom_fees_pb2.FixedCustomFee, _Mapping]]] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/consensus_topic_info_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/consensus_topic_info_pb2_grpc.py new file mode 100644 index 000000000..b1c7bc59b --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/consensus_topic_info_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/consensus_topic_info_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/consensus_update_topic_pb2.py b/src/hiero_sdk_python/hapi/services/consensus_update_topic_pb2.py new file mode 100644 index 000000000..a20b0f177 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/consensus_update_topic_pb2.py @@ -0,0 +1,40 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/consensus_update_topic.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/consensus_update_topic.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from google.protobuf import wrappers_pb2 as google_dot_protobuf_dot_wrappers__pb2 +from . import basic_types_pb2 as services_dot_basic__types__pb2 +from . import custom_fees_pb2 as services_dot_custom__fees__pb2 +from . import duration_pb2 as services_dot_duration__pb2 +from . import timestamp_pb2 as services_dot_timestamp__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n%services/consensus_update_topic.proto\x12\x05proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x1aservices/basic_types.proto\x1a\x1aservices/custom_fees.proto\x1a\x17services/duration.proto\x1a\x18services/timestamp.proto\"\xbb\x03\n#ConsensusUpdateTopicTransactionBody\x12\x1f\n\x07topicID\x18\x01 \x01(\x0b\x32\x0e.proto.TopicID\x12*\n\x04memo\x18\x02 \x01(\x0b\x32\x1c.google.protobuf.StringValue\x12(\n\x0e\x65xpirationTime\x18\x04 \x01(\x0b\x32\x10.proto.Timestamp\x12\x1c\n\x08\x61\x64minKey\x18\x06 \x01(\x0b\x32\n.proto.Key\x12\x1d\n\tsubmitKey\x18\x07 \x01(\x0b\x32\n.proto.Key\x12(\n\x0f\x61utoRenewPeriod\x18\x08 \x01(\x0b\x32\x0f.proto.Duration\x12*\n\x10\x61utoRenewAccount\x18\t \x01(\x0b\x32\x10.proto.AccountID\x12$\n\x10\x66\x65\x65_schedule_key\x18\n \x01(\x0b\x32\n.proto.Key\x12\x34\n\x13\x66\x65\x65_exempt_key_list\x18\x0b \x01(\x0b\x32\x17.proto.FeeExemptKeyList\x12.\n\x0b\x63ustom_fees\x18\x0c \x01(\x0b\x32\x19.proto.FixedCustomFeeListB&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.consensus_update_topic_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_CONSENSUSUPDATETOPICTRANSACTIONBODY']._serialized_start=188 + _globals['_CONSENSUSUPDATETOPICTRANSACTIONBODY']._serialized_end=631 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/consensus_update_topic_pb2.pyi b/src/hiero_sdk_python/hapi/services/consensus_update_topic_pb2.pyi new file mode 100644 index 000000000..40a7305a0 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/consensus_update_topic_pb2.pyi @@ -0,0 +1,35 @@ +from google.protobuf import wrappers_pb2 as _wrappers_pb2 +from . import basic_types_pb2 as _basic_types_pb2 +from . import custom_fees_pb2 as _custom_fees_pb2 +from . import duration_pb2 as _duration_pb2 +from . import timestamp_pb2 as _timestamp_pb2 +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class ConsensusUpdateTopicTransactionBody(_message.Message): + __slots__ = ("topicID", "memo", "expirationTime", "adminKey", "submitKey", "autoRenewPeriod", "autoRenewAccount", "fee_schedule_key", "fee_exempt_key_list", "custom_fees") + TOPICID_FIELD_NUMBER: _ClassVar[int] + MEMO_FIELD_NUMBER: _ClassVar[int] + EXPIRATIONTIME_FIELD_NUMBER: _ClassVar[int] + ADMINKEY_FIELD_NUMBER: _ClassVar[int] + SUBMITKEY_FIELD_NUMBER: _ClassVar[int] + AUTORENEWPERIOD_FIELD_NUMBER: _ClassVar[int] + AUTORENEWACCOUNT_FIELD_NUMBER: _ClassVar[int] + FEE_SCHEDULE_KEY_FIELD_NUMBER: _ClassVar[int] + FEE_EXEMPT_KEY_LIST_FIELD_NUMBER: _ClassVar[int] + CUSTOM_FEES_FIELD_NUMBER: _ClassVar[int] + topicID: _basic_types_pb2.TopicID + memo: _wrappers_pb2.StringValue + expirationTime: _timestamp_pb2.Timestamp + adminKey: _basic_types_pb2.Key + submitKey: _basic_types_pb2.Key + autoRenewPeriod: _duration_pb2.Duration + autoRenewAccount: _basic_types_pb2.AccountID + fee_schedule_key: _basic_types_pb2.Key + fee_exempt_key_list: _custom_fees_pb2.FeeExemptKeyList + custom_fees: _custom_fees_pb2.FixedCustomFeeList + def __init__(self, topicID: _Optional[_Union[_basic_types_pb2.TopicID, _Mapping]] = ..., memo: _Optional[_Union[_wrappers_pb2.StringValue, _Mapping]] = ..., expirationTime: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., adminKey: _Optional[_Union[_basic_types_pb2.Key, _Mapping]] = ..., submitKey: _Optional[_Union[_basic_types_pb2.Key, _Mapping]] = ..., autoRenewPeriod: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ..., autoRenewAccount: _Optional[_Union[_basic_types_pb2.AccountID, _Mapping]] = ..., fee_schedule_key: _Optional[_Union[_basic_types_pb2.Key, _Mapping]] = ..., fee_exempt_key_list: _Optional[_Union[_custom_fees_pb2.FeeExemptKeyList, _Mapping]] = ..., custom_fees: _Optional[_Union[_custom_fees_pb2.FixedCustomFeeList, _Mapping]] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/consensus_update_topic_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/consensus_update_topic_pb2_grpc.py new file mode 100644 index 000000000..2c43e7883 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/consensus_update_topic_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/consensus_update_topic_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/contract_call_local_pb2.py b/src/hiero_sdk_python/hapi/services/contract_call_local_pb2.py new file mode 100644 index 000000000..a92110314 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/contract_call_local_pb2.py @@ -0,0 +1,41 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/contract_call_local.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/contract_call_local.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import basic_types_pb2 as services_dot_basic__types__pb2 +from . import contract_types_pb2 as services_dot_contract__types__pb2 +from . import query_header_pb2 as services_dot_query__header__pb2 +from . import response_header_pb2 as services_dot_response__header__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"services/contract_call_local.proto\x12\x05proto\x1a\x1aservices/basic_types.proto\x1a\x1dservices/contract_types.proto\x1a\x1bservices/query_header.proto\x1a\x1eservices/response_header.proto\"\xcc\x01\n\x16\x43ontractCallLocalQuery\x12\"\n\x06header\x18\x01 \x01(\x0b\x32\x12.proto.QueryHeader\x12%\n\ncontractID\x18\x02 \x01(\x0b\x32\x11.proto.ContractID\x12\x0b\n\x03gas\x18\x03 \x01(\x03\x12\x1a\n\x12\x66unctionParameters\x18\x04 \x01(\x0c\x12\x19\n\rmaxResultSize\x18\x05 \x01(\x03\x42\x02\x18\x01\x12#\n\tsender_id\x18\x06 \x01(\x0b\x32\x10.proto.AccountID\"y\n\x19\x43ontractCallLocalResponse\x12%\n\x06header\x18\x01 \x01(\x0b\x32\x15.proto.ResponseHeader\x12\x35\n\x0e\x66unctionResult\x18\x02 \x01(\x0b\x32\x1d.proto.ContractFunctionResultB&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.contract_call_local_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_CONTRACTCALLLOCALQUERY'].fields_by_name['maxResultSize']._loaded_options = None + _globals['_CONTRACTCALLLOCALQUERY'].fields_by_name['maxResultSize']._serialized_options = b'\030\001' + _globals['_CONTRACTCALLLOCALQUERY']._serialized_start=166 + _globals['_CONTRACTCALLLOCALQUERY']._serialized_end=370 + _globals['_CONTRACTCALLLOCALRESPONSE']._serialized_start=372 + _globals['_CONTRACTCALLLOCALRESPONSE']._serialized_end=493 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/contract_call_local_pb2.pyi b/src/hiero_sdk_python/hapi/services/contract_call_local_pb2.pyi new file mode 100644 index 000000000..417ad786a --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/contract_call_local_pb2.pyi @@ -0,0 +1,34 @@ +from . import basic_types_pb2 as _basic_types_pb2 +from . import contract_types_pb2 as _contract_types_pb2 +from . import query_header_pb2 as _query_header_pb2 +from . import response_header_pb2 as _response_header_pb2 +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class ContractCallLocalQuery(_message.Message): + __slots__ = ("header", "contractID", "gas", "functionParameters", "maxResultSize", "sender_id") + HEADER_FIELD_NUMBER: _ClassVar[int] + CONTRACTID_FIELD_NUMBER: _ClassVar[int] + GAS_FIELD_NUMBER: _ClassVar[int] + FUNCTIONPARAMETERS_FIELD_NUMBER: _ClassVar[int] + MAXRESULTSIZE_FIELD_NUMBER: _ClassVar[int] + SENDER_ID_FIELD_NUMBER: _ClassVar[int] + header: _query_header_pb2.QueryHeader + contractID: _basic_types_pb2.ContractID + gas: int + functionParameters: bytes + maxResultSize: int + sender_id: _basic_types_pb2.AccountID + def __init__(self, header: _Optional[_Union[_query_header_pb2.QueryHeader, _Mapping]] = ..., contractID: _Optional[_Union[_basic_types_pb2.ContractID, _Mapping]] = ..., gas: _Optional[int] = ..., functionParameters: _Optional[bytes] = ..., maxResultSize: _Optional[int] = ..., sender_id: _Optional[_Union[_basic_types_pb2.AccountID, _Mapping]] = ...) -> None: ... + +class ContractCallLocalResponse(_message.Message): + __slots__ = ("header", "functionResult") + HEADER_FIELD_NUMBER: _ClassVar[int] + FUNCTIONRESULT_FIELD_NUMBER: _ClassVar[int] + header: _response_header_pb2.ResponseHeader + functionResult: _contract_types_pb2.ContractFunctionResult + def __init__(self, header: _Optional[_Union[_response_header_pb2.ResponseHeader, _Mapping]] = ..., functionResult: _Optional[_Union[_contract_types_pb2.ContractFunctionResult, _Mapping]] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/contract_call_local_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/contract_call_local_pb2_grpc.py new file mode 100644 index 000000000..d43b4a50a --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/contract_call_local_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/contract_call_local_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/contract_call_pb2.py b/src/hiero_sdk_python/hapi/services/contract_call_pb2.py new file mode 100644 index 000000000..bb15b096b --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/contract_call_pb2.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/contract_call.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/contract_call.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import basic_types_pb2 as services_dot_basic__types__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cservices/contract_call.proto\x12\x05proto\x1a\x1aservices/basic_types.proto\"}\n\x1b\x43ontractCallTransactionBody\x12%\n\ncontractID\x18\x01 \x01(\x0b\x32\x11.proto.ContractID\x12\x0b\n\x03gas\x18\x02 \x01(\x03\x12\x0e\n\x06\x61mount\x18\x03 \x01(\x03\x12\x1a\n\x12\x66unctionParameters\x18\x04 \x01(\x0c\x42&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.contract_call_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_CONTRACTCALLTRANSACTIONBODY']._serialized_start=67 + _globals['_CONTRACTCALLTRANSACTIONBODY']._serialized_end=192 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/contract_call_pb2.pyi b/src/hiero_sdk_python/hapi/services/contract_call_pb2.pyi new file mode 100644 index 000000000..8fd5d5dda --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/contract_call_pb2.pyi @@ -0,0 +1,19 @@ +from . import basic_types_pb2 as _basic_types_pb2 +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class ContractCallTransactionBody(_message.Message): + __slots__ = ("contractID", "gas", "amount", "functionParameters") + CONTRACTID_FIELD_NUMBER: _ClassVar[int] + GAS_FIELD_NUMBER: _ClassVar[int] + AMOUNT_FIELD_NUMBER: _ClassVar[int] + FUNCTIONPARAMETERS_FIELD_NUMBER: _ClassVar[int] + contractID: _basic_types_pb2.ContractID + gas: int + amount: int + functionParameters: bytes + def __init__(self, contractID: _Optional[_Union[_basic_types_pb2.ContractID, _Mapping]] = ..., gas: _Optional[int] = ..., amount: _Optional[int] = ..., functionParameters: _Optional[bytes] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/contract_call_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/contract_call_pb2_grpc.py new file mode 100644 index 000000000..f77bf2f93 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/contract_call_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/contract_call_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/contract_create_pb2.py b/src/hiero_sdk_python/hapi/services/contract_create_pb2.py new file mode 100644 index 000000000..d85d904f5 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/contract_create_pb2.py @@ -0,0 +1,38 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/contract_create.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/contract_create.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import basic_types_pb2 as services_dot_basic__types__pb2 +from . import duration_pb2 as services_dot_duration__pb2 +from . import hook_types_pb2 as services_dot_hook__types__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1eservices/contract_create.proto\x12\x05proto\x1a\x1aservices/basic_types.proto\x1a\x17services/duration.proto\x1a\x19services/hook_types.proto\"\xaf\x05\n\x1d\x43ontractCreateTransactionBody\x12\x1f\n\x06\x66ileID\x18\x01 \x01(\x0b\x32\r.proto.FileIDH\x00\x12\x12\n\x08initcode\x18\x10 \x01(\x0cH\x00\x12\x1c\n\x08\x61\x64minKey\x18\x03 \x01(\x0b\x32\n.proto.Key\x12\x0b\n\x03gas\x18\x04 \x01(\x03\x12\x16\n\x0einitialBalance\x18\x05 \x01(\x03\x12,\n\x0eproxyAccountID\x18\x06 \x01(\x0b\x32\x10.proto.AccountIDB\x02\x18\x01\x12(\n\x0f\x61utoRenewPeriod\x18\x08 \x01(\x0b\x32\x0f.proto.Duration\x12\x1d\n\x15\x63onstructorParameters\x18\t \x01(\x0c\x12\x1f\n\x07shardID\x18\n \x01(\x0b\x32\x0e.proto.ShardID\x12\x1f\n\x07realmID\x18\x0b \x01(\x0b\x32\x0e.proto.RealmID\x12$\n\x10newRealmAdminKey\x18\x0c \x01(\x0b\x32\n.proto.Key\x12\x0c\n\x04memo\x18\r \x01(\t\x12(\n max_automatic_token_associations\x18\x0e \x01(\x05\x12/\n\x15\x61uto_renew_account_id\x18\x0f \x01(\x0b\x32\x10.proto.AccountID\x12-\n\x11staked_account_id\x18\x11 \x01(\x0b\x32\x10.proto.AccountIDH\x01\x12\x18\n\x0estaked_node_id\x18\x12 \x01(\x03H\x01\x12\x16\n\x0e\x64\x65\x63line_reward\x18\x13 \x01(\x08\x12N\n\x15hook_creation_details\x18\x14 \x03(\x0b\x32/.com.hedera.hapi.node.hooks.HookCreationDetailsB\x10\n\x0einitcodeSourceB\x0b\n\tstaked_idB&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.contract_create_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_CONTRACTCREATETRANSACTIONBODY'].fields_by_name['proxyAccountID']._loaded_options = None + _globals['_CONTRACTCREATETRANSACTIONBODY'].fields_by_name['proxyAccountID']._serialized_options = b'\030\001' + _globals['_CONTRACTCREATETRANSACTIONBODY']._serialized_start=122 + _globals['_CONTRACTCREATETRANSACTIONBODY']._serialized_end=809 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/contract_create_pb2.pyi b/src/hiero_sdk_python/hapi/services/contract_create_pb2.pyi new file mode 100644 index 000000000..30c964246 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/contract_create_pb2.pyi @@ -0,0 +1,50 @@ +from . import basic_types_pb2 as _basic_types_pb2 +from . import duration_pb2 as _duration_pb2 +from . import hook_types_pb2 as _hook_types_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Iterable as _Iterable, Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class ContractCreateTransactionBody(_message.Message): + __slots__ = ("fileID", "initcode", "adminKey", "gas", "initialBalance", "proxyAccountID", "autoRenewPeriod", "constructorParameters", "shardID", "realmID", "newRealmAdminKey", "memo", "max_automatic_token_associations", "auto_renew_account_id", "staked_account_id", "staked_node_id", "decline_reward", "hook_creation_details") + FILEID_FIELD_NUMBER: _ClassVar[int] + INITCODE_FIELD_NUMBER: _ClassVar[int] + ADMINKEY_FIELD_NUMBER: _ClassVar[int] + GAS_FIELD_NUMBER: _ClassVar[int] + INITIALBALANCE_FIELD_NUMBER: _ClassVar[int] + PROXYACCOUNTID_FIELD_NUMBER: _ClassVar[int] + AUTORENEWPERIOD_FIELD_NUMBER: _ClassVar[int] + CONSTRUCTORPARAMETERS_FIELD_NUMBER: _ClassVar[int] + SHARDID_FIELD_NUMBER: _ClassVar[int] + REALMID_FIELD_NUMBER: _ClassVar[int] + NEWREALMADMINKEY_FIELD_NUMBER: _ClassVar[int] + MEMO_FIELD_NUMBER: _ClassVar[int] + MAX_AUTOMATIC_TOKEN_ASSOCIATIONS_FIELD_NUMBER: _ClassVar[int] + AUTO_RENEW_ACCOUNT_ID_FIELD_NUMBER: _ClassVar[int] + STAKED_ACCOUNT_ID_FIELD_NUMBER: _ClassVar[int] + STAKED_NODE_ID_FIELD_NUMBER: _ClassVar[int] + DECLINE_REWARD_FIELD_NUMBER: _ClassVar[int] + HOOK_CREATION_DETAILS_FIELD_NUMBER: _ClassVar[int] + fileID: _basic_types_pb2.FileID + initcode: bytes + adminKey: _basic_types_pb2.Key + gas: int + initialBalance: int + proxyAccountID: _basic_types_pb2.AccountID + autoRenewPeriod: _duration_pb2.Duration + constructorParameters: bytes + shardID: _basic_types_pb2.ShardID + realmID: _basic_types_pb2.RealmID + newRealmAdminKey: _basic_types_pb2.Key + memo: str + max_automatic_token_associations: int + auto_renew_account_id: _basic_types_pb2.AccountID + staked_account_id: _basic_types_pb2.AccountID + staked_node_id: int + decline_reward: bool + hook_creation_details: _containers.RepeatedCompositeFieldContainer[_hook_types_pb2.HookCreationDetails] + def __init__(self, fileID: _Optional[_Union[_basic_types_pb2.FileID, _Mapping]] = ..., initcode: _Optional[bytes] = ..., adminKey: _Optional[_Union[_basic_types_pb2.Key, _Mapping]] = ..., gas: _Optional[int] = ..., initialBalance: _Optional[int] = ..., proxyAccountID: _Optional[_Union[_basic_types_pb2.AccountID, _Mapping]] = ..., autoRenewPeriod: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ..., constructorParameters: _Optional[bytes] = ..., shardID: _Optional[_Union[_basic_types_pb2.ShardID, _Mapping]] = ..., realmID: _Optional[_Union[_basic_types_pb2.RealmID, _Mapping]] = ..., newRealmAdminKey: _Optional[_Union[_basic_types_pb2.Key, _Mapping]] = ..., memo: _Optional[str] = ..., max_automatic_token_associations: _Optional[int] = ..., auto_renew_account_id: _Optional[_Union[_basic_types_pb2.AccountID, _Mapping]] = ..., staked_account_id: _Optional[_Union[_basic_types_pb2.AccountID, _Mapping]] = ..., staked_node_id: _Optional[int] = ..., decline_reward: bool = ..., hook_creation_details: _Optional[_Iterable[_Union[_hook_types_pb2.HookCreationDetails, _Mapping]]] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/contract_create_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/contract_create_pb2_grpc.py new file mode 100644 index 000000000..bb3743424 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/contract_create_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/contract_create_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/contract_delete_pb2.py b/src/hiero_sdk_python/hapi/services/contract_delete_pb2.py new file mode 100644 index 000000000..aa4c9144d --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/contract_delete_pb2.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/contract_delete.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/contract_delete.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import basic_types_pb2 as services_dot_basic__types__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1eservices/contract_delete.proto\x12\x05proto\x1a\x1aservices/basic_types.proto\"\xce\x01\n\x1d\x43ontractDeleteTransactionBody\x12%\n\ncontractID\x18\x01 \x01(\x0b\x32\x11.proto.ContractID\x12-\n\x11transferAccountID\x18\x02 \x01(\x0b\x32\x10.proto.AccountIDH\x00\x12/\n\x12transferContractID\x18\x03 \x01(\x0b\x32\x11.proto.ContractIDH\x00\x12\x19\n\x11permanent_removal\x18\x04 \x01(\x08\x42\x0b\n\tobtainersB&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.contract_delete_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_CONTRACTDELETETRANSACTIONBODY']._serialized_start=70 + _globals['_CONTRACTDELETETRANSACTIONBODY']._serialized_end=276 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/contract_delete_pb2.pyi b/src/hiero_sdk_python/hapi/services/contract_delete_pb2.pyi new file mode 100644 index 000000000..2bbbd5c92 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/contract_delete_pb2.pyi @@ -0,0 +1,19 @@ +from . import basic_types_pb2 as _basic_types_pb2 +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class ContractDeleteTransactionBody(_message.Message): + __slots__ = ("contractID", "transferAccountID", "transferContractID", "permanent_removal") + CONTRACTID_FIELD_NUMBER: _ClassVar[int] + TRANSFERACCOUNTID_FIELD_NUMBER: _ClassVar[int] + TRANSFERCONTRACTID_FIELD_NUMBER: _ClassVar[int] + PERMANENT_REMOVAL_FIELD_NUMBER: _ClassVar[int] + contractID: _basic_types_pb2.ContractID + transferAccountID: _basic_types_pb2.AccountID + transferContractID: _basic_types_pb2.ContractID + permanent_removal: bool + def __init__(self, contractID: _Optional[_Union[_basic_types_pb2.ContractID, _Mapping]] = ..., transferAccountID: _Optional[_Union[_basic_types_pb2.AccountID, _Mapping]] = ..., transferContractID: _Optional[_Union[_basic_types_pb2.ContractID, _Mapping]] = ..., permanent_removal: bool = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/contract_delete_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/contract_delete_pb2_grpc.py new file mode 100644 index 000000000..4f7d8a865 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/contract_delete_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/contract_delete_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/contract_get_bytecode_pb2.py b/src/hiero_sdk_python/hapi/services/contract_get_bytecode_pb2.py new file mode 100644 index 000000000..8ad19c80e --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/contract_get_bytecode_pb2.py @@ -0,0 +1,38 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/contract_get_bytecode.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/contract_get_bytecode.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import basic_types_pb2 as services_dot_basic__types__pb2 +from . import query_header_pb2 as services_dot_query__header__pb2 +from . import response_header_pb2 as services_dot_response__header__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n$services/contract_get_bytecode.proto\x12\x05proto\x1a\x1aservices/basic_types.proto\x1a\x1bservices/query_header.proto\x1a\x1eservices/response_header.proto\"e\n\x18\x43ontractGetBytecodeQuery\x12\"\n\x06header\x18\x01 \x01(\x0b\x32\x12.proto.QueryHeader\x12%\n\ncontractID\x18\x02 \x01(\x0b\x32\x11.proto.ContractID\"V\n\x1b\x43ontractGetBytecodeResponse\x12%\n\x06header\x18\x01 \x01(\x0b\x32\x15.proto.ResponseHeader\x12\x10\n\x08\x62ytecode\x18\x06 \x01(\x0c\x42&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.contract_get_bytecode_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_CONTRACTGETBYTECODEQUERY']._serialized_start=136 + _globals['_CONTRACTGETBYTECODEQUERY']._serialized_end=237 + _globals['_CONTRACTGETBYTECODERESPONSE']._serialized_start=239 + _globals['_CONTRACTGETBYTECODERESPONSE']._serialized_end=325 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/contract_get_bytecode_pb2.pyi b/src/hiero_sdk_python/hapi/services/contract_get_bytecode_pb2.pyi new file mode 100644 index 000000000..e8fa339d7 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/contract_get_bytecode_pb2.pyi @@ -0,0 +1,25 @@ +from . import basic_types_pb2 as _basic_types_pb2 +from . import query_header_pb2 as _query_header_pb2 +from . import response_header_pb2 as _response_header_pb2 +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class ContractGetBytecodeQuery(_message.Message): + __slots__ = ("header", "contractID") + HEADER_FIELD_NUMBER: _ClassVar[int] + CONTRACTID_FIELD_NUMBER: _ClassVar[int] + header: _query_header_pb2.QueryHeader + contractID: _basic_types_pb2.ContractID + def __init__(self, header: _Optional[_Union[_query_header_pb2.QueryHeader, _Mapping]] = ..., contractID: _Optional[_Union[_basic_types_pb2.ContractID, _Mapping]] = ...) -> None: ... + +class ContractGetBytecodeResponse(_message.Message): + __slots__ = ("header", "bytecode") + HEADER_FIELD_NUMBER: _ClassVar[int] + BYTECODE_FIELD_NUMBER: _ClassVar[int] + header: _response_header_pb2.ResponseHeader + bytecode: bytes + def __init__(self, header: _Optional[_Union[_response_header_pb2.ResponseHeader, _Mapping]] = ..., bytecode: _Optional[bytes] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/contract_get_bytecode_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/contract_get_bytecode_pb2_grpc.py new file mode 100644 index 000000000..05b358b97 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/contract_get_bytecode_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/contract_get_bytecode_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/contract_get_info_pb2.py b/src/hiero_sdk_python/hapi/services/contract_get_info_pb2.py new file mode 100644 index 000000000..3c63f8e52 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/contract_get_info_pb2.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/contract_get_info.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/contract_get_info.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import timestamp_pb2 as services_dot_timestamp__pb2 +from . import duration_pb2 as services_dot_duration__pb2 +from . import basic_types_pb2 as services_dot_basic__types__pb2 +from . import query_header_pb2 as services_dot_query__header__pb2 +from . import response_header_pb2 as services_dot_response__header__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n services/contract_get_info.proto\x12\x05proto\x1a\x18services/timestamp.proto\x1a\x17services/duration.proto\x1a\x1aservices/basic_types.proto\x1a\x1bservices/query_header.proto\x1a\x1eservices/response_header.proto\"a\n\x14\x43ontractGetInfoQuery\x12\"\n\x06header\x18\x01 \x01(\x0b\x32\x12.proto.QueryHeader\x12%\n\ncontractID\x18\x02 \x01(\x0b\x32\x11.proto.ContractID\"\x80\x05\n\x17\x43ontractGetInfoResponse\x12%\n\x06header\x18\x01 \x01(\x0b\x32\x15.proto.ResponseHeader\x12\x41\n\x0c\x63ontractInfo\x18\x02 \x01(\x0b\x32+.proto.ContractGetInfoResponse.ContractInfo\x1a\xfa\x03\n\x0c\x43ontractInfo\x12%\n\ncontractID\x18\x01 \x01(\x0b\x32\x11.proto.ContractID\x12#\n\taccountID\x18\x02 \x01(\x0b\x32\x10.proto.AccountID\x12\x19\n\x11\x63ontractAccountID\x18\x03 \x01(\t\x12\x1c\n\x08\x61\x64minKey\x18\x04 \x01(\x0b\x32\n.proto.Key\x12(\n\x0e\x65xpirationTime\x18\x05 \x01(\x0b\x32\x10.proto.Timestamp\x12(\n\x0f\x61utoRenewPeriod\x18\x06 \x01(\x0b\x32\x0f.proto.Duration\x12\x0f\n\x07storage\x18\x07 \x01(\x03\x12\x0c\n\x04memo\x18\x08 \x01(\t\x12\x0f\n\x07\x62\x61lance\x18\t \x01(\x04\x12\x0f\n\x07\x64\x65leted\x18\n \x01(\x08\x12\x38\n\x12tokenRelationships\x18\x0b \x03(\x0b\x32\x18.proto.TokenRelationshipB\x02\x18\x01\x12\x11\n\tledger_id\x18\x0c \x01(\x0c\x12/\n\x15\x61uto_renew_account_id\x18\r \x01(\x0b\x32\x10.proto.AccountID\x12(\n max_automatic_token_associations\x18\x0e \x01(\x05\x12(\n\x0cstaking_info\x18\x0f \x01(\x0b\x32\x12.proto.StakingInfoB&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.contract_get_info_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_CONTRACTGETINFORESPONSE_CONTRACTINFO'].fields_by_name['tokenRelationships']._loaded_options = None + _globals['_CONTRACTGETINFORESPONSE_CONTRACTINFO'].fields_by_name['tokenRelationships']._serialized_options = b'\030\001' + _globals['_CONTRACTGETINFOQUERY']._serialized_start=183 + _globals['_CONTRACTGETINFOQUERY']._serialized_end=280 + _globals['_CONTRACTGETINFORESPONSE']._serialized_start=283 + _globals['_CONTRACTGETINFORESPONSE']._serialized_end=923 + _globals['_CONTRACTGETINFORESPONSE_CONTRACTINFO']._serialized_start=417 + _globals['_CONTRACTGETINFORESPONSE_CONTRACTINFO']._serialized_end=923 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/contract_get_info_pb2.pyi b/src/hiero_sdk_python/hapi/services/contract_get_info_pb2.pyi new file mode 100644 index 000000000..fe8b6e142 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/contract_get_info_pb2.pyi @@ -0,0 +1,61 @@ +from . import timestamp_pb2 as _timestamp_pb2 +from . import duration_pb2 as _duration_pb2 +from . import basic_types_pb2 as _basic_types_pb2 +from . import query_header_pb2 as _query_header_pb2 +from . import response_header_pb2 as _response_header_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Iterable as _Iterable, Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class ContractGetInfoQuery(_message.Message): + __slots__ = ("header", "contractID") + HEADER_FIELD_NUMBER: _ClassVar[int] + CONTRACTID_FIELD_NUMBER: _ClassVar[int] + header: _query_header_pb2.QueryHeader + contractID: _basic_types_pb2.ContractID + def __init__(self, header: _Optional[_Union[_query_header_pb2.QueryHeader, _Mapping]] = ..., contractID: _Optional[_Union[_basic_types_pb2.ContractID, _Mapping]] = ...) -> None: ... + +class ContractGetInfoResponse(_message.Message): + __slots__ = ("header", "contractInfo") + class ContractInfo(_message.Message): + __slots__ = ("contractID", "accountID", "contractAccountID", "adminKey", "expirationTime", "autoRenewPeriod", "storage", "memo", "balance", "deleted", "tokenRelationships", "ledger_id", "auto_renew_account_id", "max_automatic_token_associations", "staking_info") + CONTRACTID_FIELD_NUMBER: _ClassVar[int] + ACCOUNTID_FIELD_NUMBER: _ClassVar[int] + CONTRACTACCOUNTID_FIELD_NUMBER: _ClassVar[int] + ADMINKEY_FIELD_NUMBER: _ClassVar[int] + EXPIRATIONTIME_FIELD_NUMBER: _ClassVar[int] + AUTORENEWPERIOD_FIELD_NUMBER: _ClassVar[int] + STORAGE_FIELD_NUMBER: _ClassVar[int] + MEMO_FIELD_NUMBER: _ClassVar[int] + BALANCE_FIELD_NUMBER: _ClassVar[int] + DELETED_FIELD_NUMBER: _ClassVar[int] + TOKENRELATIONSHIPS_FIELD_NUMBER: _ClassVar[int] + LEDGER_ID_FIELD_NUMBER: _ClassVar[int] + AUTO_RENEW_ACCOUNT_ID_FIELD_NUMBER: _ClassVar[int] + MAX_AUTOMATIC_TOKEN_ASSOCIATIONS_FIELD_NUMBER: _ClassVar[int] + STAKING_INFO_FIELD_NUMBER: _ClassVar[int] + contractID: _basic_types_pb2.ContractID + accountID: _basic_types_pb2.AccountID + contractAccountID: str + adminKey: _basic_types_pb2.Key + expirationTime: _timestamp_pb2.Timestamp + autoRenewPeriod: _duration_pb2.Duration + storage: int + memo: str + balance: int + deleted: bool + tokenRelationships: _containers.RepeatedCompositeFieldContainer[_basic_types_pb2.TokenRelationship] + ledger_id: bytes + auto_renew_account_id: _basic_types_pb2.AccountID + max_automatic_token_associations: int + staking_info: _basic_types_pb2.StakingInfo + def __init__(self, contractID: _Optional[_Union[_basic_types_pb2.ContractID, _Mapping]] = ..., accountID: _Optional[_Union[_basic_types_pb2.AccountID, _Mapping]] = ..., contractAccountID: _Optional[str] = ..., adminKey: _Optional[_Union[_basic_types_pb2.Key, _Mapping]] = ..., expirationTime: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., autoRenewPeriod: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ..., storage: _Optional[int] = ..., memo: _Optional[str] = ..., balance: _Optional[int] = ..., deleted: bool = ..., tokenRelationships: _Optional[_Iterable[_Union[_basic_types_pb2.TokenRelationship, _Mapping]]] = ..., ledger_id: _Optional[bytes] = ..., auto_renew_account_id: _Optional[_Union[_basic_types_pb2.AccountID, _Mapping]] = ..., max_automatic_token_associations: _Optional[int] = ..., staking_info: _Optional[_Union[_basic_types_pb2.StakingInfo, _Mapping]] = ...) -> None: ... + HEADER_FIELD_NUMBER: _ClassVar[int] + CONTRACTINFO_FIELD_NUMBER: _ClassVar[int] + header: _response_header_pb2.ResponseHeader + contractInfo: ContractGetInfoResponse.ContractInfo + def __init__(self, header: _Optional[_Union[_response_header_pb2.ResponseHeader, _Mapping]] = ..., contractInfo: _Optional[_Union[ContractGetInfoResponse.ContractInfo, _Mapping]] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/contract_get_info_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/contract_get_info_pb2_grpc.py new file mode 100644 index 000000000..9112f493d --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/contract_get_info_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/contract_get_info_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/contract_get_records_pb2.py b/src/hiero_sdk_python/hapi/services/contract_get_records_pb2.py new file mode 100644 index 000000000..c81e12c86 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/contract_get_records_pb2.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/contract_get_records.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/contract_get_records.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import basic_types_pb2 as services_dot_basic__types__pb2 +from . import transaction_record_pb2 as services_dot_transaction__record__pb2 +from . import query_header_pb2 as services_dot_query__header__pb2 +from . import response_header_pb2 as services_dot_response__header__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n#services/contract_get_records.proto\x12\x05proto\x1a\x1aservices/basic_types.proto\x1a!services/transaction_record.proto\x1a\x1bservices/query_header.proto\x1a\x1eservices/response_header.proto\"h\n\x17\x43ontractGetRecordsQuery\x12\"\n\x06header\x18\x01 \x01(\x0b\x32\x12.proto.QueryHeader\x12%\n\ncontractID\x18\x02 \x01(\x0b\x32\x11.proto.ContractID:\x02\x18\x01\"\x99\x01\n\x1a\x43ontractGetRecordsResponse\x12%\n\x06header\x18\x01 \x01(\x0b\x32\x15.proto.ResponseHeader\x12%\n\ncontractID\x18\x02 \x01(\x0b\x32\x11.proto.ContractID\x12)\n\x07records\x18\x03 \x03(\x0b\x32\x18.proto.TransactionRecord:\x02\x18\x01\x42&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.contract_get_records_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_CONTRACTGETRECORDSQUERY']._loaded_options = None + _globals['_CONTRACTGETRECORDSQUERY']._serialized_options = b'\030\001' + _globals['_CONTRACTGETRECORDSRESPONSE']._loaded_options = None + _globals['_CONTRACTGETRECORDSRESPONSE']._serialized_options = b'\030\001' + _globals['_CONTRACTGETRECORDSQUERY']._serialized_start=170 + _globals['_CONTRACTGETRECORDSQUERY']._serialized_end=274 + _globals['_CONTRACTGETRECORDSRESPONSE']._serialized_start=277 + _globals['_CONTRACTGETRECORDSRESPONSE']._serialized_end=430 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/contract_get_records_pb2.pyi b/src/hiero_sdk_python/hapi/services/contract_get_records_pb2.pyi new file mode 100644 index 000000000..b15974144 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/contract_get_records_pb2.pyi @@ -0,0 +1,29 @@ +from . import basic_types_pb2 as _basic_types_pb2 +from . import transaction_record_pb2 as _transaction_record_pb2 +from . import query_header_pb2 as _query_header_pb2 +from . import response_header_pb2 as _response_header_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Iterable as _Iterable, Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class ContractGetRecordsQuery(_message.Message): + __slots__ = ("header", "contractID") + HEADER_FIELD_NUMBER: _ClassVar[int] + CONTRACTID_FIELD_NUMBER: _ClassVar[int] + header: _query_header_pb2.QueryHeader + contractID: _basic_types_pb2.ContractID + def __init__(self, header: _Optional[_Union[_query_header_pb2.QueryHeader, _Mapping]] = ..., contractID: _Optional[_Union[_basic_types_pb2.ContractID, _Mapping]] = ...) -> None: ... + +class ContractGetRecordsResponse(_message.Message): + __slots__ = ("header", "contractID", "records") + HEADER_FIELD_NUMBER: _ClassVar[int] + CONTRACTID_FIELD_NUMBER: _ClassVar[int] + RECORDS_FIELD_NUMBER: _ClassVar[int] + header: _response_header_pb2.ResponseHeader + contractID: _basic_types_pb2.ContractID + records: _containers.RepeatedCompositeFieldContainer[_transaction_record_pb2.TransactionRecord] + def __init__(self, header: _Optional[_Union[_response_header_pb2.ResponseHeader, _Mapping]] = ..., contractID: _Optional[_Union[_basic_types_pb2.ContractID, _Mapping]] = ..., records: _Optional[_Iterable[_Union[_transaction_record_pb2.TransactionRecord, _Mapping]]] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/contract_get_records_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/contract_get_records_pb2_grpc.py new file mode 100644 index 000000000..9533241ec --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/contract_get_records_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/contract_get_records_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/contract_types_pb2.py b/src/hiero_sdk_python/hapi/services/contract_types_pb2.py new file mode 100644 index 000000000..f00d92f3d --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/contract_types_pb2.py @@ -0,0 +1,47 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/contract_types.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/contract_types.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import basic_types_pb2 as services_dot_basic__types__pb2 +from google.protobuf import wrappers_pb2 as google_dot_protobuf_dot_wrappers__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1dservices/contract_types.proto\x12\x05proto\x1a\x1aservices/basic_types.proto\x1a\x1egoogle/protobuf/wrappers.proto\"D\n\x13InternalCallContext\x12\x0b\n\x03gas\x18\x01 \x01(\x04\x12\r\n\x05value\x18\x02 \x01(\x04\x12\x11\n\tcall_data\x18\x03 \x01(\x0c\"\xdc\x01\n\x14\x45vmTransactionResult\x12#\n\tsender_id\x18\x01 \x01(\x0b\x32\x10.proto.AccountID\x12&\n\x0b\x63ontract_id\x18\x02 \x01(\x0b\x32\x11.proto.ContractID\x12\x13\n\x0bresult_data\x18\x03 \x01(\x0c\x12\x15\n\rerror_message\x18\x04 \x01(\t\x12\x10\n\x08gas_used\x18\x05 \x01(\x04\x12\x39\n\x15internal_call_context\x18\x06 \x01(\x0b\x32\x1a.proto.InternalCallContext\"J\n\x11\x43ontractNonceInfo\x12&\n\x0b\x63ontract_id\x18\x01 \x01(\x0b\x32\x11.proto.ContractID\x12\r\n\x05nonce\x18\x02 \x01(\x03\"d\n\x0f\x43ontractLoginfo\x12%\n\ncontractID\x18\x01 \x01(\x0b\x32\x11.proto.ContractID\x12\r\n\x05\x62loom\x18\x02 \x01(\x0c\x12\r\n\x05topic\x18\x03 \x03(\x0c\x12\x0c\n\x04\x64\x61ta\x18\x04 \x01(\x0c\"\xe9\x03\n\x16\x43ontractFunctionResult\x12%\n\ncontractID\x18\x01 \x01(\x0b\x32\x11.proto.ContractID\x12\x1a\n\x12\x63ontractCallResult\x18\x02 \x01(\x0c\x12\x14\n\x0c\x65rrorMessage\x18\x03 \x01(\t\x12\r\n\x05\x62loom\x18\x04 \x01(\x0c\x12\x0f\n\x07gasUsed\x18\x05 \x01(\x04\x12\'\n\x07logInfo\x18\x06 \x03(\x0b\x32\x16.proto.ContractLoginfo\x12\x31\n\x12\x63reatedContractIDs\x18\x07 \x03(\x0b\x32\x11.proto.ContractIDB\x02\x18\x01\x12\x30\n\x0b\x65vm_address\x18\t \x01(\x0b\x32\x1b.google.protobuf.BytesValue\x12\x0b\n\x03gas\x18\n \x01(\x03\x12\x0e\n\x06\x61mount\x18\x0b \x01(\x03\x12\x1a\n\x12\x66unctionParameters\x18\x0c \x01(\x0c\x12#\n\tsender_id\x18\r \x01(\x0b\x32\x10.proto.AccountID\x12\x31\n\x0f\x63ontract_nonces\x18\x0e \x03(\x0b\x32\x18.proto.ContractNonceInfo\x12\x31\n\x0csigner_nonce\x18\x0f \x01(\x0b\x32\x1b.google.protobuf.Int64ValueJ\x04\x08\x08\x10\tB&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.contract_types_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_CONTRACTFUNCTIONRESULT'].fields_by_name['createdContractIDs']._loaded_options = None + _globals['_CONTRACTFUNCTIONRESULT'].fields_by_name['createdContractIDs']._serialized_options = b'\030\001' + _globals['_INTERNALCALLCONTEXT']._serialized_start=100 + _globals['_INTERNALCALLCONTEXT']._serialized_end=168 + _globals['_EVMTRANSACTIONRESULT']._serialized_start=171 + _globals['_EVMTRANSACTIONRESULT']._serialized_end=391 + _globals['_CONTRACTNONCEINFO']._serialized_start=393 + _globals['_CONTRACTNONCEINFO']._serialized_end=467 + _globals['_CONTRACTLOGINFO']._serialized_start=469 + _globals['_CONTRACTLOGINFO']._serialized_end=569 + _globals['_CONTRACTFUNCTIONRESULT']._serialized_start=572 + _globals['_CONTRACTFUNCTIONRESULT']._serialized_end=1061 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/contract_types_pb2.pyi b/src/hiero_sdk_python/hapi/services/contract_types_pb2.pyi new file mode 100644 index 000000000..cc425a7c9 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/contract_types_pb2.pyi @@ -0,0 +1,87 @@ +from . import basic_types_pb2 as _basic_types_pb2 +from google.protobuf import wrappers_pb2 as _wrappers_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Iterable as _Iterable, Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class InternalCallContext(_message.Message): + __slots__ = ("gas", "value", "call_data") + GAS_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + CALL_DATA_FIELD_NUMBER: _ClassVar[int] + gas: int + value: int + call_data: bytes + def __init__(self, gas: _Optional[int] = ..., value: _Optional[int] = ..., call_data: _Optional[bytes] = ...) -> None: ... + +class EvmTransactionResult(_message.Message): + __slots__ = ("sender_id", "contract_id", "result_data", "error_message", "gas_used", "internal_call_context") + SENDER_ID_FIELD_NUMBER: _ClassVar[int] + CONTRACT_ID_FIELD_NUMBER: _ClassVar[int] + RESULT_DATA_FIELD_NUMBER: _ClassVar[int] + ERROR_MESSAGE_FIELD_NUMBER: _ClassVar[int] + GAS_USED_FIELD_NUMBER: _ClassVar[int] + INTERNAL_CALL_CONTEXT_FIELD_NUMBER: _ClassVar[int] + sender_id: _basic_types_pb2.AccountID + contract_id: _basic_types_pb2.ContractID + result_data: bytes + error_message: str + gas_used: int + internal_call_context: InternalCallContext + def __init__(self, sender_id: _Optional[_Union[_basic_types_pb2.AccountID, _Mapping]] = ..., contract_id: _Optional[_Union[_basic_types_pb2.ContractID, _Mapping]] = ..., result_data: _Optional[bytes] = ..., error_message: _Optional[str] = ..., gas_used: _Optional[int] = ..., internal_call_context: _Optional[_Union[InternalCallContext, _Mapping]] = ...) -> None: ... + +class ContractNonceInfo(_message.Message): + __slots__ = ("contract_id", "nonce") + CONTRACT_ID_FIELD_NUMBER: _ClassVar[int] + NONCE_FIELD_NUMBER: _ClassVar[int] + contract_id: _basic_types_pb2.ContractID + nonce: int + def __init__(self, contract_id: _Optional[_Union[_basic_types_pb2.ContractID, _Mapping]] = ..., nonce: _Optional[int] = ...) -> None: ... + +class ContractLoginfo(_message.Message): + __slots__ = ("contractID", "bloom", "topic", "data") + CONTRACTID_FIELD_NUMBER: _ClassVar[int] + BLOOM_FIELD_NUMBER: _ClassVar[int] + TOPIC_FIELD_NUMBER: _ClassVar[int] + DATA_FIELD_NUMBER: _ClassVar[int] + contractID: _basic_types_pb2.ContractID + bloom: bytes + topic: _containers.RepeatedScalarFieldContainer[bytes] + data: bytes + def __init__(self, contractID: _Optional[_Union[_basic_types_pb2.ContractID, _Mapping]] = ..., bloom: _Optional[bytes] = ..., topic: _Optional[_Iterable[bytes]] = ..., data: _Optional[bytes] = ...) -> None: ... + +class ContractFunctionResult(_message.Message): + __slots__ = ("contractID", "contractCallResult", "errorMessage", "bloom", "gasUsed", "logInfo", "createdContractIDs", "evm_address", "gas", "amount", "functionParameters", "sender_id", "contract_nonces", "signer_nonce") + CONTRACTID_FIELD_NUMBER: _ClassVar[int] + CONTRACTCALLRESULT_FIELD_NUMBER: _ClassVar[int] + ERRORMESSAGE_FIELD_NUMBER: _ClassVar[int] + BLOOM_FIELD_NUMBER: _ClassVar[int] + GASUSED_FIELD_NUMBER: _ClassVar[int] + LOGINFO_FIELD_NUMBER: _ClassVar[int] + CREATEDCONTRACTIDS_FIELD_NUMBER: _ClassVar[int] + EVM_ADDRESS_FIELD_NUMBER: _ClassVar[int] + GAS_FIELD_NUMBER: _ClassVar[int] + AMOUNT_FIELD_NUMBER: _ClassVar[int] + FUNCTIONPARAMETERS_FIELD_NUMBER: _ClassVar[int] + SENDER_ID_FIELD_NUMBER: _ClassVar[int] + CONTRACT_NONCES_FIELD_NUMBER: _ClassVar[int] + SIGNER_NONCE_FIELD_NUMBER: _ClassVar[int] + contractID: _basic_types_pb2.ContractID + contractCallResult: bytes + errorMessage: str + bloom: bytes + gasUsed: int + logInfo: _containers.RepeatedCompositeFieldContainer[ContractLoginfo] + createdContractIDs: _containers.RepeatedCompositeFieldContainer[_basic_types_pb2.ContractID] + evm_address: _wrappers_pb2.BytesValue + gas: int + amount: int + functionParameters: bytes + sender_id: _basic_types_pb2.AccountID + contract_nonces: _containers.RepeatedCompositeFieldContainer[ContractNonceInfo] + signer_nonce: _wrappers_pb2.Int64Value + def __init__(self, contractID: _Optional[_Union[_basic_types_pb2.ContractID, _Mapping]] = ..., contractCallResult: _Optional[bytes] = ..., errorMessage: _Optional[str] = ..., bloom: _Optional[bytes] = ..., gasUsed: _Optional[int] = ..., logInfo: _Optional[_Iterable[_Union[ContractLoginfo, _Mapping]]] = ..., createdContractIDs: _Optional[_Iterable[_Union[_basic_types_pb2.ContractID, _Mapping]]] = ..., evm_address: _Optional[_Union[_wrappers_pb2.BytesValue, _Mapping]] = ..., gas: _Optional[int] = ..., amount: _Optional[int] = ..., functionParameters: _Optional[bytes] = ..., sender_id: _Optional[_Union[_basic_types_pb2.AccountID, _Mapping]] = ..., contract_nonces: _Optional[_Iterable[_Union[ContractNonceInfo, _Mapping]]] = ..., signer_nonce: _Optional[_Union[_wrappers_pb2.Int64Value, _Mapping]] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/contract_types_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/contract_types_pb2_grpc.py new file mode 100644 index 000000000..a8aa8adc3 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/contract_types_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/contract_types_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/contract_update_pb2.py b/src/hiero_sdk_python/hapi/services/contract_update_pb2.py new file mode 100644 index 000000000..95bcc65db --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/contract_update_pb2.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/contract_update.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/contract_update.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import basic_types_pb2 as services_dot_basic__types__pb2 +from . import duration_pb2 as services_dot_duration__pb2 +from . import hook_types_pb2 as services_dot_hook__types__pb2 +from . import timestamp_pb2 as services_dot_timestamp__pb2 +from google.protobuf import wrappers_pb2 as google_dot_protobuf_dot_wrappers__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1eservices/contract_update.proto\x12\x05proto\x1a\x1aservices/basic_types.proto\x1a\x17services/duration.proto\x1a\x19services/hook_types.proto\x1a\x18services/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\"\xcd\x05\n\x1d\x43ontractUpdateTransactionBody\x12%\n\ncontractID\x18\x01 \x01(\x0b\x32\x11.proto.ContractID\x12(\n\x0e\x65xpirationTime\x18\x02 \x01(\x0b\x32\x10.proto.Timestamp\x12\x1c\n\x08\x61\x64minKey\x18\x03 \x01(\x0b\x32\n.proto.Key\x12,\n\x0eproxyAccountID\x18\x06 \x01(\x0b\x32\x10.proto.AccountIDB\x02\x18\x01\x12(\n\x0f\x61utoRenewPeriod\x18\x07 \x01(\x0b\x32\x0f.proto.Duration\x12!\n\x06\x66ileID\x18\x08 \x01(\x0b\x32\r.proto.FileIDB\x02\x18\x01\x12\x12\n\x04memo\x18\t \x01(\tB\x02\x18\x01H\x00\x12\x33\n\x0bmemoWrapper\x18\n \x01(\x0b\x32\x1c.google.protobuf.StringValueH\x00\x12\x45\n max_automatic_token_associations\x18\x0b \x01(\x0b\x32\x1b.google.protobuf.Int32Value\x12/\n\x15\x61uto_renew_account_id\x18\x0c \x01(\x0b\x32\x10.proto.AccountID\x12-\n\x11staked_account_id\x18\r \x01(\x0b\x32\x10.proto.AccountIDH\x01\x12\x18\n\x0estaked_node_id\x18\x0e \x01(\x03H\x01\x12\x32\n\x0e\x64\x65\x63line_reward\x18\x0f \x01(\x0b\x32\x1a.google.protobuf.BoolValue\x12\x1a\n\x12hook_ids_to_delete\x18\x10 \x03(\x03\x12N\n\x15hook_creation_details\x18\x11 \x03(\x0b\x32/.com.hedera.hapi.node.hooks.HookCreationDetailsB\x0b\n\tmemoFieldB\x0b\n\tstaked_idB&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.contract_update_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_CONTRACTUPDATETRANSACTIONBODY'].fields_by_name['proxyAccountID']._loaded_options = None + _globals['_CONTRACTUPDATETRANSACTIONBODY'].fields_by_name['proxyAccountID']._serialized_options = b'\030\001' + _globals['_CONTRACTUPDATETRANSACTIONBODY'].fields_by_name['fileID']._loaded_options = None + _globals['_CONTRACTUPDATETRANSACTIONBODY'].fields_by_name['fileID']._serialized_options = b'\030\001' + _globals['_CONTRACTUPDATETRANSACTIONBODY'].fields_by_name['memo']._loaded_options = None + _globals['_CONTRACTUPDATETRANSACTIONBODY'].fields_by_name['memo']._serialized_options = b'\030\001' + _globals['_CONTRACTUPDATETRANSACTIONBODY']._serialized_start=180 + _globals['_CONTRACTUPDATETRANSACTIONBODY']._serialized_end=897 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/contract_update_pb2.pyi b/src/hiero_sdk_python/hapi/services/contract_update_pb2.pyi new file mode 100644 index 000000000..683daacab --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/contract_update_pb2.pyi @@ -0,0 +1,46 @@ +from . import basic_types_pb2 as _basic_types_pb2 +from . import duration_pb2 as _duration_pb2 +from . import hook_types_pb2 as _hook_types_pb2 +from . import timestamp_pb2 as _timestamp_pb2 +from google.protobuf import wrappers_pb2 as _wrappers_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Iterable as _Iterable, Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class ContractUpdateTransactionBody(_message.Message): + __slots__ = ("contractID", "expirationTime", "adminKey", "proxyAccountID", "autoRenewPeriod", "fileID", "memo", "memoWrapper", "max_automatic_token_associations", "auto_renew_account_id", "staked_account_id", "staked_node_id", "decline_reward", "hook_ids_to_delete", "hook_creation_details") + CONTRACTID_FIELD_NUMBER: _ClassVar[int] + EXPIRATIONTIME_FIELD_NUMBER: _ClassVar[int] + ADMINKEY_FIELD_NUMBER: _ClassVar[int] + PROXYACCOUNTID_FIELD_NUMBER: _ClassVar[int] + AUTORENEWPERIOD_FIELD_NUMBER: _ClassVar[int] + FILEID_FIELD_NUMBER: _ClassVar[int] + MEMO_FIELD_NUMBER: _ClassVar[int] + MEMOWRAPPER_FIELD_NUMBER: _ClassVar[int] + MAX_AUTOMATIC_TOKEN_ASSOCIATIONS_FIELD_NUMBER: _ClassVar[int] + AUTO_RENEW_ACCOUNT_ID_FIELD_NUMBER: _ClassVar[int] + STAKED_ACCOUNT_ID_FIELD_NUMBER: _ClassVar[int] + STAKED_NODE_ID_FIELD_NUMBER: _ClassVar[int] + DECLINE_REWARD_FIELD_NUMBER: _ClassVar[int] + HOOK_IDS_TO_DELETE_FIELD_NUMBER: _ClassVar[int] + HOOK_CREATION_DETAILS_FIELD_NUMBER: _ClassVar[int] + contractID: _basic_types_pb2.ContractID + expirationTime: _timestamp_pb2.Timestamp + adminKey: _basic_types_pb2.Key + proxyAccountID: _basic_types_pb2.AccountID + autoRenewPeriod: _duration_pb2.Duration + fileID: _basic_types_pb2.FileID + memo: str + memoWrapper: _wrappers_pb2.StringValue + max_automatic_token_associations: _wrappers_pb2.Int32Value + auto_renew_account_id: _basic_types_pb2.AccountID + staked_account_id: _basic_types_pb2.AccountID + staked_node_id: int + decline_reward: _wrappers_pb2.BoolValue + hook_ids_to_delete: _containers.RepeatedScalarFieldContainer[int] + hook_creation_details: _containers.RepeatedCompositeFieldContainer[_hook_types_pb2.HookCreationDetails] + def __init__(self, contractID: _Optional[_Union[_basic_types_pb2.ContractID, _Mapping]] = ..., expirationTime: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., adminKey: _Optional[_Union[_basic_types_pb2.Key, _Mapping]] = ..., proxyAccountID: _Optional[_Union[_basic_types_pb2.AccountID, _Mapping]] = ..., autoRenewPeriod: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ..., fileID: _Optional[_Union[_basic_types_pb2.FileID, _Mapping]] = ..., memo: _Optional[str] = ..., memoWrapper: _Optional[_Union[_wrappers_pb2.StringValue, _Mapping]] = ..., max_automatic_token_associations: _Optional[_Union[_wrappers_pb2.Int32Value, _Mapping]] = ..., auto_renew_account_id: _Optional[_Union[_basic_types_pb2.AccountID, _Mapping]] = ..., staked_account_id: _Optional[_Union[_basic_types_pb2.AccountID, _Mapping]] = ..., staked_node_id: _Optional[int] = ..., decline_reward: _Optional[_Union[_wrappers_pb2.BoolValue, _Mapping]] = ..., hook_ids_to_delete: _Optional[_Iterable[int]] = ..., hook_creation_details: _Optional[_Iterable[_Union[_hook_types_pb2.HookCreationDetails, _Mapping]]] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/contract_update_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/contract_update_pb2_grpc.py new file mode 100644 index 000000000..ab757dc3e --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/contract_update_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/contract_update_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/crypto_add_live_hash_pb2.py b/src/hiero_sdk_python/hapi/services/crypto_add_live_hash_pb2.py new file mode 100644 index 000000000..85734b867 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/crypto_add_live_hash_pb2.py @@ -0,0 +1,37 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/crypto_add_live_hash.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/crypto_add_live_hash.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import basic_types_pb2 as services_dot_basic__types__pb2 +from . import duration_pb2 as services_dot_duration__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n#services/crypto_add_live_hash.proto\x12\x05proto\x1a\x1aservices/basic_types.proto\x1a\x17services/duration.proto\"~\n\x08LiveHash\x12#\n\taccountId\x18\x01 \x01(\x0b\x32\x10.proto.AccountID\x12\x0c\n\x04hash\x18\x02 \x01(\x0c\x12\x1c\n\x04keys\x18\x03 \x01(\x0b\x32\x0e.proto.KeyList\x12!\n\x08\x64uration\x18\x05 \x01(\x0b\x32\x0f.proto.Duration\"E\n CryptoAddLiveHashTransactionBody\x12!\n\x08liveHash\x18\x03 \x01(\x0b\x32\x0f.proto.LiveHashB&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.crypto_add_live_hash_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_LIVEHASH']._serialized_start=99 + _globals['_LIVEHASH']._serialized_end=225 + _globals['_CRYPTOADDLIVEHASHTRANSACTIONBODY']._serialized_start=227 + _globals['_CRYPTOADDLIVEHASHTRANSACTIONBODY']._serialized_end=296 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/crypto_add_live_hash_pb2.pyi b/src/hiero_sdk_python/hapi/services/crypto_add_live_hash_pb2.pyi new file mode 100644 index 000000000..eebc26088 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/crypto_add_live_hash_pb2.pyi @@ -0,0 +1,26 @@ +from . import basic_types_pb2 as _basic_types_pb2 +from . import duration_pb2 as _duration_pb2 +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class LiveHash(_message.Message): + __slots__ = ("accountId", "hash", "keys", "duration") + ACCOUNTID_FIELD_NUMBER: _ClassVar[int] + HASH_FIELD_NUMBER: _ClassVar[int] + KEYS_FIELD_NUMBER: _ClassVar[int] + DURATION_FIELD_NUMBER: _ClassVar[int] + accountId: _basic_types_pb2.AccountID + hash: bytes + keys: _basic_types_pb2.KeyList + duration: _duration_pb2.Duration + def __init__(self, accountId: _Optional[_Union[_basic_types_pb2.AccountID, _Mapping]] = ..., hash: _Optional[bytes] = ..., keys: _Optional[_Union[_basic_types_pb2.KeyList, _Mapping]] = ..., duration: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ...) -> None: ... + +class CryptoAddLiveHashTransactionBody(_message.Message): + __slots__ = ("liveHash",) + LIVEHASH_FIELD_NUMBER: _ClassVar[int] + liveHash: LiveHash + def __init__(self, liveHash: _Optional[_Union[LiveHash, _Mapping]] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/crypto_add_live_hash_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/crypto_add_live_hash_pb2_grpc.py new file mode 100644 index 000000000..a5dc7d68d --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/crypto_add_live_hash_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/crypto_add_live_hash_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/crypto_approve_allowance_pb2.py b/src/hiero_sdk_python/hapi/services/crypto_approve_allowance_pb2.py new file mode 100644 index 000000000..f1d299d7f --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/crypto_approve_allowance_pb2.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/crypto_approve_allowance.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/crypto_approve_allowance.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import basic_types_pb2 as services_dot_basic__types__pb2 +from google.protobuf import wrappers_pb2 as google_dot_protobuf_dot_wrappers__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\'services/crypto_approve_allowance.proto\x12\x05proto\x1a\x1aservices/basic_types.proto\x1a\x1egoogle/protobuf/wrappers.proto\"\xb5\x01\n%CryptoApproveAllowanceTransactionBody\x12\x30\n\x10\x63ryptoAllowances\x18\x01 \x03(\x0b\x32\x16.proto.CryptoAllowance\x12*\n\rnftAllowances\x18\x02 \x03(\x0b\x32\x13.proto.NftAllowance\x12.\n\x0ftokenAllowances\x18\x03 \x03(\x0b\x32\x15.proto.TokenAllowance\"e\n\x0f\x43ryptoAllowance\x12\x1f\n\x05owner\x18\x01 \x01(\x0b\x32\x10.proto.AccountID\x12!\n\x07spender\x18\x02 \x01(\x0b\x32\x10.proto.AccountID\x12\x0e\n\x06\x61mount\x18\x03 \x01(\x03\"\xef\x01\n\x0cNftAllowance\x12\x1f\n\x07tokenId\x18\x01 \x01(\x0b\x32\x0e.proto.TokenID\x12\x1f\n\x05owner\x18\x02 \x01(\x0b\x32\x10.proto.AccountID\x12!\n\x07spender\x18\x03 \x01(\x0b\x32\x10.proto.AccountID\x12\x16\n\x0eserial_numbers\x18\x04 \x03(\x03\x12\x34\n\x10\x61pproved_for_all\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.BoolValue\x12,\n\x12\x64\x65legating_spender\x18\x06 \x01(\x0b\x32\x10.proto.AccountID\"\x85\x01\n\x0eTokenAllowance\x12\x1f\n\x07tokenId\x18\x01 \x01(\x0b\x32\x0e.proto.TokenID\x12\x1f\n\x05owner\x18\x02 \x01(\x0b\x32\x10.proto.AccountID\x12!\n\x07spender\x18\x03 \x01(\x0b\x32\x10.proto.AccountID\x12\x0e\n\x06\x61mount\x18\x04 \x01(\x03\x42&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.crypto_approve_allowance_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_CRYPTOAPPROVEALLOWANCETRANSACTIONBODY']._serialized_start=111 + _globals['_CRYPTOAPPROVEALLOWANCETRANSACTIONBODY']._serialized_end=292 + _globals['_CRYPTOALLOWANCE']._serialized_start=294 + _globals['_CRYPTOALLOWANCE']._serialized_end=395 + _globals['_NFTALLOWANCE']._serialized_start=398 + _globals['_NFTALLOWANCE']._serialized_end=637 + _globals['_TOKENALLOWANCE']._serialized_start=640 + _globals['_TOKENALLOWANCE']._serialized_end=773 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/crypto_approve_allowance_pb2.pyi b/src/hiero_sdk_python/hapi/services/crypto_approve_allowance_pb2.pyi new file mode 100644 index 000000000..0c5a36217 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/crypto_approve_allowance_pb2.pyi @@ -0,0 +1,57 @@ +from . import basic_types_pb2 as _basic_types_pb2 +from google.protobuf import wrappers_pb2 as _wrappers_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Iterable as _Iterable, Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class CryptoApproveAllowanceTransactionBody(_message.Message): + __slots__ = ("cryptoAllowances", "nftAllowances", "tokenAllowances") + CRYPTOALLOWANCES_FIELD_NUMBER: _ClassVar[int] + NFTALLOWANCES_FIELD_NUMBER: _ClassVar[int] + TOKENALLOWANCES_FIELD_NUMBER: _ClassVar[int] + cryptoAllowances: _containers.RepeatedCompositeFieldContainer[CryptoAllowance] + nftAllowances: _containers.RepeatedCompositeFieldContainer[NftAllowance] + tokenAllowances: _containers.RepeatedCompositeFieldContainer[TokenAllowance] + def __init__(self, cryptoAllowances: _Optional[_Iterable[_Union[CryptoAllowance, _Mapping]]] = ..., nftAllowances: _Optional[_Iterable[_Union[NftAllowance, _Mapping]]] = ..., tokenAllowances: _Optional[_Iterable[_Union[TokenAllowance, _Mapping]]] = ...) -> None: ... + +class CryptoAllowance(_message.Message): + __slots__ = ("owner", "spender", "amount") + OWNER_FIELD_NUMBER: _ClassVar[int] + SPENDER_FIELD_NUMBER: _ClassVar[int] + AMOUNT_FIELD_NUMBER: _ClassVar[int] + owner: _basic_types_pb2.AccountID + spender: _basic_types_pb2.AccountID + amount: int + def __init__(self, owner: _Optional[_Union[_basic_types_pb2.AccountID, _Mapping]] = ..., spender: _Optional[_Union[_basic_types_pb2.AccountID, _Mapping]] = ..., amount: _Optional[int] = ...) -> None: ... + +class NftAllowance(_message.Message): + __slots__ = ("tokenId", "owner", "spender", "serial_numbers", "approved_for_all", "delegating_spender") + TOKENID_FIELD_NUMBER: _ClassVar[int] + OWNER_FIELD_NUMBER: _ClassVar[int] + SPENDER_FIELD_NUMBER: _ClassVar[int] + SERIAL_NUMBERS_FIELD_NUMBER: _ClassVar[int] + APPROVED_FOR_ALL_FIELD_NUMBER: _ClassVar[int] + DELEGATING_SPENDER_FIELD_NUMBER: _ClassVar[int] + tokenId: _basic_types_pb2.TokenID + owner: _basic_types_pb2.AccountID + spender: _basic_types_pb2.AccountID + serial_numbers: _containers.RepeatedScalarFieldContainer[int] + approved_for_all: _wrappers_pb2.BoolValue + delegating_spender: _basic_types_pb2.AccountID + def __init__(self, tokenId: _Optional[_Union[_basic_types_pb2.TokenID, _Mapping]] = ..., owner: _Optional[_Union[_basic_types_pb2.AccountID, _Mapping]] = ..., spender: _Optional[_Union[_basic_types_pb2.AccountID, _Mapping]] = ..., serial_numbers: _Optional[_Iterable[int]] = ..., approved_for_all: _Optional[_Union[_wrappers_pb2.BoolValue, _Mapping]] = ..., delegating_spender: _Optional[_Union[_basic_types_pb2.AccountID, _Mapping]] = ...) -> None: ... + +class TokenAllowance(_message.Message): + __slots__ = ("tokenId", "owner", "spender", "amount") + TOKENID_FIELD_NUMBER: _ClassVar[int] + OWNER_FIELD_NUMBER: _ClassVar[int] + SPENDER_FIELD_NUMBER: _ClassVar[int] + AMOUNT_FIELD_NUMBER: _ClassVar[int] + tokenId: _basic_types_pb2.TokenID + owner: _basic_types_pb2.AccountID + spender: _basic_types_pb2.AccountID + amount: int + def __init__(self, tokenId: _Optional[_Union[_basic_types_pb2.TokenID, _Mapping]] = ..., owner: _Optional[_Union[_basic_types_pb2.AccountID, _Mapping]] = ..., spender: _Optional[_Union[_basic_types_pb2.AccountID, _Mapping]] = ..., amount: _Optional[int] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/crypto_approve_allowance_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/crypto_approve_allowance_pb2_grpc.py new file mode 100644 index 000000000..d4c16ae0d --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/crypto_approve_allowance_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/crypto_approve_allowance_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/crypto_create_pb2.py b/src/hiero_sdk_python/hapi/services/crypto_create_pb2.py new file mode 100644 index 000000000..188a9ba85 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/crypto_create_pb2.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/crypto_create.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/crypto_create.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import basic_types_pb2 as services_dot_basic__types__pb2 +from . import duration_pb2 as services_dot_duration__pb2 +from . import hook_types_pb2 as services_dot_hook__types__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cservices/crypto_create.proto\x12\x05proto\x1a\x1aservices/basic_types.proto\x1a\x17services/duration.proto\x1a\x19services/hook_types.proto\"\x85\x05\n\x1b\x43ryptoCreateTransactionBody\x12\x17\n\x03key\x18\x01 \x01(\x0b\x32\n.proto.Key\x12\x16\n\x0einitialBalance\x18\x02 \x01(\x04\x12,\n\x0eproxyAccountID\x18\x03 \x01(\x0b\x32\x10.proto.AccountIDB\x02\x18\x01\x12\x1f\n\x13sendRecordThreshold\x18\x06 \x01(\x04\x42\x02\x18\x01\x12\"\n\x16receiveRecordThreshold\x18\x07 \x01(\x04\x42\x02\x18\x01\x12\x1b\n\x13receiverSigRequired\x18\x08 \x01(\x08\x12(\n\x0f\x61utoRenewPeriod\x18\t \x01(\x0b\x32\x0f.proto.Duration\x12\x1f\n\x07shardID\x18\n \x01(\x0b\x32\x0e.proto.ShardID\x12\x1f\n\x07realmID\x18\x0b \x01(\x0b\x32\x0e.proto.RealmID\x12(\n\x10newRealmAdminKey\x18\x0c \x01(\x0b\x32\n.proto.KeyB\x02\x18\x01\x12\x0c\n\x04memo\x18\r \x01(\t\x12(\n max_automatic_token_associations\x18\x0e \x01(\x05\x12-\n\x11staked_account_id\x18\x0f \x01(\x0b\x32\x10.proto.AccountIDH\x00\x12\x18\n\x0estaked_node_id\x18\x10 \x01(\x03H\x00\x12\x16\n\x0e\x64\x65\x63line_reward\x18\x11 \x01(\x08\x12\r\n\x05\x61lias\x18\x12 \x01(\x0c\x12N\n\x15hook_creation_details\x18\x13 \x03(\x0b\x32/.com.hedera.hapi.node.hooks.HookCreationDetailsB\x0b\n\tstaked_idJ\x04\x08\x04\x10\x05J\x04\x08\x05\x10\x06\x42&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.crypto_create_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_CRYPTOCREATETRANSACTIONBODY'].fields_by_name['proxyAccountID']._loaded_options = None + _globals['_CRYPTOCREATETRANSACTIONBODY'].fields_by_name['proxyAccountID']._serialized_options = b'\030\001' + _globals['_CRYPTOCREATETRANSACTIONBODY'].fields_by_name['sendRecordThreshold']._loaded_options = None + _globals['_CRYPTOCREATETRANSACTIONBODY'].fields_by_name['sendRecordThreshold']._serialized_options = b'\030\001' + _globals['_CRYPTOCREATETRANSACTIONBODY'].fields_by_name['receiveRecordThreshold']._loaded_options = None + _globals['_CRYPTOCREATETRANSACTIONBODY'].fields_by_name['receiveRecordThreshold']._serialized_options = b'\030\001' + _globals['_CRYPTOCREATETRANSACTIONBODY'].fields_by_name['newRealmAdminKey']._loaded_options = None + _globals['_CRYPTOCREATETRANSACTIONBODY'].fields_by_name['newRealmAdminKey']._serialized_options = b'\030\001' + _globals['_CRYPTOCREATETRANSACTIONBODY']._serialized_start=120 + _globals['_CRYPTOCREATETRANSACTIONBODY']._serialized_end=765 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/crypto_create_pb2.pyi b/src/hiero_sdk_python/hapi/services/crypto_create_pb2.pyi new file mode 100644 index 000000000..a4c890455 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/crypto_create_pb2.pyi @@ -0,0 +1,48 @@ +from . import basic_types_pb2 as _basic_types_pb2 +from . import duration_pb2 as _duration_pb2 +from . import hook_types_pb2 as _hook_types_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Iterable as _Iterable, Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class CryptoCreateTransactionBody(_message.Message): + __slots__ = ("key", "initialBalance", "proxyAccountID", "sendRecordThreshold", "receiveRecordThreshold", "receiverSigRequired", "autoRenewPeriod", "shardID", "realmID", "newRealmAdminKey", "memo", "max_automatic_token_associations", "staked_account_id", "staked_node_id", "decline_reward", "alias", "hook_creation_details") + KEY_FIELD_NUMBER: _ClassVar[int] + INITIALBALANCE_FIELD_NUMBER: _ClassVar[int] + PROXYACCOUNTID_FIELD_NUMBER: _ClassVar[int] + SENDRECORDTHRESHOLD_FIELD_NUMBER: _ClassVar[int] + RECEIVERECORDTHRESHOLD_FIELD_NUMBER: _ClassVar[int] + RECEIVERSIGREQUIRED_FIELD_NUMBER: _ClassVar[int] + AUTORENEWPERIOD_FIELD_NUMBER: _ClassVar[int] + SHARDID_FIELD_NUMBER: _ClassVar[int] + REALMID_FIELD_NUMBER: _ClassVar[int] + NEWREALMADMINKEY_FIELD_NUMBER: _ClassVar[int] + MEMO_FIELD_NUMBER: _ClassVar[int] + MAX_AUTOMATIC_TOKEN_ASSOCIATIONS_FIELD_NUMBER: _ClassVar[int] + STAKED_ACCOUNT_ID_FIELD_NUMBER: _ClassVar[int] + STAKED_NODE_ID_FIELD_NUMBER: _ClassVar[int] + DECLINE_REWARD_FIELD_NUMBER: _ClassVar[int] + ALIAS_FIELD_NUMBER: _ClassVar[int] + HOOK_CREATION_DETAILS_FIELD_NUMBER: _ClassVar[int] + key: _basic_types_pb2.Key + initialBalance: int + proxyAccountID: _basic_types_pb2.AccountID + sendRecordThreshold: int + receiveRecordThreshold: int + receiverSigRequired: bool + autoRenewPeriod: _duration_pb2.Duration + shardID: _basic_types_pb2.ShardID + realmID: _basic_types_pb2.RealmID + newRealmAdminKey: _basic_types_pb2.Key + memo: str + max_automatic_token_associations: int + staked_account_id: _basic_types_pb2.AccountID + staked_node_id: int + decline_reward: bool + alias: bytes + hook_creation_details: _containers.RepeatedCompositeFieldContainer[_hook_types_pb2.HookCreationDetails] + def __init__(self, key: _Optional[_Union[_basic_types_pb2.Key, _Mapping]] = ..., initialBalance: _Optional[int] = ..., proxyAccountID: _Optional[_Union[_basic_types_pb2.AccountID, _Mapping]] = ..., sendRecordThreshold: _Optional[int] = ..., receiveRecordThreshold: _Optional[int] = ..., receiverSigRequired: bool = ..., autoRenewPeriod: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ..., shardID: _Optional[_Union[_basic_types_pb2.ShardID, _Mapping]] = ..., realmID: _Optional[_Union[_basic_types_pb2.RealmID, _Mapping]] = ..., newRealmAdminKey: _Optional[_Union[_basic_types_pb2.Key, _Mapping]] = ..., memo: _Optional[str] = ..., max_automatic_token_associations: _Optional[int] = ..., staked_account_id: _Optional[_Union[_basic_types_pb2.AccountID, _Mapping]] = ..., staked_node_id: _Optional[int] = ..., decline_reward: bool = ..., alias: _Optional[bytes] = ..., hook_creation_details: _Optional[_Iterable[_Union[_hook_types_pb2.HookCreationDetails, _Mapping]]] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/crypto_create_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/crypto_create_pb2_grpc.py new file mode 100644 index 000000000..d0f5c88e0 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/crypto_create_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/crypto_create_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/crypto_delete_allowance_pb2.py b/src/hiero_sdk_python/hapi/services/crypto_delete_allowance_pb2.py new file mode 100644 index 000000000..274fba2e5 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/crypto_delete_allowance_pb2.py @@ -0,0 +1,36 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/crypto_delete_allowance.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/crypto_delete_allowance.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import basic_types_pb2 as services_dot_basic__types__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n&services/crypto_delete_allowance.proto\x12\x05proto\x1a\x1aservices/basic_types.proto\"X\n$CryptoDeleteAllowanceTransactionBody\x12\x30\n\rnftAllowances\x18\x02 \x03(\x0b\x32\x19.proto.NftRemoveAllowance\"o\n\x12NftRemoveAllowance\x12 \n\x08token_id\x18\x01 \x01(\x0b\x32\x0e.proto.TokenID\x12\x1f\n\x05owner\x18\x02 \x01(\x0b\x32\x10.proto.AccountID\x12\x16\n\x0eserial_numbers\x18\x03 \x03(\x03\x42&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.crypto_delete_allowance_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_CRYPTODELETEALLOWANCETRANSACTIONBODY']._serialized_start=77 + _globals['_CRYPTODELETEALLOWANCETRANSACTIONBODY']._serialized_end=165 + _globals['_NFTREMOVEALLOWANCE']._serialized_start=167 + _globals['_NFTREMOVEALLOWANCE']._serialized_end=278 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/crypto_delete_allowance_pb2.pyi b/src/hiero_sdk_python/hapi/services/crypto_delete_allowance_pb2.pyi new file mode 100644 index 000000000..42d9603cf --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/crypto_delete_allowance_pb2.pyi @@ -0,0 +1,24 @@ +from . import basic_types_pb2 as _basic_types_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Iterable as _Iterable, Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class CryptoDeleteAllowanceTransactionBody(_message.Message): + __slots__ = ("nftAllowances",) + NFTALLOWANCES_FIELD_NUMBER: _ClassVar[int] + nftAllowances: _containers.RepeatedCompositeFieldContainer[NftRemoveAllowance] + def __init__(self, nftAllowances: _Optional[_Iterable[_Union[NftRemoveAllowance, _Mapping]]] = ...) -> None: ... + +class NftRemoveAllowance(_message.Message): + __slots__ = ("token_id", "owner", "serial_numbers") + TOKEN_ID_FIELD_NUMBER: _ClassVar[int] + OWNER_FIELD_NUMBER: _ClassVar[int] + SERIAL_NUMBERS_FIELD_NUMBER: _ClassVar[int] + token_id: _basic_types_pb2.TokenID + owner: _basic_types_pb2.AccountID + serial_numbers: _containers.RepeatedScalarFieldContainer[int] + def __init__(self, token_id: _Optional[_Union[_basic_types_pb2.TokenID, _Mapping]] = ..., owner: _Optional[_Union[_basic_types_pb2.AccountID, _Mapping]] = ..., serial_numbers: _Optional[_Iterable[int]] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/crypto_delete_allowance_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/crypto_delete_allowance_pb2_grpc.py new file mode 100644 index 000000000..fad997e09 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/crypto_delete_allowance_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/crypto_delete_allowance_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/crypto_delete_live_hash_pb2.py b/src/hiero_sdk_python/hapi/services/crypto_delete_live_hash_pb2.py new file mode 100644 index 000000000..055d113ad --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/crypto_delete_live_hash_pb2.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/crypto_delete_live_hash.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/crypto_delete_live_hash.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import basic_types_pb2 as services_dot_basic__types__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n&services/crypto_delete_live_hash.proto\x12\x05proto\x1a\x1aservices/basic_types.proto\"l\n#CryptoDeleteLiveHashTransactionBody\x12+\n\x11\x61\x63\x63ountOfLiveHash\x18\x01 \x01(\x0b\x32\x10.proto.AccountID\x12\x18\n\x10liveHashToDelete\x18\x02 \x01(\x0c\x42&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.crypto_delete_live_hash_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_CRYPTODELETELIVEHASHTRANSACTIONBODY']._serialized_start=77 + _globals['_CRYPTODELETELIVEHASHTRANSACTIONBODY']._serialized_end=185 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/crypto_delete_live_hash_pb2.pyi b/src/hiero_sdk_python/hapi/services/crypto_delete_live_hash_pb2.pyi new file mode 100644 index 000000000..cb860ca7e --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/crypto_delete_live_hash_pb2.pyi @@ -0,0 +1,15 @@ +from . import basic_types_pb2 as _basic_types_pb2 +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class CryptoDeleteLiveHashTransactionBody(_message.Message): + __slots__ = ("accountOfLiveHash", "liveHashToDelete") + ACCOUNTOFLIVEHASH_FIELD_NUMBER: _ClassVar[int] + LIVEHASHTODELETE_FIELD_NUMBER: _ClassVar[int] + accountOfLiveHash: _basic_types_pb2.AccountID + liveHashToDelete: bytes + def __init__(self, accountOfLiveHash: _Optional[_Union[_basic_types_pb2.AccountID, _Mapping]] = ..., liveHashToDelete: _Optional[bytes] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/crypto_delete_live_hash_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/crypto_delete_live_hash_pb2_grpc.py new file mode 100644 index 000000000..65219b0f0 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/crypto_delete_live_hash_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/crypto_delete_live_hash_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/crypto_delete_pb2.py b/src/hiero_sdk_python/hapi/services/crypto_delete_pb2.py new file mode 100644 index 000000000..f643aec4f --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/crypto_delete_pb2.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/crypto_delete.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/crypto_delete.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import basic_types_pb2 as services_dot_basic__types__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cservices/crypto_delete.proto\x12\x05proto\x1a\x1aservices/basic_types.proto\"u\n\x1b\x43ryptoDeleteTransactionBody\x12+\n\x11transferAccountID\x18\x01 \x01(\x0b\x32\x10.proto.AccountID\x12)\n\x0f\x64\x65leteAccountID\x18\x02 \x01(\x0b\x32\x10.proto.AccountIDB&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.crypto_delete_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_CRYPTODELETETRANSACTIONBODY']._serialized_start=67 + _globals['_CRYPTODELETETRANSACTIONBODY']._serialized_end=184 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/crypto_delete_pb2.pyi b/src/hiero_sdk_python/hapi/services/crypto_delete_pb2.pyi new file mode 100644 index 000000000..8a6dedfc8 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/crypto_delete_pb2.pyi @@ -0,0 +1,15 @@ +from . import basic_types_pb2 as _basic_types_pb2 +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class CryptoDeleteTransactionBody(_message.Message): + __slots__ = ("transferAccountID", "deleteAccountID") + TRANSFERACCOUNTID_FIELD_NUMBER: _ClassVar[int] + DELETEACCOUNTID_FIELD_NUMBER: _ClassVar[int] + transferAccountID: _basic_types_pb2.AccountID + deleteAccountID: _basic_types_pb2.AccountID + def __init__(self, transferAccountID: _Optional[_Union[_basic_types_pb2.AccountID, _Mapping]] = ..., deleteAccountID: _Optional[_Union[_basic_types_pb2.AccountID, _Mapping]] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/crypto_delete_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/crypto_delete_pb2_grpc.py new file mode 100644 index 000000000..36618a9cf --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/crypto_delete_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/crypto_delete_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/crypto_get_account_balance_pb2.py b/src/hiero_sdk_python/hapi/services/crypto_get_account_balance_pb2.py new file mode 100644 index 000000000..125cef95b --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/crypto_get_account_balance_pb2.py @@ -0,0 +1,40 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/crypto_get_account_balance.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/crypto_get_account_balance.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import basic_types_pb2 as services_dot_basic__types__pb2 +from . import query_header_pb2 as services_dot_query__header__pb2 +from . import response_header_pb2 as services_dot_response__header__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n)services/crypto_get_account_balance.proto\x12\x05proto\x1a\x1aservices/basic_types.proto\x1a\x1bservices/query_header.proto\x1a\x1eservices/response_header.proto\"\xa3\x01\n\x1c\x43ryptoGetAccountBalanceQuery\x12\"\n\x06header\x18\x01 \x01(\x0b\x32\x12.proto.QueryHeader\x12%\n\taccountID\x18\x02 \x01(\x0b\x32\x10.proto.AccountIDH\x00\x12\'\n\ncontractID\x18\x03 \x01(\x0b\x32\x11.proto.ContractIDH\x00\x42\x0f\n\rbalanceSource\"\xae\x01\n\x1f\x43ryptoGetAccountBalanceResponse\x12%\n\x06header\x18\x01 \x01(\x0b\x32\x15.proto.ResponseHeader\x12#\n\taccountID\x18\x02 \x01(\x0b\x32\x10.proto.AccountID\x12\x0f\n\x07\x62\x61lance\x18\x03 \x01(\x04\x12.\n\rtokenBalances\x18\x04 \x03(\x0b\x32\x13.proto.TokenBalanceB\x02\x18\x01\x42&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.crypto_get_account_balance_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_CRYPTOGETACCOUNTBALANCERESPONSE'].fields_by_name['tokenBalances']._loaded_options = None + _globals['_CRYPTOGETACCOUNTBALANCERESPONSE'].fields_by_name['tokenBalances']._serialized_options = b'\030\001' + _globals['_CRYPTOGETACCOUNTBALANCEQUERY']._serialized_start=142 + _globals['_CRYPTOGETACCOUNTBALANCEQUERY']._serialized_end=305 + _globals['_CRYPTOGETACCOUNTBALANCERESPONSE']._serialized_start=308 + _globals['_CRYPTOGETACCOUNTBALANCERESPONSE']._serialized_end=482 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/crypto_get_account_balance_pb2.pyi b/src/hiero_sdk_python/hapi/services/crypto_get_account_balance_pb2.pyi new file mode 100644 index 000000000..b6cbe63b5 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/crypto_get_account_balance_pb2.pyi @@ -0,0 +1,32 @@ +from . import basic_types_pb2 as _basic_types_pb2 +from . import query_header_pb2 as _query_header_pb2 +from . import response_header_pb2 as _response_header_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Iterable as _Iterable, Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class CryptoGetAccountBalanceQuery(_message.Message): + __slots__ = ("header", "accountID", "contractID") + HEADER_FIELD_NUMBER: _ClassVar[int] + ACCOUNTID_FIELD_NUMBER: _ClassVar[int] + CONTRACTID_FIELD_NUMBER: _ClassVar[int] + header: _query_header_pb2.QueryHeader + accountID: _basic_types_pb2.AccountID + contractID: _basic_types_pb2.ContractID + def __init__(self, header: _Optional[_Union[_query_header_pb2.QueryHeader, _Mapping]] = ..., accountID: _Optional[_Union[_basic_types_pb2.AccountID, _Mapping]] = ..., contractID: _Optional[_Union[_basic_types_pb2.ContractID, _Mapping]] = ...) -> None: ... + +class CryptoGetAccountBalanceResponse(_message.Message): + __slots__ = ("header", "accountID", "balance", "tokenBalances") + HEADER_FIELD_NUMBER: _ClassVar[int] + ACCOUNTID_FIELD_NUMBER: _ClassVar[int] + BALANCE_FIELD_NUMBER: _ClassVar[int] + TOKENBALANCES_FIELD_NUMBER: _ClassVar[int] + header: _response_header_pb2.ResponseHeader + accountID: _basic_types_pb2.AccountID + balance: int + tokenBalances: _containers.RepeatedCompositeFieldContainer[_basic_types_pb2.TokenBalance] + def __init__(self, header: _Optional[_Union[_response_header_pb2.ResponseHeader, _Mapping]] = ..., accountID: _Optional[_Union[_basic_types_pb2.AccountID, _Mapping]] = ..., balance: _Optional[int] = ..., tokenBalances: _Optional[_Iterable[_Union[_basic_types_pb2.TokenBalance, _Mapping]]] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/crypto_get_account_balance_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/crypto_get_account_balance_pb2_grpc.py new file mode 100644 index 000000000..ebee8c913 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/crypto_get_account_balance_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/crypto_get_account_balance_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/crypto_get_account_records_pb2.py b/src/hiero_sdk_python/hapi/services/crypto_get_account_records_pb2.py new file mode 100644 index 000000000..55bee5d03 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/crypto_get_account_records_pb2.py @@ -0,0 +1,39 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/crypto_get_account_records.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/crypto_get_account_records.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import basic_types_pb2 as services_dot_basic__types__pb2 +from . import transaction_record_pb2 as services_dot_transaction__record__pb2 +from . import query_header_pb2 as services_dot_query__header__pb2 +from . import response_header_pb2 as services_dot_response__header__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n)services/crypto_get_account_records.proto\x12\x05proto\x1a\x1aservices/basic_types.proto\x1a!services/transaction_record.proto\x1a\x1bservices/query_header.proto\x1a\x1eservices/response_header.proto\"g\n\x1c\x43ryptoGetAccountRecordsQuery\x12\"\n\x06header\x18\x01 \x01(\x0b\x32\x12.proto.QueryHeader\x12#\n\taccountID\x18\x02 \x01(\x0b\x32\x10.proto.AccountID\"\x98\x01\n\x1f\x43ryptoGetAccountRecordsResponse\x12%\n\x06header\x18\x01 \x01(\x0b\x32\x15.proto.ResponseHeader\x12#\n\taccountID\x18\x02 \x01(\x0b\x32\x10.proto.AccountID\x12)\n\x07records\x18\x03 \x03(\x0b\x32\x18.proto.TransactionRecordB&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.crypto_get_account_records_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_CRYPTOGETACCOUNTRECORDSQUERY']._serialized_start=176 + _globals['_CRYPTOGETACCOUNTRECORDSQUERY']._serialized_end=279 + _globals['_CRYPTOGETACCOUNTRECORDSRESPONSE']._serialized_start=282 + _globals['_CRYPTOGETACCOUNTRECORDSRESPONSE']._serialized_end=434 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/crypto_get_account_records_pb2.pyi b/src/hiero_sdk_python/hapi/services/crypto_get_account_records_pb2.pyi new file mode 100644 index 000000000..c47492685 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/crypto_get_account_records_pb2.pyi @@ -0,0 +1,29 @@ +from . import basic_types_pb2 as _basic_types_pb2 +from . import transaction_record_pb2 as _transaction_record_pb2 +from . import query_header_pb2 as _query_header_pb2 +from . import response_header_pb2 as _response_header_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Iterable as _Iterable, Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class CryptoGetAccountRecordsQuery(_message.Message): + __slots__ = ("header", "accountID") + HEADER_FIELD_NUMBER: _ClassVar[int] + ACCOUNTID_FIELD_NUMBER: _ClassVar[int] + header: _query_header_pb2.QueryHeader + accountID: _basic_types_pb2.AccountID + def __init__(self, header: _Optional[_Union[_query_header_pb2.QueryHeader, _Mapping]] = ..., accountID: _Optional[_Union[_basic_types_pb2.AccountID, _Mapping]] = ...) -> None: ... + +class CryptoGetAccountRecordsResponse(_message.Message): + __slots__ = ("header", "accountID", "records") + HEADER_FIELD_NUMBER: _ClassVar[int] + ACCOUNTID_FIELD_NUMBER: _ClassVar[int] + RECORDS_FIELD_NUMBER: _ClassVar[int] + header: _response_header_pb2.ResponseHeader + accountID: _basic_types_pb2.AccountID + records: _containers.RepeatedCompositeFieldContainer[_transaction_record_pb2.TransactionRecord] + def __init__(self, header: _Optional[_Union[_response_header_pb2.ResponseHeader, _Mapping]] = ..., accountID: _Optional[_Union[_basic_types_pb2.AccountID, _Mapping]] = ..., records: _Optional[_Iterable[_Union[_transaction_record_pb2.TransactionRecord, _Mapping]]] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/crypto_get_account_records_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/crypto_get_account_records_pb2_grpc.py new file mode 100644 index 000000000..794fd7d42 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/crypto_get_account_records_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/crypto_get_account_records_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/crypto_get_info_pb2.py b/src/hiero_sdk_python/hapi/services/crypto_get_info_pb2.py new file mode 100644 index 000000000..e44ba1ba2 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/crypto_get_info_pb2.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/crypto_get_info.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/crypto_get_info.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import timestamp_pb2 as services_dot_timestamp__pb2 +from . import duration_pb2 as services_dot_duration__pb2 +from . import basic_types_pb2 as services_dot_basic__types__pb2 +from . import query_header_pb2 as services_dot_query__header__pb2 +from . import response_header_pb2 as services_dot_response__header__pb2 +from . import crypto_add_live_hash_pb2 as services_dot_crypto__add__live__hash__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1eservices/crypto_get_info.proto\x12\x05proto\x1a\x18services/timestamp.proto\x1a\x17services/duration.proto\x1a\x1aservices/basic_types.proto\x1a\x1bservices/query_header.proto\x1a\x1eservices/response_header.proto\x1a#services/crypto_add_live_hash.proto\"]\n\x12\x43ryptoGetInfoQuery\x12\"\n\x06header\x18\x01 \x01(\x0b\x32\x12.proto.QueryHeader\x12#\n\taccountID\x18\x02 \x01(\x0b\x32\x10.proto.AccountID\"\xab\x06\n\x15\x43ryptoGetInfoResponse\x12%\n\x06header\x18\x01 \x01(\x0b\x32\x15.proto.ResponseHeader\x12=\n\x0b\x61\x63\x63ountInfo\x18\x02 \x01(\x0b\x32(.proto.CryptoGetInfoResponse.AccountInfo\x1a\xab\x05\n\x0b\x41\x63\x63ountInfo\x12#\n\taccountID\x18\x01 \x01(\x0b\x32\x10.proto.AccountID\x12\x19\n\x11\x63ontractAccountID\x18\x02 \x01(\t\x12\x0f\n\x07\x64\x65leted\x18\x03 \x01(\x08\x12,\n\x0eproxyAccountID\x18\x04 \x01(\x0b\x32\x10.proto.AccountIDB\x02\x18\x01\x12\x19\n\rproxyReceived\x18\x06 \x01(\x03\x42\x02\x18\x01\x12\x17\n\x03key\x18\x07 \x01(\x0b\x32\n.proto.Key\x12\x0f\n\x07\x62\x61lance\x18\x08 \x01(\x04\x12\'\n\x1bgenerateSendRecordThreshold\x18\t \x01(\x04\x42\x02\x18\x01\x12*\n\x1egenerateReceiveRecordThreshold\x18\n \x01(\x04\x42\x02\x18\x01\x12\x1b\n\x13receiverSigRequired\x18\x0b \x01(\x08\x12(\n\x0e\x65xpirationTime\x18\x0c \x01(\x0b\x32\x10.proto.Timestamp\x12(\n\x0f\x61utoRenewPeriod\x18\r \x01(\x0b\x32\x0f.proto.Duration\x12#\n\nliveHashes\x18\x0e \x03(\x0b\x32\x0f.proto.LiveHash\x12\x38\n\x12tokenRelationships\x18\x0f \x03(\x0b\x32\x18.proto.TokenRelationshipB\x02\x18\x01\x12\x0c\n\x04memo\x18\x10 \x01(\t\x12\x11\n\townedNfts\x18\x11 \x01(\x03\x12(\n max_automatic_token_associations\x18\x12 \x01(\x05\x12\r\n\x05\x61lias\x18\x13 \x01(\x0c\x12\x11\n\tledger_id\x18\x14 \x01(\x0c\x12\x16\n\x0e\x65thereum_nonce\x18\x15 \x01(\x03\x12(\n\x0cstaking_info\x18\x16 \x01(\x0b\x32\x12.proto.StakingInfoJ\x04\x08\x05\x10\x06\x42&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.crypto_get_info_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_CRYPTOGETINFORESPONSE_ACCOUNTINFO'].fields_by_name['proxyAccountID']._loaded_options = None + _globals['_CRYPTOGETINFORESPONSE_ACCOUNTINFO'].fields_by_name['proxyAccountID']._serialized_options = b'\030\001' + _globals['_CRYPTOGETINFORESPONSE_ACCOUNTINFO'].fields_by_name['proxyReceived']._loaded_options = None + _globals['_CRYPTOGETINFORESPONSE_ACCOUNTINFO'].fields_by_name['proxyReceived']._serialized_options = b'\030\001' + _globals['_CRYPTOGETINFORESPONSE_ACCOUNTINFO'].fields_by_name['generateSendRecordThreshold']._loaded_options = None + _globals['_CRYPTOGETINFORESPONSE_ACCOUNTINFO'].fields_by_name['generateSendRecordThreshold']._serialized_options = b'\030\001' + _globals['_CRYPTOGETINFORESPONSE_ACCOUNTINFO'].fields_by_name['generateReceiveRecordThreshold']._loaded_options = None + _globals['_CRYPTOGETINFORESPONSE_ACCOUNTINFO'].fields_by_name['generateReceiveRecordThreshold']._serialized_options = b'\030\001' + _globals['_CRYPTOGETINFORESPONSE_ACCOUNTINFO'].fields_by_name['tokenRelationships']._loaded_options = None + _globals['_CRYPTOGETINFORESPONSE_ACCOUNTINFO'].fields_by_name['tokenRelationships']._serialized_options = b'\030\001' + _globals['_CRYPTOGETINFOQUERY']._serialized_start=218 + _globals['_CRYPTOGETINFOQUERY']._serialized_end=311 + _globals['_CRYPTOGETINFORESPONSE']._serialized_start=314 + _globals['_CRYPTOGETINFORESPONSE']._serialized_end=1125 + _globals['_CRYPTOGETINFORESPONSE_ACCOUNTINFO']._serialized_start=442 + _globals['_CRYPTOGETINFORESPONSE_ACCOUNTINFO']._serialized_end=1125 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/crypto_get_info_pb2.pyi b/src/hiero_sdk_python/hapi/services/crypto_get_info_pb2.pyi new file mode 100644 index 000000000..c9a6505bf --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/crypto_get_info_pb2.pyi @@ -0,0 +1,74 @@ +from . import timestamp_pb2 as _timestamp_pb2 +from . import duration_pb2 as _duration_pb2 +from . import basic_types_pb2 as _basic_types_pb2 +from . import query_header_pb2 as _query_header_pb2 +from . import response_header_pb2 as _response_header_pb2 +from . import crypto_add_live_hash_pb2 as _crypto_add_live_hash_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Iterable as _Iterable, Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class CryptoGetInfoQuery(_message.Message): + __slots__ = ("header", "accountID") + HEADER_FIELD_NUMBER: _ClassVar[int] + ACCOUNTID_FIELD_NUMBER: _ClassVar[int] + header: _query_header_pb2.QueryHeader + accountID: _basic_types_pb2.AccountID + def __init__(self, header: _Optional[_Union[_query_header_pb2.QueryHeader, _Mapping]] = ..., accountID: _Optional[_Union[_basic_types_pb2.AccountID, _Mapping]] = ...) -> None: ... + +class CryptoGetInfoResponse(_message.Message): + __slots__ = ("header", "accountInfo") + class AccountInfo(_message.Message): + __slots__ = ("accountID", "contractAccountID", "deleted", "proxyAccountID", "proxyReceived", "key", "balance", "generateSendRecordThreshold", "generateReceiveRecordThreshold", "receiverSigRequired", "expirationTime", "autoRenewPeriod", "liveHashes", "tokenRelationships", "memo", "ownedNfts", "max_automatic_token_associations", "alias", "ledger_id", "ethereum_nonce", "staking_info") + ACCOUNTID_FIELD_NUMBER: _ClassVar[int] + CONTRACTACCOUNTID_FIELD_NUMBER: _ClassVar[int] + DELETED_FIELD_NUMBER: _ClassVar[int] + PROXYACCOUNTID_FIELD_NUMBER: _ClassVar[int] + PROXYRECEIVED_FIELD_NUMBER: _ClassVar[int] + KEY_FIELD_NUMBER: _ClassVar[int] + BALANCE_FIELD_NUMBER: _ClassVar[int] + GENERATESENDRECORDTHRESHOLD_FIELD_NUMBER: _ClassVar[int] + GENERATERECEIVERECORDTHRESHOLD_FIELD_NUMBER: _ClassVar[int] + RECEIVERSIGREQUIRED_FIELD_NUMBER: _ClassVar[int] + EXPIRATIONTIME_FIELD_NUMBER: _ClassVar[int] + AUTORENEWPERIOD_FIELD_NUMBER: _ClassVar[int] + LIVEHASHES_FIELD_NUMBER: _ClassVar[int] + TOKENRELATIONSHIPS_FIELD_NUMBER: _ClassVar[int] + MEMO_FIELD_NUMBER: _ClassVar[int] + OWNEDNFTS_FIELD_NUMBER: _ClassVar[int] + MAX_AUTOMATIC_TOKEN_ASSOCIATIONS_FIELD_NUMBER: _ClassVar[int] + ALIAS_FIELD_NUMBER: _ClassVar[int] + LEDGER_ID_FIELD_NUMBER: _ClassVar[int] + ETHEREUM_NONCE_FIELD_NUMBER: _ClassVar[int] + STAKING_INFO_FIELD_NUMBER: _ClassVar[int] + accountID: _basic_types_pb2.AccountID + contractAccountID: str + deleted: bool + proxyAccountID: _basic_types_pb2.AccountID + proxyReceived: int + key: _basic_types_pb2.Key + balance: int + generateSendRecordThreshold: int + generateReceiveRecordThreshold: int + receiverSigRequired: bool + expirationTime: _timestamp_pb2.Timestamp + autoRenewPeriod: _duration_pb2.Duration + liveHashes: _containers.RepeatedCompositeFieldContainer[_crypto_add_live_hash_pb2.LiveHash] + tokenRelationships: _containers.RepeatedCompositeFieldContainer[_basic_types_pb2.TokenRelationship] + memo: str + ownedNfts: int + max_automatic_token_associations: int + alias: bytes + ledger_id: bytes + ethereum_nonce: int + staking_info: _basic_types_pb2.StakingInfo + def __init__(self, accountID: _Optional[_Union[_basic_types_pb2.AccountID, _Mapping]] = ..., contractAccountID: _Optional[str] = ..., deleted: bool = ..., proxyAccountID: _Optional[_Union[_basic_types_pb2.AccountID, _Mapping]] = ..., proxyReceived: _Optional[int] = ..., key: _Optional[_Union[_basic_types_pb2.Key, _Mapping]] = ..., balance: _Optional[int] = ..., generateSendRecordThreshold: _Optional[int] = ..., generateReceiveRecordThreshold: _Optional[int] = ..., receiverSigRequired: bool = ..., expirationTime: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., autoRenewPeriod: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ..., liveHashes: _Optional[_Iterable[_Union[_crypto_add_live_hash_pb2.LiveHash, _Mapping]]] = ..., tokenRelationships: _Optional[_Iterable[_Union[_basic_types_pb2.TokenRelationship, _Mapping]]] = ..., memo: _Optional[str] = ..., ownedNfts: _Optional[int] = ..., max_automatic_token_associations: _Optional[int] = ..., alias: _Optional[bytes] = ..., ledger_id: _Optional[bytes] = ..., ethereum_nonce: _Optional[int] = ..., staking_info: _Optional[_Union[_basic_types_pb2.StakingInfo, _Mapping]] = ...) -> None: ... + HEADER_FIELD_NUMBER: _ClassVar[int] + ACCOUNTINFO_FIELD_NUMBER: _ClassVar[int] + header: _response_header_pb2.ResponseHeader + accountInfo: CryptoGetInfoResponse.AccountInfo + def __init__(self, header: _Optional[_Union[_response_header_pb2.ResponseHeader, _Mapping]] = ..., accountInfo: _Optional[_Union[CryptoGetInfoResponse.AccountInfo, _Mapping]] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/crypto_get_info_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/crypto_get_info_pb2_grpc.py new file mode 100644 index 000000000..d54ea8587 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/crypto_get_info_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/crypto_get_info_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/crypto_get_live_hash_pb2.py b/src/hiero_sdk_python/hapi/services/crypto_get_live_hash_pb2.py new file mode 100644 index 000000000..25737dc1c --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/crypto_get_live_hash_pb2.py @@ -0,0 +1,39 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/crypto_get_live_hash.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/crypto_get_live_hash.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import basic_types_pb2 as services_dot_basic__types__pb2 +from . import query_header_pb2 as services_dot_query__header__pb2 +from . import response_header_pb2 as services_dot_response__header__pb2 +from . import crypto_add_live_hash_pb2 as services_dot_crypto__add__live__hash__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n#services/crypto_get_live_hash.proto\x12\x05proto\x1a\x1aservices/basic_types.proto\x1a\x1bservices/query_header.proto\x1a\x1eservices/response_header.proto\x1a#services/crypto_add_live_hash.proto\"o\n\x16\x43ryptoGetLiveHashQuery\x12\"\n\x06header\x18\x01 \x01(\x0b\x32\x12.proto.QueryHeader\x12#\n\taccountID\x18\x02 \x01(\x0b\x32\x10.proto.AccountID\x12\x0c\n\x04hash\x18\x03 \x01(\x0c\"e\n\x19\x43ryptoGetLiveHashResponse\x12%\n\x06header\x18\x01 \x01(\x0b\x32\x15.proto.ResponseHeader\x12!\n\x08liveHash\x18\x02 \x01(\x0b\x32\x0f.proto.LiveHashB&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.crypto_get_live_hash_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_CRYPTOGETLIVEHASHQUERY']._serialized_start=172 + _globals['_CRYPTOGETLIVEHASHQUERY']._serialized_end=283 + _globals['_CRYPTOGETLIVEHASHRESPONSE']._serialized_start=285 + _globals['_CRYPTOGETLIVEHASHRESPONSE']._serialized_end=386 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/crypto_get_live_hash_pb2.pyi b/src/hiero_sdk_python/hapi/services/crypto_get_live_hash_pb2.pyi new file mode 100644 index 000000000..6870e1344 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/crypto_get_live_hash_pb2.pyi @@ -0,0 +1,28 @@ +from . import basic_types_pb2 as _basic_types_pb2 +from . import query_header_pb2 as _query_header_pb2 +from . import response_header_pb2 as _response_header_pb2 +from . import crypto_add_live_hash_pb2 as _crypto_add_live_hash_pb2 +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class CryptoGetLiveHashQuery(_message.Message): + __slots__ = ("header", "accountID", "hash") + HEADER_FIELD_NUMBER: _ClassVar[int] + ACCOUNTID_FIELD_NUMBER: _ClassVar[int] + HASH_FIELD_NUMBER: _ClassVar[int] + header: _query_header_pb2.QueryHeader + accountID: _basic_types_pb2.AccountID + hash: bytes + def __init__(self, header: _Optional[_Union[_query_header_pb2.QueryHeader, _Mapping]] = ..., accountID: _Optional[_Union[_basic_types_pb2.AccountID, _Mapping]] = ..., hash: _Optional[bytes] = ...) -> None: ... + +class CryptoGetLiveHashResponse(_message.Message): + __slots__ = ("header", "liveHash") + HEADER_FIELD_NUMBER: _ClassVar[int] + LIVEHASH_FIELD_NUMBER: _ClassVar[int] + header: _response_header_pb2.ResponseHeader + liveHash: _crypto_add_live_hash_pb2.LiveHash + def __init__(self, header: _Optional[_Union[_response_header_pb2.ResponseHeader, _Mapping]] = ..., liveHash: _Optional[_Union[_crypto_add_live_hash_pb2.LiveHash, _Mapping]] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/crypto_get_live_hash_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/crypto_get_live_hash_pb2_grpc.py new file mode 100644 index 000000000..39ebd603b --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/crypto_get_live_hash_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/crypto_get_live_hash_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/crypto_get_stakers_pb2.py b/src/hiero_sdk_python/hapi/services/crypto_get_stakers_pb2.py new file mode 100644 index 000000000..7d9a61b88 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/crypto_get_stakers_pb2.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/crypto_get_stakers.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/crypto_get_stakers.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import basic_types_pb2 as services_dot_basic__types__pb2 +from . import query_header_pb2 as services_dot_query__header__pb2 +from . import response_header_pb2 as services_dot_response__header__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!services/crypto_get_stakers.proto\x12\x05proto\x1a\x1aservices/basic_types.proto\x1a\x1bservices/query_header.proto\x1a\x1eservices/response_header.proto\"d\n\x15\x43ryptoGetStakersQuery\x12\"\n\x06header\x18\x01 \x01(\x0b\x32\x12.proto.QueryHeader\x12#\n\taccountID\x18\x02 \x01(\x0b\x32\x10.proto.AccountID:\x02\x18\x01\"F\n\x0bProxyStaker\x12#\n\taccountID\x18\x01 \x01(\x0b\x32\x10.proto.AccountID\x12\x0e\n\x06\x61mount\x18\x02 \x01(\x03:\x02\x18\x01\"c\n\x0f\x41llProxyStakers\x12#\n\taccountID\x18\x01 \x01(\x0b\x32\x10.proto.AccountID\x12\'\n\x0bproxyStaker\x18\x02 \x03(\x0b\x32\x12.proto.ProxyStaker:\x02\x18\x01\"n\n\x18\x43ryptoGetStakersResponse\x12%\n\x06header\x18\x01 \x01(\x0b\x32\x15.proto.ResponseHeader\x12\'\n\x07stakers\x18\x03 \x01(\x0b\x32\x16.proto.AllProxyStakers:\x02\x18\x01\x42&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.crypto_get_stakers_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_CRYPTOGETSTAKERSQUERY']._loaded_options = None + _globals['_CRYPTOGETSTAKERSQUERY']._serialized_options = b'\030\001' + _globals['_PROXYSTAKER']._loaded_options = None + _globals['_PROXYSTAKER']._serialized_options = b'\030\001' + _globals['_ALLPROXYSTAKERS']._loaded_options = None + _globals['_ALLPROXYSTAKERS']._serialized_options = b'\030\001' + _globals['_CRYPTOGETSTAKERSRESPONSE']._loaded_options = None + _globals['_CRYPTOGETSTAKERSRESPONSE']._serialized_options = b'\030\001' + _globals['_CRYPTOGETSTAKERSQUERY']._serialized_start=133 + _globals['_CRYPTOGETSTAKERSQUERY']._serialized_end=233 + _globals['_PROXYSTAKER']._serialized_start=235 + _globals['_PROXYSTAKER']._serialized_end=305 + _globals['_ALLPROXYSTAKERS']._serialized_start=307 + _globals['_ALLPROXYSTAKERS']._serialized_end=406 + _globals['_CRYPTOGETSTAKERSRESPONSE']._serialized_start=408 + _globals['_CRYPTOGETSTAKERSRESPONSE']._serialized_end=518 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/crypto_get_stakers_pb2.pyi b/src/hiero_sdk_python/hapi/services/crypto_get_stakers_pb2.pyi new file mode 100644 index 000000000..d747d536d --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/crypto_get_stakers_pb2.pyi @@ -0,0 +1,42 @@ +from . import basic_types_pb2 as _basic_types_pb2 +from . import query_header_pb2 as _query_header_pb2 +from . import response_header_pb2 as _response_header_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Iterable as _Iterable, Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class CryptoGetStakersQuery(_message.Message): + __slots__ = ("header", "accountID") + HEADER_FIELD_NUMBER: _ClassVar[int] + ACCOUNTID_FIELD_NUMBER: _ClassVar[int] + header: _query_header_pb2.QueryHeader + accountID: _basic_types_pb2.AccountID + def __init__(self, header: _Optional[_Union[_query_header_pb2.QueryHeader, _Mapping]] = ..., accountID: _Optional[_Union[_basic_types_pb2.AccountID, _Mapping]] = ...) -> None: ... + +class ProxyStaker(_message.Message): + __slots__ = ("accountID", "amount") + ACCOUNTID_FIELD_NUMBER: _ClassVar[int] + AMOUNT_FIELD_NUMBER: _ClassVar[int] + accountID: _basic_types_pb2.AccountID + amount: int + def __init__(self, accountID: _Optional[_Union[_basic_types_pb2.AccountID, _Mapping]] = ..., amount: _Optional[int] = ...) -> None: ... + +class AllProxyStakers(_message.Message): + __slots__ = ("accountID", "proxyStaker") + ACCOUNTID_FIELD_NUMBER: _ClassVar[int] + PROXYSTAKER_FIELD_NUMBER: _ClassVar[int] + accountID: _basic_types_pb2.AccountID + proxyStaker: _containers.RepeatedCompositeFieldContainer[ProxyStaker] + def __init__(self, accountID: _Optional[_Union[_basic_types_pb2.AccountID, _Mapping]] = ..., proxyStaker: _Optional[_Iterable[_Union[ProxyStaker, _Mapping]]] = ...) -> None: ... + +class CryptoGetStakersResponse(_message.Message): + __slots__ = ("header", "stakers") + HEADER_FIELD_NUMBER: _ClassVar[int] + STAKERS_FIELD_NUMBER: _ClassVar[int] + header: _response_header_pb2.ResponseHeader + stakers: AllProxyStakers + def __init__(self, header: _Optional[_Union[_response_header_pb2.ResponseHeader, _Mapping]] = ..., stakers: _Optional[_Union[AllProxyStakers, _Mapping]] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/crypto_get_stakers_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/crypto_get_stakers_pb2_grpc.py new file mode 100644 index 000000000..1c7bc6698 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/crypto_get_stakers_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/crypto_get_stakers_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/crypto_service_pb2.py b/src/hiero_sdk_python/hapi/services/crypto_service_pb2.py new file mode 100644 index 000000000..148c72653 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/crypto_service_pb2.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/crypto_service.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/crypto_service.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import query_pb2 as services_dot_query__pb2 +from . import response_pb2 as services_dot_response__pb2 +from . import transaction_response_pb2 as services_dot_transaction__response__pb2 +from . import transaction_pb2 as services_dot_transaction__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1dservices/crypto_service.proto\x12\x05proto\x1a\x14services/query.proto\x1a\x17services/response.proto\x1a#services/transaction_response.proto\x1a\x1aservices/transaction.proto2\xdf\x06\n\rCryptoService\x12?\n\rcreateAccount\x12\x12.proto.Transaction\x1a\x1a.proto.TransactionResponse\x12?\n\rupdateAccount\x12\x12.proto.Transaction\x1a\x1a.proto.TransactionResponse\x12@\n\x0e\x63ryptoTransfer\x12\x12.proto.Transaction\x1a\x1a.proto.TransactionResponse\x12>\n\x0c\x63ryptoDelete\x12\x12.proto.Transaction\x1a\x1a.proto.TransactionResponse\x12\x43\n\x11\x61pproveAllowances\x12\x12.proto.Transaction\x1a\x1a.proto.TransactionResponse\x12\x42\n\x10\x64\x65leteAllowances\x12\x12.proto.Transaction\x1a\x1a.proto.TransactionResponse\x12\x42\n\x0b\x61\x64\x64LiveHash\x12\x12.proto.Transaction\x1a\x1a.proto.TransactionResponse\"\x03\x88\x02\x01\x12\x45\n\x0e\x64\x65leteLiveHash\x12\x12.proto.Transaction\x1a\x1a.proto.TransactionResponse\"\x03\x88\x02\x01\x12\x31\n\x0bgetLiveHash\x12\x0c.proto.Query\x1a\x0f.proto.Response\"\x03\x88\x02\x01\x12\x32\n\x11getAccountRecords\x12\x0c.proto.Query\x1a\x0f.proto.Response\x12\x31\n\x10\x63ryptoGetBalance\x12\x0c.proto.Query\x1a\x0f.proto.Response\x12/\n\x0egetAccountInfo\x12\x0c.proto.Query\x1a\x0f.proto.Response\x12\x37\n\x16getTransactionReceipts\x12\x0c.proto.Query\x1a\x0f.proto.Response\x12\x32\n\x11getTxRecordByTxID\x12\x0c.proto.Query\x1a\x0f.proto.ResponseB(\n&com.hederahashgraph.service.proto.javab\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.crypto_service_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n&com.hederahashgraph.service.proto.java' + _globals['_CRYPTOSERVICE'].methods_by_name['addLiveHash']._loaded_options = None + _globals['_CRYPTOSERVICE'].methods_by_name['addLiveHash']._serialized_options = b'\210\002\001' + _globals['_CRYPTOSERVICE'].methods_by_name['deleteLiveHash']._loaded_options = None + _globals['_CRYPTOSERVICE'].methods_by_name['deleteLiveHash']._serialized_options = b'\210\002\001' + _globals['_CRYPTOSERVICE'].methods_by_name['getLiveHash']._loaded_options = None + _globals['_CRYPTOSERVICE'].methods_by_name['getLiveHash']._serialized_options = b'\210\002\001' + _globals['_CRYPTOSERVICE']._serialized_start=153 + _globals['_CRYPTOSERVICE']._serialized_end=1016 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/crypto_service_pb2.pyi b/src/hiero_sdk_python/hapi/services/crypto_service_pb2.pyi new file mode 100644 index 000000000..ce90eb498 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/crypto_service_pb2.pyi @@ -0,0 +1,8 @@ +from . import query_pb2 as _query_pb2 +from . import response_pb2 as _response_pb2 +from . import transaction_response_pb2 as _transaction_response_pb2 +from . import transaction_pb2 as _transaction_pb2 +from google.protobuf import descriptor as _descriptor +from typing import ClassVar as _ClassVar + +DESCRIPTOR: _descriptor.FileDescriptor diff --git a/src/hiero_sdk_python/hapi/services/crypto_service_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/crypto_service_pb2_grpc.py new file mode 100644 index 000000000..b06e9cceb --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/crypto_service_pb2_grpc.py @@ -0,0 +1,712 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings +from . import query_pb2 as services_dot_query__pb2 +from . import response_pb2 as services_dot_response__pb2 +from . import transaction_pb2 as services_dot_transaction__pb2 +from . import transaction_response_pb2 as services_dot_transaction__response__pb2 +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/crypto_service_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) + + +class CryptoServiceStub(object): + """* + Transactions and queries for the Hedera Crypto Service. + The following queries are permanently removed. + getStakersByAccountID, getFastTransactionRecord + """ + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.createAccount = channel.unary_unary( + '/proto.CryptoService/createAccount', + request_serializer=services_dot_transaction__pb2.Transaction.SerializeToString, + response_deserializer=services_dot_transaction__response__pb2.TransactionResponse.FromString, + _registered_method=True) + self.updateAccount = channel.unary_unary( + '/proto.CryptoService/updateAccount', + request_serializer=services_dot_transaction__pb2.Transaction.SerializeToString, + response_deserializer=services_dot_transaction__response__pb2.TransactionResponse.FromString, + _registered_method=True) + self.cryptoTransfer = channel.unary_unary( + '/proto.CryptoService/cryptoTransfer', + request_serializer=services_dot_transaction__pb2.Transaction.SerializeToString, + response_deserializer=services_dot_transaction__response__pb2.TransactionResponse.FromString, + _registered_method=True) + self.cryptoDelete = channel.unary_unary( + '/proto.CryptoService/cryptoDelete', + request_serializer=services_dot_transaction__pb2.Transaction.SerializeToString, + response_deserializer=services_dot_transaction__response__pb2.TransactionResponse.FromString, + _registered_method=True) + self.approveAllowances = channel.unary_unary( + '/proto.CryptoService/approveAllowances', + request_serializer=services_dot_transaction__pb2.Transaction.SerializeToString, + response_deserializer=services_dot_transaction__response__pb2.TransactionResponse.FromString, + _registered_method=True) + self.deleteAllowances = channel.unary_unary( + '/proto.CryptoService/deleteAllowances', + request_serializer=services_dot_transaction__pb2.Transaction.SerializeToString, + response_deserializer=services_dot_transaction__response__pb2.TransactionResponse.FromString, + _registered_method=True) + self.addLiveHash = channel.unary_unary( + '/proto.CryptoService/addLiveHash', + request_serializer=services_dot_transaction__pb2.Transaction.SerializeToString, + response_deserializer=services_dot_transaction__response__pb2.TransactionResponse.FromString, + _registered_method=True) + self.deleteLiveHash = channel.unary_unary( + '/proto.CryptoService/deleteLiveHash', + request_serializer=services_dot_transaction__pb2.Transaction.SerializeToString, + response_deserializer=services_dot_transaction__response__pb2.TransactionResponse.FromString, + _registered_method=True) + self.getLiveHash = channel.unary_unary( + '/proto.CryptoService/getLiveHash', + request_serializer=services_dot_query__pb2.Query.SerializeToString, + response_deserializer=services_dot_response__pb2.Response.FromString, + _registered_method=True) + self.getAccountRecords = channel.unary_unary( + '/proto.CryptoService/getAccountRecords', + request_serializer=services_dot_query__pb2.Query.SerializeToString, + response_deserializer=services_dot_response__pb2.Response.FromString, + _registered_method=True) + self.cryptoGetBalance = channel.unary_unary( + '/proto.CryptoService/cryptoGetBalance', + request_serializer=services_dot_query__pb2.Query.SerializeToString, + response_deserializer=services_dot_response__pb2.Response.FromString, + _registered_method=True) + self.getAccountInfo = channel.unary_unary( + '/proto.CryptoService/getAccountInfo', + request_serializer=services_dot_query__pb2.Query.SerializeToString, + response_deserializer=services_dot_response__pb2.Response.FromString, + _registered_method=True) + self.getTransactionReceipts = channel.unary_unary( + '/proto.CryptoService/getTransactionReceipts', + request_serializer=services_dot_query__pb2.Query.SerializeToString, + response_deserializer=services_dot_response__pb2.Response.FromString, + _registered_method=True) + self.getTxRecordByTxID = channel.unary_unary( + '/proto.CryptoService/getTxRecordByTxID', + request_serializer=services_dot_query__pb2.Query.SerializeToString, + response_deserializer=services_dot_response__pb2.Response.FromString, + _registered_method=True) + + +class CryptoServiceServicer(object): + """* + Transactions and queries for the Hedera Crypto Service. + The following queries are permanently removed. + getStakersByAccountID, getFastTransactionRecord + """ + + def createAccount(self, request, context): + """* + Create a new account by submitting the transaction + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def updateAccount(self, request, context): + """* + Update an account by submitting the transaction + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def cryptoTransfer(self, request, context): + """* + Initiate a transfer by submitting the transaction + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def cryptoDelete(self, request, context): + """* + Delete an account by submitting the transaction + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def approveAllowances(self, request, context): + """* + Add one or more approved allowances for spenders to transfer the paying + account's hbar or tokens. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def deleteAllowances(self, request, context): + """* + Delete one or more of the specific approved NFT serial numbers on an + owner account. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def addLiveHash(self, request, context): + """* + Add a livehash +

      Important
      + This transaction is obsolete, not supported, and SHALL fail with a + pre-check result of `NOT_SUPPORTED`.
      + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def deleteLiveHash(self, request, context): + """* + Delete a livehash +
      Important
      + This transaction is obsolete, not supported, and SHALL fail with a + pre-check result of `NOT_SUPPORTED`.
      + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def getLiveHash(self, request, context): + """* + Retrieve a livehash for an account +
      Important
      + This query is obsolete, not supported, and SHALL fail with a pre-check + result of `NOT_SUPPORTED`.
      + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def getAccountRecords(self, request, context): + """* + Return 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`. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def cryptoGetBalance(self, request, context): + """* + Retrieve the balance of an account + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def getAccountInfo(self, request, context): + """* + Retrieve the metadata of an account + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def getTransactionReceipts(self, request, context): + """* + Retrieve the latest receipt for a transaction that is either awaiting + consensus, or reached consensus in the last 180 seconds + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def getTxRecordByTxID(self, request, context): + """* + Retrieve the record of a transaction that is either awaiting consensus, + or reached consensus in the last 180 seconds + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_CryptoServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'createAccount': grpc.unary_unary_rpc_method_handler( + servicer.createAccount, + request_deserializer=services_dot_transaction__pb2.Transaction.FromString, + response_serializer=services_dot_transaction__response__pb2.TransactionResponse.SerializeToString, + ), + 'updateAccount': grpc.unary_unary_rpc_method_handler( + servicer.updateAccount, + request_deserializer=services_dot_transaction__pb2.Transaction.FromString, + response_serializer=services_dot_transaction__response__pb2.TransactionResponse.SerializeToString, + ), + 'cryptoTransfer': grpc.unary_unary_rpc_method_handler( + servicer.cryptoTransfer, + request_deserializer=services_dot_transaction__pb2.Transaction.FromString, + response_serializer=services_dot_transaction__response__pb2.TransactionResponse.SerializeToString, + ), + 'cryptoDelete': grpc.unary_unary_rpc_method_handler( + servicer.cryptoDelete, + request_deserializer=services_dot_transaction__pb2.Transaction.FromString, + response_serializer=services_dot_transaction__response__pb2.TransactionResponse.SerializeToString, + ), + 'approveAllowances': grpc.unary_unary_rpc_method_handler( + servicer.approveAllowances, + request_deserializer=services_dot_transaction__pb2.Transaction.FromString, + response_serializer=services_dot_transaction__response__pb2.TransactionResponse.SerializeToString, + ), + 'deleteAllowances': grpc.unary_unary_rpc_method_handler( + servicer.deleteAllowances, + request_deserializer=services_dot_transaction__pb2.Transaction.FromString, + response_serializer=services_dot_transaction__response__pb2.TransactionResponse.SerializeToString, + ), + 'addLiveHash': grpc.unary_unary_rpc_method_handler( + servicer.addLiveHash, + request_deserializer=services_dot_transaction__pb2.Transaction.FromString, + response_serializer=services_dot_transaction__response__pb2.TransactionResponse.SerializeToString, + ), + 'deleteLiveHash': grpc.unary_unary_rpc_method_handler( + servicer.deleteLiveHash, + request_deserializer=services_dot_transaction__pb2.Transaction.FromString, + response_serializer=services_dot_transaction__response__pb2.TransactionResponse.SerializeToString, + ), + 'getLiveHash': grpc.unary_unary_rpc_method_handler( + servicer.getLiveHash, + request_deserializer=services_dot_query__pb2.Query.FromString, + response_serializer=services_dot_response__pb2.Response.SerializeToString, + ), + 'getAccountRecords': grpc.unary_unary_rpc_method_handler( + servicer.getAccountRecords, + request_deserializer=services_dot_query__pb2.Query.FromString, + response_serializer=services_dot_response__pb2.Response.SerializeToString, + ), + 'cryptoGetBalance': grpc.unary_unary_rpc_method_handler( + servicer.cryptoGetBalance, + request_deserializer=services_dot_query__pb2.Query.FromString, + response_serializer=services_dot_response__pb2.Response.SerializeToString, + ), + 'getAccountInfo': grpc.unary_unary_rpc_method_handler( + servicer.getAccountInfo, + request_deserializer=services_dot_query__pb2.Query.FromString, + response_serializer=services_dot_response__pb2.Response.SerializeToString, + ), + 'getTransactionReceipts': grpc.unary_unary_rpc_method_handler( + servicer.getTransactionReceipts, + request_deserializer=services_dot_query__pb2.Query.FromString, + response_serializer=services_dot_response__pb2.Response.SerializeToString, + ), + 'getTxRecordByTxID': grpc.unary_unary_rpc_method_handler( + servicer.getTxRecordByTxID, + request_deserializer=services_dot_query__pb2.Query.FromString, + response_serializer=services_dot_response__pb2.Response.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'proto.CryptoService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + server.add_registered_method_handlers('proto.CryptoService', rpc_method_handlers) + + + # This class is part of an EXPERIMENTAL API. +class CryptoService(object): + """* + Transactions and queries for the Hedera Crypto Service. + The following queries are permanently removed. + getStakersByAccountID, getFastTransactionRecord + """ + + @staticmethod + def createAccount(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/proto.CryptoService/createAccount', + services_dot_transaction__pb2.Transaction.SerializeToString, + services_dot_transaction__response__pb2.TransactionResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def updateAccount(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/proto.CryptoService/updateAccount', + services_dot_transaction__pb2.Transaction.SerializeToString, + services_dot_transaction__response__pb2.TransactionResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def cryptoTransfer(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/proto.CryptoService/cryptoTransfer', + services_dot_transaction__pb2.Transaction.SerializeToString, + services_dot_transaction__response__pb2.TransactionResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def cryptoDelete(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/proto.CryptoService/cryptoDelete', + services_dot_transaction__pb2.Transaction.SerializeToString, + services_dot_transaction__response__pb2.TransactionResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def approveAllowances(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/proto.CryptoService/approveAllowances', + services_dot_transaction__pb2.Transaction.SerializeToString, + services_dot_transaction__response__pb2.TransactionResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def deleteAllowances(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/proto.CryptoService/deleteAllowances', + services_dot_transaction__pb2.Transaction.SerializeToString, + services_dot_transaction__response__pb2.TransactionResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def addLiveHash(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/proto.CryptoService/addLiveHash', + services_dot_transaction__pb2.Transaction.SerializeToString, + services_dot_transaction__response__pb2.TransactionResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def deleteLiveHash(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/proto.CryptoService/deleteLiveHash', + services_dot_transaction__pb2.Transaction.SerializeToString, + services_dot_transaction__response__pb2.TransactionResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def getLiveHash(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/proto.CryptoService/getLiveHash', + services_dot_query__pb2.Query.SerializeToString, + services_dot_response__pb2.Response.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def getAccountRecords(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/proto.CryptoService/getAccountRecords', + services_dot_query__pb2.Query.SerializeToString, + services_dot_response__pb2.Response.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def cryptoGetBalance(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/proto.CryptoService/cryptoGetBalance', + services_dot_query__pb2.Query.SerializeToString, + services_dot_response__pb2.Response.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def getAccountInfo(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/proto.CryptoService/getAccountInfo', + services_dot_query__pb2.Query.SerializeToString, + services_dot_response__pb2.Response.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def getTransactionReceipts(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/proto.CryptoService/getTransactionReceipts', + services_dot_query__pb2.Query.SerializeToString, + services_dot_response__pb2.Response.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def getTxRecordByTxID(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/proto.CryptoService/getTxRecordByTxID', + services_dot_query__pb2.Query.SerializeToString, + services_dot_response__pb2.Response.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) diff --git a/src/hiero_sdk_python/hapi/services/crypto_transfer_pb2.py b/src/hiero_sdk_python/hapi/services/crypto_transfer_pb2.py new file mode 100644 index 000000000..4896db87e --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/crypto_transfer_pb2.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/crypto_transfer.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/crypto_transfer.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import basic_types_pb2 as services_dot_basic__types__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1eservices/crypto_transfer.proto\x12\x05proto\x1a\x1aservices/basic_types.proto\"y\n\x1d\x43ryptoTransferTransactionBody\x12&\n\ttransfers\x18\x01 \x01(\x0b\x32\x13.proto.TransferList\x12\x30\n\x0etokenTransfers\x18\x02 \x03(\x0b\x32\x18.proto.TokenTransferListB&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.crypto_transfer_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_CRYPTOTRANSFERTRANSACTIONBODY']._serialized_start=69 + _globals['_CRYPTOTRANSFERTRANSACTIONBODY']._serialized_end=190 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/crypto_transfer_pb2.pyi b/src/hiero_sdk_python/hapi/services/crypto_transfer_pb2.pyi new file mode 100644 index 000000000..cd19da71a --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/crypto_transfer_pb2.pyi @@ -0,0 +1,16 @@ +from . import basic_types_pb2 as _basic_types_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Iterable as _Iterable, Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class CryptoTransferTransactionBody(_message.Message): + __slots__ = ("transfers", "tokenTransfers") + TRANSFERS_FIELD_NUMBER: _ClassVar[int] + TOKENTRANSFERS_FIELD_NUMBER: _ClassVar[int] + transfers: _basic_types_pb2.TransferList + tokenTransfers: _containers.RepeatedCompositeFieldContainer[_basic_types_pb2.TokenTransferList] + def __init__(self, transfers: _Optional[_Union[_basic_types_pb2.TransferList, _Mapping]] = ..., tokenTransfers: _Optional[_Iterable[_Union[_basic_types_pb2.TokenTransferList, _Mapping]]] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/crypto_transfer_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/crypto_transfer_pb2_grpc.py new file mode 100644 index 000000000..c2df727e6 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/crypto_transfer_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/crypto_transfer_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/crypto_update_pb2.py b/src/hiero_sdk_python/hapi/services/crypto_update_pb2.py new file mode 100644 index 000000000..806f8c0f0 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/crypto_update_pb2.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/crypto_update.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/crypto_update.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import basic_types_pb2 as services_dot_basic__types__pb2 +from . import duration_pb2 as services_dot_duration__pb2 +from . import hook_types_pb2 as services_dot_hook__types__pb2 +from . import timestamp_pb2 as services_dot_timestamp__pb2 +from google.protobuf import wrappers_pb2 as google_dot_protobuf_dot_wrappers__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cservices/crypto_update.proto\x12\x05proto\x1a\x1aservices/basic_types.proto\x1a\x17services/duration.proto\x1a\x19services/hook_types.proto\x1a\x18services/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\"\x81\x08\n\x1b\x43ryptoUpdateTransactionBody\x12+\n\x11\x61\x63\x63ountIDToUpdate\x18\x02 \x01(\x0b\x32\x10.proto.AccountID\x12\x17\n\x03key\x18\x03 \x01(\x0b\x32\n.proto.Key\x12,\n\x0eproxyAccountID\x18\x04 \x01(\x0b\x32\x10.proto.AccountIDB\x02\x18\x01\x12\x19\n\rproxyFraction\x18\x05 \x01(\x05\x42\x02\x18\x01\x12!\n\x13sendRecordThreshold\x18\x06 \x01(\x04\x42\x02\x18\x01H\x00\x12\x46\n\x1asendRecordThresholdWrapper\x18\x0b \x01(\x0b\x32\x1c.google.protobuf.UInt64ValueB\x02\x18\x01H\x00\x12$\n\x16receiveRecordThreshold\x18\x07 \x01(\x04\x42\x02\x18\x01H\x01\x12I\n\x1dreceiveRecordThresholdWrapper\x18\x0c \x01(\x0b\x32\x1c.google.protobuf.UInt64ValueB\x02\x18\x01H\x01\x12(\n\x0f\x61utoRenewPeriod\x18\x08 \x01(\x0b\x32\x0f.proto.Duration\x12(\n\x0e\x65xpirationTime\x18\t \x01(\x0b\x32\x10.proto.Timestamp\x12!\n\x13receiverSigRequired\x18\n \x01(\x08\x42\x02\x18\x01H\x02\x12@\n\x1areceiverSigRequiredWrapper\x18\r \x01(\x0b\x32\x1a.google.protobuf.BoolValueH\x02\x12*\n\x04memo\x18\x0e \x01(\x0b\x32\x1c.google.protobuf.StringValue\x12\x45\n max_automatic_token_associations\x18\x0f \x01(\x0b\x32\x1b.google.protobuf.Int32Value\x12-\n\x11staked_account_id\x18\x10 \x01(\x0b\x32\x10.proto.AccountIDH\x03\x12\x18\n\x0estaked_node_id\x18\x11 \x01(\x03H\x03\x12\x32\n\x0e\x64\x65\x63line_reward\x18\x12 \x01(\x0b\x32\x1a.google.protobuf.BoolValue\x12\x1a\n\x12hook_ids_to_delete\x18\x13 \x03(\x03\x12N\n\x15hook_creation_details\x18\x14 \x03(\x0b\x32/.com.hedera.hapi.node.hooks.HookCreationDetailsB\x1a\n\x18sendRecordThresholdFieldB\x1d\n\x1breceiveRecordThresholdFieldB\x1a\n\x18receiverSigRequiredFieldB\x0b\n\tstaked_idB&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.crypto_update_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_CRYPTOUPDATETRANSACTIONBODY'].fields_by_name['proxyAccountID']._loaded_options = None + _globals['_CRYPTOUPDATETRANSACTIONBODY'].fields_by_name['proxyAccountID']._serialized_options = b'\030\001' + _globals['_CRYPTOUPDATETRANSACTIONBODY'].fields_by_name['proxyFraction']._loaded_options = None + _globals['_CRYPTOUPDATETRANSACTIONBODY'].fields_by_name['proxyFraction']._serialized_options = b'\030\001' + _globals['_CRYPTOUPDATETRANSACTIONBODY'].fields_by_name['sendRecordThreshold']._loaded_options = None + _globals['_CRYPTOUPDATETRANSACTIONBODY'].fields_by_name['sendRecordThreshold']._serialized_options = b'\030\001' + _globals['_CRYPTOUPDATETRANSACTIONBODY'].fields_by_name['sendRecordThresholdWrapper']._loaded_options = None + _globals['_CRYPTOUPDATETRANSACTIONBODY'].fields_by_name['sendRecordThresholdWrapper']._serialized_options = b'\030\001' + _globals['_CRYPTOUPDATETRANSACTIONBODY'].fields_by_name['receiveRecordThreshold']._loaded_options = None + _globals['_CRYPTOUPDATETRANSACTIONBODY'].fields_by_name['receiveRecordThreshold']._serialized_options = b'\030\001' + _globals['_CRYPTOUPDATETRANSACTIONBODY'].fields_by_name['receiveRecordThresholdWrapper']._loaded_options = None + _globals['_CRYPTOUPDATETRANSACTIONBODY'].fields_by_name['receiveRecordThresholdWrapper']._serialized_options = b'\030\001' + _globals['_CRYPTOUPDATETRANSACTIONBODY'].fields_by_name['receiverSigRequired']._loaded_options = None + _globals['_CRYPTOUPDATETRANSACTIONBODY'].fields_by_name['receiverSigRequired']._serialized_options = b'\030\001' + _globals['_CRYPTOUPDATETRANSACTIONBODY']._serialized_start=178 + _globals['_CRYPTOUPDATETRANSACTIONBODY']._serialized_end=1203 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/crypto_update_pb2.pyi b/src/hiero_sdk_python/hapi/services/crypto_update_pb2.pyi new file mode 100644 index 000000000..5bf24c288 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/crypto_update_pb2.pyi @@ -0,0 +1,54 @@ +from . import basic_types_pb2 as _basic_types_pb2 +from . import duration_pb2 as _duration_pb2 +from . import hook_types_pb2 as _hook_types_pb2 +from . import timestamp_pb2 as _timestamp_pb2 +from google.protobuf import wrappers_pb2 as _wrappers_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Iterable as _Iterable, Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class CryptoUpdateTransactionBody(_message.Message): + __slots__ = ("accountIDToUpdate", "key", "proxyAccountID", "proxyFraction", "sendRecordThreshold", "sendRecordThresholdWrapper", "receiveRecordThreshold", "receiveRecordThresholdWrapper", "autoRenewPeriod", "expirationTime", "receiverSigRequired", "receiverSigRequiredWrapper", "memo", "max_automatic_token_associations", "staked_account_id", "staked_node_id", "decline_reward", "hook_ids_to_delete", "hook_creation_details") + ACCOUNTIDTOUPDATE_FIELD_NUMBER: _ClassVar[int] + KEY_FIELD_NUMBER: _ClassVar[int] + PROXYACCOUNTID_FIELD_NUMBER: _ClassVar[int] + PROXYFRACTION_FIELD_NUMBER: _ClassVar[int] + SENDRECORDTHRESHOLD_FIELD_NUMBER: _ClassVar[int] + SENDRECORDTHRESHOLDWRAPPER_FIELD_NUMBER: _ClassVar[int] + RECEIVERECORDTHRESHOLD_FIELD_NUMBER: _ClassVar[int] + RECEIVERECORDTHRESHOLDWRAPPER_FIELD_NUMBER: _ClassVar[int] + AUTORENEWPERIOD_FIELD_NUMBER: _ClassVar[int] + EXPIRATIONTIME_FIELD_NUMBER: _ClassVar[int] + RECEIVERSIGREQUIRED_FIELD_NUMBER: _ClassVar[int] + RECEIVERSIGREQUIREDWRAPPER_FIELD_NUMBER: _ClassVar[int] + MEMO_FIELD_NUMBER: _ClassVar[int] + MAX_AUTOMATIC_TOKEN_ASSOCIATIONS_FIELD_NUMBER: _ClassVar[int] + STAKED_ACCOUNT_ID_FIELD_NUMBER: _ClassVar[int] + STAKED_NODE_ID_FIELD_NUMBER: _ClassVar[int] + DECLINE_REWARD_FIELD_NUMBER: _ClassVar[int] + HOOK_IDS_TO_DELETE_FIELD_NUMBER: _ClassVar[int] + HOOK_CREATION_DETAILS_FIELD_NUMBER: _ClassVar[int] + accountIDToUpdate: _basic_types_pb2.AccountID + key: _basic_types_pb2.Key + proxyAccountID: _basic_types_pb2.AccountID + proxyFraction: int + sendRecordThreshold: int + sendRecordThresholdWrapper: _wrappers_pb2.UInt64Value + receiveRecordThreshold: int + receiveRecordThresholdWrapper: _wrappers_pb2.UInt64Value + autoRenewPeriod: _duration_pb2.Duration + expirationTime: _timestamp_pb2.Timestamp + receiverSigRequired: bool + receiverSigRequiredWrapper: _wrappers_pb2.BoolValue + memo: _wrappers_pb2.StringValue + max_automatic_token_associations: _wrappers_pb2.Int32Value + staked_account_id: _basic_types_pb2.AccountID + staked_node_id: int + decline_reward: _wrappers_pb2.BoolValue + hook_ids_to_delete: _containers.RepeatedScalarFieldContainer[int] + hook_creation_details: _containers.RepeatedCompositeFieldContainer[_hook_types_pb2.HookCreationDetails] + def __init__(self, accountIDToUpdate: _Optional[_Union[_basic_types_pb2.AccountID, _Mapping]] = ..., key: _Optional[_Union[_basic_types_pb2.Key, _Mapping]] = ..., proxyAccountID: _Optional[_Union[_basic_types_pb2.AccountID, _Mapping]] = ..., proxyFraction: _Optional[int] = ..., sendRecordThreshold: _Optional[int] = ..., sendRecordThresholdWrapper: _Optional[_Union[_wrappers_pb2.UInt64Value, _Mapping]] = ..., receiveRecordThreshold: _Optional[int] = ..., receiveRecordThresholdWrapper: _Optional[_Union[_wrappers_pb2.UInt64Value, _Mapping]] = ..., autoRenewPeriod: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ..., expirationTime: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., receiverSigRequired: bool = ..., receiverSigRequiredWrapper: _Optional[_Union[_wrappers_pb2.BoolValue, _Mapping]] = ..., memo: _Optional[_Union[_wrappers_pb2.StringValue, _Mapping]] = ..., max_automatic_token_associations: _Optional[_Union[_wrappers_pb2.Int32Value, _Mapping]] = ..., staked_account_id: _Optional[_Union[_basic_types_pb2.AccountID, _Mapping]] = ..., staked_node_id: _Optional[int] = ..., decline_reward: _Optional[_Union[_wrappers_pb2.BoolValue, _Mapping]] = ..., hook_ids_to_delete: _Optional[_Iterable[int]] = ..., hook_creation_details: _Optional[_Iterable[_Union[_hook_types_pb2.HookCreationDetails, _Mapping]]] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/crypto_update_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/crypto_update_pb2_grpc.py new file mode 100644 index 000000000..867f2cc8f --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/crypto_update_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/crypto_update_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/custom_fees_pb2.py b/src/hiero_sdk_python/hapi/services/custom_fees_pb2.py new file mode 100644 index 000000000..99942ef06 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/custom_fees_pb2.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/custom_fees.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/custom_fees.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import basic_types_pb2 as services_dot_basic__types__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1aservices/custom_fees.proto\x12\x05proto\x1a\x1aservices/basic_types.proto\"\x85\x01\n\rFractionalFee\x12*\n\x11\x66ractional_amount\x18\x01 \x01(\x0b\x32\x0f.proto.Fraction\x12\x16\n\x0eminimum_amount\x18\x02 \x01(\x03\x12\x16\n\x0emaximum_amount\x18\x03 \x01(\x03\x12\x18\n\x10net_of_transfers\x18\x04 \x01(\x08\"I\n\x08\x46ixedFee\x12\x0e\n\x06\x61mount\x18\x01 \x01(\x03\x12-\n\x15\x64\x65nominating_token_id\x18\x02 \x01(\x0b\x32\x0e.proto.TokenID\"e\n\nRoyaltyFee\x12\x30\n\x17\x65xchange_value_fraction\x18\x01 \x01(\x0b\x32\x0f.proto.Fraction\x12%\n\x0c\x66\x61llback_fee\x18\x02 \x01(\x0b\x32\x0f.proto.FixedFee\"\xe9\x01\n\tCustomFee\x12$\n\tfixed_fee\x18\x01 \x01(\x0b\x32\x0f.proto.FixedFeeH\x00\x12.\n\x0e\x66ractional_fee\x18\x02 \x01(\x0b\x32\x14.proto.FractionalFeeH\x00\x12(\n\x0broyalty_fee\x18\x04 \x01(\x0b\x32\x11.proto.RoyaltyFeeH\x00\x12\x32\n\x18\x66\x65\x65_collector_account_id\x18\x03 \x01(\x0b\x32\x10.proto.AccountID\x12!\n\x19\x61ll_collectors_are_exempt\x18\x05 \x01(\x08\x42\x05\n\x03\x66\x65\x65\"\xaf\x01\n\x11\x41ssessedCustomFee\x12\x0e\n\x06\x61mount\x18\x01 \x01(\x03\x12 \n\x08token_id\x18\x02 \x01(\x0b\x32\x0e.proto.TokenID\x12\x32\n\x18\x66\x65\x65_collector_account_id\x18\x03 \x01(\x0b\x32\x10.proto.AccountID\x12\x34\n\x1a\x65\x66\x66\x65\x63tive_payer_account_id\x18\x04 \x03(\x0b\x32\x10.proto.AccountID\"h\n\x0e\x46ixedCustomFee\x12\"\n\tfixed_fee\x18\x01 \x01(\x0b\x32\x0f.proto.FixedFee\x12\x32\n\x18\x66\x65\x65_collector_account_id\x18\x02 \x01(\x0b\x32\x10.proto.AccountID\"9\n\x12\x46ixedCustomFeeList\x12#\n\x04\x66\x65\x65s\x18\x01 \x03(\x0b\x32\x15.proto.FixedCustomFee\",\n\x10\x46\x65\x65\x45xemptKeyList\x12\x18\n\x04keys\x18\x01 \x03(\x0b\x32\n.proto.Key\"U\n\x0e\x43ustomFeeLimit\x12$\n\naccount_id\x18\x01 \x01(\x0b\x32\x10.proto.AccountID\x12\x1d\n\x04\x66\x65\x65s\x18\x02 \x03(\x0b\x32\x0f.proto.FixedFeeB&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.custom_fees_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_FRACTIONALFEE']._serialized_start=66 + _globals['_FRACTIONALFEE']._serialized_end=199 + _globals['_FIXEDFEE']._serialized_start=201 + _globals['_FIXEDFEE']._serialized_end=274 + _globals['_ROYALTYFEE']._serialized_start=276 + _globals['_ROYALTYFEE']._serialized_end=377 + _globals['_CUSTOMFEE']._serialized_start=380 + _globals['_CUSTOMFEE']._serialized_end=613 + _globals['_ASSESSEDCUSTOMFEE']._serialized_start=616 + _globals['_ASSESSEDCUSTOMFEE']._serialized_end=791 + _globals['_FIXEDCUSTOMFEE']._serialized_start=793 + _globals['_FIXEDCUSTOMFEE']._serialized_end=897 + _globals['_FIXEDCUSTOMFEELIST']._serialized_start=899 + _globals['_FIXEDCUSTOMFEELIST']._serialized_end=956 + _globals['_FEEEXEMPTKEYLIST']._serialized_start=958 + _globals['_FEEEXEMPTKEYLIST']._serialized_end=1002 + _globals['_CUSTOMFEELIMIT']._serialized_start=1004 + _globals['_CUSTOMFEELIMIT']._serialized_end=1089 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/custom_fees_pb2.pyi b/src/hiero_sdk_python/hapi/services/custom_fees_pb2.pyi new file mode 100644 index 000000000..a26b46b40 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/custom_fees_pb2.pyi @@ -0,0 +1,90 @@ +from . import basic_types_pb2 as _basic_types_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Iterable as _Iterable, Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class FractionalFee(_message.Message): + __slots__ = ("fractional_amount", "minimum_amount", "maximum_amount", "net_of_transfers") + FRACTIONAL_AMOUNT_FIELD_NUMBER: _ClassVar[int] + MINIMUM_AMOUNT_FIELD_NUMBER: _ClassVar[int] + MAXIMUM_AMOUNT_FIELD_NUMBER: _ClassVar[int] + NET_OF_TRANSFERS_FIELD_NUMBER: _ClassVar[int] + fractional_amount: _basic_types_pb2.Fraction + minimum_amount: int + maximum_amount: int + net_of_transfers: bool + def __init__(self, fractional_amount: _Optional[_Union[_basic_types_pb2.Fraction, _Mapping]] = ..., minimum_amount: _Optional[int] = ..., maximum_amount: _Optional[int] = ..., net_of_transfers: bool = ...) -> None: ... + +class FixedFee(_message.Message): + __slots__ = ("amount", "denominating_token_id") + AMOUNT_FIELD_NUMBER: _ClassVar[int] + DENOMINATING_TOKEN_ID_FIELD_NUMBER: _ClassVar[int] + amount: int + denominating_token_id: _basic_types_pb2.TokenID + def __init__(self, amount: _Optional[int] = ..., denominating_token_id: _Optional[_Union[_basic_types_pb2.TokenID, _Mapping]] = ...) -> None: ... + +class RoyaltyFee(_message.Message): + __slots__ = ("exchange_value_fraction", "fallback_fee") + EXCHANGE_VALUE_FRACTION_FIELD_NUMBER: _ClassVar[int] + FALLBACK_FEE_FIELD_NUMBER: _ClassVar[int] + exchange_value_fraction: _basic_types_pb2.Fraction + fallback_fee: FixedFee + def __init__(self, exchange_value_fraction: _Optional[_Union[_basic_types_pb2.Fraction, _Mapping]] = ..., fallback_fee: _Optional[_Union[FixedFee, _Mapping]] = ...) -> None: ... + +class CustomFee(_message.Message): + __slots__ = ("fixed_fee", "fractional_fee", "royalty_fee", "fee_collector_account_id", "all_collectors_are_exempt") + FIXED_FEE_FIELD_NUMBER: _ClassVar[int] + FRACTIONAL_FEE_FIELD_NUMBER: _ClassVar[int] + ROYALTY_FEE_FIELD_NUMBER: _ClassVar[int] + FEE_COLLECTOR_ACCOUNT_ID_FIELD_NUMBER: _ClassVar[int] + ALL_COLLECTORS_ARE_EXEMPT_FIELD_NUMBER: _ClassVar[int] + fixed_fee: FixedFee + fractional_fee: FractionalFee + royalty_fee: RoyaltyFee + fee_collector_account_id: _basic_types_pb2.AccountID + all_collectors_are_exempt: bool + def __init__(self, fixed_fee: _Optional[_Union[FixedFee, _Mapping]] = ..., fractional_fee: _Optional[_Union[FractionalFee, _Mapping]] = ..., royalty_fee: _Optional[_Union[RoyaltyFee, _Mapping]] = ..., fee_collector_account_id: _Optional[_Union[_basic_types_pb2.AccountID, _Mapping]] = ..., all_collectors_are_exempt: bool = ...) -> None: ... + +class AssessedCustomFee(_message.Message): + __slots__ = ("amount", "token_id", "fee_collector_account_id", "effective_payer_account_id") + AMOUNT_FIELD_NUMBER: _ClassVar[int] + TOKEN_ID_FIELD_NUMBER: _ClassVar[int] + FEE_COLLECTOR_ACCOUNT_ID_FIELD_NUMBER: _ClassVar[int] + EFFECTIVE_PAYER_ACCOUNT_ID_FIELD_NUMBER: _ClassVar[int] + amount: int + token_id: _basic_types_pb2.TokenID + fee_collector_account_id: _basic_types_pb2.AccountID + effective_payer_account_id: _containers.RepeatedCompositeFieldContainer[_basic_types_pb2.AccountID] + def __init__(self, amount: _Optional[int] = ..., token_id: _Optional[_Union[_basic_types_pb2.TokenID, _Mapping]] = ..., fee_collector_account_id: _Optional[_Union[_basic_types_pb2.AccountID, _Mapping]] = ..., effective_payer_account_id: _Optional[_Iterable[_Union[_basic_types_pb2.AccountID, _Mapping]]] = ...) -> None: ... + +class FixedCustomFee(_message.Message): + __slots__ = ("fixed_fee", "fee_collector_account_id") + FIXED_FEE_FIELD_NUMBER: _ClassVar[int] + FEE_COLLECTOR_ACCOUNT_ID_FIELD_NUMBER: _ClassVar[int] + fixed_fee: FixedFee + fee_collector_account_id: _basic_types_pb2.AccountID + def __init__(self, fixed_fee: _Optional[_Union[FixedFee, _Mapping]] = ..., fee_collector_account_id: _Optional[_Union[_basic_types_pb2.AccountID, _Mapping]] = ...) -> None: ... + +class FixedCustomFeeList(_message.Message): + __slots__ = ("fees",) + FEES_FIELD_NUMBER: _ClassVar[int] + fees: _containers.RepeatedCompositeFieldContainer[FixedCustomFee] + def __init__(self, fees: _Optional[_Iterable[_Union[FixedCustomFee, _Mapping]]] = ...) -> None: ... + +class FeeExemptKeyList(_message.Message): + __slots__ = ("keys",) + KEYS_FIELD_NUMBER: _ClassVar[int] + keys: _containers.RepeatedCompositeFieldContainer[_basic_types_pb2.Key] + def __init__(self, keys: _Optional[_Iterable[_Union[_basic_types_pb2.Key, _Mapping]]] = ...) -> None: ... + +class CustomFeeLimit(_message.Message): + __slots__ = ("account_id", "fees") + ACCOUNT_ID_FIELD_NUMBER: _ClassVar[int] + FEES_FIELD_NUMBER: _ClassVar[int] + account_id: _basic_types_pb2.AccountID + fees: _containers.RepeatedCompositeFieldContainer[FixedFee] + def __init__(self, account_id: _Optional[_Union[_basic_types_pb2.AccountID, _Mapping]] = ..., fees: _Optional[_Iterable[_Union[FixedFee, _Mapping]]] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/custom_fees_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/custom_fees_pb2_grpc.py new file mode 100644 index 000000000..92aeef6b1 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/custom_fees_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/custom_fees_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/duration_pb2.py b/src/hiero_sdk_python/hapi/services/duration_pb2.py new file mode 100644 index 000000000..ced65459b --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/duration_pb2.py @@ -0,0 +1,37 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/duration.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/duration.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x17services/duration.proto\x12\x05proto\"\x1b\n\x08\x44uration\x12\x0f\n\x07seconds\x18\x01 \x01(\x03\x42&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.duration_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_DURATION']._serialized_start=34 + _globals['_DURATION']._serialized_end=61 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/duration_pb2.pyi b/src/hiero_sdk_python/hapi/services/duration_pb2.pyi new file mode 100644 index 000000000..7a4d05e88 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/duration_pb2.pyi @@ -0,0 +1,11 @@ +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Optional as _Optional + +DESCRIPTOR: _descriptor.FileDescriptor + +class Duration(_message.Message): + __slots__ = ("seconds",) + SECONDS_FIELD_NUMBER: _ClassVar[int] + seconds: int + def __init__(self, seconds: _Optional[int] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/duration_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/duration_pb2_grpc.py new file mode 100644 index 000000000..25db04e94 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/duration_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/duration_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/ethereum_transaction_pb2.py b/src/hiero_sdk_python/hapi/services/ethereum_transaction_pb2.py new file mode 100644 index 000000000..26d63170a --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/ethereum_transaction_pb2.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/ethereum_transaction.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/ethereum_transaction.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import basic_types_pb2 as services_dot_basic__types__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n#services/ethereum_transaction.proto\x12\x05proto\x1a\x1aservices/basic_types.proto\"m\n\x17\x45thereumTransactionBody\x12\x15\n\rethereum_data\x18\x01 \x01(\x0c\x12 \n\tcall_data\x18\x02 \x01(\x0b\x32\r.proto.FileID\x12\x19\n\x11max_gas_allowance\x18\x03 \x01(\x03\x42&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.ethereum_transaction_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_ETHEREUMTRANSACTIONBODY']._serialized_start=74 + _globals['_ETHEREUMTRANSACTIONBODY']._serialized_end=183 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/ethereum_transaction_pb2.pyi b/src/hiero_sdk_python/hapi/services/ethereum_transaction_pb2.pyi new file mode 100644 index 000000000..c80b23242 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/ethereum_transaction_pb2.pyi @@ -0,0 +1,17 @@ +from . import basic_types_pb2 as _basic_types_pb2 +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class EthereumTransactionBody(_message.Message): + __slots__ = ("ethereum_data", "call_data", "max_gas_allowance") + ETHEREUM_DATA_FIELD_NUMBER: _ClassVar[int] + CALL_DATA_FIELD_NUMBER: _ClassVar[int] + MAX_GAS_ALLOWANCE_FIELD_NUMBER: _ClassVar[int] + ethereum_data: bytes + call_data: _basic_types_pb2.FileID + max_gas_allowance: int + def __init__(self, ethereum_data: _Optional[bytes] = ..., call_data: _Optional[_Union[_basic_types_pb2.FileID, _Mapping]] = ..., max_gas_allowance: _Optional[int] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/ethereum_transaction_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/ethereum_transaction_pb2_grpc.py new file mode 100644 index 000000000..05aa50245 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/ethereum_transaction_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/ethereum_transaction_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/exchange_rate_pb2.py b/src/hiero_sdk_python/hapi/services/exchange_rate_pb2.py new file mode 100644 index 000000000..7ab11ed5a --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/exchange_rate_pb2.py @@ -0,0 +1,36 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/exchange_rate.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/exchange_rate.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import timestamp_pb2 as services_dot_timestamp__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cservices/exchange_rate.proto\x12\x05proto\x1a\x18services/timestamp.proto\"e\n\x0c\x45xchangeRate\x12\x11\n\thbarEquiv\x18\x01 \x01(\x05\x12\x11\n\tcentEquiv\x18\x02 \x01(\x05\x12/\n\x0e\x65xpirationTime\x18\x03 \x01(\x0b\x32\x17.proto.TimestampSeconds\"b\n\x0f\x45xchangeRateSet\x12(\n\x0b\x63urrentRate\x18\x01 \x01(\x0b\x32\x13.proto.ExchangeRate\x12%\n\x08nextRate\x18\x02 \x01(\x0b\x32\x13.proto.ExchangeRateB&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.exchange_rate_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_EXCHANGERATE']._serialized_start=65 + _globals['_EXCHANGERATE']._serialized_end=166 + _globals['_EXCHANGERATESET']._serialized_start=168 + _globals['_EXCHANGERATESET']._serialized_end=266 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/exchange_rate_pb2.pyi b/src/hiero_sdk_python/hapi/services/exchange_rate_pb2.pyi new file mode 100644 index 000000000..4b2c81585 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/exchange_rate_pb2.pyi @@ -0,0 +1,25 @@ +from . import timestamp_pb2 as _timestamp_pb2 +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class ExchangeRate(_message.Message): + __slots__ = ("hbarEquiv", "centEquiv", "expirationTime") + HBAREQUIV_FIELD_NUMBER: _ClassVar[int] + CENTEQUIV_FIELD_NUMBER: _ClassVar[int] + EXPIRATIONTIME_FIELD_NUMBER: _ClassVar[int] + hbarEquiv: int + centEquiv: int + expirationTime: _timestamp_pb2.TimestampSeconds + def __init__(self, hbarEquiv: _Optional[int] = ..., centEquiv: _Optional[int] = ..., expirationTime: _Optional[_Union[_timestamp_pb2.TimestampSeconds, _Mapping]] = ...) -> None: ... + +class ExchangeRateSet(_message.Message): + __slots__ = ("currentRate", "nextRate") + CURRENTRATE_FIELD_NUMBER: _ClassVar[int] + NEXTRATE_FIELD_NUMBER: _ClassVar[int] + currentRate: ExchangeRate + nextRate: ExchangeRate + def __init__(self, currentRate: _Optional[_Union[ExchangeRate, _Mapping]] = ..., nextRate: _Optional[_Union[ExchangeRate, _Mapping]] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/exchange_rate_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/exchange_rate_pb2_grpc.py new file mode 100644 index 000000000..b6393571a --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/exchange_rate_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/exchange_rate_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/file_append_pb2.py b/src/hiero_sdk_python/hapi/services/file_append_pb2.py new file mode 100644 index 000000000..99c61d1f3 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/file_append_pb2.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/file_append.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/file_append.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import basic_types_pb2 as services_dot_basic__types__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1aservices/file_append.proto\x12\x05proto\x1a\x1aservices/basic_types.proto\"L\n\x19\x46ileAppendTransactionBody\x12\x1d\n\x06\x66ileID\x18\x02 \x01(\x0b\x32\r.proto.FileID\x12\x10\n\x08\x63ontents\x18\x04 \x01(\x0c\x42&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.file_append_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_FILEAPPENDTRANSACTIONBODY']._serialized_start=65 + _globals['_FILEAPPENDTRANSACTIONBODY']._serialized_end=141 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/file_append_pb2.pyi b/src/hiero_sdk_python/hapi/services/file_append_pb2.pyi new file mode 100644 index 000000000..7525af0e7 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/file_append_pb2.pyi @@ -0,0 +1,15 @@ +from . import basic_types_pb2 as _basic_types_pb2 +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class FileAppendTransactionBody(_message.Message): + __slots__ = ("fileID", "contents") + FILEID_FIELD_NUMBER: _ClassVar[int] + CONTENTS_FIELD_NUMBER: _ClassVar[int] + fileID: _basic_types_pb2.FileID + contents: bytes + def __init__(self, fileID: _Optional[_Union[_basic_types_pb2.FileID, _Mapping]] = ..., contents: _Optional[bytes] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/file_append_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/file_append_pb2_grpc.py new file mode 100644 index 000000000..04ae5e956 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/file_append_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/file_append_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/file_create_pb2.py b/src/hiero_sdk_python/hapi/services/file_create_pb2.py new file mode 100644 index 000000000..b3f907cb0 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/file_create_pb2.py @@ -0,0 +1,37 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/file_create.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/file_create.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import basic_types_pb2 as services_dot_basic__types__pb2 +from . import timestamp_pb2 as services_dot_timestamp__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1aservices/file_create.proto\x12\x05proto\x1a\x1aservices/basic_types.proto\x1a\x18services/timestamp.proto\"\xef\x01\n\x19\x46ileCreateTransactionBody\x12(\n\x0e\x65xpirationTime\x18\x02 \x01(\x0b\x32\x10.proto.Timestamp\x12\x1c\n\x04keys\x18\x03 \x01(\x0b\x32\x0e.proto.KeyList\x12\x10\n\x08\x63ontents\x18\x04 \x01(\x0c\x12\x1f\n\x07shardID\x18\x05 \x01(\x0b\x32\x0e.proto.ShardID\x12\x1f\n\x07realmID\x18\x06 \x01(\x0b\x32\x0e.proto.RealmID\x12(\n\x10newRealmAdminKey\x18\x07 \x01(\x0b\x32\n.proto.KeyB\x02\x18\x01\x12\x0c\n\x04memo\x18\x08 \x01(\tB&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.file_create_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_FILECREATETRANSACTIONBODY'].fields_by_name['newRealmAdminKey']._loaded_options = None + _globals['_FILECREATETRANSACTIONBODY'].fields_by_name['newRealmAdminKey']._serialized_options = b'\030\001' + _globals['_FILECREATETRANSACTIONBODY']._serialized_start=92 + _globals['_FILECREATETRANSACTIONBODY']._serialized_end=331 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/file_create_pb2.pyi b/src/hiero_sdk_python/hapi/services/file_create_pb2.pyi new file mode 100644 index 000000000..a59c3ec77 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/file_create_pb2.pyi @@ -0,0 +1,26 @@ +from . import basic_types_pb2 as _basic_types_pb2 +from . import timestamp_pb2 as _timestamp_pb2 +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class FileCreateTransactionBody(_message.Message): + __slots__ = ("expirationTime", "keys", "contents", "shardID", "realmID", "newRealmAdminKey", "memo") + EXPIRATIONTIME_FIELD_NUMBER: _ClassVar[int] + KEYS_FIELD_NUMBER: _ClassVar[int] + CONTENTS_FIELD_NUMBER: _ClassVar[int] + SHARDID_FIELD_NUMBER: _ClassVar[int] + REALMID_FIELD_NUMBER: _ClassVar[int] + NEWREALMADMINKEY_FIELD_NUMBER: _ClassVar[int] + MEMO_FIELD_NUMBER: _ClassVar[int] + expirationTime: _timestamp_pb2.Timestamp + keys: _basic_types_pb2.KeyList + contents: bytes + shardID: _basic_types_pb2.ShardID + realmID: _basic_types_pb2.RealmID + newRealmAdminKey: _basic_types_pb2.Key + memo: str + def __init__(self, expirationTime: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., keys: _Optional[_Union[_basic_types_pb2.KeyList, _Mapping]] = ..., contents: _Optional[bytes] = ..., shardID: _Optional[_Union[_basic_types_pb2.ShardID, _Mapping]] = ..., realmID: _Optional[_Union[_basic_types_pb2.RealmID, _Mapping]] = ..., newRealmAdminKey: _Optional[_Union[_basic_types_pb2.Key, _Mapping]] = ..., memo: _Optional[str] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/file_create_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/file_create_pb2_grpc.py new file mode 100644 index 000000000..e0d640fac --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/file_create_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/file_create_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/file_delete_pb2.py b/src/hiero_sdk_python/hapi/services/file_delete_pb2.py new file mode 100644 index 000000000..2c6626880 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/file_delete_pb2.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/file_delete.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/file_delete.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import basic_types_pb2 as services_dot_basic__types__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1aservices/file_delete.proto\x12\x05proto\x1a\x1aservices/basic_types.proto\":\n\x19\x46ileDeleteTransactionBody\x12\x1d\n\x06\x66ileID\x18\x02 \x01(\x0b\x32\r.proto.FileIDB&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.file_delete_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_FILEDELETETRANSACTIONBODY']._serialized_start=65 + _globals['_FILEDELETETRANSACTIONBODY']._serialized_end=123 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/file_delete_pb2.pyi b/src/hiero_sdk_python/hapi/services/file_delete_pb2.pyi new file mode 100644 index 000000000..726232447 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/file_delete_pb2.pyi @@ -0,0 +1,13 @@ +from . import basic_types_pb2 as _basic_types_pb2 +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class FileDeleteTransactionBody(_message.Message): + __slots__ = ("fileID",) + FILEID_FIELD_NUMBER: _ClassVar[int] + fileID: _basic_types_pb2.FileID + def __init__(self, fileID: _Optional[_Union[_basic_types_pb2.FileID, _Mapping]] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/file_delete_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/file_delete_pb2_grpc.py new file mode 100644 index 000000000..397224551 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/file_delete_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/file_delete_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/file_get_contents_pb2.py b/src/hiero_sdk_python/hapi/services/file_get_contents_pb2.py new file mode 100644 index 000000000..e21c24b9c --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/file_get_contents_pb2.py @@ -0,0 +1,40 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/file_get_contents.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/file_get_contents.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import basic_types_pb2 as services_dot_basic__types__pb2 +from . import query_header_pb2 as services_dot_query__header__pb2 +from . import response_header_pb2 as services_dot_response__header__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n services/file_get_contents.proto\x12\x05proto\x1a\x1aservices/basic_types.proto\x1a\x1bservices/query_header.proto\x1a\x1eservices/response_header.proto\"Y\n\x14\x46ileGetContentsQuery\x12\"\n\x06header\x18\x01 \x01(\x0b\x32\x12.proto.QueryHeader\x12\x1d\n\x06\x66ileID\x18\x02 \x01(\x0b\x32\r.proto.FileID\"\xc4\x01\n\x17\x46ileGetContentsResponse\x12%\n\x06header\x18\x01 \x01(\x0b\x32\x15.proto.ResponseHeader\x12\x41\n\x0c\x66ileContents\x18\x02 \x01(\x0b\x32+.proto.FileGetContentsResponse.FileContents\x1a?\n\x0c\x46ileContents\x12\x1d\n\x06\x66ileID\x18\x01 \x01(\x0b\x32\r.proto.FileID\x12\x10\n\x08\x63ontents\x18\x02 \x01(\x0c\x42&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.file_get_contents_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_FILEGETCONTENTSQUERY']._serialized_start=132 + _globals['_FILEGETCONTENTSQUERY']._serialized_end=221 + _globals['_FILEGETCONTENTSRESPONSE']._serialized_start=224 + _globals['_FILEGETCONTENTSRESPONSE']._serialized_end=420 + _globals['_FILEGETCONTENTSRESPONSE_FILECONTENTS']._serialized_start=357 + _globals['_FILEGETCONTENTSRESPONSE_FILECONTENTS']._serialized_end=420 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/file_get_contents_pb2.pyi b/src/hiero_sdk_python/hapi/services/file_get_contents_pb2.pyi new file mode 100644 index 000000000..f842cac44 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/file_get_contents_pb2.pyi @@ -0,0 +1,32 @@ +from . import basic_types_pb2 as _basic_types_pb2 +from . import query_header_pb2 as _query_header_pb2 +from . import response_header_pb2 as _response_header_pb2 +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class FileGetContentsQuery(_message.Message): + __slots__ = ("header", "fileID") + HEADER_FIELD_NUMBER: _ClassVar[int] + FILEID_FIELD_NUMBER: _ClassVar[int] + header: _query_header_pb2.QueryHeader + fileID: _basic_types_pb2.FileID + def __init__(self, header: _Optional[_Union[_query_header_pb2.QueryHeader, _Mapping]] = ..., fileID: _Optional[_Union[_basic_types_pb2.FileID, _Mapping]] = ...) -> None: ... + +class FileGetContentsResponse(_message.Message): + __slots__ = ("header", "fileContents") + class FileContents(_message.Message): + __slots__ = ("fileID", "contents") + FILEID_FIELD_NUMBER: _ClassVar[int] + CONTENTS_FIELD_NUMBER: _ClassVar[int] + fileID: _basic_types_pb2.FileID + contents: bytes + def __init__(self, fileID: _Optional[_Union[_basic_types_pb2.FileID, _Mapping]] = ..., contents: _Optional[bytes] = ...) -> None: ... + HEADER_FIELD_NUMBER: _ClassVar[int] + FILECONTENTS_FIELD_NUMBER: _ClassVar[int] + header: _response_header_pb2.ResponseHeader + fileContents: FileGetContentsResponse.FileContents + def __init__(self, header: _Optional[_Union[_response_header_pb2.ResponseHeader, _Mapping]] = ..., fileContents: _Optional[_Union[FileGetContentsResponse.FileContents, _Mapping]] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/file_get_contents_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/file_get_contents_pb2_grpc.py new file mode 100644 index 000000000..5d8a04d65 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/file_get_contents_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/file_get_contents_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/file_get_info_pb2.py b/src/hiero_sdk_python/hapi/services/file_get_info_pb2.py new file mode 100644 index 000000000..e032dc214 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/file_get_info_pb2.py @@ -0,0 +1,41 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/file_get_info.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/file_get_info.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import timestamp_pb2 as services_dot_timestamp__pb2 +from . import basic_types_pb2 as services_dot_basic__types__pb2 +from . import query_header_pb2 as services_dot_query__header__pb2 +from . import response_header_pb2 as services_dot_response__header__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cservices/file_get_info.proto\x12\x05proto\x1a\x18services/timestamp.proto\x1a\x1aservices/basic_types.proto\x1a\x1bservices/query_header.proto\x1a\x1eservices/response_header.proto\"U\n\x10\x46ileGetInfoQuery\x12\"\n\x06header\x18\x01 \x01(\x0b\x32\x12.proto.QueryHeader\x12\x1d\n\x06\x66ileID\x18\x02 \x01(\x0b\x32\r.proto.FileID\"\xa7\x02\n\x13\x46ileGetInfoResponse\x12%\n\x06header\x18\x01 \x01(\x0b\x32\x15.proto.ResponseHeader\x12\x35\n\x08\x66ileInfo\x18\x02 \x01(\x0b\x32#.proto.FileGetInfoResponse.FileInfo\x1a\xb1\x01\n\x08\x46ileInfo\x12\x1d\n\x06\x66ileID\x18\x01 \x01(\x0b\x32\r.proto.FileID\x12\x0c\n\x04size\x18\x02 \x01(\x03\x12(\n\x0e\x65xpirationTime\x18\x03 \x01(\x0b\x32\x10.proto.Timestamp\x12\x0f\n\x07\x64\x65leted\x18\x04 \x01(\x08\x12\x1c\n\x04keys\x18\x05 \x01(\x0b\x32\x0e.proto.KeyList\x12\x0c\n\x04memo\x18\x06 \x01(\t\x12\x11\n\tledger_id\x18\x07 \x01(\x0c\x42&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.file_get_info_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_FILEGETINFOQUERY']._serialized_start=154 + _globals['_FILEGETINFOQUERY']._serialized_end=239 + _globals['_FILEGETINFORESPONSE']._serialized_start=242 + _globals['_FILEGETINFORESPONSE']._serialized_end=537 + _globals['_FILEGETINFORESPONSE_FILEINFO']._serialized_start=360 + _globals['_FILEGETINFORESPONSE_FILEINFO']._serialized_end=537 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/file_get_info_pb2.pyi b/src/hiero_sdk_python/hapi/services/file_get_info_pb2.pyi new file mode 100644 index 000000000..151f5ac5e --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/file_get_info_pb2.pyi @@ -0,0 +1,43 @@ +from . import timestamp_pb2 as _timestamp_pb2 +from . import basic_types_pb2 as _basic_types_pb2 +from . import query_header_pb2 as _query_header_pb2 +from . import response_header_pb2 as _response_header_pb2 +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class FileGetInfoQuery(_message.Message): + __slots__ = ("header", "fileID") + HEADER_FIELD_NUMBER: _ClassVar[int] + FILEID_FIELD_NUMBER: _ClassVar[int] + header: _query_header_pb2.QueryHeader + fileID: _basic_types_pb2.FileID + def __init__(self, header: _Optional[_Union[_query_header_pb2.QueryHeader, _Mapping]] = ..., fileID: _Optional[_Union[_basic_types_pb2.FileID, _Mapping]] = ...) -> None: ... + +class FileGetInfoResponse(_message.Message): + __slots__ = ("header", "fileInfo") + class FileInfo(_message.Message): + __slots__ = ("fileID", "size", "expirationTime", "deleted", "keys", "memo", "ledger_id") + FILEID_FIELD_NUMBER: _ClassVar[int] + SIZE_FIELD_NUMBER: _ClassVar[int] + EXPIRATIONTIME_FIELD_NUMBER: _ClassVar[int] + DELETED_FIELD_NUMBER: _ClassVar[int] + KEYS_FIELD_NUMBER: _ClassVar[int] + MEMO_FIELD_NUMBER: _ClassVar[int] + LEDGER_ID_FIELD_NUMBER: _ClassVar[int] + fileID: _basic_types_pb2.FileID + size: int + expirationTime: _timestamp_pb2.Timestamp + deleted: bool + keys: _basic_types_pb2.KeyList + memo: str + ledger_id: bytes + def __init__(self, fileID: _Optional[_Union[_basic_types_pb2.FileID, _Mapping]] = ..., size: _Optional[int] = ..., expirationTime: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., deleted: bool = ..., keys: _Optional[_Union[_basic_types_pb2.KeyList, _Mapping]] = ..., memo: _Optional[str] = ..., ledger_id: _Optional[bytes] = ...) -> None: ... + HEADER_FIELD_NUMBER: _ClassVar[int] + FILEINFO_FIELD_NUMBER: _ClassVar[int] + header: _response_header_pb2.ResponseHeader + fileInfo: FileGetInfoResponse.FileInfo + def __init__(self, header: _Optional[_Union[_response_header_pb2.ResponseHeader, _Mapping]] = ..., fileInfo: _Optional[_Union[FileGetInfoResponse.FileInfo, _Mapping]] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/file_get_info_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/file_get_info_pb2_grpc.py new file mode 100644 index 000000000..3cf807d92 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/file_get_info_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/file_get_info_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/file_service_pb2.py b/src/hiero_sdk_python/hapi/services/file_service_pb2.py new file mode 100644 index 000000000..87e0357a1 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/file_service_pb2.py @@ -0,0 +1,37 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/file_service.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/file_service.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import query_pb2 as services_dot_query__pb2 +from . import response_pb2 as services_dot_response__pb2 +from . import transaction_response_pb2 as services_dot_transaction__response__pb2 +from . import transaction_pb2 as services_dot_transaction__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1bservices/file_service.proto\x12\x05proto\x1a\x14services/query.proto\x1a\x17services/response.proto\x1a#services/transaction_response.proto\x1a\x1aservices/transaction.proto2\xe9\x03\n\x0b\x46ileService\x12<\n\ncreateFile\x12\x12.proto.Transaction\x1a\x1a.proto.TransactionResponse\x12<\n\nupdateFile\x12\x12.proto.Transaction\x1a\x1a.proto.TransactionResponse\x12<\n\ndeleteFile\x12\x12.proto.Transaction\x1a\x1a.proto.TransactionResponse\x12?\n\rappendContent\x12\x12.proto.Transaction\x1a\x1a.proto.TransactionResponse\x12/\n\x0egetFileContent\x12\x0c.proto.Query\x1a\x0f.proto.Response\x12,\n\x0bgetFileInfo\x12\x0c.proto.Query\x1a\x0f.proto.Response\x12>\n\x0csystemDelete\x12\x12.proto.Transaction\x1a\x1a.proto.TransactionResponse\x12@\n\x0esystemUndelete\x12\x12.proto.Transaction\x1a\x1a.proto.TransactionResponseB(\n&com.hederahashgraph.service.proto.javab\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.file_service_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n&com.hederahashgraph.service.proto.java' + _globals['_FILESERVICE']._serialized_start=151 + _globals['_FILESERVICE']._serialized_end=640 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/file_service_pb2.pyi b/src/hiero_sdk_python/hapi/services/file_service_pb2.pyi new file mode 100644 index 000000000..ce90eb498 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/file_service_pb2.pyi @@ -0,0 +1,8 @@ +from . import query_pb2 as _query_pb2 +from . import response_pb2 as _response_pb2 +from . import transaction_response_pb2 as _transaction_response_pb2 +from . import transaction_pb2 as _transaction_pb2 +from google.protobuf import descriptor as _descriptor +from typing import ClassVar as _ClassVar + +DESCRIPTOR: _descriptor.FileDescriptor diff --git a/src/hiero_sdk_python/hapi/services/file_service_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/file_service_pb2_grpc.py new file mode 100644 index 000000000..876678230 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/file_service_pb2_grpc.py @@ -0,0 +1,513 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings +from . import query_pb2 as services_dot_query__pb2 +from . import response_pb2 as services_dot_response__pb2 +from . import transaction_pb2 as services_dot_transaction__pb2 +from . import transaction_response_pb2 as services_dot_transaction__response__pb2 +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/file_service_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) + + +class FileServiceStub(object): + """* + Service gRPC definitions for the Hedera File Service (HFS). + + #### Signature Requirements + The HFS manages file authorization differently, depending on type of file + transaction, and this can be surprising.
      + The core element of file authorization is the `keys` field, + which is a `KeyList`; a list of individual `Key` messages, each of which + may represent a simple or complex key.
      + The file service transactions treat this list differently.
      + A `fileCreate`, `fileAppend`, or `fileUpdate` MUST have a valid signature + from _each_ key in the list.
      + A `fileDelete` MUST have a valid signature from _at least one_ key in + the list. This is different, and allows a file "owned" by many entities + to be deleted by any one of those entities. A deleted file cannot be + restored, so it is important to consider this when assigning keys for + a file.
      + If any of the keys in a `KeyList` are complex, the full requirements of + each complex key must be met to count as a "valid signature" for that key. + A complex key structure (i.e. a `ThresholdKey`, or `KeyList`, possibly + including additional `ThresholdKey` or `KeyList` descendants) may be + assigned as the sole entry in a file `keys` field to ensure all transactions + have the same signature requirements. + """ + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.createFile = channel.unary_unary( + '/proto.FileService/createFile', + request_serializer=services_dot_transaction__pb2.Transaction.SerializeToString, + response_deserializer=services_dot_transaction__response__pb2.TransactionResponse.FromString, + _registered_method=True) + self.updateFile = channel.unary_unary( + '/proto.FileService/updateFile', + request_serializer=services_dot_transaction__pb2.Transaction.SerializeToString, + response_deserializer=services_dot_transaction__response__pb2.TransactionResponse.FromString, + _registered_method=True) + self.deleteFile = channel.unary_unary( + '/proto.FileService/deleteFile', + request_serializer=services_dot_transaction__pb2.Transaction.SerializeToString, + response_deserializer=services_dot_transaction__response__pb2.TransactionResponse.FromString, + _registered_method=True) + self.appendContent = channel.unary_unary( + '/proto.FileService/appendContent', + request_serializer=services_dot_transaction__pb2.Transaction.SerializeToString, + response_deserializer=services_dot_transaction__response__pb2.TransactionResponse.FromString, + _registered_method=True) + self.getFileContent = channel.unary_unary( + '/proto.FileService/getFileContent', + request_serializer=services_dot_query__pb2.Query.SerializeToString, + response_deserializer=services_dot_response__pb2.Response.FromString, + _registered_method=True) + self.getFileInfo = channel.unary_unary( + '/proto.FileService/getFileInfo', + request_serializer=services_dot_query__pb2.Query.SerializeToString, + response_deserializer=services_dot_response__pb2.Response.FromString, + _registered_method=True) + self.systemDelete = channel.unary_unary( + '/proto.FileService/systemDelete', + request_serializer=services_dot_transaction__pb2.Transaction.SerializeToString, + response_deserializer=services_dot_transaction__response__pb2.TransactionResponse.FromString, + _registered_method=True) + self.systemUndelete = channel.unary_unary( + '/proto.FileService/systemUndelete', + request_serializer=services_dot_transaction__pb2.Transaction.SerializeToString, + response_deserializer=services_dot_transaction__response__pb2.TransactionResponse.FromString, + _registered_method=True) + + +class FileServiceServicer(object): + """* + Service gRPC definitions for the Hedera File Service (HFS). + + #### Signature Requirements + The HFS manages file authorization differently, depending on type of file + transaction, and this can be surprising.
      + The core element of file authorization is the `keys` field, + which is a `KeyList`; a list of individual `Key` messages, each of which + may represent a simple or complex key.
      + The file service transactions treat this list differently.
      + A `fileCreate`, `fileAppend`, or `fileUpdate` MUST have a valid signature + from _each_ key in the list.
      + A `fileDelete` MUST have a valid signature from _at least one_ key in + the list. This is different, and allows a file "owned" by many entities + to be deleted by any one of those entities. A deleted file cannot be + restored, so it is important to consider this when assigning keys for + a file.
      + If any of the keys in a `KeyList` are complex, the full requirements of + each complex key must be met to count as a "valid signature" for that key. + A complex key structure (i.e. a `ThresholdKey`, or `KeyList`, possibly + including additional `ThresholdKey` or `KeyList` descendants) may be + assigned as the sole entry in a file `keys` field to ensure all transactions + have the same signature requirements. + """ + + def createFile(self, request, context): + """* + Create a file in HFS. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def updateFile(self, request, context): + """* + Update a file in HFS. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def deleteFile(self, request, context): + """* + Delete a file in HFS.
      + The content of a file deleted in this manner is completely removed + from network state, but the file metadata remains. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def appendContent(self, request, context): + """* + Append content to a file in HFS. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def getFileContent(self, request, context): + """* + Retrieve the content of a file in HFS.
      + Note that this query retrieves _only_ the file content, not any of + the metadata for the file. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def getFileInfo(self, request, context): + """* + Retrieve the metadata for a file in HFS.
      + Note that this query does not retrieve the file _content_. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def systemDelete(self, request, context): + """* + Delete a "regular" file without "owner" authorization.
      + This transaction _does not_ require signatures for the keys in + the file `keys` list, but must be signed by a "privileged" account. +

      + This transaction SHALL NOT accept a file identifier for + a "system" file.
      + This transaction SHALL NOT remove the _content_ of the file from state. + This permits use of the `systemUndelete` to reverse this action if + performed in error. +

      + This is a privileged transaction, and only accounts 2-59 are permitted + to call this function, by default. The actual restriction is in the + `api-permission.properties` file in the consensus node configuration. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def systemUndelete(self, request, context): + """* + Undelete a "regular" file. + This transaction must be signed by a "privileged" account.
      +

      + This transaction SHALL NOT accept a file identifier for + a "system" file.
      + The file identified SHOULD have been previously deleted.
      + This transaction SHALL NOT recover the _content_ of a file unless that + file was deleted with a `systemDelete` transaction. The _content_ of a + file deleted with a `fileDelete` transaction is not retained in state. +

      + This is a privileged transaction, and only accounts 2-60 are permitted + to call this function, by default. The actual restriction is in the + `api-permission.properties` file in the consensus node configuration. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_FileServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'createFile': grpc.unary_unary_rpc_method_handler( + servicer.createFile, + request_deserializer=services_dot_transaction__pb2.Transaction.FromString, + response_serializer=services_dot_transaction__response__pb2.TransactionResponse.SerializeToString, + ), + 'updateFile': grpc.unary_unary_rpc_method_handler( + servicer.updateFile, + request_deserializer=services_dot_transaction__pb2.Transaction.FromString, + response_serializer=services_dot_transaction__response__pb2.TransactionResponse.SerializeToString, + ), + 'deleteFile': grpc.unary_unary_rpc_method_handler( + servicer.deleteFile, + request_deserializer=services_dot_transaction__pb2.Transaction.FromString, + response_serializer=services_dot_transaction__response__pb2.TransactionResponse.SerializeToString, + ), + 'appendContent': grpc.unary_unary_rpc_method_handler( + servicer.appendContent, + request_deserializer=services_dot_transaction__pb2.Transaction.FromString, + response_serializer=services_dot_transaction__response__pb2.TransactionResponse.SerializeToString, + ), + 'getFileContent': grpc.unary_unary_rpc_method_handler( + servicer.getFileContent, + request_deserializer=services_dot_query__pb2.Query.FromString, + response_serializer=services_dot_response__pb2.Response.SerializeToString, + ), + 'getFileInfo': grpc.unary_unary_rpc_method_handler( + servicer.getFileInfo, + request_deserializer=services_dot_query__pb2.Query.FromString, + response_serializer=services_dot_response__pb2.Response.SerializeToString, + ), + 'systemDelete': grpc.unary_unary_rpc_method_handler( + servicer.systemDelete, + request_deserializer=services_dot_transaction__pb2.Transaction.FromString, + response_serializer=services_dot_transaction__response__pb2.TransactionResponse.SerializeToString, + ), + 'systemUndelete': grpc.unary_unary_rpc_method_handler( + servicer.systemUndelete, + request_deserializer=services_dot_transaction__pb2.Transaction.FromString, + response_serializer=services_dot_transaction__response__pb2.TransactionResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'proto.FileService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + server.add_registered_method_handlers('proto.FileService', rpc_method_handlers) + + + # This class is part of an EXPERIMENTAL API. +class FileService(object): + """* + Service gRPC definitions for the Hedera File Service (HFS). + + #### Signature Requirements + The HFS manages file authorization differently, depending on type of file + transaction, and this can be surprising.
      + The core element of file authorization is the `keys` field, + which is a `KeyList`; a list of individual `Key` messages, each of which + may represent a simple or complex key.
      + The file service transactions treat this list differently.
      + A `fileCreate`, `fileAppend`, or `fileUpdate` MUST have a valid signature + from _each_ key in the list.
      + A `fileDelete` MUST have a valid signature from _at least one_ key in + the list. This is different, and allows a file "owned" by many entities + to be deleted by any one of those entities. A deleted file cannot be + restored, so it is important to consider this when assigning keys for + a file.
      + If any of the keys in a `KeyList` are complex, the full requirements of + each complex key must be met to count as a "valid signature" for that key. + A complex key structure (i.e. a `ThresholdKey`, or `KeyList`, possibly + including additional `ThresholdKey` or `KeyList` descendants) may be + assigned as the sole entry in a file `keys` field to ensure all transactions + have the same signature requirements. + """ + + @staticmethod + def createFile(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/proto.FileService/createFile', + services_dot_transaction__pb2.Transaction.SerializeToString, + services_dot_transaction__response__pb2.TransactionResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def updateFile(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/proto.FileService/updateFile', + services_dot_transaction__pb2.Transaction.SerializeToString, + services_dot_transaction__response__pb2.TransactionResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def deleteFile(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/proto.FileService/deleteFile', + services_dot_transaction__pb2.Transaction.SerializeToString, + services_dot_transaction__response__pb2.TransactionResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def appendContent(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/proto.FileService/appendContent', + services_dot_transaction__pb2.Transaction.SerializeToString, + services_dot_transaction__response__pb2.TransactionResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def getFileContent(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/proto.FileService/getFileContent', + services_dot_query__pb2.Query.SerializeToString, + services_dot_response__pb2.Response.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def getFileInfo(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/proto.FileService/getFileInfo', + services_dot_query__pb2.Query.SerializeToString, + services_dot_response__pb2.Response.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def systemDelete(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/proto.FileService/systemDelete', + services_dot_transaction__pb2.Transaction.SerializeToString, + services_dot_transaction__response__pb2.TransactionResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def systemUndelete(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/proto.FileService/systemUndelete', + services_dot_transaction__pb2.Transaction.SerializeToString, + services_dot_transaction__response__pb2.TransactionResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) diff --git a/src/hiero_sdk_python/hapi/services/file_update_pb2.py b/src/hiero_sdk_python/hapi/services/file_update_pb2.py new file mode 100644 index 000000000..5eb02a47d --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/file_update_pb2.py @@ -0,0 +1,38 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/file_update.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/file_update.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import basic_types_pb2 as services_dot_basic__types__pb2 +from . import timestamp_pb2 as services_dot_timestamp__pb2 +from google.protobuf import wrappers_pb2 as google_dot_protobuf_dot_wrappers__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1aservices/file_update.proto\x12\x05proto\x1a\x1aservices/basic_types.proto\x1a\x18services/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\"\xc0\x01\n\x19\x46ileUpdateTransactionBody\x12\x1d\n\x06\x66ileID\x18\x01 \x01(\x0b\x32\r.proto.FileID\x12(\n\x0e\x65xpirationTime\x18\x02 \x01(\x0b\x32\x10.proto.Timestamp\x12\x1c\n\x04keys\x18\x03 \x01(\x0b\x32\x0e.proto.KeyList\x12\x10\n\x08\x63ontents\x18\x04 \x01(\x0c\x12*\n\x04memo\x18\x05 \x01(\x0b\x32\x1c.google.protobuf.StringValueB&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.file_update_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_FILEUPDATETRANSACTIONBODY']._serialized_start=124 + _globals['_FILEUPDATETRANSACTIONBODY']._serialized_end=316 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/file_update_pb2.pyi b/src/hiero_sdk_python/hapi/services/file_update_pb2.pyi new file mode 100644 index 000000000..b5127c9ff --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/file_update_pb2.pyi @@ -0,0 +1,23 @@ +from . import basic_types_pb2 as _basic_types_pb2 +from . import timestamp_pb2 as _timestamp_pb2 +from google.protobuf import wrappers_pb2 as _wrappers_pb2 +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class FileUpdateTransactionBody(_message.Message): + __slots__ = ("fileID", "expirationTime", "keys", "contents", "memo") + FILEID_FIELD_NUMBER: _ClassVar[int] + EXPIRATIONTIME_FIELD_NUMBER: _ClassVar[int] + KEYS_FIELD_NUMBER: _ClassVar[int] + CONTENTS_FIELD_NUMBER: _ClassVar[int] + MEMO_FIELD_NUMBER: _ClassVar[int] + fileID: _basic_types_pb2.FileID + expirationTime: _timestamp_pb2.Timestamp + keys: _basic_types_pb2.KeyList + contents: bytes + memo: _wrappers_pb2.StringValue + def __init__(self, fileID: _Optional[_Union[_basic_types_pb2.FileID, _Mapping]] = ..., expirationTime: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., keys: _Optional[_Union[_basic_types_pb2.KeyList, _Mapping]] = ..., contents: _Optional[bytes] = ..., memo: _Optional[_Union[_wrappers_pb2.StringValue, _Mapping]] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/file_update_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/file_update_pb2_grpc.py new file mode 100644 index 000000000..388f55195 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/file_update_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/file_update_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/freeze_pb2.py b/src/hiero_sdk_python/hapi/services/freeze_pb2.py new file mode 100644 index 000000000..0ea3ef597 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/freeze_pb2.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/freeze.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/freeze.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import timestamp_pb2 as services_dot_timestamp__pb2 +from . import basic_types_pb2 as services_dot_basic__types__pb2 +from . import freeze_type_pb2 as services_dot_freeze__type__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x15services/freeze.proto\x12\x05proto\x1a\x18services/timestamp.proto\x1a\x1aservices/basic_types.proto\x1a\x1aservices/freeze_type.proto\"\xf2\x01\n\x15\x46reezeTransactionBody\x12\x15\n\tstartHour\x18\x01 \x01(\x05\x42\x02\x18\x01\x12\x14\n\x08startMin\x18\x02 \x01(\x05\x42\x02\x18\x01\x12\x13\n\x07\x65ndHour\x18\x03 \x01(\x05\x42\x02\x18\x01\x12\x12\n\x06\x65ndMin\x18\x04 \x01(\x05\x42\x02\x18\x01\x12\"\n\x0bupdate_file\x18\x05 \x01(\x0b\x32\r.proto.FileID\x12\x11\n\tfile_hash\x18\x06 \x01(\x0c\x12$\n\nstart_time\x18\x07 \x01(\x0b\x32\x10.proto.Timestamp\x12&\n\x0b\x66reeze_type\x18\x08 \x01(\x0e\x32\x11.proto.FreezeTypeB&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.freeze_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_FREEZETRANSACTIONBODY'].fields_by_name['startHour']._loaded_options = None + _globals['_FREEZETRANSACTIONBODY'].fields_by_name['startHour']._serialized_options = b'\030\001' + _globals['_FREEZETRANSACTIONBODY'].fields_by_name['startMin']._loaded_options = None + _globals['_FREEZETRANSACTIONBODY'].fields_by_name['startMin']._serialized_options = b'\030\001' + _globals['_FREEZETRANSACTIONBODY'].fields_by_name['endHour']._loaded_options = None + _globals['_FREEZETRANSACTIONBODY'].fields_by_name['endHour']._serialized_options = b'\030\001' + _globals['_FREEZETRANSACTIONBODY'].fields_by_name['endMin']._loaded_options = None + _globals['_FREEZETRANSACTIONBODY'].fields_by_name['endMin']._serialized_options = b'\030\001' + _globals['_FREEZETRANSACTIONBODY']._serialized_start=115 + _globals['_FREEZETRANSACTIONBODY']._serialized_end=357 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/freeze_pb2.pyi b/src/hiero_sdk_python/hapi/services/freeze_pb2.pyi new file mode 100644 index 000000000..59e52863f --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/freeze_pb2.pyi @@ -0,0 +1,29 @@ +from . import timestamp_pb2 as _timestamp_pb2 +from . import basic_types_pb2 as _basic_types_pb2 +from . import freeze_type_pb2 as _freeze_type_pb2 +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class FreezeTransactionBody(_message.Message): + __slots__ = ("startHour", "startMin", "endHour", "endMin", "update_file", "file_hash", "start_time", "freeze_type") + STARTHOUR_FIELD_NUMBER: _ClassVar[int] + STARTMIN_FIELD_NUMBER: _ClassVar[int] + ENDHOUR_FIELD_NUMBER: _ClassVar[int] + ENDMIN_FIELD_NUMBER: _ClassVar[int] + UPDATE_FILE_FIELD_NUMBER: _ClassVar[int] + FILE_HASH_FIELD_NUMBER: _ClassVar[int] + START_TIME_FIELD_NUMBER: _ClassVar[int] + FREEZE_TYPE_FIELD_NUMBER: _ClassVar[int] + startHour: int + startMin: int + endHour: int + endMin: int + update_file: _basic_types_pb2.FileID + file_hash: bytes + start_time: _timestamp_pb2.Timestamp + freeze_type: _freeze_type_pb2.FreezeType + def __init__(self, startHour: _Optional[int] = ..., startMin: _Optional[int] = ..., endHour: _Optional[int] = ..., endMin: _Optional[int] = ..., update_file: _Optional[_Union[_basic_types_pb2.FileID, _Mapping]] = ..., file_hash: _Optional[bytes] = ..., start_time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., freeze_type: _Optional[_Union[_freeze_type_pb2.FreezeType, str]] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/freeze_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/freeze_pb2_grpc.py new file mode 100644 index 000000000..79c0479ca --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/freeze_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/freeze_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/freeze_service_pb2.py b/src/hiero_sdk_python/hapi/services/freeze_service_pb2.py new file mode 100644 index 000000000..1e3f81333 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/freeze_service_pb2.py @@ -0,0 +1,35 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/freeze_service.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/freeze_service.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import transaction_response_pb2 as services_dot_transaction__response__pb2 +from . import transaction_pb2 as services_dot_transaction__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1dservices/freeze_service.proto\x12\x05proto\x1a#services/transaction_response.proto\x1a\x1aservices/transaction.proto2I\n\rFreezeService\x12\x38\n\x06\x66reeze\x12\x12.proto.Transaction\x1a\x1a.proto.TransactionResponseB(\n&com.hederahashgraph.service.proto.javab\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.freeze_service_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n&com.hederahashgraph.service.proto.java' + _globals['_FREEZESERVICE']._serialized_start=105 + _globals['_FREEZESERVICE']._serialized_end=178 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/freeze_service_pb2.pyi b/src/hiero_sdk_python/hapi/services/freeze_service_pb2.pyi new file mode 100644 index 000000000..4119f125c --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/freeze_service_pb2.pyi @@ -0,0 +1,6 @@ +from . import transaction_response_pb2 as _transaction_response_pb2 +from . import transaction_pb2 as _transaction_pb2 +from google.protobuf import descriptor as _descriptor +from typing import ClassVar as _ClassVar + +DESCRIPTOR: _descriptor.FileDescriptor diff --git a/src/hiero_sdk_python/hapi/services/freeze_service_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/freeze_service_pb2_grpc.py new file mode 100644 index 000000000..7dd5fec68 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/freeze_service_pb2_grpc.py @@ -0,0 +1,121 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings +from . import transaction_pb2 as services_dot_transaction__pb2 +from . import transaction_response_pb2 as services_dot_transaction__response__pb2 +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/freeze_service_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) + + +class FreezeServiceStub(object): + """* + A service to manage network "freeze" events. + + This service provides a facility to prepare for network upgrades, halt network processing, + perform network software upgrades, and automatically restart the network following an upgrade. + """ + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.freeze = channel.unary_unary( + '/proto.FreezeService/freeze', + request_serializer=services_dot_transaction__pb2.Transaction.SerializeToString, + response_deserializer=services_dot_transaction__response__pb2.TransactionResponse.FromString, + _registered_method=True) + + +class FreezeServiceServicer(object): + """* + A service to manage network "freeze" events. + + This service provides a facility to prepare for network upgrades, halt network processing, + perform network software upgrades, and automatically restart the network following an upgrade. + """ + + def freeze(self, request, context): + """* + Freeze, cancel, or prepare a freeze. + This single transaction performs all of the functions supported + by the network freeze service. These functions include actions to + prepare an upgrade, prepare a telemetry upgrade, freeze the network, + freeze the network for upgrade, or abort a scheduled freeze. +

      + The actual freeze action SHALL be determined by the `freeze_type` field + of the `FreezeTransactionBody`.
      + The transaction body MUST be a `FreezeTransactionBody`. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_FreezeServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'freeze': grpc.unary_unary_rpc_method_handler( + servicer.freeze, + request_deserializer=services_dot_transaction__pb2.Transaction.FromString, + response_serializer=services_dot_transaction__response__pb2.TransactionResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'proto.FreezeService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + server.add_registered_method_handlers('proto.FreezeService', rpc_method_handlers) + + + # This class is part of an EXPERIMENTAL API. +class FreezeService(object): + """* + A service to manage network "freeze" events. + + This service provides a facility to prepare for network upgrades, halt network processing, + perform network software upgrades, and automatically restart the network following an upgrade. + """ + + @staticmethod + def freeze(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/proto.FreezeService/freeze', + services_dot_transaction__pb2.Transaction.SerializeToString, + services_dot_transaction__response__pb2.TransactionResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) diff --git a/src/hiero_sdk_python/hapi/services/freeze_type_pb2.py b/src/hiero_sdk_python/hapi/services/freeze_type_pb2.py new file mode 100644 index 000000000..1363d0823 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/freeze_type_pb2.py @@ -0,0 +1,37 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/freeze_type.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/freeze_type.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1aservices/freeze_type.proto\x12\x05proto*\x88\x01\n\nFreezeType\x12\x17\n\x13UNKNOWN_FREEZE_TYPE\x10\x00\x12\x0f\n\x0b\x46REEZE_ONLY\x10\x01\x12\x13\n\x0fPREPARE_UPGRADE\x10\x02\x12\x12\n\x0e\x46REEZE_UPGRADE\x10\x03\x12\x10\n\x0c\x46REEZE_ABORT\x10\x04\x12\x15\n\x11TELEMETRY_UPGRADE\x10\x05\x42&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.freeze_type_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_FREEZETYPE']._serialized_start=38 + _globals['_FREEZETYPE']._serialized_end=174 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/freeze_type_pb2.pyi b/src/hiero_sdk_python/hapi/services/freeze_type_pb2.pyi new file mode 100644 index 000000000..9e154ccd7 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/freeze_type_pb2.pyi @@ -0,0 +1,20 @@ +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper +from google.protobuf import descriptor as _descriptor +from typing import ClassVar as _ClassVar + +DESCRIPTOR: _descriptor.FileDescriptor + +class FreezeType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = () + UNKNOWN_FREEZE_TYPE: _ClassVar[FreezeType] + FREEZE_ONLY: _ClassVar[FreezeType] + PREPARE_UPGRADE: _ClassVar[FreezeType] + FREEZE_UPGRADE: _ClassVar[FreezeType] + FREEZE_ABORT: _ClassVar[FreezeType] + TELEMETRY_UPGRADE: _ClassVar[FreezeType] +UNKNOWN_FREEZE_TYPE: FreezeType +FREEZE_ONLY: FreezeType +PREPARE_UPGRADE: FreezeType +FREEZE_UPGRADE: FreezeType +FREEZE_ABORT: FreezeType +TELEMETRY_UPGRADE: FreezeType diff --git a/src/hiero_sdk_python/hapi/services/freeze_type_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/freeze_type_pb2_grpc.py new file mode 100644 index 000000000..b987ad9c3 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/freeze_type_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/freeze_type_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/get_account_details_pb2.py b/src/hiero_sdk_python/hapi/services/get_account_details_pb2.py new file mode 100644 index 000000000..babb61b1c --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/get_account_details_pb2.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/get_account_details.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/get_account_details.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import timestamp_pb2 as services_dot_timestamp__pb2 +from . import duration_pb2 as services_dot_duration__pb2 +from . import basic_types_pb2 as services_dot_basic__types__pb2 +from . import query_header_pb2 as services_dot_query__header__pb2 +from . import response_header_pb2 as services_dot_response__header__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"services/get_account_details.proto\x12\x05proto\x1a\x18services/timestamp.proto\x1a\x17services/duration.proto\x1a\x1aservices/basic_types.proto\x1a\x1bservices/query_header.proto\x1a\x1eservices/response_header.proto\"b\n\x16GetAccountDetailsQuery\x12\"\n\x06header\x18\x01 \x01(\x0b\x32\x12.proto.QueryHeader\x12$\n\naccount_id\x18\x02 \x01(\x0b\x32\x10.proto.AccountID\"\xbe\x06\n\x19GetAccountDetailsResponse\x12%\n\x06header\x18\x01 \x01(\x0b\x32\x15.proto.ResponseHeader\x12H\n\x0f\x61\x63\x63ount_details\x18\x02 \x01(\x0b\x32/.proto.GetAccountDetailsResponse.AccountDetails\x1a\xaf\x05\n\x0e\x41\x63\x63ountDetails\x12$\n\naccount_id\x18\x01 \x01(\x0b\x32\x10.proto.AccountID\x12\x1b\n\x13\x63ontract_account_id\x18\x02 \x01(\t\x12\x0f\n\x07\x64\x65leted\x18\x03 \x01(\x08\x12.\n\x10proxy_account_id\x18\x04 \x01(\x0b\x32\x10.proto.AccountIDB\x02\x18\x01\x12\x16\n\x0eproxy_received\x18\x05 \x01(\x03\x12\x17\n\x03key\x18\x06 \x01(\x0b\x32\n.proto.Key\x12\x0f\n\x07\x62\x61lance\x18\x07 \x01(\x04\x12\x1d\n\x15receiver_sig_required\x18\x08 \x01(\x08\x12)\n\x0f\x65xpiration_time\x18\t \x01(\x0b\x32\x10.proto.Timestamp\x12*\n\x11\x61uto_renew_period\x18\n \x01(\x0b\x32\x0f.proto.Duration\x12\x35\n\x13token_relationships\x18\x0b \x03(\x0b\x32\x18.proto.TokenRelationship\x12\x0c\n\x04memo\x18\x0c \x01(\t\x12\x12\n\nowned_nfts\x18\r \x01(\x03\x12(\n max_automatic_token_associations\x18\x0e \x01(\x05\x12\r\n\x05\x61lias\x18\x0f \x01(\x0c\x12\x11\n\tledger_id\x18\x10 \x01(\x0c\x12@\n\x19granted_crypto_allowances\x18\x11 \x03(\x0b\x32\x1d.proto.GrantedCryptoAllowance\x12:\n\x16granted_nft_allowances\x18\x12 \x03(\x0b\x32\x1a.proto.GrantedNftAllowance\x12>\n\x18granted_token_allowances\x18\x13 \x03(\x0b\x32\x1c.proto.GrantedTokenAllowance\"K\n\x16GrantedCryptoAllowance\x12!\n\x07spender\x18\x01 \x01(\x0b\x32\x10.proto.AccountID\x12\x0e\n\x06\x61mount\x18\x02 \x01(\x03\"Z\n\x13GrantedNftAllowance\x12 \n\x08token_id\x18\x01 \x01(\x0b\x32\x0e.proto.TokenID\x12!\n\x07spender\x18\x02 \x01(\x0b\x32\x10.proto.AccountID\"l\n\x15GrantedTokenAllowance\x12 \n\x08token_id\x18\x01 \x01(\x0b\x32\x0e.proto.TokenID\x12!\n\x07spender\x18\x02 \x01(\x0b\x32\x10.proto.AccountID\x12\x0e\n\x06\x61mount\x18\x03 \x01(\x03\x42&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.get_account_details_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_GETACCOUNTDETAILSRESPONSE_ACCOUNTDETAILS'].fields_by_name['proxy_account_id']._loaded_options = None + _globals['_GETACCOUNTDETAILSRESPONSE_ACCOUNTDETAILS'].fields_by_name['proxy_account_id']._serialized_options = b'\030\001' + _globals['_GETACCOUNTDETAILSQUERY']._serialized_start=185 + _globals['_GETACCOUNTDETAILSQUERY']._serialized_end=283 + _globals['_GETACCOUNTDETAILSRESPONSE']._serialized_start=286 + _globals['_GETACCOUNTDETAILSRESPONSE']._serialized_end=1116 + _globals['_GETACCOUNTDETAILSRESPONSE_ACCOUNTDETAILS']._serialized_start=429 + _globals['_GETACCOUNTDETAILSRESPONSE_ACCOUNTDETAILS']._serialized_end=1116 + _globals['_GRANTEDCRYPTOALLOWANCE']._serialized_start=1118 + _globals['_GRANTEDCRYPTOALLOWANCE']._serialized_end=1193 + _globals['_GRANTEDNFTALLOWANCE']._serialized_start=1195 + _globals['_GRANTEDNFTALLOWANCE']._serialized_end=1285 + _globals['_GRANTEDTOKENALLOWANCE']._serialized_start=1287 + _globals['_GRANTEDTOKENALLOWANCE']._serialized_end=1395 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/get_account_details_pb2.pyi b/src/hiero_sdk_python/hapi/services/get_account_details_pb2.pyi new file mode 100644 index 000000000..1ae908365 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/get_account_details_pb2.pyi @@ -0,0 +1,95 @@ +from . import timestamp_pb2 as _timestamp_pb2 +from . import duration_pb2 as _duration_pb2 +from . import basic_types_pb2 as _basic_types_pb2 +from . import query_header_pb2 as _query_header_pb2 +from . import response_header_pb2 as _response_header_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Iterable as _Iterable, Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class GetAccountDetailsQuery(_message.Message): + __slots__ = ("header", "account_id") + HEADER_FIELD_NUMBER: _ClassVar[int] + ACCOUNT_ID_FIELD_NUMBER: _ClassVar[int] + header: _query_header_pb2.QueryHeader + account_id: _basic_types_pb2.AccountID + def __init__(self, header: _Optional[_Union[_query_header_pb2.QueryHeader, _Mapping]] = ..., account_id: _Optional[_Union[_basic_types_pb2.AccountID, _Mapping]] = ...) -> None: ... + +class GetAccountDetailsResponse(_message.Message): + __slots__ = ("header", "account_details") + class AccountDetails(_message.Message): + __slots__ = ("account_id", "contract_account_id", "deleted", "proxy_account_id", "proxy_received", "key", "balance", "receiver_sig_required", "expiration_time", "auto_renew_period", "token_relationships", "memo", "owned_nfts", "max_automatic_token_associations", "alias", "ledger_id", "granted_crypto_allowances", "granted_nft_allowances", "granted_token_allowances") + ACCOUNT_ID_FIELD_NUMBER: _ClassVar[int] + CONTRACT_ACCOUNT_ID_FIELD_NUMBER: _ClassVar[int] + DELETED_FIELD_NUMBER: _ClassVar[int] + PROXY_ACCOUNT_ID_FIELD_NUMBER: _ClassVar[int] + PROXY_RECEIVED_FIELD_NUMBER: _ClassVar[int] + KEY_FIELD_NUMBER: _ClassVar[int] + BALANCE_FIELD_NUMBER: _ClassVar[int] + RECEIVER_SIG_REQUIRED_FIELD_NUMBER: _ClassVar[int] + EXPIRATION_TIME_FIELD_NUMBER: _ClassVar[int] + AUTO_RENEW_PERIOD_FIELD_NUMBER: _ClassVar[int] + TOKEN_RELATIONSHIPS_FIELD_NUMBER: _ClassVar[int] + MEMO_FIELD_NUMBER: _ClassVar[int] + OWNED_NFTS_FIELD_NUMBER: _ClassVar[int] + MAX_AUTOMATIC_TOKEN_ASSOCIATIONS_FIELD_NUMBER: _ClassVar[int] + ALIAS_FIELD_NUMBER: _ClassVar[int] + LEDGER_ID_FIELD_NUMBER: _ClassVar[int] + GRANTED_CRYPTO_ALLOWANCES_FIELD_NUMBER: _ClassVar[int] + GRANTED_NFT_ALLOWANCES_FIELD_NUMBER: _ClassVar[int] + GRANTED_TOKEN_ALLOWANCES_FIELD_NUMBER: _ClassVar[int] + account_id: _basic_types_pb2.AccountID + contract_account_id: str + deleted: bool + proxy_account_id: _basic_types_pb2.AccountID + proxy_received: int + key: _basic_types_pb2.Key + balance: int + receiver_sig_required: bool + expiration_time: _timestamp_pb2.Timestamp + auto_renew_period: _duration_pb2.Duration + token_relationships: _containers.RepeatedCompositeFieldContainer[_basic_types_pb2.TokenRelationship] + memo: str + owned_nfts: int + max_automatic_token_associations: int + alias: bytes + ledger_id: bytes + granted_crypto_allowances: _containers.RepeatedCompositeFieldContainer[GrantedCryptoAllowance] + granted_nft_allowances: _containers.RepeatedCompositeFieldContainer[GrantedNftAllowance] + granted_token_allowances: _containers.RepeatedCompositeFieldContainer[GrantedTokenAllowance] + def __init__(self, account_id: _Optional[_Union[_basic_types_pb2.AccountID, _Mapping]] = ..., contract_account_id: _Optional[str] = ..., deleted: bool = ..., proxy_account_id: _Optional[_Union[_basic_types_pb2.AccountID, _Mapping]] = ..., proxy_received: _Optional[int] = ..., key: _Optional[_Union[_basic_types_pb2.Key, _Mapping]] = ..., balance: _Optional[int] = ..., receiver_sig_required: bool = ..., expiration_time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., auto_renew_period: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ..., token_relationships: _Optional[_Iterable[_Union[_basic_types_pb2.TokenRelationship, _Mapping]]] = ..., memo: _Optional[str] = ..., owned_nfts: _Optional[int] = ..., max_automatic_token_associations: _Optional[int] = ..., alias: _Optional[bytes] = ..., ledger_id: _Optional[bytes] = ..., granted_crypto_allowances: _Optional[_Iterable[_Union[GrantedCryptoAllowance, _Mapping]]] = ..., granted_nft_allowances: _Optional[_Iterable[_Union[GrantedNftAllowance, _Mapping]]] = ..., granted_token_allowances: _Optional[_Iterable[_Union[GrantedTokenAllowance, _Mapping]]] = ...) -> None: ... + HEADER_FIELD_NUMBER: _ClassVar[int] + ACCOUNT_DETAILS_FIELD_NUMBER: _ClassVar[int] + header: _response_header_pb2.ResponseHeader + account_details: GetAccountDetailsResponse.AccountDetails + def __init__(self, header: _Optional[_Union[_response_header_pb2.ResponseHeader, _Mapping]] = ..., account_details: _Optional[_Union[GetAccountDetailsResponse.AccountDetails, _Mapping]] = ...) -> None: ... + +class GrantedCryptoAllowance(_message.Message): + __slots__ = ("spender", "amount") + SPENDER_FIELD_NUMBER: _ClassVar[int] + AMOUNT_FIELD_NUMBER: _ClassVar[int] + spender: _basic_types_pb2.AccountID + amount: int + def __init__(self, spender: _Optional[_Union[_basic_types_pb2.AccountID, _Mapping]] = ..., amount: _Optional[int] = ...) -> None: ... + +class GrantedNftAllowance(_message.Message): + __slots__ = ("token_id", "spender") + TOKEN_ID_FIELD_NUMBER: _ClassVar[int] + SPENDER_FIELD_NUMBER: _ClassVar[int] + token_id: _basic_types_pb2.TokenID + spender: _basic_types_pb2.AccountID + def __init__(self, token_id: _Optional[_Union[_basic_types_pb2.TokenID, _Mapping]] = ..., spender: _Optional[_Union[_basic_types_pb2.AccountID, _Mapping]] = ...) -> None: ... + +class GrantedTokenAllowance(_message.Message): + __slots__ = ("token_id", "spender", "amount") + TOKEN_ID_FIELD_NUMBER: _ClassVar[int] + SPENDER_FIELD_NUMBER: _ClassVar[int] + AMOUNT_FIELD_NUMBER: _ClassVar[int] + token_id: _basic_types_pb2.TokenID + spender: _basic_types_pb2.AccountID + amount: int + def __init__(self, token_id: _Optional[_Union[_basic_types_pb2.TokenID, _Mapping]] = ..., spender: _Optional[_Union[_basic_types_pb2.AccountID, _Mapping]] = ..., amount: _Optional[int] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/get_account_details_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/get_account_details_pb2_grpc.py new file mode 100644 index 000000000..041279b4c --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/get_account_details_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/get_account_details_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/get_by_key_pb2.py b/src/hiero_sdk_python/hapi/services/get_by_key_pb2.py new file mode 100644 index 000000000..bcb85629a --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/get_by_key_pb2.py @@ -0,0 +1,47 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/get_by_key.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/get_by_key.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import basic_types_pb2 as services_dot_basic__types__pb2 +from . import query_header_pb2 as services_dot_query__header__pb2 +from . import response_header_pb2 as services_dot_response__header__pb2 +from . import crypto_add_live_hash_pb2 as services_dot_crypto__add__live__hash__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x19services/get_by_key.proto\x12\x05proto\x1a\x1aservices/basic_types.proto\x1a\x1bservices/query_header.proto\x1a\x1eservices/response_header.proto\x1a#services/crypto_add_live_hash.proto\"P\n\rGetByKeyQuery\x12\"\n\x06header\x18\x01 \x01(\x0b\x32\x12.proto.QueryHeader\x12\x17\n\x03key\x18\x02 \x01(\x0b\x32\n.proto.Key:\x02\x18\x01\"\xae\x01\n\x08\x45ntityID\x12%\n\taccountID\x18\x01 \x01(\x0b\x32\x10.proto.AccountIDH\x00\x12#\n\x08liveHash\x18\x02 \x01(\x0b\x32\x0f.proto.LiveHashH\x00\x12\x1f\n\x06\x66ileID\x18\x03 \x01(\x0b\x32\r.proto.FileIDH\x00\x12\'\n\ncontractID\x18\x04 \x01(\x0b\x32\x11.proto.ContractIDH\x00:\x02\x18\x01\x42\x08\n\x06\x65ntity\"`\n\x10GetByKeyResponse\x12%\n\x06header\x18\x01 \x01(\x0b\x32\x15.proto.ResponseHeader\x12!\n\x08\x65ntities\x18\x02 \x03(\x0b\x32\x0f.proto.EntityID:\x02\x18\x01\x42&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.get_by_key_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_GETBYKEYQUERY']._loaded_options = None + _globals['_GETBYKEYQUERY']._serialized_options = b'\030\001' + _globals['_ENTITYID']._loaded_options = None + _globals['_ENTITYID']._serialized_options = b'\030\001' + _globals['_GETBYKEYRESPONSE']._loaded_options = None + _globals['_GETBYKEYRESPONSE']._serialized_options = b'\030\001' + _globals['_GETBYKEYQUERY']._serialized_start=162 + _globals['_GETBYKEYQUERY']._serialized_end=242 + _globals['_ENTITYID']._serialized_start=245 + _globals['_ENTITYID']._serialized_end=419 + _globals['_GETBYKEYRESPONSE']._serialized_start=421 + _globals['_GETBYKEYRESPONSE']._serialized_end=517 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/get_by_key_pb2.pyi b/src/hiero_sdk_python/hapi/services/get_by_key_pb2.pyi new file mode 100644 index 000000000..06787154d --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/get_by_key_pb2.pyi @@ -0,0 +1,39 @@ +from . import basic_types_pb2 as _basic_types_pb2 +from . import query_header_pb2 as _query_header_pb2 +from . import response_header_pb2 as _response_header_pb2 +from . import crypto_add_live_hash_pb2 as _crypto_add_live_hash_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Iterable as _Iterable, Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class GetByKeyQuery(_message.Message): + __slots__ = ("header", "key") + HEADER_FIELD_NUMBER: _ClassVar[int] + KEY_FIELD_NUMBER: _ClassVar[int] + header: _query_header_pb2.QueryHeader + key: _basic_types_pb2.Key + def __init__(self, header: _Optional[_Union[_query_header_pb2.QueryHeader, _Mapping]] = ..., key: _Optional[_Union[_basic_types_pb2.Key, _Mapping]] = ...) -> None: ... + +class EntityID(_message.Message): + __slots__ = ("accountID", "liveHash", "fileID", "contractID") + ACCOUNTID_FIELD_NUMBER: _ClassVar[int] + LIVEHASH_FIELD_NUMBER: _ClassVar[int] + FILEID_FIELD_NUMBER: _ClassVar[int] + CONTRACTID_FIELD_NUMBER: _ClassVar[int] + accountID: _basic_types_pb2.AccountID + liveHash: _crypto_add_live_hash_pb2.LiveHash + fileID: _basic_types_pb2.FileID + contractID: _basic_types_pb2.ContractID + def __init__(self, accountID: _Optional[_Union[_basic_types_pb2.AccountID, _Mapping]] = ..., liveHash: _Optional[_Union[_crypto_add_live_hash_pb2.LiveHash, _Mapping]] = ..., fileID: _Optional[_Union[_basic_types_pb2.FileID, _Mapping]] = ..., contractID: _Optional[_Union[_basic_types_pb2.ContractID, _Mapping]] = ...) -> None: ... + +class GetByKeyResponse(_message.Message): + __slots__ = ("header", "entities") + HEADER_FIELD_NUMBER: _ClassVar[int] + ENTITIES_FIELD_NUMBER: _ClassVar[int] + header: _response_header_pb2.ResponseHeader + entities: _containers.RepeatedCompositeFieldContainer[EntityID] + def __init__(self, header: _Optional[_Union[_response_header_pb2.ResponseHeader, _Mapping]] = ..., entities: _Optional[_Iterable[_Union[EntityID, _Mapping]]] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/get_by_key_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/get_by_key_pb2_grpc.py new file mode 100644 index 000000000..4c3fe45c3 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/get_by_key_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/get_by_key_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/get_by_solidity_id_pb2.py b/src/hiero_sdk_python/hapi/services/get_by_solidity_id_pb2.py new file mode 100644 index 000000000..52c569ea8 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/get_by_solidity_id_pb2.py @@ -0,0 +1,42 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/get_by_solidity_id.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/get_by_solidity_id.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import basic_types_pb2 as services_dot_basic__types__pb2 +from . import query_header_pb2 as services_dot_query__header__pb2 +from . import response_header_pb2 as services_dot_response__header__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!services/get_by_solidity_id.proto\x12\x05proto\x1a\x1aservices/basic_types.proto\x1a\x1bservices/query_header.proto\x1a\x1eservices/response_header.proto\"R\n\x14GetBySolidityIDQuery\x12\"\n\x06header\x18\x01 \x01(\x0b\x32\x12.proto.QueryHeader\x12\x12\n\nsolidityID\x18\x02 \x01(\t:\x02\x18\x01\"\xaf\x01\n\x17GetBySolidityIDResponse\x12%\n\x06header\x18\x01 \x01(\x0b\x32\x15.proto.ResponseHeader\x12#\n\taccountID\x18\x02 \x01(\x0b\x32\x10.proto.AccountID\x12\x1d\n\x06\x66ileID\x18\x03 \x01(\x0b\x32\r.proto.FileID\x12%\n\ncontractID\x18\x04 \x01(\x0b\x32\x11.proto.ContractID:\x02\x18\x01\x42&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.get_by_solidity_id_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_GETBYSOLIDITYIDQUERY']._loaded_options = None + _globals['_GETBYSOLIDITYIDQUERY']._serialized_options = b'\030\001' + _globals['_GETBYSOLIDITYIDRESPONSE']._loaded_options = None + _globals['_GETBYSOLIDITYIDRESPONSE']._serialized_options = b'\030\001' + _globals['_GETBYSOLIDITYIDQUERY']._serialized_start=133 + _globals['_GETBYSOLIDITYIDQUERY']._serialized_end=215 + _globals['_GETBYSOLIDITYIDRESPONSE']._serialized_start=218 + _globals['_GETBYSOLIDITYIDRESPONSE']._serialized_end=393 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/get_by_solidity_id_pb2.pyi b/src/hiero_sdk_python/hapi/services/get_by_solidity_id_pb2.pyi new file mode 100644 index 000000000..fd60faa71 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/get_by_solidity_id_pb2.pyi @@ -0,0 +1,29 @@ +from . import basic_types_pb2 as _basic_types_pb2 +from . import query_header_pb2 as _query_header_pb2 +from . import response_header_pb2 as _response_header_pb2 +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class GetBySolidityIDQuery(_message.Message): + __slots__ = ("header", "solidityID") + HEADER_FIELD_NUMBER: _ClassVar[int] + SOLIDITYID_FIELD_NUMBER: _ClassVar[int] + header: _query_header_pb2.QueryHeader + solidityID: str + def __init__(self, header: _Optional[_Union[_query_header_pb2.QueryHeader, _Mapping]] = ..., solidityID: _Optional[str] = ...) -> None: ... + +class GetBySolidityIDResponse(_message.Message): + __slots__ = ("header", "accountID", "fileID", "contractID") + HEADER_FIELD_NUMBER: _ClassVar[int] + ACCOUNTID_FIELD_NUMBER: _ClassVar[int] + FILEID_FIELD_NUMBER: _ClassVar[int] + CONTRACTID_FIELD_NUMBER: _ClassVar[int] + header: _response_header_pb2.ResponseHeader + accountID: _basic_types_pb2.AccountID + fileID: _basic_types_pb2.FileID + contractID: _basic_types_pb2.ContractID + def __init__(self, header: _Optional[_Union[_response_header_pb2.ResponseHeader, _Mapping]] = ..., accountID: _Optional[_Union[_basic_types_pb2.AccountID, _Mapping]] = ..., fileID: _Optional[_Union[_basic_types_pb2.FileID, _Mapping]] = ..., contractID: _Optional[_Union[_basic_types_pb2.ContractID, _Mapping]] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/get_by_solidity_id_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/get_by_solidity_id_pb2_grpc.py new file mode 100644 index 000000000..d1a58c611 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/get_by_solidity_id_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/get_by_solidity_id_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/hook_dispatch_pb2.py b/src/hiero_sdk_python/hapi/services/hook_dispatch_pb2.py new file mode 100644 index 000000000..f46980652 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/hook_dispatch_pb2.py @@ -0,0 +1,37 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/hook_dispatch.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/hook_dispatch.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import basic_types_pb2 as services_dot_basic__types__pb2 +from . import hook_types_pb2 as services_dot_hook__types__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cservices/hook_dispatch.proto\x12\x1a\x63om.hedera.hapi.node.hooks\x1a\x1aservices/basic_types.proto\x1a\x19services/hook_types.proto\"\xd1\x01\n\x1bHookDispatchTransactionBody\x12*\n\x11hook_id_to_delete\x18\x01 \x01(\x0b\x32\r.proto.HookIdH\x00\x12<\n\x08\x63reation\x18\x02 \x01(\x0b\x32(.com.hedera.hapi.node.hooks.HookCreationH\x00\x12>\n\texecution\x18\x03 \x01(\x0b\x32).com.hedera.hapi.node.hooks.HookExecutionH\x00\x42\x08\n\x06\x61\x63tion\"[\n\rHookExecution\x12+\n\x0ehook_entity_id\x18\x01 \x01(\x0b\x32\x13.proto.HookEntityId\x12\x1d\n\x04\x63\x61ll\x18\x02 \x01(\x0b\x32\x0f.proto.HookCallB%\n!com.hedera.hapi.node.hooks.legacyP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.hook_dispatch_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n!com.hedera.hapi.node.hooks.legacyP\001' + _globals['_HOOKDISPATCHTRANSACTIONBODY']._serialized_start=116 + _globals['_HOOKDISPATCHTRANSACTIONBODY']._serialized_end=325 + _globals['_HOOKEXECUTION']._serialized_start=327 + _globals['_HOOKEXECUTION']._serialized_end=418 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/hook_dispatch_pb2.pyi b/src/hiero_sdk_python/hapi/services/hook_dispatch_pb2.pyi new file mode 100644 index 000000000..e5bf76d82 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/hook_dispatch_pb2.pyi @@ -0,0 +1,26 @@ +from . import basic_types_pb2 as _basic_types_pb2 +from . import hook_types_pb2 as _hook_types_pb2 +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class HookDispatchTransactionBody(_message.Message): + __slots__ = ("hook_id_to_delete", "creation", "execution") + HOOK_ID_TO_DELETE_FIELD_NUMBER: _ClassVar[int] + CREATION_FIELD_NUMBER: _ClassVar[int] + EXECUTION_FIELD_NUMBER: _ClassVar[int] + hook_id_to_delete: _basic_types_pb2.HookId + creation: _hook_types_pb2.HookCreation + execution: HookExecution + def __init__(self, hook_id_to_delete: _Optional[_Union[_basic_types_pb2.HookId, _Mapping]] = ..., creation: _Optional[_Union[_hook_types_pb2.HookCreation, _Mapping]] = ..., execution: _Optional[_Union[HookExecution, _Mapping]] = ...) -> None: ... + +class HookExecution(_message.Message): + __slots__ = ("hook_entity_id", "call") + HOOK_ENTITY_ID_FIELD_NUMBER: _ClassVar[int] + CALL_FIELD_NUMBER: _ClassVar[int] + hook_entity_id: _basic_types_pb2.HookEntityId + call: _basic_types_pb2.HookCall + def __init__(self, hook_entity_id: _Optional[_Union[_basic_types_pb2.HookEntityId, _Mapping]] = ..., call: _Optional[_Union[_basic_types_pb2.HookCall, _Mapping]] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/hook_dispatch_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/hook_dispatch_pb2_grpc.py new file mode 100644 index 000000000..255bb5768 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/hook_dispatch_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/hook_dispatch_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/hook_types_pb2.py b/src/hiero_sdk_python/hapi/services/hook_types_pb2.py new file mode 100644 index 000000000..a8dfd35d5 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/hook_types_pb2.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/hook_types.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/hook_types.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import basic_types_pb2 as services_dot_basic__types__pb2 +from google.protobuf import wrappers_pb2 as google_dot_protobuf_dot_wrappers__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x19services/hook_types.proto\x12\x1a\x63om.hedera.hapi.node.hooks\x1a\x1aservices/basic_types.proto\x1a\x1egoogle/protobuf/wrappers.proto\"\xab\x01\n\x0cHookCreation\x12&\n\tentity_id\x18\x01 \x01(\x0b\x32\x13.proto.HookEntityId\x12@\n\x07\x64\x65tails\x18\x02 \x01(\x0b\x32/.com.hedera.hapi.node.hooks.HookCreationDetails\x12\x31\n\x0cnext_hook_id\x18\t \x01(\x0b\x32\x1b.google.protobuf.Int64Value\"\x9e\x02\n\x13HookCreationDetails\x12G\n\x0f\x65xtension_point\x18\x01 \x01(\x0e\x32..com.hedera.hapi.node.hooks.HookExtensionPoint\x12\x0f\n\x07hook_id\x18\x02 \x01(\x03\x12@\n\rpure_evm_hook\x18\x03 \x01(\x0b\x32\'.com.hedera.hapi.node.hooks.PureEvmHookH\x00\x12\x44\n\x0flambda_evm_hook\x18\x04 \x01(\x0b\x32).com.hedera.hapi.node.hooks.LambdaEvmHookH\x00\x12\x1d\n\tadmin_key\x18\x05 \x01(\x0b\x32\n.proto.KeyB\x06\n\x04hook\"D\n\x0bPureEvmHook\x12\x35\n\x04spec\x18\x01 \x01(\x0b\x32\'.com.hedera.hapi.node.hooks.EvmHookSpec\"\x90\x01\n\rLambdaEvmHook\x12\x35\n\x04spec\x18\x01 \x01(\x0b\x32\'.com.hedera.hapi.node.hooks.EvmHookSpec\x12H\n\x0fstorage_updates\x18\x02 \x03(\x0b\x32/.com.hedera.hapi.node.hooks.LambdaStorageUpdate\"J\n\x0b\x45vmHookSpec\x12(\n\x0b\x63ontract_id\x18\x01 \x01(\x0b\x32\x11.proto.ContractIDH\x00\x42\x11\n\x0f\x62ytecode_source\"\xb3\x01\n\x13LambdaStorageUpdate\x12\x45\n\x0cstorage_slot\x18\x01 \x01(\x0b\x32-.com.hedera.hapi.node.hooks.LambdaStorageSlotH\x00\x12K\n\x0fmapping_entries\x18\x02 \x01(\x0b\x32\x30.com.hedera.hapi.node.hooks.LambdaMappingEntriesH\x00\x42\x08\n\x06update\"m\n\x14LambdaMappingEntries\x12\x14\n\x0cmapping_slot\x18\x01 \x01(\x0c\x12?\n\x07\x65ntries\x18\x02 \x03(\x0b\x32..com.hedera.hapi.node.hooks.LambdaMappingEntry\"S\n\x12LambdaMappingEntry\x12\r\n\x03key\x18\x01 \x01(\x0cH\x00\x12\x12\n\x08preimage\x18\x02 \x01(\x0cH\x00\x12\r\n\x05value\x18\x03 \x01(\x0c\x42\x0b\n\tentry_key\"/\n\x11LambdaStorageSlot\x12\x0b\n\x03key\x18\x01 \x01(\x0c\x12\r\n\x05value\x18\x02 \x01(\x0c*0\n\x12HookExtensionPoint\x12\x1a\n\x16\x41\x43\x43OUNT_ALLOWANCE_HOOK\x10\x00\x42%\n!com.hedera.hapi.node.hooks.legacyP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.hook_types_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n!com.hedera.hapi.node.hooks.legacyP\001' + _globals['_HOOKEXTENSIONPOINT']._serialized_start=1300 + _globals['_HOOKEXTENSIONPOINT']._serialized_end=1348 + _globals['_HOOKCREATION']._serialized_start=118 + _globals['_HOOKCREATION']._serialized_end=289 + _globals['_HOOKCREATIONDETAILS']._serialized_start=292 + _globals['_HOOKCREATIONDETAILS']._serialized_end=578 + _globals['_PUREEVMHOOK']._serialized_start=580 + _globals['_PUREEVMHOOK']._serialized_end=648 + _globals['_LAMBDAEVMHOOK']._serialized_start=651 + _globals['_LAMBDAEVMHOOK']._serialized_end=795 + _globals['_EVMHOOKSPEC']._serialized_start=797 + _globals['_EVMHOOKSPEC']._serialized_end=871 + _globals['_LAMBDASTORAGEUPDATE']._serialized_start=874 + _globals['_LAMBDASTORAGEUPDATE']._serialized_end=1053 + _globals['_LAMBDAMAPPINGENTRIES']._serialized_start=1055 + _globals['_LAMBDAMAPPINGENTRIES']._serialized_end=1164 + _globals['_LAMBDAMAPPINGENTRY']._serialized_start=1166 + _globals['_LAMBDAMAPPINGENTRY']._serialized_end=1249 + _globals['_LAMBDASTORAGESLOT']._serialized_start=1251 + _globals['_LAMBDASTORAGESLOT']._serialized_end=1298 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/hook_types_pb2.pyi b/src/hiero_sdk_python/hapi/services/hook_types_pb2.pyi new file mode 100644 index 000000000..4c242683b --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/hook_types_pb2.pyi @@ -0,0 +1,93 @@ +from . import basic_types_pb2 as _basic_types_pb2 +from google.protobuf import wrappers_pb2 as _wrappers_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Iterable as _Iterable, Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class HookExtensionPoint(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = () + ACCOUNT_ALLOWANCE_HOOK: _ClassVar[HookExtensionPoint] +ACCOUNT_ALLOWANCE_HOOK: HookExtensionPoint + +class HookCreation(_message.Message): + __slots__ = ("entity_id", "details", "next_hook_id") + ENTITY_ID_FIELD_NUMBER: _ClassVar[int] + DETAILS_FIELD_NUMBER: _ClassVar[int] + NEXT_HOOK_ID_FIELD_NUMBER: _ClassVar[int] + entity_id: _basic_types_pb2.HookEntityId + details: HookCreationDetails + next_hook_id: _wrappers_pb2.Int64Value + def __init__(self, entity_id: _Optional[_Union[_basic_types_pb2.HookEntityId, _Mapping]] = ..., details: _Optional[_Union[HookCreationDetails, _Mapping]] = ..., next_hook_id: _Optional[_Union[_wrappers_pb2.Int64Value, _Mapping]] = ...) -> None: ... + +class HookCreationDetails(_message.Message): + __slots__ = ("extension_point", "hook_id", "pure_evm_hook", "lambda_evm_hook", "admin_key") + EXTENSION_POINT_FIELD_NUMBER: _ClassVar[int] + HOOK_ID_FIELD_NUMBER: _ClassVar[int] + PURE_EVM_HOOK_FIELD_NUMBER: _ClassVar[int] + LAMBDA_EVM_HOOK_FIELD_NUMBER: _ClassVar[int] + ADMIN_KEY_FIELD_NUMBER: _ClassVar[int] + extension_point: HookExtensionPoint + hook_id: int + pure_evm_hook: PureEvmHook + lambda_evm_hook: LambdaEvmHook + admin_key: _basic_types_pb2.Key + def __init__(self, extension_point: _Optional[_Union[HookExtensionPoint, str]] = ..., hook_id: _Optional[int] = ..., pure_evm_hook: _Optional[_Union[PureEvmHook, _Mapping]] = ..., lambda_evm_hook: _Optional[_Union[LambdaEvmHook, _Mapping]] = ..., admin_key: _Optional[_Union[_basic_types_pb2.Key, _Mapping]] = ...) -> None: ... + +class PureEvmHook(_message.Message): + __slots__ = ("spec",) + SPEC_FIELD_NUMBER: _ClassVar[int] + spec: EvmHookSpec + def __init__(self, spec: _Optional[_Union[EvmHookSpec, _Mapping]] = ...) -> None: ... + +class LambdaEvmHook(_message.Message): + __slots__ = ("spec", "storage_updates") + SPEC_FIELD_NUMBER: _ClassVar[int] + STORAGE_UPDATES_FIELD_NUMBER: _ClassVar[int] + spec: EvmHookSpec + storage_updates: _containers.RepeatedCompositeFieldContainer[LambdaStorageUpdate] + def __init__(self, spec: _Optional[_Union[EvmHookSpec, _Mapping]] = ..., storage_updates: _Optional[_Iterable[_Union[LambdaStorageUpdate, _Mapping]]] = ...) -> None: ... + +class EvmHookSpec(_message.Message): + __slots__ = ("contract_id",) + CONTRACT_ID_FIELD_NUMBER: _ClassVar[int] + contract_id: _basic_types_pb2.ContractID + def __init__(self, contract_id: _Optional[_Union[_basic_types_pb2.ContractID, _Mapping]] = ...) -> None: ... + +class LambdaStorageUpdate(_message.Message): + __slots__ = ("storage_slot", "mapping_entries") + STORAGE_SLOT_FIELD_NUMBER: _ClassVar[int] + MAPPING_ENTRIES_FIELD_NUMBER: _ClassVar[int] + storage_slot: LambdaStorageSlot + mapping_entries: LambdaMappingEntries + def __init__(self, storage_slot: _Optional[_Union[LambdaStorageSlot, _Mapping]] = ..., mapping_entries: _Optional[_Union[LambdaMappingEntries, _Mapping]] = ...) -> None: ... + +class LambdaMappingEntries(_message.Message): + __slots__ = ("mapping_slot", "entries") + MAPPING_SLOT_FIELD_NUMBER: _ClassVar[int] + ENTRIES_FIELD_NUMBER: _ClassVar[int] + mapping_slot: bytes + entries: _containers.RepeatedCompositeFieldContainer[LambdaMappingEntry] + def __init__(self, mapping_slot: _Optional[bytes] = ..., entries: _Optional[_Iterable[_Union[LambdaMappingEntry, _Mapping]]] = ...) -> None: ... + +class LambdaMappingEntry(_message.Message): + __slots__ = ("key", "preimage", "value") + KEY_FIELD_NUMBER: _ClassVar[int] + PREIMAGE_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + key: bytes + preimage: bytes + value: bytes + def __init__(self, key: _Optional[bytes] = ..., preimage: _Optional[bytes] = ..., value: _Optional[bytes] = ...) -> None: ... + +class LambdaStorageSlot(_message.Message): + __slots__ = ("key", "value") + KEY_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + key: bytes + value: bytes + def __init__(self, key: _Optional[bytes] = ..., value: _Optional[bytes] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/hook_types_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/hook_types_pb2_grpc.py new file mode 100644 index 000000000..4851e5b42 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/hook_types_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/hook_types_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/lambda_sstore_pb2.py b/src/hiero_sdk_python/hapi/services/lambda_sstore_pb2.py new file mode 100644 index 000000000..d6b0eaaf8 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/lambda_sstore_pb2.py @@ -0,0 +1,35 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/lambda_sstore.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/lambda_sstore.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import basic_types_pb2 as services_dot_basic__types__pb2 +from . import hook_types_pb2 as services_dot_hook__types__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cservices/lambda_sstore.proto\x12\x1a\x63om.hedera.hapi.node.hooks\x1a\x1aservices/basic_types.proto\x1a\x19services/hook_types.proto\"\x87\x01\n\x1bLambdaSStoreTransactionBody\x12\x1e\n\x07hook_id\x18\x01 \x01(\x0b\x32\r.proto.HookId\x12H\n\x0fstorage_updates\x18\x02 \x03(\x0b\x32/.com.hedera.hapi.node.hooks.LambdaStorageUpdateB%\n!com.hedera.hapi.node.hooks.legacyP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.lambda_sstore_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n!com.hedera.hapi.node.hooks.legacyP\001' + _globals['_LAMBDASSTORETRANSACTIONBODY']._serialized_start=116 + _globals['_LAMBDASSTORETRANSACTIONBODY']._serialized_end=251 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/lambda_sstore_pb2.pyi b/src/hiero_sdk_python/hapi/services/lambda_sstore_pb2.pyi new file mode 100644 index 000000000..65fa3cf59 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/lambda_sstore_pb2.pyi @@ -0,0 +1,17 @@ +from . import basic_types_pb2 as _basic_types_pb2 +from . import hook_types_pb2 as _hook_types_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Iterable as _Iterable, Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class LambdaSStoreTransactionBody(_message.Message): + __slots__ = ("hook_id", "storage_updates") + HOOK_ID_FIELD_NUMBER: _ClassVar[int] + STORAGE_UPDATES_FIELD_NUMBER: _ClassVar[int] + hook_id: _basic_types_pb2.HookId + storage_updates: _containers.RepeatedCompositeFieldContainer[_hook_types_pb2.LambdaStorageUpdate] + def __init__(self, hook_id: _Optional[_Union[_basic_types_pb2.HookId, _Mapping]] = ..., storage_updates: _Optional[_Iterable[_Union[_hook_types_pb2.LambdaStorageUpdate, _Mapping]]] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/lambda_sstore_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/lambda_sstore_pb2_grpc.py new file mode 100644 index 000000000..31944fc50 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/lambda_sstore_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/lambda_sstore_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/network_get_execution_time_pb2.py b/src/hiero_sdk_python/hapi/services/network_get_execution_time_pb2.py new file mode 100644 index 000000000..74865e909 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/network_get_execution_time_pb2.py @@ -0,0 +1,42 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/network_get_execution_time.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/network_get_execution_time.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import basic_types_pb2 as services_dot_basic__types__pb2 +from . import query_header_pb2 as services_dot_query__header__pb2 +from . import response_header_pb2 as services_dot_response__header__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n)services/network_get_execution_time.proto\x12\x05proto\x1a\x1aservices/basic_types.proto\x1a\x1bservices/query_header.proto\x1a\x1eservices/response_header.proto\"u\n\x1cNetworkGetExecutionTimeQuery\x12\"\n\x06header\x18\x01 \x01(\x0b\x32\x12.proto.QueryHeader\x12-\n\x0ftransaction_ids\x18\x02 \x03(\x0b\x32\x14.proto.TransactionID:\x02\x18\x01\"e\n\x1fNetworkGetExecutionTimeResponse\x12%\n\x06header\x18\x01 \x01(\x0b\x32\x15.proto.ResponseHeader\x12\x17\n\x0f\x65xecution_times\x18\x02 \x03(\x04:\x02\x18\x01\x42&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.network_get_execution_time_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_NETWORKGETEXECUTIONTIMEQUERY']._loaded_options = None + _globals['_NETWORKGETEXECUTIONTIMEQUERY']._serialized_options = b'\030\001' + _globals['_NETWORKGETEXECUTIONTIMERESPONSE']._loaded_options = None + _globals['_NETWORKGETEXECUTIONTIMERESPONSE']._serialized_options = b'\030\001' + _globals['_NETWORKGETEXECUTIONTIMEQUERY']._serialized_start=141 + _globals['_NETWORKGETEXECUTIONTIMEQUERY']._serialized_end=258 + _globals['_NETWORKGETEXECUTIONTIMERESPONSE']._serialized_start=260 + _globals['_NETWORKGETEXECUTIONTIMERESPONSE']._serialized_end=361 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/network_get_execution_time_pb2.pyi b/src/hiero_sdk_python/hapi/services/network_get_execution_time_pb2.pyi new file mode 100644 index 000000000..0940f536c --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/network_get_execution_time_pb2.pyi @@ -0,0 +1,26 @@ +from . import basic_types_pb2 as _basic_types_pb2 +from . import query_header_pb2 as _query_header_pb2 +from . import response_header_pb2 as _response_header_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Iterable as _Iterable, Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class NetworkGetExecutionTimeQuery(_message.Message): + __slots__ = ("header", "transaction_ids") + HEADER_FIELD_NUMBER: _ClassVar[int] + TRANSACTION_IDS_FIELD_NUMBER: _ClassVar[int] + header: _query_header_pb2.QueryHeader + transaction_ids: _containers.RepeatedCompositeFieldContainer[_basic_types_pb2.TransactionID] + def __init__(self, header: _Optional[_Union[_query_header_pb2.QueryHeader, _Mapping]] = ..., transaction_ids: _Optional[_Iterable[_Union[_basic_types_pb2.TransactionID, _Mapping]]] = ...) -> None: ... + +class NetworkGetExecutionTimeResponse(_message.Message): + __slots__ = ("header", "execution_times") + HEADER_FIELD_NUMBER: _ClassVar[int] + EXECUTION_TIMES_FIELD_NUMBER: _ClassVar[int] + header: _response_header_pb2.ResponseHeader + execution_times: _containers.RepeatedScalarFieldContainer[int] + def __init__(self, header: _Optional[_Union[_response_header_pb2.ResponseHeader, _Mapping]] = ..., execution_times: _Optional[_Iterable[int]] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/network_get_execution_time_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/network_get_execution_time_pb2_grpc.py new file mode 100644 index 000000000..0a4dcb6b5 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/network_get_execution_time_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/network_get_execution_time_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/network_get_version_info_pb2.py b/src/hiero_sdk_python/hapi/services/network_get_version_info_pb2.py new file mode 100644 index 000000000..def90b78f --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/network_get_version_info_pb2.py @@ -0,0 +1,38 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/network_get_version_info.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/network_get_version_info.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import basic_types_pb2 as services_dot_basic__types__pb2 +from . import query_header_pb2 as services_dot_query__header__pb2 +from . import response_header_pb2 as services_dot_response__header__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\'services/network_get_version_info.proto\x12\x05proto\x1a\x1aservices/basic_types.proto\x1a\x1bservices/query_header.proto\x1a\x1eservices/response_header.proto\"@\n\x1aNetworkGetVersionInfoQuery\x12\"\n\x06header\x18\x01 \x01(\x0b\x32\x12.proto.QueryHeader\"\xaf\x01\n\x1dNetworkGetVersionInfoResponse\x12%\n\x06header\x18\x01 \x01(\x0b\x32\x15.proto.ResponseHeader\x12\x30\n\x10hapiProtoVersion\x18\x02 \x01(\x0b\x32\x16.proto.SemanticVersion\x12\x35\n\x15hederaServicesVersion\x18\x03 \x01(\x0b\x32\x16.proto.SemanticVersionB&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.network_get_version_info_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_NETWORKGETVERSIONINFOQUERY']._serialized_start=139 + _globals['_NETWORKGETVERSIONINFOQUERY']._serialized_end=203 + _globals['_NETWORKGETVERSIONINFORESPONSE']._serialized_start=206 + _globals['_NETWORKGETVERSIONINFORESPONSE']._serialized_end=381 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/network_get_version_info_pb2.pyi b/src/hiero_sdk_python/hapi/services/network_get_version_info_pb2.pyi new file mode 100644 index 000000000..1ea2b92b2 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/network_get_version_info_pb2.pyi @@ -0,0 +1,25 @@ +from . import basic_types_pb2 as _basic_types_pb2 +from . import query_header_pb2 as _query_header_pb2 +from . import response_header_pb2 as _response_header_pb2 +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class NetworkGetVersionInfoQuery(_message.Message): + __slots__ = ("header",) + HEADER_FIELD_NUMBER: _ClassVar[int] + header: _query_header_pb2.QueryHeader + def __init__(self, header: _Optional[_Union[_query_header_pb2.QueryHeader, _Mapping]] = ...) -> None: ... + +class NetworkGetVersionInfoResponse(_message.Message): + __slots__ = ("header", "hapiProtoVersion", "hederaServicesVersion") + HEADER_FIELD_NUMBER: _ClassVar[int] + HAPIPROTOVERSION_FIELD_NUMBER: _ClassVar[int] + HEDERASERVICESVERSION_FIELD_NUMBER: _ClassVar[int] + header: _response_header_pb2.ResponseHeader + hapiProtoVersion: _basic_types_pb2.SemanticVersion + hederaServicesVersion: _basic_types_pb2.SemanticVersion + def __init__(self, header: _Optional[_Union[_response_header_pb2.ResponseHeader, _Mapping]] = ..., hapiProtoVersion: _Optional[_Union[_basic_types_pb2.SemanticVersion, _Mapping]] = ..., hederaServicesVersion: _Optional[_Union[_basic_types_pb2.SemanticVersion, _Mapping]] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/network_get_version_info_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/network_get_version_info_pb2_grpc.py new file mode 100644 index 000000000..3f36cf86d --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/network_get_version_info_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/network_get_version_info_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/network_service_pb2.py b/src/hiero_sdk_python/hapi/services/network_service_pb2.py new file mode 100644 index 000000000..00b741ff4 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/network_service_pb2.py @@ -0,0 +1,41 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/network_service.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/network_service.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import query_pb2 as services_dot_query__pb2 +from . import response_pb2 as services_dot_response__pb2 +from . import transaction_response_pb2 as services_dot_transaction__response__pb2 +from . import transaction_pb2 as services_dot_transaction__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1eservices/network_service.proto\x12\x05proto\x1a\x14services/query.proto\x1a\x17services/response.proto\x1a#services/transaction_response.proto\x1a\x1aservices/transaction.proto2\xf5\x01\n\x0eNetworkService\x12/\n\x0egetVersionInfo\x12\x0c.proto.Query\x1a\x0f.proto.Response\x12\x32\n\x11getAccountDetails\x12\x0c.proto.Query\x1a\x0f.proto.Response\x12\x36\n\x10getExecutionTime\x12\x0c.proto.Query\x1a\x0f.proto.Response\"\x03\x88\x02\x01\x12\x46\n\x0funcheckedSubmit\x12\x12.proto.Transaction\x1a\x1a.proto.TransactionResponse\"\x03\x88\x02\x01\x42(\n&com.hederahashgraph.service.proto.javab\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.network_service_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n&com.hederahashgraph.service.proto.java' + _globals['_NETWORKSERVICE'].methods_by_name['getExecutionTime']._loaded_options = None + _globals['_NETWORKSERVICE'].methods_by_name['getExecutionTime']._serialized_options = b'\210\002\001' + _globals['_NETWORKSERVICE'].methods_by_name['uncheckedSubmit']._loaded_options = None + _globals['_NETWORKSERVICE'].methods_by_name['uncheckedSubmit']._serialized_options = b'\210\002\001' + _globals['_NETWORKSERVICE']._serialized_start=154 + _globals['_NETWORKSERVICE']._serialized_end=399 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/network_service_pb2.pyi b/src/hiero_sdk_python/hapi/services/network_service_pb2.pyi new file mode 100644 index 000000000..ce90eb498 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/network_service_pb2.pyi @@ -0,0 +1,8 @@ +from . import query_pb2 as _query_pb2 +from . import response_pb2 as _response_pb2 +from . import transaction_response_pb2 as _transaction_response_pb2 +from . import transaction_pb2 as _transaction_pb2 +from google.protobuf import descriptor as _descriptor +from typing import ClassVar as _ClassVar + +DESCRIPTOR: _descriptor.FileDescriptor diff --git a/src/hiero_sdk_python/hapi/services/network_service_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/network_service_pb2_grpc.py new file mode 100644 index 000000000..ca630ebfe --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/network_service_pb2_grpc.py @@ -0,0 +1,272 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings +from . import query_pb2 as services_dot_query__pb2 +from . import response_pb2 as services_dot_response__pb2 +from . import transaction_pb2 as services_dot_transaction__pb2 +from . import transaction_response_pb2 as services_dot_transaction__response__pb2 +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/network_service_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) + + +class NetworkServiceStub(object): + """* + Basic "network information" queries. + + This service supports queries for the active services and API versions, + and a query for account details. + """ + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.getVersionInfo = channel.unary_unary( + '/proto.NetworkService/getVersionInfo', + request_serializer=services_dot_query__pb2.Query.SerializeToString, + response_deserializer=services_dot_response__pb2.Response.FromString, + _registered_method=True) + self.getAccountDetails = channel.unary_unary( + '/proto.NetworkService/getAccountDetails', + request_serializer=services_dot_query__pb2.Query.SerializeToString, + response_deserializer=services_dot_response__pb2.Response.FromString, + _registered_method=True) + self.getExecutionTime = channel.unary_unary( + '/proto.NetworkService/getExecutionTime', + request_serializer=services_dot_query__pb2.Query.SerializeToString, + response_deserializer=services_dot_response__pb2.Response.FromString, + _registered_method=True) + self.uncheckedSubmit = channel.unary_unary( + '/proto.NetworkService/uncheckedSubmit', + request_serializer=services_dot_transaction__pb2.Transaction.SerializeToString, + response_deserializer=services_dot_transaction__response__pb2.TransactionResponse.FromString, + _registered_method=True) + + +class NetworkServiceServicer(object): + """* + Basic "network information" queries. + + This service supports queries for the active services and API versions, + and a query for account details. + """ + + def getVersionInfo(self, request, context): + """* + Retrieve the active versions of Hedera Services and API messages. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def getAccountDetails(self, request, context): + """* + Request detail information about an account. +

      + The returned information SHALL include balance and allowances.
      + The returned information SHALL NOT include a list of account records. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def getExecutionTime(self, request, context): + """* + Retrieve the time, in nanoseconds, spent in direct processing for one or + more recent transactions. +

      + For each transaction identifier provided, if that transaction is + sufficiently recent (that is, it is within the range of the + configuration value `stats.executionTimesToTrack`), the node SHALL + return the time, in nanoseconds, spent to directly process that + transaction (that is, excluding time to reach consensus).
      + Note that because each node processes every transaction for the Hedera + network, this query MAY be sent to any node. +

      +

      Important
      + This query is obsolete, not supported, and SHALL fail with a pre-check + result of `NOT_SUPPORTED`.
      + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def uncheckedSubmit(self, request, context): + """* + Submit a transaction that wraps another transaction which will + skip most validation. +

      +

      Important
      + This query is obsolete, not supported, and SHALL fail with a pre-check + result of `NOT_SUPPORTED`. +
      + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_NetworkServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'getVersionInfo': grpc.unary_unary_rpc_method_handler( + servicer.getVersionInfo, + request_deserializer=services_dot_query__pb2.Query.FromString, + response_serializer=services_dot_response__pb2.Response.SerializeToString, + ), + 'getAccountDetails': grpc.unary_unary_rpc_method_handler( + servicer.getAccountDetails, + request_deserializer=services_dot_query__pb2.Query.FromString, + response_serializer=services_dot_response__pb2.Response.SerializeToString, + ), + 'getExecutionTime': grpc.unary_unary_rpc_method_handler( + servicer.getExecutionTime, + request_deserializer=services_dot_query__pb2.Query.FromString, + response_serializer=services_dot_response__pb2.Response.SerializeToString, + ), + 'uncheckedSubmit': grpc.unary_unary_rpc_method_handler( + servicer.uncheckedSubmit, + request_deserializer=services_dot_transaction__pb2.Transaction.FromString, + response_serializer=services_dot_transaction__response__pb2.TransactionResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'proto.NetworkService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + server.add_registered_method_handlers('proto.NetworkService', rpc_method_handlers) + + + # This class is part of an EXPERIMENTAL API. +class NetworkService(object): + """* + Basic "network information" queries. + + This service supports queries for the active services and API versions, + and a query for account details. + """ + + @staticmethod + def getVersionInfo(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/proto.NetworkService/getVersionInfo', + services_dot_query__pb2.Query.SerializeToString, + services_dot_response__pb2.Response.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def getAccountDetails(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/proto.NetworkService/getAccountDetails', + services_dot_query__pb2.Query.SerializeToString, + services_dot_response__pb2.Response.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def getExecutionTime(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/proto.NetworkService/getExecutionTime', + services_dot_query__pb2.Query.SerializeToString, + services_dot_response__pb2.Response.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def uncheckedSubmit(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/proto.NetworkService/uncheckedSubmit', + services_dot_transaction__pb2.Transaction.SerializeToString, + services_dot_transaction__response__pb2.TransactionResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) diff --git a/src/hiero_sdk_python/hapi/services/node_create_pb2.py b/src/hiero_sdk_python/hapi/services/node_create_pb2.py new file mode 100644 index 000000000..d6c7a9695 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/node_create_pb2.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/node_create.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/node_create.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import basic_types_pb2 as services_dot_basic__types__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1aservices/node_create.proto\x12 com.hedera.hapi.node.addressbook\x1a\x1aservices/basic_types.proto\"\xe3\x02\n\x19NodeCreateTransactionBody\x12$\n\naccount_id\x18\x01 \x01(\x0b\x32\x10.proto.AccountID\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12/\n\x0fgossip_endpoint\x18\x03 \x03(\x0b\x32\x16.proto.ServiceEndpoint\x12\x30\n\x10service_endpoint\x18\x04 \x03(\x0b\x32\x16.proto.ServiceEndpoint\x12\x1d\n\x15gossip_ca_certificate\x18\x05 \x01(\x0c\x12\x1d\n\x15grpc_certificate_hash\x18\x06 \x01(\x0c\x12\x1d\n\tadmin_key\x18\x07 \x01(\x0b\x32\n.proto.Key\x12\x16\n\x0e\x64\x65\x63line_reward\x18\x08 \x01(\x08\x12\x33\n\x13grpc_proxy_endpoint\x18\t \x01(\x0b\x32\x16.proto.ServiceEndpointB&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.node_create_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_NODECREATETRANSACTIONBODY']._serialized_start=93 + _globals['_NODECREATETRANSACTIONBODY']._serialized_end=448 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/node_create_pb2.pyi b/src/hiero_sdk_python/hapi/services/node_create_pb2.pyi new file mode 100644 index 000000000..d5e7aa5d3 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/node_create_pb2.pyi @@ -0,0 +1,30 @@ +from . import basic_types_pb2 as _basic_types_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Iterable as _Iterable, Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class NodeCreateTransactionBody(_message.Message): + __slots__ = ("account_id", "description", "gossip_endpoint", "service_endpoint", "gossip_ca_certificate", "grpc_certificate_hash", "admin_key", "decline_reward", "grpc_proxy_endpoint") + ACCOUNT_ID_FIELD_NUMBER: _ClassVar[int] + DESCRIPTION_FIELD_NUMBER: _ClassVar[int] + GOSSIP_ENDPOINT_FIELD_NUMBER: _ClassVar[int] + SERVICE_ENDPOINT_FIELD_NUMBER: _ClassVar[int] + GOSSIP_CA_CERTIFICATE_FIELD_NUMBER: _ClassVar[int] + GRPC_CERTIFICATE_HASH_FIELD_NUMBER: _ClassVar[int] + ADMIN_KEY_FIELD_NUMBER: _ClassVar[int] + DECLINE_REWARD_FIELD_NUMBER: _ClassVar[int] + GRPC_PROXY_ENDPOINT_FIELD_NUMBER: _ClassVar[int] + account_id: _basic_types_pb2.AccountID + description: str + gossip_endpoint: _containers.RepeatedCompositeFieldContainer[_basic_types_pb2.ServiceEndpoint] + service_endpoint: _containers.RepeatedCompositeFieldContainer[_basic_types_pb2.ServiceEndpoint] + gossip_ca_certificate: bytes + grpc_certificate_hash: bytes + admin_key: _basic_types_pb2.Key + decline_reward: bool + grpc_proxy_endpoint: _basic_types_pb2.ServiceEndpoint + def __init__(self, account_id: _Optional[_Union[_basic_types_pb2.AccountID, _Mapping]] = ..., description: _Optional[str] = ..., gossip_endpoint: _Optional[_Iterable[_Union[_basic_types_pb2.ServiceEndpoint, _Mapping]]] = ..., service_endpoint: _Optional[_Iterable[_Union[_basic_types_pb2.ServiceEndpoint, _Mapping]]] = ..., gossip_ca_certificate: _Optional[bytes] = ..., grpc_certificate_hash: _Optional[bytes] = ..., admin_key: _Optional[_Union[_basic_types_pb2.Key, _Mapping]] = ..., decline_reward: bool = ..., grpc_proxy_endpoint: _Optional[_Union[_basic_types_pb2.ServiceEndpoint, _Mapping]] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/node_create_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/node_create_pb2_grpc.py new file mode 100644 index 000000000..5494b135d --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/node_create_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/node_create_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/node_delete_pb2.py b/src/hiero_sdk_python/hapi/services/node_delete_pb2.py new file mode 100644 index 000000000..374cd12ee --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/node_delete_pb2.py @@ -0,0 +1,37 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/node_delete.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/node_delete.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1aservices/node_delete.proto\x12 com.hedera.hapi.node.addressbook\",\n\x19NodeDeleteTransactionBody\x12\x0f\n\x07node_id\x18\x01 \x01(\x04\x42&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.node_delete_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_NODEDELETETRANSACTIONBODY']._serialized_start=64 + _globals['_NODEDELETETRANSACTIONBODY']._serialized_end=108 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/node_delete_pb2.pyi b/src/hiero_sdk_python/hapi/services/node_delete_pb2.pyi new file mode 100644 index 000000000..d09ab9947 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/node_delete_pb2.pyi @@ -0,0 +1,11 @@ +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Optional as _Optional + +DESCRIPTOR: _descriptor.FileDescriptor + +class NodeDeleteTransactionBody(_message.Message): + __slots__ = ("node_id",) + NODE_ID_FIELD_NUMBER: _ClassVar[int] + node_id: int + def __init__(self, node_id: _Optional[int] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/node_delete_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/node_delete_pb2_grpc.py new file mode 100644 index 000000000..706dca922 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/node_delete_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/node_delete_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/node_stake_update_pb2.py b/src/hiero_sdk_python/hapi/services/node_stake_update_pb2.py new file mode 100644 index 000000000..4c77a6e8d --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/node_stake_update_pb2.py @@ -0,0 +1,39 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/node_stake_update.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/node_stake_update.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import basic_types_pb2 as services_dot_basic__types__pb2 +from . import timestamp_pb2 as services_dot_timestamp__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n services/node_stake_update.proto\x12\x05proto\x1a\x1aservices/basic_types.proto\x1a\x18services/timestamp.proto\"\xa9\x04\n\x1eNodeStakeUpdateTransactionBody\x12/\n\x15\x65nd_of_staking_period\x18\x01 \x01(\x0b\x32\x10.proto.Timestamp\x12$\n\nnode_stake\x18\x02 \x03(\x0b\x32\x10.proto.NodeStake\x12(\n max_staking_reward_rate_per_hbar\x18\x03 \x01(\x03\x12\x31\n\x18node_reward_fee_fraction\x18\x04 \x01(\x0b\x32\x0f.proto.Fraction\x12\x1e\n\x16staking_periods_stored\x18\x05 \x01(\x03\x12\x16\n\x0estaking_period\x18\x06 \x01(\x03\x12\x34\n\x1bstaking_reward_fee_fraction\x18\x07 \x01(\x0b\x32\x0f.proto.Fraction\x12\x1f\n\x17staking_start_threshold\x18\x08 \x01(\x03\x12\x1f\n\x13staking_reward_rate\x18\t \x01(\x03\x42\x02\x18\x01\x12 \n\x18reserved_staking_rewards\x18\n \x01(\x03\x12)\n!unreserved_staking_reward_balance\x18\x0b \x01(\x03\x12 \n\x18reward_balance_threshold\x18\x0c \x01(\x03\x12\x1a\n\x12max_stake_rewarded\x18\r \x01(\x03\x12\x18\n\x10max_total_reward\x18\x0e \x01(\x03\"\x9a\x01\n\tNodeStake\x12\x11\n\tmax_stake\x18\x01 \x01(\x03\x12\x11\n\tmin_stake\x18\x02 \x01(\x03\x12\x0f\n\x07node_id\x18\x03 \x01(\x03\x12\x13\n\x0breward_rate\x18\x04 \x01(\x03\x12\r\n\x05stake\x18\x05 \x01(\x03\x12\x1a\n\x12stake_not_rewarded\x18\x06 \x01(\x03\x12\x16\n\x0estake_rewarded\x18\x07 \x01(\x03\x42&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.node_stake_update_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_NODESTAKEUPDATETRANSACTIONBODY'].fields_by_name['staking_reward_rate']._loaded_options = None + _globals['_NODESTAKEUPDATETRANSACTIONBODY'].fields_by_name['staking_reward_rate']._serialized_options = b'\030\001' + _globals['_NODESTAKEUPDATETRANSACTIONBODY']._serialized_start=98 + _globals['_NODESTAKEUPDATETRANSACTIONBODY']._serialized_end=651 + _globals['_NODESTAKE']._serialized_start=654 + _globals['_NODESTAKE']._serialized_end=808 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/node_stake_update_pb2.pyi b/src/hiero_sdk_python/hapi/services/node_stake_update_pb2.pyi new file mode 100644 index 000000000..e35bc8144 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/node_stake_update_pb2.pyi @@ -0,0 +1,59 @@ +from . import basic_types_pb2 as _basic_types_pb2 +from . import timestamp_pb2 as _timestamp_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Iterable as _Iterable, Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class NodeStakeUpdateTransactionBody(_message.Message): + __slots__ = ("end_of_staking_period", "node_stake", "max_staking_reward_rate_per_hbar", "node_reward_fee_fraction", "staking_periods_stored", "staking_period", "staking_reward_fee_fraction", "staking_start_threshold", "staking_reward_rate", "reserved_staking_rewards", "unreserved_staking_reward_balance", "reward_balance_threshold", "max_stake_rewarded", "max_total_reward") + END_OF_STAKING_PERIOD_FIELD_NUMBER: _ClassVar[int] + NODE_STAKE_FIELD_NUMBER: _ClassVar[int] + MAX_STAKING_REWARD_RATE_PER_HBAR_FIELD_NUMBER: _ClassVar[int] + NODE_REWARD_FEE_FRACTION_FIELD_NUMBER: _ClassVar[int] + STAKING_PERIODS_STORED_FIELD_NUMBER: _ClassVar[int] + STAKING_PERIOD_FIELD_NUMBER: _ClassVar[int] + STAKING_REWARD_FEE_FRACTION_FIELD_NUMBER: _ClassVar[int] + STAKING_START_THRESHOLD_FIELD_NUMBER: _ClassVar[int] + STAKING_REWARD_RATE_FIELD_NUMBER: _ClassVar[int] + RESERVED_STAKING_REWARDS_FIELD_NUMBER: _ClassVar[int] + UNRESERVED_STAKING_REWARD_BALANCE_FIELD_NUMBER: _ClassVar[int] + REWARD_BALANCE_THRESHOLD_FIELD_NUMBER: _ClassVar[int] + MAX_STAKE_REWARDED_FIELD_NUMBER: _ClassVar[int] + MAX_TOTAL_REWARD_FIELD_NUMBER: _ClassVar[int] + end_of_staking_period: _timestamp_pb2.Timestamp + node_stake: _containers.RepeatedCompositeFieldContainer[NodeStake] + max_staking_reward_rate_per_hbar: int + node_reward_fee_fraction: _basic_types_pb2.Fraction + staking_periods_stored: int + staking_period: int + staking_reward_fee_fraction: _basic_types_pb2.Fraction + staking_start_threshold: int + staking_reward_rate: int + reserved_staking_rewards: int + unreserved_staking_reward_balance: int + reward_balance_threshold: int + max_stake_rewarded: int + max_total_reward: int + def __init__(self, end_of_staking_period: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., node_stake: _Optional[_Iterable[_Union[NodeStake, _Mapping]]] = ..., max_staking_reward_rate_per_hbar: _Optional[int] = ..., node_reward_fee_fraction: _Optional[_Union[_basic_types_pb2.Fraction, _Mapping]] = ..., staking_periods_stored: _Optional[int] = ..., staking_period: _Optional[int] = ..., staking_reward_fee_fraction: _Optional[_Union[_basic_types_pb2.Fraction, _Mapping]] = ..., staking_start_threshold: _Optional[int] = ..., staking_reward_rate: _Optional[int] = ..., reserved_staking_rewards: _Optional[int] = ..., unreserved_staking_reward_balance: _Optional[int] = ..., reward_balance_threshold: _Optional[int] = ..., max_stake_rewarded: _Optional[int] = ..., max_total_reward: _Optional[int] = ...) -> None: ... + +class NodeStake(_message.Message): + __slots__ = ("max_stake", "min_stake", "node_id", "reward_rate", "stake", "stake_not_rewarded", "stake_rewarded") + MAX_STAKE_FIELD_NUMBER: _ClassVar[int] + MIN_STAKE_FIELD_NUMBER: _ClassVar[int] + NODE_ID_FIELD_NUMBER: _ClassVar[int] + REWARD_RATE_FIELD_NUMBER: _ClassVar[int] + STAKE_FIELD_NUMBER: _ClassVar[int] + STAKE_NOT_REWARDED_FIELD_NUMBER: _ClassVar[int] + STAKE_REWARDED_FIELD_NUMBER: _ClassVar[int] + max_stake: int + min_stake: int + node_id: int + reward_rate: int + stake: int + stake_not_rewarded: int + stake_rewarded: int + def __init__(self, max_stake: _Optional[int] = ..., min_stake: _Optional[int] = ..., node_id: _Optional[int] = ..., reward_rate: _Optional[int] = ..., stake: _Optional[int] = ..., stake_not_rewarded: _Optional[int] = ..., stake_rewarded: _Optional[int] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/node_stake_update_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/node_stake_update_pb2_grpc.py new file mode 100644 index 000000000..8c71720e6 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/node_stake_update_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/node_stake_update_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/node_update_pb2.py b/src/hiero_sdk_python/hapi/services/node_update_pb2.py new file mode 100644 index 000000000..84c754cd8 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/node_update_pb2.py @@ -0,0 +1,37 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/node_update.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/node_update.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from google.protobuf import wrappers_pb2 as google_dot_protobuf_dot_wrappers__pb2 +from . import basic_types_pb2 as services_dot_basic__types__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1aservices/node_update.proto\x12 com.hedera.hapi.node.addressbook\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x1aservices/basic_types.proto\"\xe8\x03\n\x19NodeUpdateTransactionBody\x12\x0f\n\x07node_id\x18\x01 \x01(\x04\x12$\n\naccount_id\x18\x02 \x01(\x0b\x32\x10.proto.AccountID\x12\x31\n\x0b\x64\x65scription\x18\x03 \x01(\x0b\x32\x1c.google.protobuf.StringValue\x12/\n\x0fgossip_endpoint\x18\x04 \x03(\x0b\x32\x16.proto.ServiceEndpoint\x12\x30\n\x10service_endpoint\x18\x05 \x03(\x0b\x32\x16.proto.ServiceEndpoint\x12:\n\x15gossip_ca_certificate\x18\x06 \x01(\x0b\x32\x1b.google.protobuf.BytesValue\x12:\n\x15grpc_certificate_hash\x18\x07 \x01(\x0b\x32\x1b.google.protobuf.BytesValue\x12\x1d\n\tadmin_key\x18\x08 \x01(\x0b\x32\n.proto.Key\x12\x32\n\x0e\x64\x65\x63line_reward\x18\t \x01(\x0b\x32\x1a.google.protobuf.BoolValue\x12\x33\n\x13grpc_proxy_endpoint\x18\n \x01(\x0b\x32\x16.proto.ServiceEndpointB&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.node_update_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_NODEUPDATETRANSACTIONBODY']._serialized_start=125 + _globals['_NODEUPDATETRANSACTIONBODY']._serialized_end=613 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/node_update_pb2.pyi b/src/hiero_sdk_python/hapi/services/node_update_pb2.pyi new file mode 100644 index 000000000..ae3611ee7 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/node_update_pb2.pyi @@ -0,0 +1,33 @@ +from google.protobuf import wrappers_pb2 as _wrappers_pb2 +from . import basic_types_pb2 as _basic_types_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Iterable as _Iterable, Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class NodeUpdateTransactionBody(_message.Message): + __slots__ = ("node_id", "account_id", "description", "gossip_endpoint", "service_endpoint", "gossip_ca_certificate", "grpc_certificate_hash", "admin_key", "decline_reward", "grpc_proxy_endpoint") + NODE_ID_FIELD_NUMBER: _ClassVar[int] + ACCOUNT_ID_FIELD_NUMBER: _ClassVar[int] + DESCRIPTION_FIELD_NUMBER: _ClassVar[int] + GOSSIP_ENDPOINT_FIELD_NUMBER: _ClassVar[int] + SERVICE_ENDPOINT_FIELD_NUMBER: _ClassVar[int] + GOSSIP_CA_CERTIFICATE_FIELD_NUMBER: _ClassVar[int] + GRPC_CERTIFICATE_HASH_FIELD_NUMBER: _ClassVar[int] + ADMIN_KEY_FIELD_NUMBER: _ClassVar[int] + DECLINE_REWARD_FIELD_NUMBER: _ClassVar[int] + GRPC_PROXY_ENDPOINT_FIELD_NUMBER: _ClassVar[int] + node_id: int + account_id: _basic_types_pb2.AccountID + description: _wrappers_pb2.StringValue + gossip_endpoint: _containers.RepeatedCompositeFieldContainer[_basic_types_pb2.ServiceEndpoint] + service_endpoint: _containers.RepeatedCompositeFieldContainer[_basic_types_pb2.ServiceEndpoint] + gossip_ca_certificate: _wrappers_pb2.BytesValue + grpc_certificate_hash: _wrappers_pb2.BytesValue + admin_key: _basic_types_pb2.Key + decline_reward: _wrappers_pb2.BoolValue + grpc_proxy_endpoint: _basic_types_pb2.ServiceEndpoint + def __init__(self, node_id: _Optional[int] = ..., account_id: _Optional[_Union[_basic_types_pb2.AccountID, _Mapping]] = ..., description: _Optional[_Union[_wrappers_pb2.StringValue, _Mapping]] = ..., gossip_endpoint: _Optional[_Iterable[_Union[_basic_types_pb2.ServiceEndpoint, _Mapping]]] = ..., service_endpoint: _Optional[_Iterable[_Union[_basic_types_pb2.ServiceEndpoint, _Mapping]]] = ..., gossip_ca_certificate: _Optional[_Union[_wrappers_pb2.BytesValue, _Mapping]] = ..., grpc_certificate_hash: _Optional[_Union[_wrappers_pb2.BytesValue, _Mapping]] = ..., admin_key: _Optional[_Union[_basic_types_pb2.Key, _Mapping]] = ..., decline_reward: _Optional[_Union[_wrappers_pb2.BoolValue, _Mapping]] = ..., grpc_proxy_endpoint: _Optional[_Union[_basic_types_pb2.ServiceEndpoint, _Mapping]] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/node_update_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/node_update_pb2_grpc.py new file mode 100644 index 000000000..1fa6719bc --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/node_update_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/node_update_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/query_header_pb2.py b/src/hiero_sdk_python/hapi/services/query_header_pb2.py new file mode 100644 index 000000000..4a90a969f --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/query_header_pb2.py @@ -0,0 +1,36 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/query_header.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/query_header.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import transaction_pb2 as services_dot_transaction__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1bservices/query_header.proto\x12\x05proto\x1a\x1aservices/transaction.proto\"]\n\x0bQueryHeader\x12#\n\x07payment\x18\x01 \x01(\x0b\x32\x12.proto.Transaction\x12)\n\x0cresponseType\x18\x02 \x01(\x0e\x32\x13.proto.ResponseType*e\n\x0cResponseType\x12\x0f\n\x0b\x41NSWER_ONLY\x10\x00\x12\x16\n\x12\x41NSWER_STATE_PROOF\x10\x01\x12\x0f\n\x0b\x43OST_ANSWER\x10\x02\x12\x1b\n\x17\x43OST_ANSWER_STATE_PROOF\x10\x03\x42&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.query_header_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_RESPONSETYPE']._serialized_start=161 + _globals['_RESPONSETYPE']._serialized_end=262 + _globals['_QUERYHEADER']._serialized_start=66 + _globals['_QUERYHEADER']._serialized_end=159 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/query_header_pb2.pyi b/src/hiero_sdk_python/hapi/services/query_header_pb2.pyi new file mode 100644 index 000000000..f9c63b62e --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/query_header_pb2.pyi @@ -0,0 +1,27 @@ +from . import transaction_pb2 as _transaction_pb2 +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class ResponseType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = () + ANSWER_ONLY: _ClassVar[ResponseType] + ANSWER_STATE_PROOF: _ClassVar[ResponseType] + COST_ANSWER: _ClassVar[ResponseType] + COST_ANSWER_STATE_PROOF: _ClassVar[ResponseType] +ANSWER_ONLY: ResponseType +ANSWER_STATE_PROOF: ResponseType +COST_ANSWER: ResponseType +COST_ANSWER_STATE_PROOF: ResponseType + +class QueryHeader(_message.Message): + __slots__ = ("payment", "responseType") + PAYMENT_FIELD_NUMBER: _ClassVar[int] + RESPONSETYPE_FIELD_NUMBER: _ClassVar[int] + payment: _transaction_pb2.Transaction + responseType: ResponseType + def __init__(self, payment: _Optional[_Union[_transaction_pb2.Transaction, _Mapping]] = ..., responseType: _Optional[_Union[ResponseType, str]] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/query_header_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/query_header_pb2_grpc.py new file mode 100644 index 000000000..103b4f41e --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/query_header_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/query_header_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/query_pb2.py b/src/hiero_sdk_python/hapi/services/query_pb2.py new file mode 100644 index 000000000..6421581e1 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/query_pb2.py @@ -0,0 +1,70 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/query.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/query.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import get_by_key_pb2 as services_dot_get__by__key__pb2 +from . import get_by_solidity_id_pb2 as services_dot_get__by__solidity__id__pb2 +from . import contract_call_local_pb2 as services_dot_contract__call__local__pb2 +from . import contract_get_info_pb2 as services_dot_contract__get__info__pb2 +from . import contract_get_bytecode_pb2 as services_dot_contract__get__bytecode__pb2 +from . import contract_get_records_pb2 as services_dot_contract__get__records__pb2 +from . import crypto_get_account_balance_pb2 as services_dot_crypto__get__account__balance__pb2 +from . import crypto_get_account_records_pb2 as services_dot_crypto__get__account__records__pb2 +from . import crypto_get_info_pb2 as services_dot_crypto__get__info__pb2 +from . import crypto_get_live_hash_pb2 as services_dot_crypto__get__live__hash__pb2 +from . import crypto_get_stakers_pb2 as services_dot_crypto__get__stakers__pb2 +from . import file_get_contents_pb2 as services_dot_file__get__contents__pb2 +from . import file_get_info_pb2 as services_dot_file__get__info__pb2 +from . import transaction_get_receipt_pb2 as services_dot_transaction__get__receipt__pb2 +from . import transaction_get_record_pb2 as services_dot_transaction__get__record__pb2 +from . import transaction_get_fast_record_pb2 as services_dot_transaction__get__fast__record__pb2 +from . import consensus_get_topic_info_pb2 as services_dot_consensus__get__topic__info__pb2 +from . import network_get_version_info_pb2 as services_dot_network__get__version__info__pb2 +from . import network_get_execution_time_pb2 as services_dot_network__get__execution__time__pb2 +from . import token_get_info_pb2 as services_dot_token__get__info__pb2 +from . import schedule_get_info_pb2 as services_dot_schedule__get__info__pb2 +from . import token_get_account_nft_infos_pb2 as services_dot_token__get__account__nft__infos__pb2 +from . import token_get_nft_info_pb2 as services_dot_token__get__nft__info__pb2 +from . import token_get_nft_infos_pb2 as services_dot_token__get__nft__infos__pb2 +from . import get_account_details_pb2 as services_dot_get__account__details__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x14services/query.proto\x12\x05proto\x1a\x19services/get_by_key.proto\x1a!services/get_by_solidity_id.proto\x1a\"services/contract_call_local.proto\x1a services/contract_get_info.proto\x1a$services/contract_get_bytecode.proto\x1a#services/contract_get_records.proto\x1a)services/crypto_get_account_balance.proto\x1a)services/crypto_get_account_records.proto\x1a\x1eservices/crypto_get_info.proto\x1a#services/crypto_get_live_hash.proto\x1a!services/crypto_get_stakers.proto\x1a services/file_get_contents.proto\x1a\x1cservices/file_get_info.proto\x1a&services/transaction_get_receipt.proto\x1a%services/transaction_get_record.proto\x1a*services/transaction_get_fast_record.proto\x1a\'services/consensus_get_topic_info.proto\x1a\'services/network_get_version_info.proto\x1a)services/network_get_execution_time.proto\x1a\x1dservices/token_get_info.proto\x1a services/schedule_get_info.proto\x1a*services/token_get_account_nft_infos.proto\x1a!services/token_get_nft_info.proto\x1a\"services/token_get_nft_infos.proto\x1a\"services/get_account_details.proto\"\xa0\x0c\n\x05Query\x12(\n\x08getByKey\x18\x01 \x01(\x0b\x32\x14.proto.GetByKeyQueryH\x00\x12\x36\n\x0fgetBySolidityID\x18\x02 \x01(\x0b\x32\x1b.proto.GetBySolidityIDQueryH\x00\x12:\n\x11\x63ontractCallLocal\x18\x03 \x01(\x0b\x32\x1d.proto.ContractCallLocalQueryH\x00\x12\x36\n\x0f\x63ontractGetInfo\x18\x04 \x01(\x0b\x32\x1b.proto.ContractGetInfoQueryH\x00\x12>\n\x13\x63ontractGetBytecode\x18\x05 \x01(\x0b\x32\x1f.proto.ContractGetBytecodeQueryH\x00\x12@\n\x12\x43ontractGetRecords\x18\x06 \x01(\x0b\x32\x1e.proto.ContractGetRecordsQueryB\x02\x18\x01H\x00\x12\x46\n\x17\x63ryptogetAccountBalance\x18\x07 \x01(\x0b\x32#.proto.CryptoGetAccountBalanceQueryH\x00\x12\x46\n\x17\x63ryptoGetAccountRecords\x18\x08 \x01(\x0b\x32#.proto.CryptoGetAccountRecordsQueryH\x00\x12\x32\n\rcryptoGetInfo\x18\t \x01(\x0b\x32\x19.proto.CryptoGetInfoQueryH\x00\x12>\n\x11\x63ryptoGetLiveHash\x18\n \x01(\x0b\x32\x1d.proto.CryptoGetLiveHashQueryB\x02\x18\x01H\x00\x12\x41\n\x15\x63ryptoGetProxyStakers\x18\x0b \x01(\x0b\x32\x1c.proto.CryptoGetStakersQueryB\x02\x18\x01H\x00\x12\x36\n\x0f\x66ileGetContents\x18\x0c \x01(\x0b\x32\x1b.proto.FileGetContentsQueryH\x00\x12.\n\x0b\x66ileGetInfo\x18\r \x01(\x0b\x32\x17.proto.FileGetInfoQueryH\x00\x12\x42\n\x15transactionGetReceipt\x18\x0e \x01(\x0b\x32!.proto.TransactionGetReceiptQueryH\x00\x12@\n\x14transactionGetRecord\x18\x0f \x01(\x0b\x32 .proto.TransactionGetRecordQueryH\x00\x12H\n\x18transactionGetFastRecord\x18\x10 \x01(\x0b\x32$.proto.TransactionGetFastRecordQueryH\x00\x12\x42\n\x15\x63onsensusGetTopicInfo\x18\x32 \x01(\x0b\x32!.proto.ConsensusGetTopicInfoQueryH\x00\x12\x42\n\x15networkGetVersionInfo\x18\x33 \x01(\x0b\x32!.proto.NetworkGetVersionInfoQueryH\x00\x12\x30\n\x0ctokenGetInfo\x18\x34 \x01(\x0b\x32\x18.proto.TokenGetInfoQueryH\x00\x12\x36\n\x0fscheduleGetInfo\x18\x35 \x01(\x0b\x32\x1b.proto.ScheduleGetInfoQueryH\x00\x12J\n\x17tokenGetAccountNftInfos\x18\x36 \x01(\x0b\x32#.proto.TokenGetAccountNftInfosQueryB\x02\x18\x01H\x00\x12\x36\n\x0ftokenGetNftInfo\x18\x37 \x01(\x0b\x32\x1b.proto.TokenGetNftInfoQueryH\x00\x12<\n\x10tokenGetNftInfos\x18\x38 \x01(\x0b\x32\x1c.proto.TokenGetNftInfosQueryB\x02\x18\x01H\x00\x12J\n\x17networkGetExecutionTime\x18\x39 \x01(\x0b\x32#.proto.NetworkGetExecutionTimeQueryB\x02\x18\x01H\x00\x12\x37\n\x0e\x61\x63\x63ountDetails\x18: \x01(\x0b\x32\x1d.proto.GetAccountDetailsQueryH\x00\x42\x07\n\x05queryB&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.query_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_QUERY'].fields_by_name['ContractGetRecords']._loaded_options = None + _globals['_QUERY'].fields_by_name['ContractGetRecords']._serialized_options = b'\030\001' + _globals['_QUERY'].fields_by_name['cryptoGetLiveHash']._loaded_options = None + _globals['_QUERY'].fields_by_name['cryptoGetLiveHash']._serialized_options = b'\030\001' + _globals['_QUERY'].fields_by_name['cryptoGetProxyStakers']._loaded_options = None + _globals['_QUERY'].fields_by_name['cryptoGetProxyStakers']._serialized_options = b'\030\001' + _globals['_QUERY'].fields_by_name['tokenGetAccountNftInfos']._loaded_options = None + _globals['_QUERY'].fields_by_name['tokenGetAccountNftInfos']._serialized_options = b'\030\001' + _globals['_QUERY'].fields_by_name['tokenGetNftInfos']._loaded_options = None + _globals['_QUERY'].fields_by_name['tokenGetNftInfos']._serialized_options = b'\030\001' + _globals['_QUERY'].fields_by_name['networkGetExecutionTime']._loaded_options = None + _globals['_QUERY'].fields_by_name['networkGetExecutionTime']._serialized_options = b'\030\001' + _globals['_QUERY']._serialized_start=957 + _globals['_QUERY']._serialized_end=2525 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/query_pb2.pyi b/src/hiero_sdk_python/hapi/services/query_pb2.pyi new file mode 100644 index 000000000..d528a1dfc --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/query_pb2.pyi @@ -0,0 +1,85 @@ +from . import get_by_key_pb2 as _get_by_key_pb2 +from . import get_by_solidity_id_pb2 as _get_by_solidity_id_pb2 +from . import contract_call_local_pb2 as _contract_call_local_pb2 +from . import contract_get_info_pb2 as _contract_get_info_pb2 +from . import contract_get_bytecode_pb2 as _contract_get_bytecode_pb2 +from . import contract_get_records_pb2 as _contract_get_records_pb2 +from . import crypto_get_account_balance_pb2 as _crypto_get_account_balance_pb2 +from . import crypto_get_account_records_pb2 as _crypto_get_account_records_pb2 +from . import crypto_get_info_pb2 as _crypto_get_info_pb2 +from . import crypto_get_live_hash_pb2 as _crypto_get_live_hash_pb2 +from . import crypto_get_stakers_pb2 as _crypto_get_stakers_pb2 +from . import file_get_contents_pb2 as _file_get_contents_pb2 +from . import file_get_info_pb2 as _file_get_info_pb2 +from . import transaction_get_receipt_pb2 as _transaction_get_receipt_pb2 +from . import transaction_get_record_pb2 as _transaction_get_record_pb2 +from . import transaction_get_fast_record_pb2 as _transaction_get_fast_record_pb2 +from . import consensus_get_topic_info_pb2 as _consensus_get_topic_info_pb2 +from . import network_get_version_info_pb2 as _network_get_version_info_pb2 +from . import network_get_execution_time_pb2 as _network_get_execution_time_pb2 +from . import token_get_info_pb2 as _token_get_info_pb2 +from . import schedule_get_info_pb2 as _schedule_get_info_pb2 +from . import token_get_account_nft_infos_pb2 as _token_get_account_nft_infos_pb2 +from . import token_get_nft_info_pb2 as _token_get_nft_info_pb2 +from . import token_get_nft_infos_pb2 as _token_get_nft_infos_pb2 +from . import get_account_details_pb2 as _get_account_details_pb2 +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class Query(_message.Message): + __slots__ = ("getByKey", "getBySolidityID", "contractCallLocal", "contractGetInfo", "contractGetBytecode", "ContractGetRecords", "cryptogetAccountBalance", "cryptoGetAccountRecords", "cryptoGetInfo", "cryptoGetLiveHash", "cryptoGetProxyStakers", "fileGetContents", "fileGetInfo", "transactionGetReceipt", "transactionGetRecord", "transactionGetFastRecord", "consensusGetTopicInfo", "networkGetVersionInfo", "tokenGetInfo", "scheduleGetInfo", "tokenGetAccountNftInfos", "tokenGetNftInfo", "tokenGetNftInfos", "networkGetExecutionTime", "accountDetails") + GETBYKEY_FIELD_NUMBER: _ClassVar[int] + GETBYSOLIDITYID_FIELD_NUMBER: _ClassVar[int] + CONTRACTCALLLOCAL_FIELD_NUMBER: _ClassVar[int] + CONTRACTGETINFO_FIELD_NUMBER: _ClassVar[int] + CONTRACTGETBYTECODE_FIELD_NUMBER: _ClassVar[int] + CONTRACTGETRECORDS_FIELD_NUMBER: _ClassVar[int] + CRYPTOGETACCOUNTBALANCE_FIELD_NUMBER: _ClassVar[int] + CRYPTOGETACCOUNTRECORDS_FIELD_NUMBER: _ClassVar[int] + CRYPTOGETINFO_FIELD_NUMBER: _ClassVar[int] + CRYPTOGETLIVEHASH_FIELD_NUMBER: _ClassVar[int] + CRYPTOGETPROXYSTAKERS_FIELD_NUMBER: _ClassVar[int] + FILEGETCONTENTS_FIELD_NUMBER: _ClassVar[int] + FILEGETINFO_FIELD_NUMBER: _ClassVar[int] + TRANSACTIONGETRECEIPT_FIELD_NUMBER: _ClassVar[int] + TRANSACTIONGETRECORD_FIELD_NUMBER: _ClassVar[int] + TRANSACTIONGETFASTRECORD_FIELD_NUMBER: _ClassVar[int] + CONSENSUSGETTOPICINFO_FIELD_NUMBER: _ClassVar[int] + NETWORKGETVERSIONINFO_FIELD_NUMBER: _ClassVar[int] + TOKENGETINFO_FIELD_NUMBER: _ClassVar[int] + SCHEDULEGETINFO_FIELD_NUMBER: _ClassVar[int] + TOKENGETACCOUNTNFTINFOS_FIELD_NUMBER: _ClassVar[int] + TOKENGETNFTINFO_FIELD_NUMBER: _ClassVar[int] + TOKENGETNFTINFOS_FIELD_NUMBER: _ClassVar[int] + NETWORKGETEXECUTIONTIME_FIELD_NUMBER: _ClassVar[int] + ACCOUNTDETAILS_FIELD_NUMBER: _ClassVar[int] + getByKey: _get_by_key_pb2.GetByKeyQuery + getBySolidityID: _get_by_solidity_id_pb2.GetBySolidityIDQuery + contractCallLocal: _contract_call_local_pb2.ContractCallLocalQuery + contractGetInfo: _contract_get_info_pb2.ContractGetInfoQuery + contractGetBytecode: _contract_get_bytecode_pb2.ContractGetBytecodeQuery + ContractGetRecords: _contract_get_records_pb2.ContractGetRecordsQuery + cryptogetAccountBalance: _crypto_get_account_balance_pb2.CryptoGetAccountBalanceQuery + cryptoGetAccountRecords: _crypto_get_account_records_pb2.CryptoGetAccountRecordsQuery + cryptoGetInfo: _crypto_get_info_pb2.CryptoGetInfoQuery + cryptoGetLiveHash: _crypto_get_live_hash_pb2.CryptoGetLiveHashQuery + cryptoGetProxyStakers: _crypto_get_stakers_pb2.CryptoGetStakersQuery + fileGetContents: _file_get_contents_pb2.FileGetContentsQuery + fileGetInfo: _file_get_info_pb2.FileGetInfoQuery + transactionGetReceipt: _transaction_get_receipt_pb2.TransactionGetReceiptQuery + transactionGetRecord: _transaction_get_record_pb2.TransactionGetRecordQuery + transactionGetFastRecord: _transaction_get_fast_record_pb2.TransactionGetFastRecordQuery + consensusGetTopicInfo: _consensus_get_topic_info_pb2.ConsensusGetTopicInfoQuery + networkGetVersionInfo: _network_get_version_info_pb2.NetworkGetVersionInfoQuery + tokenGetInfo: _token_get_info_pb2.TokenGetInfoQuery + scheduleGetInfo: _schedule_get_info_pb2.ScheduleGetInfoQuery + tokenGetAccountNftInfos: _token_get_account_nft_infos_pb2.TokenGetAccountNftInfosQuery + tokenGetNftInfo: _token_get_nft_info_pb2.TokenGetNftInfoQuery + tokenGetNftInfos: _token_get_nft_infos_pb2.TokenGetNftInfosQuery + networkGetExecutionTime: _network_get_execution_time_pb2.NetworkGetExecutionTimeQuery + accountDetails: _get_account_details_pb2.GetAccountDetailsQuery + def __init__(self, getByKey: _Optional[_Union[_get_by_key_pb2.GetByKeyQuery, _Mapping]] = ..., getBySolidityID: _Optional[_Union[_get_by_solidity_id_pb2.GetBySolidityIDQuery, _Mapping]] = ..., contractCallLocal: _Optional[_Union[_contract_call_local_pb2.ContractCallLocalQuery, _Mapping]] = ..., contractGetInfo: _Optional[_Union[_contract_get_info_pb2.ContractGetInfoQuery, _Mapping]] = ..., contractGetBytecode: _Optional[_Union[_contract_get_bytecode_pb2.ContractGetBytecodeQuery, _Mapping]] = ..., ContractGetRecords: _Optional[_Union[_contract_get_records_pb2.ContractGetRecordsQuery, _Mapping]] = ..., cryptogetAccountBalance: _Optional[_Union[_crypto_get_account_balance_pb2.CryptoGetAccountBalanceQuery, _Mapping]] = ..., cryptoGetAccountRecords: _Optional[_Union[_crypto_get_account_records_pb2.CryptoGetAccountRecordsQuery, _Mapping]] = ..., cryptoGetInfo: _Optional[_Union[_crypto_get_info_pb2.CryptoGetInfoQuery, _Mapping]] = ..., cryptoGetLiveHash: _Optional[_Union[_crypto_get_live_hash_pb2.CryptoGetLiveHashQuery, _Mapping]] = ..., cryptoGetProxyStakers: _Optional[_Union[_crypto_get_stakers_pb2.CryptoGetStakersQuery, _Mapping]] = ..., fileGetContents: _Optional[_Union[_file_get_contents_pb2.FileGetContentsQuery, _Mapping]] = ..., fileGetInfo: _Optional[_Union[_file_get_info_pb2.FileGetInfoQuery, _Mapping]] = ..., transactionGetReceipt: _Optional[_Union[_transaction_get_receipt_pb2.TransactionGetReceiptQuery, _Mapping]] = ..., transactionGetRecord: _Optional[_Union[_transaction_get_record_pb2.TransactionGetRecordQuery, _Mapping]] = ..., transactionGetFastRecord: _Optional[_Union[_transaction_get_fast_record_pb2.TransactionGetFastRecordQuery, _Mapping]] = ..., consensusGetTopicInfo: _Optional[_Union[_consensus_get_topic_info_pb2.ConsensusGetTopicInfoQuery, _Mapping]] = ..., networkGetVersionInfo: _Optional[_Union[_network_get_version_info_pb2.NetworkGetVersionInfoQuery, _Mapping]] = ..., tokenGetInfo: _Optional[_Union[_token_get_info_pb2.TokenGetInfoQuery, _Mapping]] = ..., scheduleGetInfo: _Optional[_Union[_schedule_get_info_pb2.ScheduleGetInfoQuery, _Mapping]] = ..., tokenGetAccountNftInfos: _Optional[_Union[_token_get_account_nft_infos_pb2.TokenGetAccountNftInfosQuery, _Mapping]] = ..., tokenGetNftInfo: _Optional[_Union[_token_get_nft_info_pb2.TokenGetNftInfoQuery, _Mapping]] = ..., tokenGetNftInfos: _Optional[_Union[_token_get_nft_infos_pb2.TokenGetNftInfosQuery, _Mapping]] = ..., networkGetExecutionTime: _Optional[_Union[_network_get_execution_time_pb2.NetworkGetExecutionTimeQuery, _Mapping]] = ..., accountDetails: _Optional[_Union[_get_account_details_pb2.GetAccountDetailsQuery, _Mapping]] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/query_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/query_pb2_grpc.py new file mode 100644 index 000000000..78cab75f5 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/query_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/query_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/response_code_pb2.py b/src/hiero_sdk_python/hapi/services/response_code_pb2.py new file mode 100644 index 000000000..4d54a8882 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/response_code_pb2.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/response_code.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/response_code.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cservices/response_code.proto\x12\x05proto*\x90\x62\n\x10ResponseCodeEnum\x12\x06\n\x02OK\x10\x00\x12\x17\n\x13INVALID_TRANSACTION\x10\x01\x12\x1b\n\x17PAYER_ACCOUNT_NOT_FOUND\x10\x02\x12\x18\n\x14INVALID_NODE_ACCOUNT\x10\x03\x12\x17\n\x13TRANSACTION_EXPIRED\x10\x04\x12\x1d\n\x19INVALID_TRANSACTION_START\x10\x05\x12 \n\x1cINVALID_TRANSACTION_DURATION\x10\x06\x12\x15\n\x11INVALID_SIGNATURE\x10\x07\x12\x11\n\rMEMO_TOO_LONG\x10\x08\x12\x17\n\x13INSUFFICIENT_TX_FEE\x10\t\x12\x1e\n\x1aINSUFFICIENT_PAYER_BALANCE\x10\n\x12\x19\n\x15\x44UPLICATE_TRANSACTION\x10\x0b\x12\x08\n\x04\x42USY\x10\x0c\x12\x11\n\rNOT_SUPPORTED\x10\r\x12\x13\n\x0fINVALID_FILE_ID\x10\x0e\x12\x16\n\x12INVALID_ACCOUNT_ID\x10\x0f\x12\x17\n\x13INVALID_CONTRACT_ID\x10\x10\x12\x1a\n\x16INVALID_TRANSACTION_ID\x10\x11\x12\x15\n\x11RECEIPT_NOT_FOUND\x10\x12\x12\x14\n\x10RECORD_NOT_FOUND\x10\x13\x12\x17\n\x13INVALID_SOLIDITY_ID\x10\x14\x12\x0b\n\x07UNKNOWN\x10\x15\x12\x0b\n\x07SUCCESS\x10\x16\x12\x10\n\x0c\x46\x41IL_INVALID\x10\x17\x12\x0c\n\x08\x46\x41IL_FEE\x10\x18\x12\x10\n\x0c\x46\x41IL_BALANCE\x10\x19\x12\x10\n\x0cKEY_REQUIRED\x10\x1a\x12\x10\n\x0c\x42\x41\x44_ENCODING\x10\x1b\x12 \n\x1cINSUFFICIENT_ACCOUNT_BALANCE\x10\x1c\x12\x1c\n\x18INVALID_SOLIDITY_ADDRESS\x10\x1d\x12\x14\n\x10INSUFFICIENT_GAS\x10\x1e\x12 \n\x1c\x43ONTRACT_SIZE_LIMIT_EXCEEDED\x10\x1f\x12%\n!LOCAL_CALL_MODIFICATION_EXCEPTION\x10 \x12\x1c\n\x18\x43ONTRACT_REVERT_EXECUTED\x10!\x12 \n\x1c\x43ONTRACT_EXECUTION_EXCEPTION\x10\"\x12\"\n\x1eINVALID_RECEIVING_NODE_ACCOUNT\x10#\x12\x18\n\x14MISSING_QUERY_HEADER\x10$\x12\x19\n\x15\x41\x43\x43OUNT_UPDATE_FAILED\x10%\x12\x18\n\x14INVALID_KEY_ENCODING\x10&\x12\x19\n\x15NULL_SOLIDITY_ADDRESS\x10\'\x12\x1a\n\x16\x43ONTRACT_UPDATE_FAILED\x10(\x12\x18\n\x14INVALID_QUERY_HEADER\x10)\x12\x19\n\x15INVALID_FEE_SUBMITTED\x10*\x12\x1b\n\x17INVALID_PAYER_SIGNATURE\x10+\x12\x14\n\x10KEY_NOT_PROVIDED\x10,\x12\x1b\n\x17INVALID_EXPIRATION_TIME\x10-\x12\x0f\n\x0bNO_WACL_KEY\x10.\x12\x16\n\x12\x46ILE_CONTENT_EMPTY\x10/\x12\x1b\n\x17INVALID_ACCOUNT_AMOUNTS\x10\x30\x12\x1a\n\x16\x45MPTY_TRANSACTION_BODY\x10\x31\x12\x1c\n\x18INVALID_TRANSACTION_BODY\x10\x32\x12*\n&INVALID_SIGNATURE_TYPE_MISMATCHING_KEY\x10\x33\x12+\n\'INVALID_SIGNATURE_COUNT_MISMATCHING_KEY\x10\x34\x12\x18\n\x14\x45MPTY_LIVE_HASH_BODY\x10\x35\x12\x13\n\x0f\x45MPTY_LIVE_HASH\x10\x36\x12\x18\n\x14\x45MPTY_LIVE_HASH_KEYS\x10\x37\x12\x1a\n\x16INVALID_LIVE_HASH_SIZE\x10\x38\x12\x14\n\x10\x45MPTY_QUERY_BODY\x10\x39\x12\x19\n\x15\x45MPTY_LIVE_HASH_QUERY\x10:\x12\x17\n\x13LIVE_HASH_NOT_FOUND\x10;\x12\x1d\n\x19\x41\x43\x43OUNT_ID_DOES_NOT_EXIST\x10<\x12\x1c\n\x18LIVE_HASH_ALREADY_EXISTS\x10=\x12\x15\n\x11INVALID_FILE_WACL\x10>\x12\x18\n\x14SERIALIZATION_FAILED\x10?\x12\x18\n\x14TRANSACTION_OVERSIZE\x10@\x12\x1f\n\x1bTRANSACTION_TOO_MANY_LAYERS\x10\x41\x12\x14\n\x10\x43ONTRACT_DELETED\x10\x42\x12\x17\n\x13PLATFORM_NOT_ACTIVE\x10\x43\x12\x17\n\x13KEY_PREFIX_MISMATCH\x10\x44\x12$\n PLATFORM_TRANSACTION_NOT_CREATED\x10\x45\x12\x1a\n\x16INVALID_RENEWAL_PERIOD\x10\x46\x12\x1c\n\x18INVALID_PAYER_ACCOUNT_ID\x10G\x12\x13\n\x0f\x41\x43\x43OUNT_DELETED\x10H\x12\x10\n\x0c\x46ILE_DELETED\x10I\x12\'\n#ACCOUNT_REPEATED_IN_ACCOUNT_AMOUNTS\x10J\x12$\n SETTING_NEGATIVE_ACCOUNT_BALANCE\x10K\x12\x15\n\x11OBTAINER_REQUIRED\x10L\x12\x1d\n\x19OBTAINER_SAME_CONTRACT_ID\x10M\x12\x1b\n\x17OBTAINER_DOES_NOT_EXIST\x10N\x12 \n\x1cMODIFYING_IMMUTABLE_CONTRACT\x10O\x12\x19\n\x15\x46ILE_SYSTEM_EXCEPTION\x10P\x12#\n\x1f\x41UTORENEW_DURATION_NOT_IN_RANGE\x10Q\x12\x1d\n\x19\x45RROR_DECODING_BYTESTRING\x10R\x12\x17\n\x13\x43ONTRACT_FILE_EMPTY\x10S\x12\x1b\n\x17\x43ONTRACT_BYTECODE_EMPTY\x10T\x12\x1b\n\x17INVALID_INITIAL_BALANCE\x10U\x12(\n INVALID_RECEIVE_RECORD_THRESHOLD\x10V\x1a\x02\x08\x01\x12%\n\x1dINVALID_SEND_RECORD_THRESHOLD\x10W\x1a\x02\x08\x01\x12\"\n\x1e\x41\x43\x43OUNT_IS_NOT_GENESIS_ACCOUNT\x10X\x12\x1e\n\x1aPAYER_ACCOUNT_UNAUTHORIZED\x10Y\x12#\n\x1fINVALID_FREEZE_TRANSACTION_BODY\x10Z\x12%\n!FREEZE_TRANSACTION_BODY_NOT_FOUND\x10[\x12%\n!TRANSFER_LIST_SIZE_LIMIT_EXCEEDED\x10\\\x12\x1e\n\x1aRESULT_SIZE_LIMIT_EXCEEDED\x10]\x12\x17\n\x13NOT_SPECIAL_ACCOUNT\x10^\x12\x19\n\x15\x43ONTRACT_NEGATIVE_GAS\x10_\x12\x1b\n\x17\x43ONTRACT_NEGATIVE_VALUE\x10`\x12\x14\n\x10INVALID_FEE_FILE\x10\x61\x12\x1e\n\x1aINVALID_EXCHANGE_RATE_FILE\x10\x62\x12\x1f\n\x1bINSUFFICIENT_LOCAL_CALL_GAS\x10\x63\x12 \n\x1c\x45NTITY_NOT_ALLOWED_TO_DELETE\x10\x64\x12\x18\n\x14\x41UTHORIZATION_FAILED\x10\x65\x12\x1f\n\x1b\x46ILE_UPLOADED_PROTO_INVALID\x10\x66\x12)\n%FILE_UPLOADED_PROTO_NOT_SAVED_TO_DISK\x10g\x12#\n\x1f\x46\x45\x45_SCHEDULE_FILE_PART_UPLOADED\x10h\x12\'\n#EXCHANGE_RATE_CHANGE_LIMIT_EXCEEDED\x10i\x12!\n\x1dMAX_CONTRACT_STORAGE_EXCEEDED\x10j\x12+\n\'TRANSFER_ACCOUNT_SAME_AS_DELETE_ACCOUNT\x10k\x12 \n\x1cTOTAL_LEDGER_BALANCE_INVALID\x10l\x12$\n EXPIRATION_REDUCTION_NOT_ALLOWED\x10n\x12\x1a\n\x16MAX_GAS_LIMIT_EXCEEDED\x10o\x12\x1a\n\x16MAX_FILE_SIZE_EXCEEDED\x10p\x12\x19\n\x15RECEIVER_SIG_REQUIRED\x10q\x12\x15\n\x10INVALID_TOPIC_ID\x10\x96\x01\x12\x16\n\x11INVALID_ADMIN_KEY\x10\x9b\x01\x12\x17\n\x12INVALID_SUBMIT_KEY\x10\x9c\x01\x12\x11\n\x0cUNAUTHORIZED\x10\x9d\x01\x12\x1a\n\x15INVALID_TOPIC_MESSAGE\x10\x9e\x01\x12\x1e\n\x19INVALID_AUTORENEW_ACCOUNT\x10\x9f\x01\x12\"\n\x1d\x41UTORENEW_ACCOUNT_NOT_ALLOWED\x10\xa0\x01\x12\x12\n\rTOPIC_EXPIRED\x10\xa2\x01\x12\x19\n\x14INVALID_CHUNK_NUMBER\x10\xa3\x01\x12!\n\x1cINVALID_CHUNK_TRANSACTION_ID\x10\xa4\x01\x12\x1d\n\x18\x41\x43\x43OUNT_FROZEN_FOR_TOKEN\x10\xa5\x01\x12&\n!TOKENS_PER_ACCOUNT_LIMIT_EXCEEDED\x10\xa6\x01\x12\x15\n\x10INVALID_TOKEN_ID\x10\xa7\x01\x12\x1b\n\x16INVALID_TOKEN_DECIMALS\x10\xa8\x01\x12!\n\x1cINVALID_TOKEN_INITIAL_SUPPLY\x10\xa9\x01\x12\'\n\"INVALID_TREASURY_ACCOUNT_FOR_TOKEN\x10\xaa\x01\x12\x19\n\x14INVALID_TOKEN_SYMBOL\x10\xab\x01\x12\x1c\n\x17TOKEN_HAS_NO_FREEZE_KEY\x10\xac\x01\x12%\n TRANSFERS_NOT_ZERO_SUM_FOR_TOKEN\x10\xad\x01\x12\x19\n\x14MISSING_TOKEN_SYMBOL\x10\xae\x01\x12\x1a\n\x15TOKEN_SYMBOL_TOO_LONG\x10\xaf\x01\x12&\n!ACCOUNT_KYC_NOT_GRANTED_FOR_TOKEN\x10\xb0\x01\x12\x19\n\x14TOKEN_HAS_NO_KYC_KEY\x10\xb1\x01\x12\x1f\n\x1aINSUFFICIENT_TOKEN_BALANCE\x10\xb2\x01\x12\x16\n\x11TOKEN_WAS_DELETED\x10\xb3\x01\x12\x1c\n\x17TOKEN_HAS_NO_SUPPLY_KEY\x10\xb4\x01\x12\x1a\n\x15TOKEN_HAS_NO_WIPE_KEY\x10\xb5\x01\x12\x1e\n\x19INVALID_TOKEN_MINT_AMOUNT\x10\xb6\x01\x12\x1e\n\x19INVALID_TOKEN_BURN_AMOUNT\x10\xb7\x01\x12$\n\x1fTOKEN_NOT_ASSOCIATED_TO_ACCOUNT\x10\xb8\x01\x12\'\n\"CANNOT_WIPE_TOKEN_TREASURY_ACCOUNT\x10\xb9\x01\x12\x14\n\x0fINVALID_KYC_KEY\x10\xba\x01\x12\x15\n\x10INVALID_WIPE_KEY\x10\xbb\x01\x12\x17\n\x12INVALID_FREEZE_KEY\x10\xbc\x01\x12\x17\n\x12INVALID_SUPPLY_KEY\x10\xbd\x01\x12\x17\n\x12MISSING_TOKEN_NAME\x10\xbe\x01\x12\x18\n\x13TOKEN_NAME_TOO_LONG\x10\xbf\x01\x12\x1a\n\x15INVALID_WIPING_AMOUNT\x10\xc0\x01\x12\x17\n\x12TOKEN_IS_IMMUTABLE\x10\xc1\x01\x12(\n#TOKEN_ALREADY_ASSOCIATED_TO_ACCOUNT\x10\xc2\x01\x12-\n(TRANSACTION_REQUIRES_ZERO_TOKEN_BALANCES\x10\xc3\x01\x12\x18\n\x13\x41\x43\x43OUNT_IS_TREASURY\x10\xc4\x01\x12$\n\x1fTOKEN_ID_REPEATED_IN_TOKEN_LIST\x10\xc5\x01\x12,\n\'TOKEN_TRANSFER_LIST_SIZE_LIMIT_EXCEEDED\x10\xc6\x01\x12\x1e\n\x19\x45MPTY_TOKEN_TRANSFER_BODY\x10\xc7\x01\x12)\n$EMPTY_TOKEN_TRANSFER_ACCOUNT_AMOUNTS\x10\xc8\x01\x12\x18\n\x13INVALID_SCHEDULE_ID\x10\xc9\x01\x12\x1a\n\x15SCHEDULE_IS_IMMUTABLE\x10\xca\x01\x12\x1e\n\x19INVALID_SCHEDULE_PAYER_ID\x10\xcb\x01\x12 \n\x1bINVALID_SCHEDULE_ACCOUNT_ID\x10\xcc\x01\x12\x1c\n\x17NO_NEW_VALID_SIGNATURES\x10\xcd\x01\x12\"\n\x1dUNRESOLVABLE_REQUIRED_SIGNERS\x10\xce\x01\x12+\n&SCHEDULED_TRANSACTION_NOT_IN_WHITELIST\x10\xcf\x01\x12!\n\x1cSOME_SIGNATURES_WERE_INVALID\x10\xd0\x01\x12%\n TRANSACTION_ID_FIELD_NOT_ALLOWED\x10\xd1\x01\x12\'\n\"IDENTICAL_SCHEDULE_ALREADY_CREATED\x10\xd2\x01\x12 \n\x1bINVALID_ZERO_BYTE_IN_STRING\x10\xd3\x01\x12\x1d\n\x18SCHEDULE_ALREADY_DELETED\x10\xd4\x01\x12\x1e\n\x19SCHEDULE_ALREADY_EXECUTED\x10\xd5\x01\x12\x1b\n\x16MESSAGE_SIZE_TOO_LARGE\x10\xd6\x01\x12(\n#OPERATION_REPEATED_IN_BUCKET_GROUPS\x10\xd7\x01\x12\x1d\n\x18\x42UCKET_CAPACITY_OVERFLOW\x10\xd8\x01\x12/\n*NODE_CAPACITY_NOT_SUFFICIENT_FOR_OPERATION\x10\xd9\x01\x12\"\n\x1d\x42UCKET_HAS_NO_THROTTLE_GROUPS\x10\xda\x01\x12(\n#THROTTLE_GROUP_HAS_ZERO_OPS_PER_SEC\x10\xdb\x01\x12+\n&SUCCESS_BUT_MISSING_EXPECTED_OPERATION\x10\xdc\x01\x12%\n UNPARSEABLE_THROTTLE_DEFINITIONS\x10\xdd\x01\x12!\n\x1cINVALID_THROTTLE_DEFINITIONS\x10\xde\x01\x12(\n#ACCOUNT_EXPIRED_AND_PENDING_REMOVAL\x10\xdf\x01\x12\x1d\n\x18INVALID_TOKEN_MAX_SUPPLY\x10\xe0\x01\x12$\n\x1fINVALID_TOKEN_NFT_SERIAL_NUMBER\x10\xe1\x01\x12\x13\n\x0eINVALID_NFT_ID\x10\xe2\x01\x12\x16\n\x11METADATA_TOO_LONG\x10\xe3\x01\x12\x1e\n\x19\x42\x41TCH_SIZE_LIMIT_EXCEEDED\x10\xe4\x01\x12\x18\n\x13INVALID_QUERY_RANGE\x10\xe5\x01\x12\x1d\n\x18\x46RACTION_DIVIDES_BY_ZERO\x10\xe6\x01\x12\x32\n)INSUFFICIENT_PAYER_BALANCE_FOR_CUSTOM_FEE\x10\xe7\x01\x1a\x02\x08\x01\x12\x1e\n\x19\x43USTOM_FEES_LIST_TOO_LONG\x10\xe8\x01\x12!\n\x1cINVALID_CUSTOM_FEE_COLLECTOR\x10\xe9\x01\x12$\n\x1fINVALID_TOKEN_ID_IN_CUSTOM_FEES\x10\xea\x01\x12*\n%TOKEN_NOT_ASSOCIATED_TO_FEE_COLLECTOR\x10\xeb\x01\x12\x1d\n\x18TOKEN_MAX_SUPPLY_REACHED\x10\xec\x01\x12&\n!SENDER_DOES_NOT_OWN_NFT_SERIAL_NO\x10\xed\x01\x12#\n\x1e\x43USTOM_FEE_NOT_FULLY_SPECIFIED\x10\xee\x01\x12 \n\x1b\x43USTOM_FEE_MUST_BE_POSITIVE\x10\xef\x01\x12\"\n\x1dTOKEN_HAS_NO_FEE_SCHEDULE_KEY\x10\xf0\x01\x12%\n CUSTOM_FEE_OUTSIDE_NUMERIC_RANGE\x10\xf1\x01\x12\'\n\"ROYALTY_FRACTION_CANNOT_EXCEED_ONE\x10\xf2\x01\x12\x33\n.FRACTIONAL_FEE_MAX_AMOUNT_LESS_THAN_MIN_AMOUNT\x10\xf3\x01\x12(\n#CUSTOM_SCHEDULE_ALREADY_HAS_NO_FEES\x10\xf4\x01\x12\x34\n/CUSTOM_FEE_DENOMINATION_MUST_BE_FUNGIBLE_COMMON\x10\xf5\x01\x12;\n6CUSTOM_FRACTIONAL_FEE_ONLY_ALLOWED_FOR_FUNGIBLE_COMMON\x10\xf6\x01\x12$\n\x1fINVALID_CUSTOM_FEE_SCHEDULE_KEY\x10\xf7\x01\x12 \n\x1bINVALID_TOKEN_MINT_METADATA\x10\xf8\x01\x12 \n\x1bINVALID_TOKEN_BURN_METADATA\x10\xf9\x01\x12%\n CURRENT_TREASURY_STILL_OWNS_NFTS\x10\xfa\x01\x12\x1c\n\x17\x41\x43\x43OUNT_STILL_OWNS_NFTS\x10\xfb\x01\x12!\n\x1cTREASURY_MUST_OWN_BURNED_NFT\x10\xfc\x01\x12#\n\x1e\x41\x43\x43OUNT_DOES_NOT_OWN_WIPED_NFT\x10\xfd\x01\x12>\n9ACCOUNT_AMOUNT_TRANSFERS_ONLY_ALLOWED_FOR_FUNGIBLE_COMMON\x10\xfe\x01\x12.\n)MAX_NFTS_IN_PRICE_REGIME_HAVE_BEEN_MINTED\x10\xff\x01\x12\x1a\n\x15PAYER_ACCOUNT_DELETED\x10\x80\x02\x12\x35\n0CUSTOM_FEE_CHARGING_EXCEEDED_MAX_RECURSION_DEPTH\x10\x81\x02\x12\x35\n0CUSTOM_FEE_CHARGING_EXCEEDED_MAX_ACCOUNT_AMOUNTS\x10\x82\x02\x12\x37\n2INSUFFICIENT_SENDER_ACCOUNT_BALANCE_FOR_CUSTOM_FEE\x10\x83\x02\x12 \n\x1bSERIAL_NUMBER_LIMIT_REACHED\x10\x84\x02\x12<\n7CUSTOM_ROYALTY_FEE_ONLY_ALLOWED_FOR_NON_FUNGIBLE_UNIQUE\x10\x85\x02\x12(\n#NO_REMAINING_AUTOMATIC_ASSOCIATIONS\x10\x86\x02\x12\x37\n2EXISTING_AUTOMATIC_ASSOCIATIONS_EXCEED_GIVEN_LIMIT\x10\x87\x02\x12\x43\n>REQUESTED_NUM_AUTOMATIC_ASSOCIATIONS_EXCEEDS_ASSOCIATION_LIMIT\x10\x88\x02\x12\x14\n\x0fTOKEN_IS_PAUSED\x10\x89\x02\x12\x1b\n\x16TOKEN_HAS_NO_PAUSE_KEY\x10\x8a\x02\x12\x16\n\x11INVALID_PAUSE_KEY\x10\x8b\x02\x12&\n!FREEZE_UPDATE_FILE_DOES_NOT_EXIST\x10\x8c\x02\x12+\n&FREEZE_UPDATE_FILE_HASH_DOES_NOT_MATCH\x10\x8d\x02\x12!\n\x1cNO_UPGRADE_HAS_BEEN_PREPARED\x10\x8e\x02\x12\x1b\n\x16NO_FREEZE_IS_SCHEDULED\x10\x8f\x02\x12\x33\n.UPDATE_FILE_HASH_CHANGED_SINCE_PREPARE_UPGRADE\x10\x90\x02\x12%\n FREEZE_START_TIME_MUST_BE_FUTURE\x10\x91\x02\x12&\n!PREPARED_UPDATE_FILE_IS_IMMUTABLE\x10\x92\x02\x12\x1d\n\x18\x46REEZE_ALREADY_SCHEDULED\x10\x93\x02\x12\x1f\n\x1a\x46REEZE_UPGRADE_IN_PROGRESS\x10\x94\x02\x12+\n&UPDATE_FILE_ID_DOES_NOT_MATCH_PREPARED\x10\x95\x02\x12-\n(UPDATE_FILE_HASH_DOES_NOT_MATCH_PREPARED\x10\x96\x02\x12\x1c\n\x17\x43ONSENSUS_GAS_EXHAUSTED\x10\x97\x02\x12\x15\n\x10REVERTED_SUCCESS\x10\x98\x02\x12.\n)MAX_STORAGE_IN_PRICE_REGIME_HAS_BEEN_USED\x10\x99\x02\x12\x16\n\x11INVALID_ALIAS_KEY\x10\x9a\x02\x12\x1e\n\x19UNEXPECTED_TOKEN_DECIMALS\x10\x9b\x02\x12!\n\x18INVALID_PROXY_ACCOUNT_ID\x10\x9c\x02\x1a\x02\x08\x01\x12 \n\x1bINVALID_TRANSFER_ACCOUNT_ID\x10\x9d\x02\x12%\n INVALID_FEE_COLLECTOR_ACCOUNT_ID\x10\x9e\x02\x12\x17\n\x12\x41LIAS_IS_IMMUTABLE\x10\x9f\x02\x12\"\n\x1dSPENDER_ACCOUNT_SAME_AS_OWNER\x10\xa0\x02\x12$\n\x1f\x41MOUNT_EXCEEDS_TOKEN_MAX_SUPPLY\x10\xa1\x02\x12\x1e\n\x19NEGATIVE_ALLOWANCE_AMOUNT\x10\xa2\x02\x12/\n&CANNOT_APPROVE_FOR_ALL_FUNGIBLE_COMMON\x10\xa3\x02\x1a\x02\x08\x01\x12$\n\x1fSPENDER_DOES_NOT_HAVE_ALLOWANCE\x10\xa4\x02\x12\x1d\n\x18\x41MOUNT_EXCEEDS_ALLOWANCE\x10\xa5\x02\x12\x1c\n\x17MAX_ALLOWANCES_EXCEEDED\x10\xa6\x02\x12\x15\n\x10\x45MPTY_ALLOWANCES\x10\xa7\x02\x12/\n&SPENDER_ACCOUNT_REPEATED_IN_ALLOWANCES\x10\xa8\x02\x1a\x02\x08\x01\x12/\n&REPEATED_SERIAL_NUMS_IN_NFT_ALLOWANCES\x10\xa9\x02\x1a\x02\x08\x01\x12%\n FUNGIBLE_TOKEN_IN_NFT_ALLOWANCES\x10\xaa\x02\x12%\n NFT_IN_FUNGIBLE_TOKEN_ALLOWANCES\x10\xab\x02\x12\x1f\n\x1aINVALID_ALLOWANCE_OWNER_ID\x10\xac\x02\x12!\n\x1cINVALID_ALLOWANCE_SPENDER_ID\x10\xad\x02\x12&\n\x1dREPEATED_ALLOWANCES_TO_DELETE\x10\xae\x02\x1a\x02\x08\x01\x12\x1f\n\x1aINVALID_DELEGATING_SPENDER\x10\xaf\x02\x12\x34\n/DELEGATING_SPENDER_CANNOT_GRANT_APPROVE_FOR_ALL\x10\xb0\x02\x12\x35\n0DELEGATING_SPENDER_DOES_NOT_HAVE_APPROVE_FOR_ALL\x10\xb1\x02\x12/\n*SCHEDULE_EXPIRATION_TIME_TOO_FAR_IN_FUTURE\x10\xb2\x02\x12@\n;SCHEDULE_EXPIRATION_TIME_MUST_BE_HIGHER_THAN_CONSENSUS_TIME\x10\xb3\x02\x12&\n!SCHEDULE_FUTURE_THROTTLE_EXCEEDED\x10\xb4\x02\x12\'\n\"SCHEDULE_FUTURE_GAS_LIMIT_EXCEEDED\x10\xb5\x02\x12!\n\x1cINVALID_ETHEREUM_TRANSACTION\x10\xb6\x02\x12\x13\n\x0eWRONG_CHAIN_ID\x10\xb7\x02\x12\x10\n\x0bWRONG_NONCE\x10\xb8\x02\x12\x1c\n\x17\x41\x43\x43\x45SS_LIST_UNSUPPORTED\x10\xb9\x02\x12 \n\x1bSCHEDULE_PENDING_EXPIRATION\x10\xba\x02\x12\x1f\n\x1a\x43ONTRACT_IS_TOKEN_TREASURY\x10\xbb\x02\x12)\n$CONTRACT_HAS_NON_ZERO_TOKEN_BALANCES\x10\xbc\x02\x12)\n$CONTRACT_EXPIRED_AND_PENDING_REMOVAL\x10\xbd\x02\x12\'\n\"CONTRACT_HAS_NO_AUTO_RENEW_ACCOUNT\x10\xbe\x02\x12\x31\n,PERMANENT_REMOVAL_REQUIRES_SYSTEM_INITIATION\x10\xbf\x02\x12)\n$PROXY_ACCOUNT_ID_FIELD_IS_DEPRECATED\x10\xc0\x02\x12 \n\x1bSELF_STAKING_IS_NOT_ALLOWED\x10\xc1\x02\x12\x17\n\x12INVALID_STAKING_ID\x10\xc2\x02\x12\x18\n\x13STAKING_NOT_ENABLED\x10\xc3\x02\x12\x17\n\x12INVALID_PRNG_RANGE\x10\xc4\x02\x12\x33\n.MAX_ENTITIES_IN_PRICE_REGIME_HAVE_BEEN_CREATED\x10\xc5\x02\x12\x31\n,INVALID_FULL_PREFIX_SIGNATURE_FOR_PRECOMPILE\x10\xc6\x02\x12+\n&INSUFFICIENT_BALANCES_FOR_STORAGE_RENT\x10\xc7\x02\x12\x1f\n\x1aMAX_CHILD_RECORDS_EXCEEDED\x10\xc8\x02\x12+\n&INSUFFICIENT_BALANCES_FOR_RENEWAL_FEES\x10\xc9\x02\x12#\n\x1eTRANSACTION_HAS_UNKNOWN_FIELDS\x10\xca\x02\x12\x19\n\x14\x41\x43\x43OUNT_IS_IMMUTABLE\x10\xcb\x02\x12\x1b\n\x16\x41LIAS_ALREADY_ASSIGNED\x10\xcc\x02\x12\x19\n\x14INVALID_METADATA_KEY\x10\xcd\x02\x12\x1e\n\x19TOKEN_HAS_NO_METADATA_KEY\x10\xce\x02\x12\x1b\n\x16MISSING_TOKEN_METADATA\x10\xcf\x02\x12\x1b\n\x16MISSING_SERIAL_NUMBERS\x10\xd0\x02\x12\x1b\n\x16TOKEN_HAS_NO_ADMIN_KEY\x10\xd1\x02\x12\x11\n\x0cNODE_DELETED\x10\xd2\x02\x12\x14\n\x0fINVALID_NODE_ID\x10\xd3\x02\x12\x1c\n\x17INVALID_GOSSIP_ENDPOINT\x10\xd4\x02\x12\x1c\n\x17INVALID_NODE_ACCOUNT_ID\x10\xd5\x02\x12\x1d\n\x18INVALID_NODE_DESCRIPTION\x10\xd6\x02\x12\x1d\n\x18INVALID_SERVICE_ENDPOINT\x10\xd7\x02\x12\"\n\x1dINVALID_GOSSIP_CA_CERTIFICATE\x10\xd8\x02\x12\x1d\n\x18INVALID_GRPC_CERTIFICATE\x10\xd9\x02\x12\"\n\x1dINVALID_MAX_AUTO_ASSOCIATIONS\x10\xda\x02\x12\x16\n\x11MAX_NODES_CREATED\x10\xdb\x02\x12,\n\'IP_FQDN_CANNOT_BE_SET_FOR_SAME_ENDPOINT\x10\xdc\x02\x12%\n GOSSIP_ENDPOINT_CANNOT_HAVE_FQDN\x10\xdd\x02\x12\x18\n\x13\x46QDN_SIZE_TOO_LARGE\x10\xde\x02\x12\x15\n\x10INVALID_ENDPOINT\x10\xdf\x02\x12$\n\x1fGOSSIP_ENDPOINTS_EXCEEDED_LIMIT\x10\xe0\x02\x12\x1d\n\x18TOKEN_REFERENCE_REPEATED\x10\xe1\x02\x12\x15\n\x10INVALID_OWNER_ID\x10\xe2\x02\x12-\n(TOKEN_REFERENCE_LIST_SIZE_LIMIT_EXCEEDED\x10\xe3\x02\x12%\n SERVICE_ENDPOINTS_EXCEEDED_LIMIT\x10\xe4\x02\x12\x19\n\x14INVALID_IPV4_ADDRESS\x10\xe5\x02\x12\x1f\n\x1a\x45MPTY_TOKEN_REFERENCE_LIST\x10\xe6\x02\x12$\n\x1fUPDATE_NODE_ACCOUNT_NOT_ALLOWED\x10\xe7\x02\x12(\n#TOKEN_HAS_NO_METADATA_OR_SUPPLY_KEY\x10\xe8\x02\x12\"\n\x1d\x45MPTY_PENDING_AIRDROP_ID_LIST\x10\xe9\x02\x12 \n\x1bPENDING_AIRDROP_ID_REPEATED\x10\xea\x02\x12%\n PENDING_AIRDROP_ID_LIST_TOO_LONG\x10\xeb\x02\x12\'\n\"PENDING_NFT_AIRDROP_ALREADY_EXISTS\x10\xec\x02\x12!\n\x1c\x41\x43\x43OUNT_HAS_PENDING_AIRDROPS\x10\xed\x02\x12\x1b\n\x16THROTTLED_AT_CONSENSUS\x10\xee\x02\x12\x1f\n\x1aINVALID_PENDING_AIRDROP_ID\x10\xef\x02\x12(\n#TOKEN_AIRDROP_WITH_FALLBACK_ROYALTY\x10\xf0\x02\x12%\n INVALID_TOKEN_IN_PENDING_AIRDROP\x10\xf1\x02\x12\x1c\n\x17SCHEDULE_EXPIRY_IS_BUSY\x10\xf2\x02\x12\"\n\x1dINVALID_GRPC_CERTIFICATE_HASH\x10\xf3\x02\x12\x18\n\x13MISSING_EXPIRY_TIME\x10\xf4\x02\x12\x34\n/NO_SCHEDULING_ALLOWED_AFTER_SCHEDULED_RECURSION\x10\xf5\x02\x12\'\n\"RECURSIVE_SCHEDULING_LIMIT_REACHED\x10\xf6\x02\x12\x1a\n\x15WAITING_FOR_LEDGER_ID\x10\xf7\x02\x12\x31\n,MAX_ENTRIES_FOR_FEE_EXEMPT_KEY_LIST_EXCEEDED\x10\xf8\x02\x12\x31\n,FEE_EXEMPT_KEY_LIST_CONTAINS_DUPLICATED_KEYS\x10\xf9\x02\x12\'\n\"INVALID_KEY_IN_FEE_EXEMPT_KEY_LIST\x10\xfa\x02\x12\x1d\n\x18INVALID_FEE_SCHEDULE_KEY\x10\xfb\x02\x12\'\n\"FEE_SCHEDULE_KEY_CANNOT_BE_UPDATED\x10\xfc\x02\x12\x1d\n\x18\x46\x45\x45_SCHEDULE_KEY_NOT_SET\x10\xfd\x02\x12\"\n\x1dMAX_CUSTOM_FEE_LIMIT_EXCEEDED\x10\xfe\x02\x12\x1c\n\x17NO_VALID_MAX_CUSTOM_FEE\x10\xff\x02\x12\x1c\n\x17INVALID_MAX_CUSTOM_FEES\x10\x80\x03\x12\x32\n-DUPLICATE_DENOMINATION_IN_MAX_CUSTOM_FEE_LIST\x10\x81\x03\x12\x30\n+DUPLICATE_ACCOUNT_ID_IN_MAX_CUSTOM_FEE_LIST\x10\x82\x03\x12%\n MAX_CUSTOM_FEES_IS_NOT_SUPPORTED\x10\x83\x03\x12\x15\n\x10\x42\x41TCH_LIST_EMPTY\x10\x84\x03\x12#\n\x1e\x42\x41TCH_LIST_CONTAINS_DUPLICATES\x10\x85\x03\x12#\n\x1e\x42\x41TCH_TRANSACTION_IN_BLACKLIST\x10\x86\x03\x12\x1d\n\x18INNER_TRANSACTION_FAILED\x10\x87\x03\x12\x16\n\x11MISSING_BATCH_KEY\x10\x88\x03\x12+\n&BATCH_KEY_SET_ON_NON_INNER_TRANSACTION\x10\x89\x03\x12\x16\n\x11INVALID_BATCH_KEY\x10\x8a\x03\x12%\n SCHEDULE_EXPIRY_NOT_CONFIGURABLE\x10\x8b\x03\x12\x1d\n\x18\x43REATING_SYSTEM_ENTITIES\x10\x8c\x03\x12 \n\x1bTHROTTLE_GROUP_LCM_OVERFLOW\x10\x8d\x03\x12\x32\n-AIRDROP_CONTAINS_MULTIPLE_SENDERS_FOR_A_TOKEN\x10\x8e\x03\x12!\n\x1cGRPC_WEB_PROXY_NOT_SUPPORTED\x10\x8f\x03\x12\x37\n2NFT_TRANSFERS_ONLY_ALLOWED_FOR_NON_FUNGIBLE_UNIQUE\x10\x90\x03\x12\x31\n,INVALID_SERIALIZED_TX_MESSAGE_HASH_ALGORITHM\x10\x91\x03\x12\x1b\n\x16\x45VM_HOOK_GAS_THROTTLED\x10\xf4\x03\x12\x13\n\x0eHOOK_ID_IN_USE\x10\xf5\x03\x12\x15\n\x10\x42\x41\x44_HOOK_REQUEST\x10\xf6\x03\x12\'\n\"REJECTED_BY_ACCOUNT_ALLOWANCE_HOOK\x10\xf7\x03\x12\x13\n\x0eHOOK_NOT_FOUND\x10\xf8\x03\x12)\n$LAMBDA_STORAGE_UPDATE_BYTES_TOO_LONG\x10\xf9\x03\x12@\n;LAMBDA_STORAGE_UPDATE_BYTES_MUST_USE_MINIMAL_REPRESENTATION\x10\xfa\x03\x12\x14\n\x0fINVALID_HOOK_ID\x10\xfb\x03\x12 \n\x1b\x45MPTY_LAMBDA_STORAGE_UPDATE\x10\xfc\x03\x12)\n$HOOK_ID_REPEATED_IN_CREATION_DETAILS\x10\xfd\x03\x12\x16\n\x11HOOKS_NOT_ENABLED\x10\xfe\x03\x12\x19\n\x14HOOK_IS_NOT_A_LAMBDA\x10\xff\x03\x12\x11\n\x0cHOOK_DELETED\x10\x80\x04\x12$\n\x1fTOO_MANY_LAMBDA_STORAGE_UPDATES\x10\x81\x04\x42&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.response_code_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_RESPONSECODEENUM'].values_by_name["INVALID_RECEIVE_RECORD_THRESHOLD"]._loaded_options = None + _globals['_RESPONSECODEENUM'].values_by_name["INVALID_RECEIVE_RECORD_THRESHOLD"]._serialized_options = b'\010\001' + _globals['_RESPONSECODEENUM'].values_by_name["INVALID_SEND_RECORD_THRESHOLD"]._loaded_options = None + _globals['_RESPONSECODEENUM'].values_by_name["INVALID_SEND_RECORD_THRESHOLD"]._serialized_options = b'\010\001' + _globals['_RESPONSECODEENUM'].values_by_name["INSUFFICIENT_PAYER_BALANCE_FOR_CUSTOM_FEE"]._loaded_options = None + _globals['_RESPONSECODEENUM'].values_by_name["INSUFFICIENT_PAYER_BALANCE_FOR_CUSTOM_FEE"]._serialized_options = b'\010\001' + _globals['_RESPONSECODEENUM'].values_by_name["INVALID_PROXY_ACCOUNT_ID"]._loaded_options = None + _globals['_RESPONSECODEENUM'].values_by_name["INVALID_PROXY_ACCOUNT_ID"]._serialized_options = b'\010\001' + _globals['_RESPONSECODEENUM'].values_by_name["CANNOT_APPROVE_FOR_ALL_FUNGIBLE_COMMON"]._loaded_options = None + _globals['_RESPONSECODEENUM'].values_by_name["CANNOT_APPROVE_FOR_ALL_FUNGIBLE_COMMON"]._serialized_options = b'\010\001' + _globals['_RESPONSECODEENUM'].values_by_name["SPENDER_ACCOUNT_REPEATED_IN_ALLOWANCES"]._loaded_options = None + _globals['_RESPONSECODEENUM'].values_by_name["SPENDER_ACCOUNT_REPEATED_IN_ALLOWANCES"]._serialized_options = b'\010\001' + _globals['_RESPONSECODEENUM'].values_by_name["REPEATED_SERIAL_NUMS_IN_NFT_ALLOWANCES"]._loaded_options = None + _globals['_RESPONSECODEENUM'].values_by_name["REPEATED_SERIAL_NUMS_IN_NFT_ALLOWANCES"]._serialized_options = b'\010\001' + _globals['_RESPONSECODEENUM'].values_by_name["REPEATED_ALLOWANCES_TO_DELETE"]._loaded_options = None + _globals['_RESPONSECODEENUM'].values_by_name["REPEATED_ALLOWANCES_TO_DELETE"]._serialized_options = b'\010\001' + _globals['_RESPONSECODEENUM']._serialized_start=40 + _globals['_RESPONSECODEENUM']._serialized_end=12600 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/response_code_pb2.pyi b/src/hiero_sdk_python/hapi/services/response_code_pb2.pyi new file mode 100644 index 000000000..6a9901817 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/response_code_pb2.pyi @@ -0,0 +1,756 @@ +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper +from google.protobuf import descriptor as _descriptor +from typing import ClassVar as _ClassVar + +DESCRIPTOR: _descriptor.FileDescriptor + +class ResponseCodeEnum(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = () + OK: _ClassVar[ResponseCodeEnum] + INVALID_TRANSACTION: _ClassVar[ResponseCodeEnum] + PAYER_ACCOUNT_NOT_FOUND: _ClassVar[ResponseCodeEnum] + INVALID_NODE_ACCOUNT: _ClassVar[ResponseCodeEnum] + TRANSACTION_EXPIRED: _ClassVar[ResponseCodeEnum] + INVALID_TRANSACTION_START: _ClassVar[ResponseCodeEnum] + INVALID_TRANSACTION_DURATION: _ClassVar[ResponseCodeEnum] + INVALID_SIGNATURE: _ClassVar[ResponseCodeEnum] + MEMO_TOO_LONG: _ClassVar[ResponseCodeEnum] + INSUFFICIENT_TX_FEE: _ClassVar[ResponseCodeEnum] + INSUFFICIENT_PAYER_BALANCE: _ClassVar[ResponseCodeEnum] + DUPLICATE_TRANSACTION: _ClassVar[ResponseCodeEnum] + BUSY: _ClassVar[ResponseCodeEnum] + NOT_SUPPORTED: _ClassVar[ResponseCodeEnum] + INVALID_FILE_ID: _ClassVar[ResponseCodeEnum] + INVALID_ACCOUNT_ID: _ClassVar[ResponseCodeEnum] + INVALID_CONTRACT_ID: _ClassVar[ResponseCodeEnum] + INVALID_TRANSACTION_ID: _ClassVar[ResponseCodeEnum] + RECEIPT_NOT_FOUND: _ClassVar[ResponseCodeEnum] + RECORD_NOT_FOUND: _ClassVar[ResponseCodeEnum] + INVALID_SOLIDITY_ID: _ClassVar[ResponseCodeEnum] + UNKNOWN: _ClassVar[ResponseCodeEnum] + SUCCESS: _ClassVar[ResponseCodeEnum] + FAIL_INVALID: _ClassVar[ResponseCodeEnum] + FAIL_FEE: _ClassVar[ResponseCodeEnum] + FAIL_BALANCE: _ClassVar[ResponseCodeEnum] + KEY_REQUIRED: _ClassVar[ResponseCodeEnum] + BAD_ENCODING: _ClassVar[ResponseCodeEnum] + INSUFFICIENT_ACCOUNT_BALANCE: _ClassVar[ResponseCodeEnum] + INVALID_SOLIDITY_ADDRESS: _ClassVar[ResponseCodeEnum] + INSUFFICIENT_GAS: _ClassVar[ResponseCodeEnum] + CONTRACT_SIZE_LIMIT_EXCEEDED: _ClassVar[ResponseCodeEnum] + LOCAL_CALL_MODIFICATION_EXCEPTION: _ClassVar[ResponseCodeEnum] + CONTRACT_REVERT_EXECUTED: _ClassVar[ResponseCodeEnum] + CONTRACT_EXECUTION_EXCEPTION: _ClassVar[ResponseCodeEnum] + INVALID_RECEIVING_NODE_ACCOUNT: _ClassVar[ResponseCodeEnum] + MISSING_QUERY_HEADER: _ClassVar[ResponseCodeEnum] + ACCOUNT_UPDATE_FAILED: _ClassVar[ResponseCodeEnum] + INVALID_KEY_ENCODING: _ClassVar[ResponseCodeEnum] + NULL_SOLIDITY_ADDRESS: _ClassVar[ResponseCodeEnum] + CONTRACT_UPDATE_FAILED: _ClassVar[ResponseCodeEnum] + INVALID_QUERY_HEADER: _ClassVar[ResponseCodeEnum] + INVALID_FEE_SUBMITTED: _ClassVar[ResponseCodeEnum] + INVALID_PAYER_SIGNATURE: _ClassVar[ResponseCodeEnum] + KEY_NOT_PROVIDED: _ClassVar[ResponseCodeEnum] + INVALID_EXPIRATION_TIME: _ClassVar[ResponseCodeEnum] + NO_WACL_KEY: _ClassVar[ResponseCodeEnum] + FILE_CONTENT_EMPTY: _ClassVar[ResponseCodeEnum] + INVALID_ACCOUNT_AMOUNTS: _ClassVar[ResponseCodeEnum] + EMPTY_TRANSACTION_BODY: _ClassVar[ResponseCodeEnum] + INVALID_TRANSACTION_BODY: _ClassVar[ResponseCodeEnum] + INVALID_SIGNATURE_TYPE_MISMATCHING_KEY: _ClassVar[ResponseCodeEnum] + INVALID_SIGNATURE_COUNT_MISMATCHING_KEY: _ClassVar[ResponseCodeEnum] + EMPTY_LIVE_HASH_BODY: _ClassVar[ResponseCodeEnum] + EMPTY_LIVE_HASH: _ClassVar[ResponseCodeEnum] + EMPTY_LIVE_HASH_KEYS: _ClassVar[ResponseCodeEnum] + INVALID_LIVE_HASH_SIZE: _ClassVar[ResponseCodeEnum] + EMPTY_QUERY_BODY: _ClassVar[ResponseCodeEnum] + EMPTY_LIVE_HASH_QUERY: _ClassVar[ResponseCodeEnum] + LIVE_HASH_NOT_FOUND: _ClassVar[ResponseCodeEnum] + ACCOUNT_ID_DOES_NOT_EXIST: _ClassVar[ResponseCodeEnum] + LIVE_HASH_ALREADY_EXISTS: _ClassVar[ResponseCodeEnum] + INVALID_FILE_WACL: _ClassVar[ResponseCodeEnum] + SERIALIZATION_FAILED: _ClassVar[ResponseCodeEnum] + TRANSACTION_OVERSIZE: _ClassVar[ResponseCodeEnum] + TRANSACTION_TOO_MANY_LAYERS: _ClassVar[ResponseCodeEnum] + CONTRACT_DELETED: _ClassVar[ResponseCodeEnum] + PLATFORM_NOT_ACTIVE: _ClassVar[ResponseCodeEnum] + KEY_PREFIX_MISMATCH: _ClassVar[ResponseCodeEnum] + PLATFORM_TRANSACTION_NOT_CREATED: _ClassVar[ResponseCodeEnum] + INVALID_RENEWAL_PERIOD: _ClassVar[ResponseCodeEnum] + INVALID_PAYER_ACCOUNT_ID: _ClassVar[ResponseCodeEnum] + ACCOUNT_DELETED: _ClassVar[ResponseCodeEnum] + FILE_DELETED: _ClassVar[ResponseCodeEnum] + ACCOUNT_REPEATED_IN_ACCOUNT_AMOUNTS: _ClassVar[ResponseCodeEnum] + SETTING_NEGATIVE_ACCOUNT_BALANCE: _ClassVar[ResponseCodeEnum] + OBTAINER_REQUIRED: _ClassVar[ResponseCodeEnum] + OBTAINER_SAME_CONTRACT_ID: _ClassVar[ResponseCodeEnum] + OBTAINER_DOES_NOT_EXIST: _ClassVar[ResponseCodeEnum] + MODIFYING_IMMUTABLE_CONTRACT: _ClassVar[ResponseCodeEnum] + FILE_SYSTEM_EXCEPTION: _ClassVar[ResponseCodeEnum] + AUTORENEW_DURATION_NOT_IN_RANGE: _ClassVar[ResponseCodeEnum] + ERROR_DECODING_BYTESTRING: _ClassVar[ResponseCodeEnum] + CONTRACT_FILE_EMPTY: _ClassVar[ResponseCodeEnum] + CONTRACT_BYTECODE_EMPTY: _ClassVar[ResponseCodeEnum] + INVALID_INITIAL_BALANCE: _ClassVar[ResponseCodeEnum] + INVALID_RECEIVE_RECORD_THRESHOLD: _ClassVar[ResponseCodeEnum] + INVALID_SEND_RECORD_THRESHOLD: _ClassVar[ResponseCodeEnum] + ACCOUNT_IS_NOT_GENESIS_ACCOUNT: _ClassVar[ResponseCodeEnum] + PAYER_ACCOUNT_UNAUTHORIZED: _ClassVar[ResponseCodeEnum] + INVALID_FREEZE_TRANSACTION_BODY: _ClassVar[ResponseCodeEnum] + FREEZE_TRANSACTION_BODY_NOT_FOUND: _ClassVar[ResponseCodeEnum] + TRANSFER_LIST_SIZE_LIMIT_EXCEEDED: _ClassVar[ResponseCodeEnum] + RESULT_SIZE_LIMIT_EXCEEDED: _ClassVar[ResponseCodeEnum] + NOT_SPECIAL_ACCOUNT: _ClassVar[ResponseCodeEnum] + CONTRACT_NEGATIVE_GAS: _ClassVar[ResponseCodeEnum] + CONTRACT_NEGATIVE_VALUE: _ClassVar[ResponseCodeEnum] + INVALID_FEE_FILE: _ClassVar[ResponseCodeEnum] + INVALID_EXCHANGE_RATE_FILE: _ClassVar[ResponseCodeEnum] + INSUFFICIENT_LOCAL_CALL_GAS: _ClassVar[ResponseCodeEnum] + ENTITY_NOT_ALLOWED_TO_DELETE: _ClassVar[ResponseCodeEnum] + AUTHORIZATION_FAILED: _ClassVar[ResponseCodeEnum] + FILE_UPLOADED_PROTO_INVALID: _ClassVar[ResponseCodeEnum] + FILE_UPLOADED_PROTO_NOT_SAVED_TO_DISK: _ClassVar[ResponseCodeEnum] + FEE_SCHEDULE_FILE_PART_UPLOADED: _ClassVar[ResponseCodeEnum] + EXCHANGE_RATE_CHANGE_LIMIT_EXCEEDED: _ClassVar[ResponseCodeEnum] + MAX_CONTRACT_STORAGE_EXCEEDED: _ClassVar[ResponseCodeEnum] + TRANSFER_ACCOUNT_SAME_AS_DELETE_ACCOUNT: _ClassVar[ResponseCodeEnum] + TOTAL_LEDGER_BALANCE_INVALID: _ClassVar[ResponseCodeEnum] + EXPIRATION_REDUCTION_NOT_ALLOWED: _ClassVar[ResponseCodeEnum] + MAX_GAS_LIMIT_EXCEEDED: _ClassVar[ResponseCodeEnum] + MAX_FILE_SIZE_EXCEEDED: _ClassVar[ResponseCodeEnum] + RECEIVER_SIG_REQUIRED: _ClassVar[ResponseCodeEnum] + INVALID_TOPIC_ID: _ClassVar[ResponseCodeEnum] + INVALID_ADMIN_KEY: _ClassVar[ResponseCodeEnum] + INVALID_SUBMIT_KEY: _ClassVar[ResponseCodeEnum] + UNAUTHORIZED: _ClassVar[ResponseCodeEnum] + INVALID_TOPIC_MESSAGE: _ClassVar[ResponseCodeEnum] + INVALID_AUTORENEW_ACCOUNT: _ClassVar[ResponseCodeEnum] + AUTORENEW_ACCOUNT_NOT_ALLOWED: _ClassVar[ResponseCodeEnum] + TOPIC_EXPIRED: _ClassVar[ResponseCodeEnum] + INVALID_CHUNK_NUMBER: _ClassVar[ResponseCodeEnum] + INVALID_CHUNK_TRANSACTION_ID: _ClassVar[ResponseCodeEnum] + ACCOUNT_FROZEN_FOR_TOKEN: _ClassVar[ResponseCodeEnum] + TOKENS_PER_ACCOUNT_LIMIT_EXCEEDED: _ClassVar[ResponseCodeEnum] + INVALID_TOKEN_ID: _ClassVar[ResponseCodeEnum] + INVALID_TOKEN_DECIMALS: _ClassVar[ResponseCodeEnum] + INVALID_TOKEN_INITIAL_SUPPLY: _ClassVar[ResponseCodeEnum] + INVALID_TREASURY_ACCOUNT_FOR_TOKEN: _ClassVar[ResponseCodeEnum] + INVALID_TOKEN_SYMBOL: _ClassVar[ResponseCodeEnum] + TOKEN_HAS_NO_FREEZE_KEY: _ClassVar[ResponseCodeEnum] + TRANSFERS_NOT_ZERO_SUM_FOR_TOKEN: _ClassVar[ResponseCodeEnum] + MISSING_TOKEN_SYMBOL: _ClassVar[ResponseCodeEnum] + TOKEN_SYMBOL_TOO_LONG: _ClassVar[ResponseCodeEnum] + ACCOUNT_KYC_NOT_GRANTED_FOR_TOKEN: _ClassVar[ResponseCodeEnum] + TOKEN_HAS_NO_KYC_KEY: _ClassVar[ResponseCodeEnum] + INSUFFICIENT_TOKEN_BALANCE: _ClassVar[ResponseCodeEnum] + TOKEN_WAS_DELETED: _ClassVar[ResponseCodeEnum] + TOKEN_HAS_NO_SUPPLY_KEY: _ClassVar[ResponseCodeEnum] + TOKEN_HAS_NO_WIPE_KEY: _ClassVar[ResponseCodeEnum] + INVALID_TOKEN_MINT_AMOUNT: _ClassVar[ResponseCodeEnum] + INVALID_TOKEN_BURN_AMOUNT: _ClassVar[ResponseCodeEnum] + TOKEN_NOT_ASSOCIATED_TO_ACCOUNT: _ClassVar[ResponseCodeEnum] + CANNOT_WIPE_TOKEN_TREASURY_ACCOUNT: _ClassVar[ResponseCodeEnum] + INVALID_KYC_KEY: _ClassVar[ResponseCodeEnum] + INVALID_WIPE_KEY: _ClassVar[ResponseCodeEnum] + INVALID_FREEZE_KEY: _ClassVar[ResponseCodeEnum] + INVALID_SUPPLY_KEY: _ClassVar[ResponseCodeEnum] + MISSING_TOKEN_NAME: _ClassVar[ResponseCodeEnum] + TOKEN_NAME_TOO_LONG: _ClassVar[ResponseCodeEnum] + INVALID_WIPING_AMOUNT: _ClassVar[ResponseCodeEnum] + TOKEN_IS_IMMUTABLE: _ClassVar[ResponseCodeEnum] + TOKEN_ALREADY_ASSOCIATED_TO_ACCOUNT: _ClassVar[ResponseCodeEnum] + TRANSACTION_REQUIRES_ZERO_TOKEN_BALANCES: _ClassVar[ResponseCodeEnum] + ACCOUNT_IS_TREASURY: _ClassVar[ResponseCodeEnum] + TOKEN_ID_REPEATED_IN_TOKEN_LIST: _ClassVar[ResponseCodeEnum] + TOKEN_TRANSFER_LIST_SIZE_LIMIT_EXCEEDED: _ClassVar[ResponseCodeEnum] + EMPTY_TOKEN_TRANSFER_BODY: _ClassVar[ResponseCodeEnum] + EMPTY_TOKEN_TRANSFER_ACCOUNT_AMOUNTS: _ClassVar[ResponseCodeEnum] + INVALID_SCHEDULE_ID: _ClassVar[ResponseCodeEnum] + SCHEDULE_IS_IMMUTABLE: _ClassVar[ResponseCodeEnum] + INVALID_SCHEDULE_PAYER_ID: _ClassVar[ResponseCodeEnum] + INVALID_SCHEDULE_ACCOUNT_ID: _ClassVar[ResponseCodeEnum] + NO_NEW_VALID_SIGNATURES: _ClassVar[ResponseCodeEnum] + UNRESOLVABLE_REQUIRED_SIGNERS: _ClassVar[ResponseCodeEnum] + SCHEDULED_TRANSACTION_NOT_IN_WHITELIST: _ClassVar[ResponseCodeEnum] + SOME_SIGNATURES_WERE_INVALID: _ClassVar[ResponseCodeEnum] + TRANSACTION_ID_FIELD_NOT_ALLOWED: _ClassVar[ResponseCodeEnum] + IDENTICAL_SCHEDULE_ALREADY_CREATED: _ClassVar[ResponseCodeEnum] + INVALID_ZERO_BYTE_IN_STRING: _ClassVar[ResponseCodeEnum] + SCHEDULE_ALREADY_DELETED: _ClassVar[ResponseCodeEnum] + SCHEDULE_ALREADY_EXECUTED: _ClassVar[ResponseCodeEnum] + MESSAGE_SIZE_TOO_LARGE: _ClassVar[ResponseCodeEnum] + OPERATION_REPEATED_IN_BUCKET_GROUPS: _ClassVar[ResponseCodeEnum] + BUCKET_CAPACITY_OVERFLOW: _ClassVar[ResponseCodeEnum] + NODE_CAPACITY_NOT_SUFFICIENT_FOR_OPERATION: _ClassVar[ResponseCodeEnum] + BUCKET_HAS_NO_THROTTLE_GROUPS: _ClassVar[ResponseCodeEnum] + THROTTLE_GROUP_HAS_ZERO_OPS_PER_SEC: _ClassVar[ResponseCodeEnum] + SUCCESS_BUT_MISSING_EXPECTED_OPERATION: _ClassVar[ResponseCodeEnum] + UNPARSEABLE_THROTTLE_DEFINITIONS: _ClassVar[ResponseCodeEnum] + INVALID_THROTTLE_DEFINITIONS: _ClassVar[ResponseCodeEnum] + ACCOUNT_EXPIRED_AND_PENDING_REMOVAL: _ClassVar[ResponseCodeEnum] + INVALID_TOKEN_MAX_SUPPLY: _ClassVar[ResponseCodeEnum] + INVALID_TOKEN_NFT_SERIAL_NUMBER: _ClassVar[ResponseCodeEnum] + INVALID_NFT_ID: _ClassVar[ResponseCodeEnum] + METADATA_TOO_LONG: _ClassVar[ResponseCodeEnum] + BATCH_SIZE_LIMIT_EXCEEDED: _ClassVar[ResponseCodeEnum] + INVALID_QUERY_RANGE: _ClassVar[ResponseCodeEnum] + FRACTION_DIVIDES_BY_ZERO: _ClassVar[ResponseCodeEnum] + INSUFFICIENT_PAYER_BALANCE_FOR_CUSTOM_FEE: _ClassVar[ResponseCodeEnum] + CUSTOM_FEES_LIST_TOO_LONG: _ClassVar[ResponseCodeEnum] + INVALID_CUSTOM_FEE_COLLECTOR: _ClassVar[ResponseCodeEnum] + INVALID_TOKEN_ID_IN_CUSTOM_FEES: _ClassVar[ResponseCodeEnum] + TOKEN_NOT_ASSOCIATED_TO_FEE_COLLECTOR: _ClassVar[ResponseCodeEnum] + TOKEN_MAX_SUPPLY_REACHED: _ClassVar[ResponseCodeEnum] + SENDER_DOES_NOT_OWN_NFT_SERIAL_NO: _ClassVar[ResponseCodeEnum] + CUSTOM_FEE_NOT_FULLY_SPECIFIED: _ClassVar[ResponseCodeEnum] + CUSTOM_FEE_MUST_BE_POSITIVE: _ClassVar[ResponseCodeEnum] + TOKEN_HAS_NO_FEE_SCHEDULE_KEY: _ClassVar[ResponseCodeEnum] + CUSTOM_FEE_OUTSIDE_NUMERIC_RANGE: _ClassVar[ResponseCodeEnum] + ROYALTY_FRACTION_CANNOT_EXCEED_ONE: _ClassVar[ResponseCodeEnum] + FRACTIONAL_FEE_MAX_AMOUNT_LESS_THAN_MIN_AMOUNT: _ClassVar[ResponseCodeEnum] + CUSTOM_SCHEDULE_ALREADY_HAS_NO_FEES: _ClassVar[ResponseCodeEnum] + CUSTOM_FEE_DENOMINATION_MUST_BE_FUNGIBLE_COMMON: _ClassVar[ResponseCodeEnum] + CUSTOM_FRACTIONAL_FEE_ONLY_ALLOWED_FOR_FUNGIBLE_COMMON: _ClassVar[ResponseCodeEnum] + INVALID_CUSTOM_FEE_SCHEDULE_KEY: _ClassVar[ResponseCodeEnum] + INVALID_TOKEN_MINT_METADATA: _ClassVar[ResponseCodeEnum] + INVALID_TOKEN_BURN_METADATA: _ClassVar[ResponseCodeEnum] + CURRENT_TREASURY_STILL_OWNS_NFTS: _ClassVar[ResponseCodeEnum] + ACCOUNT_STILL_OWNS_NFTS: _ClassVar[ResponseCodeEnum] + TREASURY_MUST_OWN_BURNED_NFT: _ClassVar[ResponseCodeEnum] + ACCOUNT_DOES_NOT_OWN_WIPED_NFT: _ClassVar[ResponseCodeEnum] + ACCOUNT_AMOUNT_TRANSFERS_ONLY_ALLOWED_FOR_FUNGIBLE_COMMON: _ClassVar[ResponseCodeEnum] + MAX_NFTS_IN_PRICE_REGIME_HAVE_BEEN_MINTED: _ClassVar[ResponseCodeEnum] + PAYER_ACCOUNT_DELETED: _ClassVar[ResponseCodeEnum] + CUSTOM_FEE_CHARGING_EXCEEDED_MAX_RECURSION_DEPTH: _ClassVar[ResponseCodeEnum] + CUSTOM_FEE_CHARGING_EXCEEDED_MAX_ACCOUNT_AMOUNTS: _ClassVar[ResponseCodeEnum] + INSUFFICIENT_SENDER_ACCOUNT_BALANCE_FOR_CUSTOM_FEE: _ClassVar[ResponseCodeEnum] + SERIAL_NUMBER_LIMIT_REACHED: _ClassVar[ResponseCodeEnum] + CUSTOM_ROYALTY_FEE_ONLY_ALLOWED_FOR_NON_FUNGIBLE_UNIQUE: _ClassVar[ResponseCodeEnum] + NO_REMAINING_AUTOMATIC_ASSOCIATIONS: _ClassVar[ResponseCodeEnum] + EXISTING_AUTOMATIC_ASSOCIATIONS_EXCEED_GIVEN_LIMIT: _ClassVar[ResponseCodeEnum] + REQUESTED_NUM_AUTOMATIC_ASSOCIATIONS_EXCEEDS_ASSOCIATION_LIMIT: _ClassVar[ResponseCodeEnum] + TOKEN_IS_PAUSED: _ClassVar[ResponseCodeEnum] + TOKEN_HAS_NO_PAUSE_KEY: _ClassVar[ResponseCodeEnum] + INVALID_PAUSE_KEY: _ClassVar[ResponseCodeEnum] + FREEZE_UPDATE_FILE_DOES_NOT_EXIST: _ClassVar[ResponseCodeEnum] + FREEZE_UPDATE_FILE_HASH_DOES_NOT_MATCH: _ClassVar[ResponseCodeEnum] + NO_UPGRADE_HAS_BEEN_PREPARED: _ClassVar[ResponseCodeEnum] + NO_FREEZE_IS_SCHEDULED: _ClassVar[ResponseCodeEnum] + UPDATE_FILE_HASH_CHANGED_SINCE_PREPARE_UPGRADE: _ClassVar[ResponseCodeEnum] + FREEZE_START_TIME_MUST_BE_FUTURE: _ClassVar[ResponseCodeEnum] + PREPARED_UPDATE_FILE_IS_IMMUTABLE: _ClassVar[ResponseCodeEnum] + FREEZE_ALREADY_SCHEDULED: _ClassVar[ResponseCodeEnum] + FREEZE_UPGRADE_IN_PROGRESS: _ClassVar[ResponseCodeEnum] + UPDATE_FILE_ID_DOES_NOT_MATCH_PREPARED: _ClassVar[ResponseCodeEnum] + UPDATE_FILE_HASH_DOES_NOT_MATCH_PREPARED: _ClassVar[ResponseCodeEnum] + CONSENSUS_GAS_EXHAUSTED: _ClassVar[ResponseCodeEnum] + REVERTED_SUCCESS: _ClassVar[ResponseCodeEnum] + MAX_STORAGE_IN_PRICE_REGIME_HAS_BEEN_USED: _ClassVar[ResponseCodeEnum] + INVALID_ALIAS_KEY: _ClassVar[ResponseCodeEnum] + UNEXPECTED_TOKEN_DECIMALS: _ClassVar[ResponseCodeEnum] + INVALID_PROXY_ACCOUNT_ID: _ClassVar[ResponseCodeEnum] + INVALID_TRANSFER_ACCOUNT_ID: _ClassVar[ResponseCodeEnum] + INVALID_FEE_COLLECTOR_ACCOUNT_ID: _ClassVar[ResponseCodeEnum] + ALIAS_IS_IMMUTABLE: _ClassVar[ResponseCodeEnum] + SPENDER_ACCOUNT_SAME_AS_OWNER: _ClassVar[ResponseCodeEnum] + AMOUNT_EXCEEDS_TOKEN_MAX_SUPPLY: _ClassVar[ResponseCodeEnum] + NEGATIVE_ALLOWANCE_AMOUNT: _ClassVar[ResponseCodeEnum] + CANNOT_APPROVE_FOR_ALL_FUNGIBLE_COMMON: _ClassVar[ResponseCodeEnum] + SPENDER_DOES_NOT_HAVE_ALLOWANCE: _ClassVar[ResponseCodeEnum] + AMOUNT_EXCEEDS_ALLOWANCE: _ClassVar[ResponseCodeEnum] + MAX_ALLOWANCES_EXCEEDED: _ClassVar[ResponseCodeEnum] + EMPTY_ALLOWANCES: _ClassVar[ResponseCodeEnum] + SPENDER_ACCOUNT_REPEATED_IN_ALLOWANCES: _ClassVar[ResponseCodeEnum] + REPEATED_SERIAL_NUMS_IN_NFT_ALLOWANCES: _ClassVar[ResponseCodeEnum] + FUNGIBLE_TOKEN_IN_NFT_ALLOWANCES: _ClassVar[ResponseCodeEnum] + NFT_IN_FUNGIBLE_TOKEN_ALLOWANCES: _ClassVar[ResponseCodeEnum] + INVALID_ALLOWANCE_OWNER_ID: _ClassVar[ResponseCodeEnum] + INVALID_ALLOWANCE_SPENDER_ID: _ClassVar[ResponseCodeEnum] + REPEATED_ALLOWANCES_TO_DELETE: _ClassVar[ResponseCodeEnum] + INVALID_DELEGATING_SPENDER: _ClassVar[ResponseCodeEnum] + DELEGATING_SPENDER_CANNOT_GRANT_APPROVE_FOR_ALL: _ClassVar[ResponseCodeEnum] + DELEGATING_SPENDER_DOES_NOT_HAVE_APPROVE_FOR_ALL: _ClassVar[ResponseCodeEnum] + SCHEDULE_EXPIRATION_TIME_TOO_FAR_IN_FUTURE: _ClassVar[ResponseCodeEnum] + SCHEDULE_EXPIRATION_TIME_MUST_BE_HIGHER_THAN_CONSENSUS_TIME: _ClassVar[ResponseCodeEnum] + SCHEDULE_FUTURE_THROTTLE_EXCEEDED: _ClassVar[ResponseCodeEnum] + SCHEDULE_FUTURE_GAS_LIMIT_EXCEEDED: _ClassVar[ResponseCodeEnum] + INVALID_ETHEREUM_TRANSACTION: _ClassVar[ResponseCodeEnum] + WRONG_CHAIN_ID: _ClassVar[ResponseCodeEnum] + WRONG_NONCE: _ClassVar[ResponseCodeEnum] + ACCESS_LIST_UNSUPPORTED: _ClassVar[ResponseCodeEnum] + SCHEDULE_PENDING_EXPIRATION: _ClassVar[ResponseCodeEnum] + CONTRACT_IS_TOKEN_TREASURY: _ClassVar[ResponseCodeEnum] + CONTRACT_HAS_NON_ZERO_TOKEN_BALANCES: _ClassVar[ResponseCodeEnum] + CONTRACT_EXPIRED_AND_PENDING_REMOVAL: _ClassVar[ResponseCodeEnum] + CONTRACT_HAS_NO_AUTO_RENEW_ACCOUNT: _ClassVar[ResponseCodeEnum] + PERMANENT_REMOVAL_REQUIRES_SYSTEM_INITIATION: _ClassVar[ResponseCodeEnum] + PROXY_ACCOUNT_ID_FIELD_IS_DEPRECATED: _ClassVar[ResponseCodeEnum] + SELF_STAKING_IS_NOT_ALLOWED: _ClassVar[ResponseCodeEnum] + INVALID_STAKING_ID: _ClassVar[ResponseCodeEnum] + STAKING_NOT_ENABLED: _ClassVar[ResponseCodeEnum] + INVALID_PRNG_RANGE: _ClassVar[ResponseCodeEnum] + MAX_ENTITIES_IN_PRICE_REGIME_HAVE_BEEN_CREATED: _ClassVar[ResponseCodeEnum] + INVALID_FULL_PREFIX_SIGNATURE_FOR_PRECOMPILE: _ClassVar[ResponseCodeEnum] + INSUFFICIENT_BALANCES_FOR_STORAGE_RENT: _ClassVar[ResponseCodeEnum] + MAX_CHILD_RECORDS_EXCEEDED: _ClassVar[ResponseCodeEnum] + INSUFFICIENT_BALANCES_FOR_RENEWAL_FEES: _ClassVar[ResponseCodeEnum] + TRANSACTION_HAS_UNKNOWN_FIELDS: _ClassVar[ResponseCodeEnum] + ACCOUNT_IS_IMMUTABLE: _ClassVar[ResponseCodeEnum] + ALIAS_ALREADY_ASSIGNED: _ClassVar[ResponseCodeEnum] + INVALID_METADATA_KEY: _ClassVar[ResponseCodeEnum] + TOKEN_HAS_NO_METADATA_KEY: _ClassVar[ResponseCodeEnum] + MISSING_TOKEN_METADATA: _ClassVar[ResponseCodeEnum] + MISSING_SERIAL_NUMBERS: _ClassVar[ResponseCodeEnum] + TOKEN_HAS_NO_ADMIN_KEY: _ClassVar[ResponseCodeEnum] + NODE_DELETED: _ClassVar[ResponseCodeEnum] + INVALID_NODE_ID: _ClassVar[ResponseCodeEnum] + INVALID_GOSSIP_ENDPOINT: _ClassVar[ResponseCodeEnum] + INVALID_NODE_ACCOUNT_ID: _ClassVar[ResponseCodeEnum] + INVALID_NODE_DESCRIPTION: _ClassVar[ResponseCodeEnum] + INVALID_SERVICE_ENDPOINT: _ClassVar[ResponseCodeEnum] + INVALID_GOSSIP_CA_CERTIFICATE: _ClassVar[ResponseCodeEnum] + INVALID_GRPC_CERTIFICATE: _ClassVar[ResponseCodeEnum] + INVALID_MAX_AUTO_ASSOCIATIONS: _ClassVar[ResponseCodeEnum] + MAX_NODES_CREATED: _ClassVar[ResponseCodeEnum] + IP_FQDN_CANNOT_BE_SET_FOR_SAME_ENDPOINT: _ClassVar[ResponseCodeEnum] + GOSSIP_ENDPOINT_CANNOT_HAVE_FQDN: _ClassVar[ResponseCodeEnum] + FQDN_SIZE_TOO_LARGE: _ClassVar[ResponseCodeEnum] + INVALID_ENDPOINT: _ClassVar[ResponseCodeEnum] + GOSSIP_ENDPOINTS_EXCEEDED_LIMIT: _ClassVar[ResponseCodeEnum] + TOKEN_REFERENCE_REPEATED: _ClassVar[ResponseCodeEnum] + INVALID_OWNER_ID: _ClassVar[ResponseCodeEnum] + TOKEN_REFERENCE_LIST_SIZE_LIMIT_EXCEEDED: _ClassVar[ResponseCodeEnum] + SERVICE_ENDPOINTS_EXCEEDED_LIMIT: _ClassVar[ResponseCodeEnum] + INVALID_IPV4_ADDRESS: _ClassVar[ResponseCodeEnum] + EMPTY_TOKEN_REFERENCE_LIST: _ClassVar[ResponseCodeEnum] + UPDATE_NODE_ACCOUNT_NOT_ALLOWED: _ClassVar[ResponseCodeEnum] + TOKEN_HAS_NO_METADATA_OR_SUPPLY_KEY: _ClassVar[ResponseCodeEnum] + EMPTY_PENDING_AIRDROP_ID_LIST: _ClassVar[ResponseCodeEnum] + PENDING_AIRDROP_ID_REPEATED: _ClassVar[ResponseCodeEnum] + PENDING_AIRDROP_ID_LIST_TOO_LONG: _ClassVar[ResponseCodeEnum] + PENDING_NFT_AIRDROP_ALREADY_EXISTS: _ClassVar[ResponseCodeEnum] + ACCOUNT_HAS_PENDING_AIRDROPS: _ClassVar[ResponseCodeEnum] + THROTTLED_AT_CONSENSUS: _ClassVar[ResponseCodeEnum] + INVALID_PENDING_AIRDROP_ID: _ClassVar[ResponseCodeEnum] + TOKEN_AIRDROP_WITH_FALLBACK_ROYALTY: _ClassVar[ResponseCodeEnum] + INVALID_TOKEN_IN_PENDING_AIRDROP: _ClassVar[ResponseCodeEnum] + SCHEDULE_EXPIRY_IS_BUSY: _ClassVar[ResponseCodeEnum] + INVALID_GRPC_CERTIFICATE_HASH: _ClassVar[ResponseCodeEnum] + MISSING_EXPIRY_TIME: _ClassVar[ResponseCodeEnum] + NO_SCHEDULING_ALLOWED_AFTER_SCHEDULED_RECURSION: _ClassVar[ResponseCodeEnum] + RECURSIVE_SCHEDULING_LIMIT_REACHED: _ClassVar[ResponseCodeEnum] + WAITING_FOR_LEDGER_ID: _ClassVar[ResponseCodeEnum] + MAX_ENTRIES_FOR_FEE_EXEMPT_KEY_LIST_EXCEEDED: _ClassVar[ResponseCodeEnum] + FEE_EXEMPT_KEY_LIST_CONTAINS_DUPLICATED_KEYS: _ClassVar[ResponseCodeEnum] + INVALID_KEY_IN_FEE_EXEMPT_KEY_LIST: _ClassVar[ResponseCodeEnum] + INVALID_FEE_SCHEDULE_KEY: _ClassVar[ResponseCodeEnum] + FEE_SCHEDULE_KEY_CANNOT_BE_UPDATED: _ClassVar[ResponseCodeEnum] + FEE_SCHEDULE_KEY_NOT_SET: _ClassVar[ResponseCodeEnum] + MAX_CUSTOM_FEE_LIMIT_EXCEEDED: _ClassVar[ResponseCodeEnum] + NO_VALID_MAX_CUSTOM_FEE: _ClassVar[ResponseCodeEnum] + INVALID_MAX_CUSTOM_FEES: _ClassVar[ResponseCodeEnum] + DUPLICATE_DENOMINATION_IN_MAX_CUSTOM_FEE_LIST: _ClassVar[ResponseCodeEnum] + DUPLICATE_ACCOUNT_ID_IN_MAX_CUSTOM_FEE_LIST: _ClassVar[ResponseCodeEnum] + MAX_CUSTOM_FEES_IS_NOT_SUPPORTED: _ClassVar[ResponseCodeEnum] + BATCH_LIST_EMPTY: _ClassVar[ResponseCodeEnum] + BATCH_LIST_CONTAINS_DUPLICATES: _ClassVar[ResponseCodeEnum] + BATCH_TRANSACTION_IN_BLACKLIST: _ClassVar[ResponseCodeEnum] + INNER_TRANSACTION_FAILED: _ClassVar[ResponseCodeEnum] + MISSING_BATCH_KEY: _ClassVar[ResponseCodeEnum] + BATCH_KEY_SET_ON_NON_INNER_TRANSACTION: _ClassVar[ResponseCodeEnum] + INVALID_BATCH_KEY: _ClassVar[ResponseCodeEnum] + SCHEDULE_EXPIRY_NOT_CONFIGURABLE: _ClassVar[ResponseCodeEnum] + CREATING_SYSTEM_ENTITIES: _ClassVar[ResponseCodeEnum] + THROTTLE_GROUP_LCM_OVERFLOW: _ClassVar[ResponseCodeEnum] + AIRDROP_CONTAINS_MULTIPLE_SENDERS_FOR_A_TOKEN: _ClassVar[ResponseCodeEnum] + GRPC_WEB_PROXY_NOT_SUPPORTED: _ClassVar[ResponseCodeEnum] + NFT_TRANSFERS_ONLY_ALLOWED_FOR_NON_FUNGIBLE_UNIQUE: _ClassVar[ResponseCodeEnum] + INVALID_SERIALIZED_TX_MESSAGE_HASH_ALGORITHM: _ClassVar[ResponseCodeEnum] + EVM_HOOK_GAS_THROTTLED: _ClassVar[ResponseCodeEnum] + HOOK_ID_IN_USE: _ClassVar[ResponseCodeEnum] + BAD_HOOK_REQUEST: _ClassVar[ResponseCodeEnum] + REJECTED_BY_ACCOUNT_ALLOWANCE_HOOK: _ClassVar[ResponseCodeEnum] + HOOK_NOT_FOUND: _ClassVar[ResponseCodeEnum] + LAMBDA_STORAGE_UPDATE_BYTES_TOO_LONG: _ClassVar[ResponseCodeEnum] + LAMBDA_STORAGE_UPDATE_BYTES_MUST_USE_MINIMAL_REPRESENTATION: _ClassVar[ResponseCodeEnum] + INVALID_HOOK_ID: _ClassVar[ResponseCodeEnum] + EMPTY_LAMBDA_STORAGE_UPDATE: _ClassVar[ResponseCodeEnum] + HOOK_ID_REPEATED_IN_CREATION_DETAILS: _ClassVar[ResponseCodeEnum] + HOOKS_NOT_ENABLED: _ClassVar[ResponseCodeEnum] + HOOK_IS_NOT_A_LAMBDA: _ClassVar[ResponseCodeEnum] + HOOK_DELETED: _ClassVar[ResponseCodeEnum] + TOO_MANY_LAMBDA_STORAGE_UPDATES: _ClassVar[ResponseCodeEnum] +OK: ResponseCodeEnum +INVALID_TRANSACTION: ResponseCodeEnum +PAYER_ACCOUNT_NOT_FOUND: ResponseCodeEnum +INVALID_NODE_ACCOUNT: ResponseCodeEnum +TRANSACTION_EXPIRED: ResponseCodeEnum +INVALID_TRANSACTION_START: ResponseCodeEnum +INVALID_TRANSACTION_DURATION: ResponseCodeEnum +INVALID_SIGNATURE: ResponseCodeEnum +MEMO_TOO_LONG: ResponseCodeEnum +INSUFFICIENT_TX_FEE: ResponseCodeEnum +INSUFFICIENT_PAYER_BALANCE: ResponseCodeEnum +DUPLICATE_TRANSACTION: ResponseCodeEnum +BUSY: ResponseCodeEnum +NOT_SUPPORTED: ResponseCodeEnum +INVALID_FILE_ID: ResponseCodeEnum +INVALID_ACCOUNT_ID: ResponseCodeEnum +INVALID_CONTRACT_ID: ResponseCodeEnum +INVALID_TRANSACTION_ID: ResponseCodeEnum +RECEIPT_NOT_FOUND: ResponseCodeEnum +RECORD_NOT_FOUND: ResponseCodeEnum +INVALID_SOLIDITY_ID: ResponseCodeEnum +UNKNOWN: ResponseCodeEnum +SUCCESS: ResponseCodeEnum +FAIL_INVALID: ResponseCodeEnum +FAIL_FEE: ResponseCodeEnum +FAIL_BALANCE: ResponseCodeEnum +KEY_REQUIRED: ResponseCodeEnum +BAD_ENCODING: ResponseCodeEnum +INSUFFICIENT_ACCOUNT_BALANCE: ResponseCodeEnum +INVALID_SOLIDITY_ADDRESS: ResponseCodeEnum +INSUFFICIENT_GAS: ResponseCodeEnum +CONTRACT_SIZE_LIMIT_EXCEEDED: ResponseCodeEnum +LOCAL_CALL_MODIFICATION_EXCEPTION: ResponseCodeEnum +CONTRACT_REVERT_EXECUTED: ResponseCodeEnum +CONTRACT_EXECUTION_EXCEPTION: ResponseCodeEnum +INVALID_RECEIVING_NODE_ACCOUNT: ResponseCodeEnum +MISSING_QUERY_HEADER: ResponseCodeEnum +ACCOUNT_UPDATE_FAILED: ResponseCodeEnum +INVALID_KEY_ENCODING: ResponseCodeEnum +NULL_SOLIDITY_ADDRESS: ResponseCodeEnum +CONTRACT_UPDATE_FAILED: ResponseCodeEnum +INVALID_QUERY_HEADER: ResponseCodeEnum +INVALID_FEE_SUBMITTED: ResponseCodeEnum +INVALID_PAYER_SIGNATURE: ResponseCodeEnum +KEY_NOT_PROVIDED: ResponseCodeEnum +INVALID_EXPIRATION_TIME: ResponseCodeEnum +NO_WACL_KEY: ResponseCodeEnum +FILE_CONTENT_EMPTY: ResponseCodeEnum +INVALID_ACCOUNT_AMOUNTS: ResponseCodeEnum +EMPTY_TRANSACTION_BODY: ResponseCodeEnum +INVALID_TRANSACTION_BODY: ResponseCodeEnum +INVALID_SIGNATURE_TYPE_MISMATCHING_KEY: ResponseCodeEnum +INVALID_SIGNATURE_COUNT_MISMATCHING_KEY: ResponseCodeEnum +EMPTY_LIVE_HASH_BODY: ResponseCodeEnum +EMPTY_LIVE_HASH: ResponseCodeEnum +EMPTY_LIVE_HASH_KEYS: ResponseCodeEnum +INVALID_LIVE_HASH_SIZE: ResponseCodeEnum +EMPTY_QUERY_BODY: ResponseCodeEnum +EMPTY_LIVE_HASH_QUERY: ResponseCodeEnum +LIVE_HASH_NOT_FOUND: ResponseCodeEnum +ACCOUNT_ID_DOES_NOT_EXIST: ResponseCodeEnum +LIVE_HASH_ALREADY_EXISTS: ResponseCodeEnum +INVALID_FILE_WACL: ResponseCodeEnum +SERIALIZATION_FAILED: ResponseCodeEnum +TRANSACTION_OVERSIZE: ResponseCodeEnum +TRANSACTION_TOO_MANY_LAYERS: ResponseCodeEnum +CONTRACT_DELETED: ResponseCodeEnum +PLATFORM_NOT_ACTIVE: ResponseCodeEnum +KEY_PREFIX_MISMATCH: ResponseCodeEnum +PLATFORM_TRANSACTION_NOT_CREATED: ResponseCodeEnum +INVALID_RENEWAL_PERIOD: ResponseCodeEnum +INVALID_PAYER_ACCOUNT_ID: ResponseCodeEnum +ACCOUNT_DELETED: ResponseCodeEnum +FILE_DELETED: ResponseCodeEnum +ACCOUNT_REPEATED_IN_ACCOUNT_AMOUNTS: ResponseCodeEnum +SETTING_NEGATIVE_ACCOUNT_BALANCE: ResponseCodeEnum +OBTAINER_REQUIRED: ResponseCodeEnum +OBTAINER_SAME_CONTRACT_ID: ResponseCodeEnum +OBTAINER_DOES_NOT_EXIST: ResponseCodeEnum +MODIFYING_IMMUTABLE_CONTRACT: ResponseCodeEnum +FILE_SYSTEM_EXCEPTION: ResponseCodeEnum +AUTORENEW_DURATION_NOT_IN_RANGE: ResponseCodeEnum +ERROR_DECODING_BYTESTRING: ResponseCodeEnum +CONTRACT_FILE_EMPTY: ResponseCodeEnum +CONTRACT_BYTECODE_EMPTY: ResponseCodeEnum +INVALID_INITIAL_BALANCE: ResponseCodeEnum +INVALID_RECEIVE_RECORD_THRESHOLD: ResponseCodeEnum +INVALID_SEND_RECORD_THRESHOLD: ResponseCodeEnum +ACCOUNT_IS_NOT_GENESIS_ACCOUNT: ResponseCodeEnum +PAYER_ACCOUNT_UNAUTHORIZED: ResponseCodeEnum +INVALID_FREEZE_TRANSACTION_BODY: ResponseCodeEnum +FREEZE_TRANSACTION_BODY_NOT_FOUND: ResponseCodeEnum +TRANSFER_LIST_SIZE_LIMIT_EXCEEDED: ResponseCodeEnum +RESULT_SIZE_LIMIT_EXCEEDED: ResponseCodeEnum +NOT_SPECIAL_ACCOUNT: ResponseCodeEnum +CONTRACT_NEGATIVE_GAS: ResponseCodeEnum +CONTRACT_NEGATIVE_VALUE: ResponseCodeEnum +INVALID_FEE_FILE: ResponseCodeEnum +INVALID_EXCHANGE_RATE_FILE: ResponseCodeEnum +INSUFFICIENT_LOCAL_CALL_GAS: ResponseCodeEnum +ENTITY_NOT_ALLOWED_TO_DELETE: ResponseCodeEnum +AUTHORIZATION_FAILED: ResponseCodeEnum +FILE_UPLOADED_PROTO_INVALID: ResponseCodeEnum +FILE_UPLOADED_PROTO_NOT_SAVED_TO_DISK: ResponseCodeEnum +FEE_SCHEDULE_FILE_PART_UPLOADED: ResponseCodeEnum +EXCHANGE_RATE_CHANGE_LIMIT_EXCEEDED: ResponseCodeEnum +MAX_CONTRACT_STORAGE_EXCEEDED: ResponseCodeEnum +TRANSFER_ACCOUNT_SAME_AS_DELETE_ACCOUNT: ResponseCodeEnum +TOTAL_LEDGER_BALANCE_INVALID: ResponseCodeEnum +EXPIRATION_REDUCTION_NOT_ALLOWED: ResponseCodeEnum +MAX_GAS_LIMIT_EXCEEDED: ResponseCodeEnum +MAX_FILE_SIZE_EXCEEDED: ResponseCodeEnum +RECEIVER_SIG_REQUIRED: ResponseCodeEnum +INVALID_TOPIC_ID: ResponseCodeEnum +INVALID_ADMIN_KEY: ResponseCodeEnum +INVALID_SUBMIT_KEY: ResponseCodeEnum +UNAUTHORIZED: ResponseCodeEnum +INVALID_TOPIC_MESSAGE: ResponseCodeEnum +INVALID_AUTORENEW_ACCOUNT: ResponseCodeEnum +AUTORENEW_ACCOUNT_NOT_ALLOWED: ResponseCodeEnum +TOPIC_EXPIRED: ResponseCodeEnum +INVALID_CHUNK_NUMBER: ResponseCodeEnum +INVALID_CHUNK_TRANSACTION_ID: ResponseCodeEnum +ACCOUNT_FROZEN_FOR_TOKEN: ResponseCodeEnum +TOKENS_PER_ACCOUNT_LIMIT_EXCEEDED: ResponseCodeEnum +INVALID_TOKEN_ID: ResponseCodeEnum +INVALID_TOKEN_DECIMALS: ResponseCodeEnum +INVALID_TOKEN_INITIAL_SUPPLY: ResponseCodeEnum +INVALID_TREASURY_ACCOUNT_FOR_TOKEN: ResponseCodeEnum +INVALID_TOKEN_SYMBOL: ResponseCodeEnum +TOKEN_HAS_NO_FREEZE_KEY: ResponseCodeEnum +TRANSFERS_NOT_ZERO_SUM_FOR_TOKEN: ResponseCodeEnum +MISSING_TOKEN_SYMBOL: ResponseCodeEnum +TOKEN_SYMBOL_TOO_LONG: ResponseCodeEnum +ACCOUNT_KYC_NOT_GRANTED_FOR_TOKEN: ResponseCodeEnum +TOKEN_HAS_NO_KYC_KEY: ResponseCodeEnum +INSUFFICIENT_TOKEN_BALANCE: ResponseCodeEnum +TOKEN_WAS_DELETED: ResponseCodeEnum +TOKEN_HAS_NO_SUPPLY_KEY: ResponseCodeEnum +TOKEN_HAS_NO_WIPE_KEY: ResponseCodeEnum +INVALID_TOKEN_MINT_AMOUNT: ResponseCodeEnum +INVALID_TOKEN_BURN_AMOUNT: ResponseCodeEnum +TOKEN_NOT_ASSOCIATED_TO_ACCOUNT: ResponseCodeEnum +CANNOT_WIPE_TOKEN_TREASURY_ACCOUNT: ResponseCodeEnum +INVALID_KYC_KEY: ResponseCodeEnum +INVALID_WIPE_KEY: ResponseCodeEnum +INVALID_FREEZE_KEY: ResponseCodeEnum +INVALID_SUPPLY_KEY: ResponseCodeEnum +MISSING_TOKEN_NAME: ResponseCodeEnum +TOKEN_NAME_TOO_LONG: ResponseCodeEnum +INVALID_WIPING_AMOUNT: ResponseCodeEnum +TOKEN_IS_IMMUTABLE: ResponseCodeEnum +TOKEN_ALREADY_ASSOCIATED_TO_ACCOUNT: ResponseCodeEnum +TRANSACTION_REQUIRES_ZERO_TOKEN_BALANCES: ResponseCodeEnum +ACCOUNT_IS_TREASURY: ResponseCodeEnum +TOKEN_ID_REPEATED_IN_TOKEN_LIST: ResponseCodeEnum +TOKEN_TRANSFER_LIST_SIZE_LIMIT_EXCEEDED: ResponseCodeEnum +EMPTY_TOKEN_TRANSFER_BODY: ResponseCodeEnum +EMPTY_TOKEN_TRANSFER_ACCOUNT_AMOUNTS: ResponseCodeEnum +INVALID_SCHEDULE_ID: ResponseCodeEnum +SCHEDULE_IS_IMMUTABLE: ResponseCodeEnum +INVALID_SCHEDULE_PAYER_ID: ResponseCodeEnum +INVALID_SCHEDULE_ACCOUNT_ID: ResponseCodeEnum +NO_NEW_VALID_SIGNATURES: ResponseCodeEnum +UNRESOLVABLE_REQUIRED_SIGNERS: ResponseCodeEnum +SCHEDULED_TRANSACTION_NOT_IN_WHITELIST: ResponseCodeEnum +SOME_SIGNATURES_WERE_INVALID: ResponseCodeEnum +TRANSACTION_ID_FIELD_NOT_ALLOWED: ResponseCodeEnum +IDENTICAL_SCHEDULE_ALREADY_CREATED: ResponseCodeEnum +INVALID_ZERO_BYTE_IN_STRING: ResponseCodeEnum +SCHEDULE_ALREADY_DELETED: ResponseCodeEnum +SCHEDULE_ALREADY_EXECUTED: ResponseCodeEnum +MESSAGE_SIZE_TOO_LARGE: ResponseCodeEnum +OPERATION_REPEATED_IN_BUCKET_GROUPS: ResponseCodeEnum +BUCKET_CAPACITY_OVERFLOW: ResponseCodeEnum +NODE_CAPACITY_NOT_SUFFICIENT_FOR_OPERATION: ResponseCodeEnum +BUCKET_HAS_NO_THROTTLE_GROUPS: ResponseCodeEnum +THROTTLE_GROUP_HAS_ZERO_OPS_PER_SEC: ResponseCodeEnum +SUCCESS_BUT_MISSING_EXPECTED_OPERATION: ResponseCodeEnum +UNPARSEABLE_THROTTLE_DEFINITIONS: ResponseCodeEnum +INVALID_THROTTLE_DEFINITIONS: ResponseCodeEnum +ACCOUNT_EXPIRED_AND_PENDING_REMOVAL: ResponseCodeEnum +INVALID_TOKEN_MAX_SUPPLY: ResponseCodeEnum +INVALID_TOKEN_NFT_SERIAL_NUMBER: ResponseCodeEnum +INVALID_NFT_ID: ResponseCodeEnum +METADATA_TOO_LONG: ResponseCodeEnum +BATCH_SIZE_LIMIT_EXCEEDED: ResponseCodeEnum +INVALID_QUERY_RANGE: ResponseCodeEnum +FRACTION_DIVIDES_BY_ZERO: ResponseCodeEnum +INSUFFICIENT_PAYER_BALANCE_FOR_CUSTOM_FEE: ResponseCodeEnum +CUSTOM_FEES_LIST_TOO_LONG: ResponseCodeEnum +INVALID_CUSTOM_FEE_COLLECTOR: ResponseCodeEnum +INVALID_TOKEN_ID_IN_CUSTOM_FEES: ResponseCodeEnum +TOKEN_NOT_ASSOCIATED_TO_FEE_COLLECTOR: ResponseCodeEnum +TOKEN_MAX_SUPPLY_REACHED: ResponseCodeEnum +SENDER_DOES_NOT_OWN_NFT_SERIAL_NO: ResponseCodeEnum +CUSTOM_FEE_NOT_FULLY_SPECIFIED: ResponseCodeEnum +CUSTOM_FEE_MUST_BE_POSITIVE: ResponseCodeEnum +TOKEN_HAS_NO_FEE_SCHEDULE_KEY: ResponseCodeEnum +CUSTOM_FEE_OUTSIDE_NUMERIC_RANGE: ResponseCodeEnum +ROYALTY_FRACTION_CANNOT_EXCEED_ONE: ResponseCodeEnum +FRACTIONAL_FEE_MAX_AMOUNT_LESS_THAN_MIN_AMOUNT: ResponseCodeEnum +CUSTOM_SCHEDULE_ALREADY_HAS_NO_FEES: ResponseCodeEnum +CUSTOM_FEE_DENOMINATION_MUST_BE_FUNGIBLE_COMMON: ResponseCodeEnum +CUSTOM_FRACTIONAL_FEE_ONLY_ALLOWED_FOR_FUNGIBLE_COMMON: ResponseCodeEnum +INVALID_CUSTOM_FEE_SCHEDULE_KEY: ResponseCodeEnum +INVALID_TOKEN_MINT_METADATA: ResponseCodeEnum +INVALID_TOKEN_BURN_METADATA: ResponseCodeEnum +CURRENT_TREASURY_STILL_OWNS_NFTS: ResponseCodeEnum +ACCOUNT_STILL_OWNS_NFTS: ResponseCodeEnum +TREASURY_MUST_OWN_BURNED_NFT: ResponseCodeEnum +ACCOUNT_DOES_NOT_OWN_WIPED_NFT: ResponseCodeEnum +ACCOUNT_AMOUNT_TRANSFERS_ONLY_ALLOWED_FOR_FUNGIBLE_COMMON: ResponseCodeEnum +MAX_NFTS_IN_PRICE_REGIME_HAVE_BEEN_MINTED: ResponseCodeEnum +PAYER_ACCOUNT_DELETED: ResponseCodeEnum +CUSTOM_FEE_CHARGING_EXCEEDED_MAX_RECURSION_DEPTH: ResponseCodeEnum +CUSTOM_FEE_CHARGING_EXCEEDED_MAX_ACCOUNT_AMOUNTS: ResponseCodeEnum +INSUFFICIENT_SENDER_ACCOUNT_BALANCE_FOR_CUSTOM_FEE: ResponseCodeEnum +SERIAL_NUMBER_LIMIT_REACHED: ResponseCodeEnum +CUSTOM_ROYALTY_FEE_ONLY_ALLOWED_FOR_NON_FUNGIBLE_UNIQUE: ResponseCodeEnum +NO_REMAINING_AUTOMATIC_ASSOCIATIONS: ResponseCodeEnum +EXISTING_AUTOMATIC_ASSOCIATIONS_EXCEED_GIVEN_LIMIT: ResponseCodeEnum +REQUESTED_NUM_AUTOMATIC_ASSOCIATIONS_EXCEEDS_ASSOCIATION_LIMIT: ResponseCodeEnum +TOKEN_IS_PAUSED: ResponseCodeEnum +TOKEN_HAS_NO_PAUSE_KEY: ResponseCodeEnum +INVALID_PAUSE_KEY: ResponseCodeEnum +FREEZE_UPDATE_FILE_DOES_NOT_EXIST: ResponseCodeEnum +FREEZE_UPDATE_FILE_HASH_DOES_NOT_MATCH: ResponseCodeEnum +NO_UPGRADE_HAS_BEEN_PREPARED: ResponseCodeEnum +NO_FREEZE_IS_SCHEDULED: ResponseCodeEnum +UPDATE_FILE_HASH_CHANGED_SINCE_PREPARE_UPGRADE: ResponseCodeEnum +FREEZE_START_TIME_MUST_BE_FUTURE: ResponseCodeEnum +PREPARED_UPDATE_FILE_IS_IMMUTABLE: ResponseCodeEnum +FREEZE_ALREADY_SCHEDULED: ResponseCodeEnum +FREEZE_UPGRADE_IN_PROGRESS: ResponseCodeEnum +UPDATE_FILE_ID_DOES_NOT_MATCH_PREPARED: ResponseCodeEnum +UPDATE_FILE_HASH_DOES_NOT_MATCH_PREPARED: ResponseCodeEnum +CONSENSUS_GAS_EXHAUSTED: ResponseCodeEnum +REVERTED_SUCCESS: ResponseCodeEnum +MAX_STORAGE_IN_PRICE_REGIME_HAS_BEEN_USED: ResponseCodeEnum +INVALID_ALIAS_KEY: ResponseCodeEnum +UNEXPECTED_TOKEN_DECIMALS: ResponseCodeEnum +INVALID_PROXY_ACCOUNT_ID: ResponseCodeEnum +INVALID_TRANSFER_ACCOUNT_ID: ResponseCodeEnum +INVALID_FEE_COLLECTOR_ACCOUNT_ID: ResponseCodeEnum +ALIAS_IS_IMMUTABLE: ResponseCodeEnum +SPENDER_ACCOUNT_SAME_AS_OWNER: ResponseCodeEnum +AMOUNT_EXCEEDS_TOKEN_MAX_SUPPLY: ResponseCodeEnum +NEGATIVE_ALLOWANCE_AMOUNT: ResponseCodeEnum +CANNOT_APPROVE_FOR_ALL_FUNGIBLE_COMMON: ResponseCodeEnum +SPENDER_DOES_NOT_HAVE_ALLOWANCE: ResponseCodeEnum +AMOUNT_EXCEEDS_ALLOWANCE: ResponseCodeEnum +MAX_ALLOWANCES_EXCEEDED: ResponseCodeEnum +EMPTY_ALLOWANCES: ResponseCodeEnum +SPENDER_ACCOUNT_REPEATED_IN_ALLOWANCES: ResponseCodeEnum +REPEATED_SERIAL_NUMS_IN_NFT_ALLOWANCES: ResponseCodeEnum +FUNGIBLE_TOKEN_IN_NFT_ALLOWANCES: ResponseCodeEnum +NFT_IN_FUNGIBLE_TOKEN_ALLOWANCES: ResponseCodeEnum +INVALID_ALLOWANCE_OWNER_ID: ResponseCodeEnum +INVALID_ALLOWANCE_SPENDER_ID: ResponseCodeEnum +REPEATED_ALLOWANCES_TO_DELETE: ResponseCodeEnum +INVALID_DELEGATING_SPENDER: ResponseCodeEnum +DELEGATING_SPENDER_CANNOT_GRANT_APPROVE_FOR_ALL: ResponseCodeEnum +DELEGATING_SPENDER_DOES_NOT_HAVE_APPROVE_FOR_ALL: ResponseCodeEnum +SCHEDULE_EXPIRATION_TIME_TOO_FAR_IN_FUTURE: ResponseCodeEnum +SCHEDULE_EXPIRATION_TIME_MUST_BE_HIGHER_THAN_CONSENSUS_TIME: ResponseCodeEnum +SCHEDULE_FUTURE_THROTTLE_EXCEEDED: ResponseCodeEnum +SCHEDULE_FUTURE_GAS_LIMIT_EXCEEDED: ResponseCodeEnum +INVALID_ETHEREUM_TRANSACTION: ResponseCodeEnum +WRONG_CHAIN_ID: ResponseCodeEnum +WRONG_NONCE: ResponseCodeEnum +ACCESS_LIST_UNSUPPORTED: ResponseCodeEnum +SCHEDULE_PENDING_EXPIRATION: ResponseCodeEnum +CONTRACT_IS_TOKEN_TREASURY: ResponseCodeEnum +CONTRACT_HAS_NON_ZERO_TOKEN_BALANCES: ResponseCodeEnum +CONTRACT_EXPIRED_AND_PENDING_REMOVAL: ResponseCodeEnum +CONTRACT_HAS_NO_AUTO_RENEW_ACCOUNT: ResponseCodeEnum +PERMANENT_REMOVAL_REQUIRES_SYSTEM_INITIATION: ResponseCodeEnum +PROXY_ACCOUNT_ID_FIELD_IS_DEPRECATED: ResponseCodeEnum +SELF_STAKING_IS_NOT_ALLOWED: ResponseCodeEnum +INVALID_STAKING_ID: ResponseCodeEnum +STAKING_NOT_ENABLED: ResponseCodeEnum +INVALID_PRNG_RANGE: ResponseCodeEnum +MAX_ENTITIES_IN_PRICE_REGIME_HAVE_BEEN_CREATED: ResponseCodeEnum +INVALID_FULL_PREFIX_SIGNATURE_FOR_PRECOMPILE: ResponseCodeEnum +INSUFFICIENT_BALANCES_FOR_STORAGE_RENT: ResponseCodeEnum +MAX_CHILD_RECORDS_EXCEEDED: ResponseCodeEnum +INSUFFICIENT_BALANCES_FOR_RENEWAL_FEES: ResponseCodeEnum +TRANSACTION_HAS_UNKNOWN_FIELDS: ResponseCodeEnum +ACCOUNT_IS_IMMUTABLE: ResponseCodeEnum +ALIAS_ALREADY_ASSIGNED: ResponseCodeEnum +INVALID_METADATA_KEY: ResponseCodeEnum +TOKEN_HAS_NO_METADATA_KEY: ResponseCodeEnum +MISSING_TOKEN_METADATA: ResponseCodeEnum +MISSING_SERIAL_NUMBERS: ResponseCodeEnum +TOKEN_HAS_NO_ADMIN_KEY: ResponseCodeEnum +NODE_DELETED: ResponseCodeEnum +INVALID_NODE_ID: ResponseCodeEnum +INVALID_GOSSIP_ENDPOINT: ResponseCodeEnum +INVALID_NODE_ACCOUNT_ID: ResponseCodeEnum +INVALID_NODE_DESCRIPTION: ResponseCodeEnum +INVALID_SERVICE_ENDPOINT: ResponseCodeEnum +INVALID_GOSSIP_CA_CERTIFICATE: ResponseCodeEnum +INVALID_GRPC_CERTIFICATE: ResponseCodeEnum +INVALID_MAX_AUTO_ASSOCIATIONS: ResponseCodeEnum +MAX_NODES_CREATED: ResponseCodeEnum +IP_FQDN_CANNOT_BE_SET_FOR_SAME_ENDPOINT: ResponseCodeEnum +GOSSIP_ENDPOINT_CANNOT_HAVE_FQDN: ResponseCodeEnum +FQDN_SIZE_TOO_LARGE: ResponseCodeEnum +INVALID_ENDPOINT: ResponseCodeEnum +GOSSIP_ENDPOINTS_EXCEEDED_LIMIT: ResponseCodeEnum +TOKEN_REFERENCE_REPEATED: ResponseCodeEnum +INVALID_OWNER_ID: ResponseCodeEnum +TOKEN_REFERENCE_LIST_SIZE_LIMIT_EXCEEDED: ResponseCodeEnum +SERVICE_ENDPOINTS_EXCEEDED_LIMIT: ResponseCodeEnum +INVALID_IPV4_ADDRESS: ResponseCodeEnum +EMPTY_TOKEN_REFERENCE_LIST: ResponseCodeEnum +UPDATE_NODE_ACCOUNT_NOT_ALLOWED: ResponseCodeEnum +TOKEN_HAS_NO_METADATA_OR_SUPPLY_KEY: ResponseCodeEnum +EMPTY_PENDING_AIRDROP_ID_LIST: ResponseCodeEnum +PENDING_AIRDROP_ID_REPEATED: ResponseCodeEnum +PENDING_AIRDROP_ID_LIST_TOO_LONG: ResponseCodeEnum +PENDING_NFT_AIRDROP_ALREADY_EXISTS: ResponseCodeEnum +ACCOUNT_HAS_PENDING_AIRDROPS: ResponseCodeEnum +THROTTLED_AT_CONSENSUS: ResponseCodeEnum +INVALID_PENDING_AIRDROP_ID: ResponseCodeEnum +TOKEN_AIRDROP_WITH_FALLBACK_ROYALTY: ResponseCodeEnum +INVALID_TOKEN_IN_PENDING_AIRDROP: ResponseCodeEnum +SCHEDULE_EXPIRY_IS_BUSY: ResponseCodeEnum +INVALID_GRPC_CERTIFICATE_HASH: ResponseCodeEnum +MISSING_EXPIRY_TIME: ResponseCodeEnum +NO_SCHEDULING_ALLOWED_AFTER_SCHEDULED_RECURSION: ResponseCodeEnum +RECURSIVE_SCHEDULING_LIMIT_REACHED: ResponseCodeEnum +WAITING_FOR_LEDGER_ID: ResponseCodeEnum +MAX_ENTRIES_FOR_FEE_EXEMPT_KEY_LIST_EXCEEDED: ResponseCodeEnum +FEE_EXEMPT_KEY_LIST_CONTAINS_DUPLICATED_KEYS: ResponseCodeEnum +INVALID_KEY_IN_FEE_EXEMPT_KEY_LIST: ResponseCodeEnum +INVALID_FEE_SCHEDULE_KEY: ResponseCodeEnum +FEE_SCHEDULE_KEY_CANNOT_BE_UPDATED: ResponseCodeEnum +FEE_SCHEDULE_KEY_NOT_SET: ResponseCodeEnum +MAX_CUSTOM_FEE_LIMIT_EXCEEDED: ResponseCodeEnum +NO_VALID_MAX_CUSTOM_FEE: ResponseCodeEnum +INVALID_MAX_CUSTOM_FEES: ResponseCodeEnum +DUPLICATE_DENOMINATION_IN_MAX_CUSTOM_FEE_LIST: ResponseCodeEnum +DUPLICATE_ACCOUNT_ID_IN_MAX_CUSTOM_FEE_LIST: ResponseCodeEnum +MAX_CUSTOM_FEES_IS_NOT_SUPPORTED: ResponseCodeEnum +BATCH_LIST_EMPTY: ResponseCodeEnum +BATCH_LIST_CONTAINS_DUPLICATES: ResponseCodeEnum +BATCH_TRANSACTION_IN_BLACKLIST: ResponseCodeEnum +INNER_TRANSACTION_FAILED: ResponseCodeEnum +MISSING_BATCH_KEY: ResponseCodeEnum +BATCH_KEY_SET_ON_NON_INNER_TRANSACTION: ResponseCodeEnum +INVALID_BATCH_KEY: ResponseCodeEnum +SCHEDULE_EXPIRY_NOT_CONFIGURABLE: ResponseCodeEnum +CREATING_SYSTEM_ENTITIES: ResponseCodeEnum +THROTTLE_GROUP_LCM_OVERFLOW: ResponseCodeEnum +AIRDROP_CONTAINS_MULTIPLE_SENDERS_FOR_A_TOKEN: ResponseCodeEnum +GRPC_WEB_PROXY_NOT_SUPPORTED: ResponseCodeEnum +NFT_TRANSFERS_ONLY_ALLOWED_FOR_NON_FUNGIBLE_UNIQUE: ResponseCodeEnum +INVALID_SERIALIZED_TX_MESSAGE_HASH_ALGORITHM: ResponseCodeEnum +EVM_HOOK_GAS_THROTTLED: ResponseCodeEnum +HOOK_ID_IN_USE: ResponseCodeEnum +BAD_HOOK_REQUEST: ResponseCodeEnum +REJECTED_BY_ACCOUNT_ALLOWANCE_HOOK: ResponseCodeEnum +HOOK_NOT_FOUND: ResponseCodeEnum +LAMBDA_STORAGE_UPDATE_BYTES_TOO_LONG: ResponseCodeEnum +LAMBDA_STORAGE_UPDATE_BYTES_MUST_USE_MINIMAL_REPRESENTATION: ResponseCodeEnum +INVALID_HOOK_ID: ResponseCodeEnum +EMPTY_LAMBDA_STORAGE_UPDATE: ResponseCodeEnum +HOOK_ID_REPEATED_IN_CREATION_DETAILS: ResponseCodeEnum +HOOKS_NOT_ENABLED: ResponseCodeEnum +HOOK_IS_NOT_A_LAMBDA: ResponseCodeEnum +HOOK_DELETED: ResponseCodeEnum +TOO_MANY_LAMBDA_STORAGE_UPDATES: ResponseCodeEnum diff --git a/src/hiero_sdk_python/hapi/services/response_code_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/response_code_pb2_grpc.py new file mode 100644 index 000000000..f1e8a6fcb --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/response_code_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/response_code_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/response_header_pb2.py b/src/hiero_sdk_python/hapi/services/response_header_pb2.py new file mode 100644 index 000000000..2c4cd1a3c --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/response_header_pb2.py @@ -0,0 +1,35 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/response_header.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/response_header.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import query_header_pb2 as services_dot_query__header__pb2 +from . import response_code_pb2 as services_dot_response__code__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1eservices/response_header.proto\x12\x05proto\x1a\x1bservices/query_header.proto\x1a\x1cservices/response_code.proto\"\x9b\x01\n\x0eResponseHeader\x12<\n\x1bnodeTransactionPrecheckCode\x18\x01 \x01(\x0e\x32\x17.proto.ResponseCodeEnum\x12)\n\x0cresponseType\x18\x02 \x01(\x0e\x32\x13.proto.ResponseType\x12\x0c\n\x04\x63ost\x18\x03 \x01(\x04\x12\x12\n\nstateProof\x18\x04 \x01(\x0c\x42&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.response_header_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_RESPONSEHEADER']._serialized_start=101 + _globals['_RESPONSEHEADER']._serialized_end=256 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/response_header_pb2.pyi b/src/hiero_sdk_python/hapi/services/response_header_pb2.pyi new file mode 100644 index 000000000..d43651887 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/response_header_pb2.pyi @@ -0,0 +1,19 @@ +from . import query_header_pb2 as _query_header_pb2 +from . import response_code_pb2 as _response_code_pb2 +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class ResponseHeader(_message.Message): + __slots__ = ("nodeTransactionPrecheckCode", "responseType", "cost", "stateProof") + NODETRANSACTIONPRECHECKCODE_FIELD_NUMBER: _ClassVar[int] + RESPONSETYPE_FIELD_NUMBER: _ClassVar[int] + COST_FIELD_NUMBER: _ClassVar[int] + STATEPROOF_FIELD_NUMBER: _ClassVar[int] + nodeTransactionPrecheckCode: _response_code_pb2.ResponseCodeEnum + responseType: _query_header_pb2.ResponseType + cost: int + stateProof: bytes + def __init__(self, nodeTransactionPrecheckCode: _Optional[_Union[_response_code_pb2.ResponseCodeEnum, str]] = ..., responseType: _Optional[_Union[_query_header_pb2.ResponseType, str]] = ..., cost: _Optional[int] = ..., stateProof: _Optional[bytes] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/response_header_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/response_header_pb2_grpc.py new file mode 100644 index 000000000..ce1534b89 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/response_header_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/response_header_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/response_pb2.py b/src/hiero_sdk_python/hapi/services/response_pb2.py new file mode 100644 index 000000000..f07fcc919 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/response_pb2.py @@ -0,0 +1,58 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/response.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/response.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import get_by_key_pb2 as services_dot_get__by__key__pb2 +from . import get_by_solidity_id_pb2 as services_dot_get__by__solidity__id__pb2 +from . import contract_call_local_pb2 as services_dot_contract__call__local__pb2 +from . import contract_get_bytecode_pb2 as services_dot_contract__get__bytecode__pb2 +from . import contract_get_info_pb2 as services_dot_contract__get__info__pb2 +from . import contract_get_records_pb2 as services_dot_contract__get__records__pb2 +from . import crypto_get_account_balance_pb2 as services_dot_crypto__get__account__balance__pb2 +from . import crypto_get_account_records_pb2 as services_dot_crypto__get__account__records__pb2 +from . import crypto_get_info_pb2 as services_dot_crypto__get__info__pb2 +from . import crypto_get_live_hash_pb2 as services_dot_crypto__get__live__hash__pb2 +from . import crypto_get_stakers_pb2 as services_dot_crypto__get__stakers__pb2 +from . import file_get_contents_pb2 as services_dot_file__get__contents__pb2 +from . import file_get_info_pb2 as services_dot_file__get__info__pb2 +from . import transaction_get_receipt_pb2 as services_dot_transaction__get__receipt__pb2 +from . import transaction_get_record_pb2 as services_dot_transaction__get__record__pb2 +from . import transaction_get_fast_record_pb2 as services_dot_transaction__get__fast__record__pb2 +from . import consensus_get_topic_info_pb2 as services_dot_consensus__get__topic__info__pb2 +from . import network_get_version_info_pb2 as services_dot_network__get__version__info__pb2 +from . import network_get_execution_time_pb2 as services_dot_network__get__execution__time__pb2 +from . import token_get_account_nft_infos_pb2 as services_dot_token__get__account__nft__infos__pb2 +from . import token_get_info_pb2 as services_dot_token__get__info__pb2 +from . import token_get_nft_info_pb2 as services_dot_token__get__nft__info__pb2 +from . import token_get_nft_infos_pb2 as services_dot_token__get__nft__infos__pb2 +from . import schedule_get_info_pb2 as services_dot_schedule__get__info__pb2 +from . import get_account_details_pb2 as services_dot_get__account__details__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x17services/response.proto\x12\x05proto\x1a\x19services/get_by_key.proto\x1a!services/get_by_solidity_id.proto\x1a\"services/contract_call_local.proto\x1a$services/contract_get_bytecode.proto\x1a services/contract_get_info.proto\x1a#services/contract_get_records.proto\x1a)services/crypto_get_account_balance.proto\x1a)services/crypto_get_account_records.proto\x1a\x1eservices/crypto_get_info.proto\x1a#services/crypto_get_live_hash.proto\x1a!services/crypto_get_stakers.proto\x1a services/file_get_contents.proto\x1a\x1cservices/file_get_info.proto\x1a&services/transaction_get_receipt.proto\x1a%services/transaction_get_record.proto\x1a*services/transaction_get_fast_record.proto\x1a\'services/consensus_get_topic_info.proto\x1a\'services/network_get_version_info.proto\x1a)services/network_get_execution_time.proto\x1a*services/token_get_account_nft_infos.proto\x1a\x1dservices/token_get_info.proto\x1a!services/token_get_nft_info.proto\x1a\"services/token_get_nft_infos.proto\x1a services/schedule_get_info.proto\x1a\"services/get_account_details.proto\"\xf2\x0c\n\x08Response\x12+\n\x08getByKey\x18\x01 \x01(\x0b\x32\x17.proto.GetByKeyResponseH\x00\x12\x39\n\x0fgetBySolidityID\x18\x02 \x01(\x0b\x32\x1e.proto.GetBySolidityIDResponseH\x00\x12=\n\x11\x63ontractCallLocal\x18\x03 \x01(\x0b\x32 .proto.ContractCallLocalResponseH\x00\x12I\n\x1b\x63ontractGetBytecodeResponse\x18\x05 \x01(\x0b\x32\".proto.ContractGetBytecodeResponseH\x00\x12\x39\n\x0f\x63ontractGetInfo\x18\x04 \x01(\x0b\x32\x1e.proto.ContractGetInfoResponseH\x00\x12G\n\x1a\x63ontractGetRecordsResponse\x18\x06 \x01(\x0b\x32!.proto.ContractGetRecordsResponseH\x00\x12I\n\x17\x63ryptogetAccountBalance\x18\x07 \x01(\x0b\x32&.proto.CryptoGetAccountBalanceResponseH\x00\x12I\n\x17\x63ryptoGetAccountRecords\x18\x08 \x01(\x0b\x32&.proto.CryptoGetAccountRecordsResponseH\x00\x12\x35\n\rcryptoGetInfo\x18\t \x01(\x0b\x32\x1c.proto.CryptoGetInfoResponseH\x00\x12=\n\x11\x63ryptoGetLiveHash\x18\n \x01(\x0b\x32 .proto.CryptoGetLiveHashResponseH\x00\x12@\n\x15\x63ryptoGetProxyStakers\x18\x0b \x01(\x0b\x32\x1f.proto.CryptoGetStakersResponseH\x00\x12\x39\n\x0f\x66ileGetContents\x18\x0c \x01(\x0b\x32\x1e.proto.FileGetContentsResponseH\x00\x12\x31\n\x0b\x66ileGetInfo\x18\r \x01(\x0b\x32\x1a.proto.FileGetInfoResponseH\x00\x12\x45\n\x15transactionGetReceipt\x18\x0e \x01(\x0b\x32$.proto.TransactionGetReceiptResponseH\x00\x12\x43\n\x14transactionGetRecord\x18\x0f \x01(\x0b\x32#.proto.TransactionGetRecordResponseH\x00\x12K\n\x18transactionGetFastRecord\x18\x10 \x01(\x0b\x32\'.proto.TransactionGetFastRecordResponseH\x00\x12\x46\n\x15\x63onsensusGetTopicInfo\x18\x96\x01 \x01(\x0b\x32$.proto.ConsensusGetTopicInfoResponseH\x00\x12\x46\n\x15networkGetVersionInfo\x18\x97\x01 \x01(\x0b\x32$.proto.NetworkGetVersionInfoResponseH\x00\x12\x34\n\x0ctokenGetInfo\x18\x98\x01 \x01(\x0b\x32\x1b.proto.TokenGetInfoResponseH\x00\x12:\n\x0fscheduleGetInfo\x18\x99\x01 \x01(\x0b\x32\x1e.proto.ScheduleGetInfoResponseH\x00\x12J\n\x17tokenGetAccountNftInfos\x18\x9a\x01 \x01(\x0b\x32&.proto.TokenGetAccountNftInfosResponseH\x00\x12:\n\x0ftokenGetNftInfo\x18\x9b\x01 \x01(\x0b\x32\x1e.proto.TokenGetNftInfoResponseH\x00\x12<\n\x10tokenGetNftInfos\x18\x9c\x01 \x01(\x0b\x32\x1f.proto.TokenGetNftInfosResponseH\x00\x12J\n\x17networkGetExecutionTime\x18\x9d\x01 \x01(\x0b\x32&.proto.NetworkGetExecutionTimeResponseH\x00\x12;\n\x0e\x61\x63\x63ountDetails\x18\x9e\x01 \x01(\x0b\x32 .proto.GetAccountDetailsResponseH\x00\x42\n\n\x08responseB&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.response_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_RESPONSE']._serialized_start=960 + _globals['_RESPONSE']._serialized_end=2610 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/response_pb2.pyi b/src/hiero_sdk_python/hapi/services/response_pb2.pyi new file mode 100644 index 000000000..3658faed9 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/response_pb2.pyi @@ -0,0 +1,85 @@ +from . import get_by_key_pb2 as _get_by_key_pb2 +from . import get_by_solidity_id_pb2 as _get_by_solidity_id_pb2 +from . import contract_call_local_pb2 as _contract_call_local_pb2 +from . import contract_get_bytecode_pb2 as _contract_get_bytecode_pb2 +from . import contract_get_info_pb2 as _contract_get_info_pb2 +from . import contract_get_records_pb2 as _contract_get_records_pb2 +from . import crypto_get_account_balance_pb2 as _crypto_get_account_balance_pb2 +from . import crypto_get_account_records_pb2 as _crypto_get_account_records_pb2 +from . import crypto_get_info_pb2 as _crypto_get_info_pb2 +from . import crypto_get_live_hash_pb2 as _crypto_get_live_hash_pb2 +from . import crypto_get_stakers_pb2 as _crypto_get_stakers_pb2 +from . import file_get_contents_pb2 as _file_get_contents_pb2 +from . import file_get_info_pb2 as _file_get_info_pb2 +from . import transaction_get_receipt_pb2 as _transaction_get_receipt_pb2 +from . import transaction_get_record_pb2 as _transaction_get_record_pb2 +from . import transaction_get_fast_record_pb2 as _transaction_get_fast_record_pb2 +from . import consensus_get_topic_info_pb2 as _consensus_get_topic_info_pb2 +from . import network_get_version_info_pb2 as _network_get_version_info_pb2 +from . import network_get_execution_time_pb2 as _network_get_execution_time_pb2 +from . import token_get_account_nft_infos_pb2 as _token_get_account_nft_infos_pb2 +from . import token_get_info_pb2 as _token_get_info_pb2 +from . import token_get_nft_info_pb2 as _token_get_nft_info_pb2 +from . import token_get_nft_infos_pb2 as _token_get_nft_infos_pb2 +from . import schedule_get_info_pb2 as _schedule_get_info_pb2 +from . import get_account_details_pb2 as _get_account_details_pb2 +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class Response(_message.Message): + __slots__ = ("getByKey", "getBySolidityID", "contractCallLocal", "contractGetBytecodeResponse", "contractGetInfo", "contractGetRecordsResponse", "cryptogetAccountBalance", "cryptoGetAccountRecords", "cryptoGetInfo", "cryptoGetLiveHash", "cryptoGetProxyStakers", "fileGetContents", "fileGetInfo", "transactionGetReceipt", "transactionGetRecord", "transactionGetFastRecord", "consensusGetTopicInfo", "networkGetVersionInfo", "tokenGetInfo", "scheduleGetInfo", "tokenGetAccountNftInfos", "tokenGetNftInfo", "tokenGetNftInfos", "networkGetExecutionTime", "accountDetails") + GETBYKEY_FIELD_NUMBER: _ClassVar[int] + GETBYSOLIDITYID_FIELD_NUMBER: _ClassVar[int] + CONTRACTCALLLOCAL_FIELD_NUMBER: _ClassVar[int] + CONTRACTGETBYTECODERESPONSE_FIELD_NUMBER: _ClassVar[int] + CONTRACTGETINFO_FIELD_NUMBER: _ClassVar[int] + CONTRACTGETRECORDSRESPONSE_FIELD_NUMBER: _ClassVar[int] + CRYPTOGETACCOUNTBALANCE_FIELD_NUMBER: _ClassVar[int] + CRYPTOGETACCOUNTRECORDS_FIELD_NUMBER: _ClassVar[int] + CRYPTOGETINFO_FIELD_NUMBER: _ClassVar[int] + CRYPTOGETLIVEHASH_FIELD_NUMBER: _ClassVar[int] + CRYPTOGETPROXYSTAKERS_FIELD_NUMBER: _ClassVar[int] + FILEGETCONTENTS_FIELD_NUMBER: _ClassVar[int] + FILEGETINFO_FIELD_NUMBER: _ClassVar[int] + TRANSACTIONGETRECEIPT_FIELD_NUMBER: _ClassVar[int] + TRANSACTIONGETRECORD_FIELD_NUMBER: _ClassVar[int] + TRANSACTIONGETFASTRECORD_FIELD_NUMBER: _ClassVar[int] + CONSENSUSGETTOPICINFO_FIELD_NUMBER: _ClassVar[int] + NETWORKGETVERSIONINFO_FIELD_NUMBER: _ClassVar[int] + TOKENGETINFO_FIELD_NUMBER: _ClassVar[int] + SCHEDULEGETINFO_FIELD_NUMBER: _ClassVar[int] + TOKENGETACCOUNTNFTINFOS_FIELD_NUMBER: _ClassVar[int] + TOKENGETNFTINFO_FIELD_NUMBER: _ClassVar[int] + TOKENGETNFTINFOS_FIELD_NUMBER: _ClassVar[int] + NETWORKGETEXECUTIONTIME_FIELD_NUMBER: _ClassVar[int] + ACCOUNTDETAILS_FIELD_NUMBER: _ClassVar[int] + getByKey: _get_by_key_pb2.GetByKeyResponse + getBySolidityID: _get_by_solidity_id_pb2.GetBySolidityIDResponse + contractCallLocal: _contract_call_local_pb2.ContractCallLocalResponse + contractGetBytecodeResponse: _contract_get_bytecode_pb2.ContractGetBytecodeResponse + contractGetInfo: _contract_get_info_pb2.ContractGetInfoResponse + contractGetRecordsResponse: _contract_get_records_pb2.ContractGetRecordsResponse + cryptogetAccountBalance: _crypto_get_account_balance_pb2.CryptoGetAccountBalanceResponse + cryptoGetAccountRecords: _crypto_get_account_records_pb2.CryptoGetAccountRecordsResponse + cryptoGetInfo: _crypto_get_info_pb2.CryptoGetInfoResponse + cryptoGetLiveHash: _crypto_get_live_hash_pb2.CryptoGetLiveHashResponse + cryptoGetProxyStakers: _crypto_get_stakers_pb2.CryptoGetStakersResponse + fileGetContents: _file_get_contents_pb2.FileGetContentsResponse + fileGetInfo: _file_get_info_pb2.FileGetInfoResponse + transactionGetReceipt: _transaction_get_receipt_pb2.TransactionGetReceiptResponse + transactionGetRecord: _transaction_get_record_pb2.TransactionGetRecordResponse + transactionGetFastRecord: _transaction_get_fast_record_pb2.TransactionGetFastRecordResponse + consensusGetTopicInfo: _consensus_get_topic_info_pb2.ConsensusGetTopicInfoResponse + networkGetVersionInfo: _network_get_version_info_pb2.NetworkGetVersionInfoResponse + tokenGetInfo: _token_get_info_pb2.TokenGetInfoResponse + scheduleGetInfo: _schedule_get_info_pb2.ScheduleGetInfoResponse + tokenGetAccountNftInfos: _token_get_account_nft_infos_pb2.TokenGetAccountNftInfosResponse + tokenGetNftInfo: _token_get_nft_info_pb2.TokenGetNftInfoResponse + tokenGetNftInfos: _token_get_nft_infos_pb2.TokenGetNftInfosResponse + networkGetExecutionTime: _network_get_execution_time_pb2.NetworkGetExecutionTimeResponse + accountDetails: _get_account_details_pb2.GetAccountDetailsResponse + def __init__(self, getByKey: _Optional[_Union[_get_by_key_pb2.GetByKeyResponse, _Mapping]] = ..., getBySolidityID: _Optional[_Union[_get_by_solidity_id_pb2.GetBySolidityIDResponse, _Mapping]] = ..., contractCallLocal: _Optional[_Union[_contract_call_local_pb2.ContractCallLocalResponse, _Mapping]] = ..., contractGetBytecodeResponse: _Optional[_Union[_contract_get_bytecode_pb2.ContractGetBytecodeResponse, _Mapping]] = ..., contractGetInfo: _Optional[_Union[_contract_get_info_pb2.ContractGetInfoResponse, _Mapping]] = ..., contractGetRecordsResponse: _Optional[_Union[_contract_get_records_pb2.ContractGetRecordsResponse, _Mapping]] = ..., cryptogetAccountBalance: _Optional[_Union[_crypto_get_account_balance_pb2.CryptoGetAccountBalanceResponse, _Mapping]] = ..., cryptoGetAccountRecords: _Optional[_Union[_crypto_get_account_records_pb2.CryptoGetAccountRecordsResponse, _Mapping]] = ..., cryptoGetInfo: _Optional[_Union[_crypto_get_info_pb2.CryptoGetInfoResponse, _Mapping]] = ..., cryptoGetLiveHash: _Optional[_Union[_crypto_get_live_hash_pb2.CryptoGetLiveHashResponse, _Mapping]] = ..., cryptoGetProxyStakers: _Optional[_Union[_crypto_get_stakers_pb2.CryptoGetStakersResponse, _Mapping]] = ..., fileGetContents: _Optional[_Union[_file_get_contents_pb2.FileGetContentsResponse, _Mapping]] = ..., fileGetInfo: _Optional[_Union[_file_get_info_pb2.FileGetInfoResponse, _Mapping]] = ..., transactionGetReceipt: _Optional[_Union[_transaction_get_receipt_pb2.TransactionGetReceiptResponse, _Mapping]] = ..., transactionGetRecord: _Optional[_Union[_transaction_get_record_pb2.TransactionGetRecordResponse, _Mapping]] = ..., transactionGetFastRecord: _Optional[_Union[_transaction_get_fast_record_pb2.TransactionGetFastRecordResponse, _Mapping]] = ..., consensusGetTopicInfo: _Optional[_Union[_consensus_get_topic_info_pb2.ConsensusGetTopicInfoResponse, _Mapping]] = ..., networkGetVersionInfo: _Optional[_Union[_network_get_version_info_pb2.NetworkGetVersionInfoResponse, _Mapping]] = ..., tokenGetInfo: _Optional[_Union[_token_get_info_pb2.TokenGetInfoResponse, _Mapping]] = ..., scheduleGetInfo: _Optional[_Union[_schedule_get_info_pb2.ScheduleGetInfoResponse, _Mapping]] = ..., tokenGetAccountNftInfos: _Optional[_Union[_token_get_account_nft_infos_pb2.TokenGetAccountNftInfosResponse, _Mapping]] = ..., tokenGetNftInfo: _Optional[_Union[_token_get_nft_info_pb2.TokenGetNftInfoResponse, _Mapping]] = ..., tokenGetNftInfos: _Optional[_Union[_token_get_nft_infos_pb2.TokenGetNftInfosResponse, _Mapping]] = ..., networkGetExecutionTime: _Optional[_Union[_network_get_execution_time_pb2.NetworkGetExecutionTimeResponse, _Mapping]] = ..., accountDetails: _Optional[_Union[_get_account_details_pb2.GetAccountDetailsResponse, _Mapping]] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/response_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/response_pb2_grpc.py new file mode 100644 index 000000000..d3ba7ed40 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/response_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/response_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/schedulable_transaction_body_pb2.py b/src/hiero_sdk_python/hapi/services/schedulable_transaction_body_pb2.py new file mode 100644 index 000000000..5be730714 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/schedulable_transaction_body_pb2.py @@ -0,0 +1,80 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/schedulable_transaction_body.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/schedulable_transaction_body.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import system_delete_pb2 as services_dot_system__delete__pb2 +from . import system_undelete_pb2 as services_dot_system__undelete__pb2 +from . import freeze_pb2 as services_dot_freeze__pb2 +from . import contract_call_pb2 as services_dot_contract__call__pb2 +from . import contract_create_pb2 as services_dot_contract__create__pb2 +from . import contract_update_pb2 as services_dot_contract__update__pb2 +from . import crypto_create_pb2 as services_dot_crypto__create__pb2 +from . import crypto_delete_pb2 as services_dot_crypto__delete__pb2 +from . import crypto_transfer_pb2 as services_dot_crypto__transfer__pb2 +from . import crypto_update_pb2 as services_dot_crypto__update__pb2 +from . import crypto_approve_allowance_pb2 as services_dot_crypto__approve__allowance__pb2 +from . import crypto_delete_allowance_pb2 as services_dot_crypto__delete__allowance__pb2 +from . import file_append_pb2 as services_dot_file__append__pb2 +from . import file_create_pb2 as services_dot_file__create__pb2 +from . import file_delete_pb2 as services_dot_file__delete__pb2 +from . import file_update_pb2 as services_dot_file__update__pb2 +from . import contract_delete_pb2 as services_dot_contract__delete__pb2 +from . import consensus_create_topic_pb2 as services_dot_consensus__create__topic__pb2 +from . import consensus_update_topic_pb2 as services_dot_consensus__update__topic__pb2 +from . import consensus_delete_topic_pb2 as services_dot_consensus__delete__topic__pb2 +from . import consensus_submit_message_pb2 as services_dot_consensus__submit__message__pb2 +from . import token_create_pb2 as services_dot_token__create__pb2 +from . import token_freeze_account_pb2 as services_dot_token__freeze__account__pb2 +from . import token_unfreeze_account_pb2 as services_dot_token__unfreeze__account__pb2 +from . import token_grant_kyc_pb2 as services_dot_token__grant__kyc__pb2 +from . import token_revoke_kyc_pb2 as services_dot_token__revoke__kyc__pb2 +from . import token_delete_pb2 as services_dot_token__delete__pb2 +from . import token_update_pb2 as services_dot_token__update__pb2 +from . import token_mint_pb2 as services_dot_token__mint__pb2 +from . import token_burn_pb2 as services_dot_token__burn__pb2 +from . import token_wipe_account_pb2 as services_dot_token__wipe__account__pb2 +from . import token_associate_pb2 as services_dot_token__associate__pb2 +from . import token_dissociate_pb2 as services_dot_token__dissociate__pb2 +from . import token_fee_schedule_update_pb2 as services_dot_token__fee__schedule__update__pb2 +from . import token_pause_pb2 as services_dot_token__pause__pb2 +from . import token_unpause_pb2 as services_dot_token__unpause__pb2 +from . import token_update_nfts_pb2 as services_dot_token__update__nfts__pb2 +from . import token_reject_pb2 as services_dot_token__reject__pb2 +from . import token_cancel_airdrop_pb2 as services_dot_token__cancel__airdrop__pb2 +from . import token_claim_airdrop_pb2 as services_dot_token__claim__airdrop__pb2 +from . import token_airdrop_pb2 as services_dot_token__airdrop__pb2 +from . import schedule_delete_pb2 as services_dot_schedule__delete__pb2 +from . import util_prng_pb2 as services_dot_util__prng__pb2 +from . import custom_fees_pb2 as services_dot_custom__fees__pb2 +from . import node_create_pb2 as services_dot_node__create__pb2 +from . import node_update_pb2 as services_dot_node__update__pb2 +from . import node_delete_pb2 as services_dot_node__delete__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n+services/schedulable_transaction_body.proto\x12\x05proto\x1a\x1cservices/system_delete.proto\x1a\x1eservices/system_undelete.proto\x1a\x15services/freeze.proto\x1a\x1cservices/contract_call.proto\x1a\x1eservices/contract_create.proto\x1a\x1eservices/contract_update.proto\x1a\x1cservices/crypto_create.proto\x1a\x1cservices/crypto_delete.proto\x1a\x1eservices/crypto_transfer.proto\x1a\x1cservices/crypto_update.proto\x1a\'services/crypto_approve_allowance.proto\x1a&services/crypto_delete_allowance.proto\x1a\x1aservices/file_append.proto\x1a\x1aservices/file_create.proto\x1a\x1aservices/file_delete.proto\x1a\x1aservices/file_update.proto\x1a\x1eservices/contract_delete.proto\x1a%services/consensus_create_topic.proto\x1a%services/consensus_update_topic.proto\x1a%services/consensus_delete_topic.proto\x1a\'services/consensus_submit_message.proto\x1a\x1bservices/token_create.proto\x1a#services/token_freeze_account.proto\x1a%services/token_unfreeze_account.proto\x1a\x1eservices/token_grant_kyc.proto\x1a\x1fservices/token_revoke_kyc.proto\x1a\x1bservices/token_delete.proto\x1a\x1bservices/token_update.proto\x1a\x19services/token_mint.proto\x1a\x19services/token_burn.proto\x1a!services/token_wipe_account.proto\x1a\x1eservices/token_associate.proto\x1a\x1fservices/token_dissociate.proto\x1a(services/token_fee_schedule_update.proto\x1a\x1aservices/token_pause.proto\x1a\x1cservices/token_unpause.proto\x1a services/token_update_nfts.proto\x1a\x1bservices/token_reject.proto\x1a#services/token_cancel_airdrop.proto\x1a\"services/token_claim_airdrop.proto\x1a\x1cservices/token_airdrop.proto\x1a\x1eservices/schedule_delete.proto\x1a\x18services/util_prng.proto\x1a\x1aservices/custom_fees.proto\x1a\x1aservices/node_create.proto\x1a\x1aservices/node_update.proto\x1a\x1aservices/node_delete.proto\"\xcf\x18\n\x1aSchedulableTransactionBody\x12\x16\n\x0etransactionFee\x18\x01 \x01(\x04\x12\x0c\n\x04memo\x18\x02 \x01(\t\x12:\n\x0c\x63ontractCall\x18\x03 \x01(\x0b\x32\".proto.ContractCallTransactionBodyH\x00\x12\x46\n\x16\x63ontractCreateInstance\x18\x04 \x01(\x0b\x32$.proto.ContractCreateTransactionBodyH\x00\x12\x46\n\x16\x63ontractUpdateInstance\x18\x05 \x01(\x0b\x32$.proto.ContractUpdateTransactionBodyH\x00\x12\x46\n\x16\x63ontractDeleteInstance\x18\x06 \x01(\x0b\x32$.proto.ContractDeleteTransactionBodyH\x00\x12\x41\n\x13\x63ryptoCreateAccount\x18\x07 \x01(\x0b\x32\".proto.CryptoCreateTransactionBodyH\x00\x12:\n\x0c\x63ryptoDelete\x18\x08 \x01(\x0b\x32\".proto.CryptoDeleteTransactionBodyH\x00\x12>\n\x0e\x63ryptoTransfer\x18\t \x01(\x0b\x32$.proto.CryptoTransferTransactionBodyH\x00\x12\x41\n\x13\x63ryptoUpdateAccount\x18\n \x01(\x0b\x32\".proto.CryptoUpdateTransactionBodyH\x00\x12\x36\n\nfileAppend\x18\x0b \x01(\x0b\x32 .proto.FileAppendTransactionBodyH\x00\x12\x36\n\nfileCreate\x18\x0c \x01(\x0b\x32 .proto.FileCreateTransactionBodyH\x00\x12\x36\n\nfileDelete\x18\r \x01(\x0b\x32 .proto.FileDeleteTransactionBodyH\x00\x12\x36\n\nfileUpdate\x18\x0e \x01(\x0b\x32 .proto.FileUpdateTransactionBodyH\x00\x12:\n\x0csystemDelete\x18\x0f \x01(\x0b\x32\".proto.SystemDeleteTransactionBodyH\x00\x12>\n\x0esystemUndelete\x18\x10 \x01(\x0b\x32$.proto.SystemUndeleteTransactionBodyH\x00\x12.\n\x06\x66reeze\x18\x11 \x01(\x0b\x32\x1c.proto.FreezeTransactionBodyH\x00\x12J\n\x14\x63onsensusCreateTopic\x18\x12 \x01(\x0b\x32*.proto.ConsensusCreateTopicTransactionBodyH\x00\x12J\n\x14\x63onsensusUpdateTopic\x18\x13 \x01(\x0b\x32*.proto.ConsensusUpdateTopicTransactionBodyH\x00\x12J\n\x14\x63onsensusDeleteTopic\x18\x14 \x01(\x0b\x32*.proto.ConsensusDeleteTopicTransactionBodyH\x00\x12N\n\x16\x63onsensusSubmitMessage\x18\x15 \x01(\x0b\x32,.proto.ConsensusSubmitMessageTransactionBodyH\x00\x12:\n\rtokenCreation\x18\x16 \x01(\x0b\x32!.proto.TokenCreateTransactionBodyH\x00\x12?\n\x0btokenFreeze\x18\x17 \x01(\x0b\x32(.proto.TokenFreezeAccountTransactionBodyH\x00\x12\x43\n\rtokenUnfreeze\x18\x18 \x01(\x0b\x32*.proto.TokenUnfreezeAccountTransactionBodyH\x00\x12<\n\rtokenGrantKyc\x18\x19 \x01(\x0b\x32#.proto.TokenGrantKycTransactionBodyH\x00\x12>\n\x0etokenRevokeKyc\x18\x1a \x01(\x0b\x32$.proto.TokenRevokeKycTransactionBodyH\x00\x12:\n\rtokenDeletion\x18\x1b \x01(\x0b\x32!.proto.TokenDeleteTransactionBodyH\x00\x12\x38\n\x0btokenUpdate\x18\x1c \x01(\x0b\x32!.proto.TokenUpdateTransactionBodyH\x00\x12\x34\n\ttokenMint\x18\x1d \x01(\x0b\x32\x1f.proto.TokenMintTransactionBodyH\x00\x12\x34\n\ttokenBurn\x18\x1e \x01(\x0b\x32\x1f.proto.TokenBurnTransactionBodyH\x00\x12;\n\ttokenWipe\x18\x1f \x01(\x0b\x32&.proto.TokenWipeAccountTransactionBodyH\x00\x12>\n\x0etokenAssociate\x18 \x01(\x0b\x32$.proto.TokenAssociateTransactionBodyH\x00\x12@\n\x0ftokenDissociate\x18! \x01(\x0b\x32%.proto.TokenDissociateTransactionBodyH\x00\x12>\n\x0escheduleDelete\x18\" \x01(\x0b\x32$.proto.ScheduleDeleteTransactionBodyH\x00\x12\x37\n\x0btoken_pause\x18# \x01(\x0b\x32 .proto.TokenPauseTransactionBodyH\x00\x12;\n\rtoken_unpause\x18$ \x01(\x0b\x32\".proto.TokenUnpauseTransactionBodyH\x00\x12N\n\x16\x63ryptoApproveAllowance\x18% \x01(\x0b\x32,.proto.CryptoApproveAllowanceTransactionBodyH\x00\x12L\n\x15\x63ryptoDeleteAllowance\x18& \x01(\x0b\x32+.proto.CryptoDeleteAllowanceTransactionBodyH\x00\x12Q\n\x19token_fee_schedule_update\x18\' \x01(\x0b\x32,.proto.TokenFeeScheduleUpdateTransactionBodyH\x00\x12\x33\n\tutil_prng\x18( \x01(\x0b\x32\x1e.proto.UtilPrngTransactionBodyH\x00\x12\x42\n\x11token_update_nfts\x18) \x01(\x0b\x32%.proto.TokenUpdateNftsTransactionBodyH\x00\x12Q\n\nnodeCreate\x18* \x01(\x0b\x32;.com.hedera.hapi.node.addressbook.NodeCreateTransactionBodyH\x00\x12Q\n\nnodeUpdate\x18+ \x01(\x0b\x32;.com.hedera.hapi.node.addressbook.NodeUpdateTransactionBodyH\x00\x12Q\n\nnodeDelete\x18, \x01(\x0b\x32;.com.hedera.hapi.node.addressbook.NodeDeleteTransactionBodyH\x00\x12\x38\n\x0btokenReject\x18- \x01(\x0b\x32!.proto.TokenRejectTransactionBodyH\x00\x12\x46\n\x12tokenCancelAirdrop\x18. \x01(\x0b\x32(.proto.TokenCancelAirdropTransactionBodyH\x00\x12\x44\n\x11tokenClaimAirdrop\x18/ \x01(\x0b\x32\'.proto.TokenClaimAirdropTransactionBodyH\x00\x12:\n\x0ctokenAirdrop\x18\x30 \x01(\x0b\x32\".proto.TokenAirdropTransactionBodyH\x00\x12/\n\x0fmax_custom_fees\x18\xe9\x07 \x03(\x0b\x32\x15.proto.CustomFeeLimitB\x06\n\x04\x64\x61taB&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.schedulable_transaction_body_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_SCHEDULABLETRANSACTIONBODY']._serialized_start=1557 + _globals['_SCHEDULABLETRANSACTIONBODY']._serialized_end=4708 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/schedulable_transaction_body_pb2.pyi b/src/hiero_sdk_python/hapi/services/schedulable_transaction_body_pb2.pyi new file mode 100644 index 000000000..c5e260e06 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/schedulable_transaction_body_pb2.pyi @@ -0,0 +1,156 @@ +from . import system_delete_pb2 as _system_delete_pb2 +from . import system_undelete_pb2 as _system_undelete_pb2 +from . import freeze_pb2 as _freeze_pb2 +from . import contract_call_pb2 as _contract_call_pb2 +from . import contract_create_pb2 as _contract_create_pb2 +from . import contract_update_pb2 as _contract_update_pb2 +from . import crypto_create_pb2 as _crypto_create_pb2 +from . import crypto_delete_pb2 as _crypto_delete_pb2 +from . import crypto_transfer_pb2 as _crypto_transfer_pb2 +from . import crypto_update_pb2 as _crypto_update_pb2 +from . import crypto_approve_allowance_pb2 as _crypto_approve_allowance_pb2 +from . import crypto_delete_allowance_pb2 as _crypto_delete_allowance_pb2 +from . import file_append_pb2 as _file_append_pb2 +from . import file_create_pb2 as _file_create_pb2 +from . import file_delete_pb2 as _file_delete_pb2 +from . import file_update_pb2 as _file_update_pb2 +from . import contract_delete_pb2 as _contract_delete_pb2 +from . import consensus_create_topic_pb2 as _consensus_create_topic_pb2 +from . import consensus_update_topic_pb2 as _consensus_update_topic_pb2 +from . import consensus_delete_topic_pb2 as _consensus_delete_topic_pb2 +from . import consensus_submit_message_pb2 as _consensus_submit_message_pb2 +from . import token_create_pb2 as _token_create_pb2 +from . import token_freeze_account_pb2 as _token_freeze_account_pb2 +from . import token_unfreeze_account_pb2 as _token_unfreeze_account_pb2 +from . import token_grant_kyc_pb2 as _token_grant_kyc_pb2 +from . import token_revoke_kyc_pb2 as _token_revoke_kyc_pb2 +from . import token_delete_pb2 as _token_delete_pb2 +from . import token_update_pb2 as _token_update_pb2 +from . import token_mint_pb2 as _token_mint_pb2 +from . import token_burn_pb2 as _token_burn_pb2 +from . import token_wipe_account_pb2 as _token_wipe_account_pb2 +from . import token_associate_pb2 as _token_associate_pb2 +from . import token_dissociate_pb2 as _token_dissociate_pb2 +from . import token_fee_schedule_update_pb2 as _token_fee_schedule_update_pb2 +from . import token_pause_pb2 as _token_pause_pb2 +from . import token_unpause_pb2 as _token_unpause_pb2 +from . import token_update_nfts_pb2 as _token_update_nfts_pb2 +from . import token_reject_pb2 as _token_reject_pb2 +from . import token_cancel_airdrop_pb2 as _token_cancel_airdrop_pb2 +from . import token_claim_airdrop_pb2 as _token_claim_airdrop_pb2 +from . import token_airdrop_pb2 as _token_airdrop_pb2 +from . import schedule_delete_pb2 as _schedule_delete_pb2 +from . import util_prng_pb2 as _util_prng_pb2 +from . import custom_fees_pb2 as _custom_fees_pb2 +from . import node_create_pb2 as _node_create_pb2 +from . import node_update_pb2 as _node_update_pb2 +from . import node_delete_pb2 as _node_delete_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Iterable as _Iterable, Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class SchedulableTransactionBody(_message.Message): + __slots__ = ("transactionFee", "memo", "contractCall", "contractCreateInstance", "contractUpdateInstance", "contractDeleteInstance", "cryptoCreateAccount", "cryptoDelete", "cryptoTransfer", "cryptoUpdateAccount", "fileAppend", "fileCreate", "fileDelete", "fileUpdate", "systemDelete", "systemUndelete", "freeze", "consensusCreateTopic", "consensusUpdateTopic", "consensusDeleteTopic", "consensusSubmitMessage", "tokenCreation", "tokenFreeze", "tokenUnfreeze", "tokenGrantKyc", "tokenRevokeKyc", "tokenDeletion", "tokenUpdate", "tokenMint", "tokenBurn", "tokenWipe", "tokenAssociate", "tokenDissociate", "scheduleDelete", "token_pause", "token_unpause", "cryptoApproveAllowance", "cryptoDeleteAllowance", "token_fee_schedule_update", "util_prng", "token_update_nfts", "nodeCreate", "nodeUpdate", "nodeDelete", "tokenReject", "tokenCancelAirdrop", "tokenClaimAirdrop", "tokenAirdrop", "max_custom_fees") + TRANSACTIONFEE_FIELD_NUMBER: _ClassVar[int] + MEMO_FIELD_NUMBER: _ClassVar[int] + CONTRACTCALL_FIELD_NUMBER: _ClassVar[int] + CONTRACTCREATEINSTANCE_FIELD_NUMBER: _ClassVar[int] + CONTRACTUPDATEINSTANCE_FIELD_NUMBER: _ClassVar[int] + CONTRACTDELETEINSTANCE_FIELD_NUMBER: _ClassVar[int] + CRYPTOCREATEACCOUNT_FIELD_NUMBER: _ClassVar[int] + CRYPTODELETE_FIELD_NUMBER: _ClassVar[int] + CRYPTOTRANSFER_FIELD_NUMBER: _ClassVar[int] + CRYPTOUPDATEACCOUNT_FIELD_NUMBER: _ClassVar[int] + FILEAPPEND_FIELD_NUMBER: _ClassVar[int] + FILECREATE_FIELD_NUMBER: _ClassVar[int] + FILEDELETE_FIELD_NUMBER: _ClassVar[int] + FILEUPDATE_FIELD_NUMBER: _ClassVar[int] + SYSTEMDELETE_FIELD_NUMBER: _ClassVar[int] + SYSTEMUNDELETE_FIELD_NUMBER: _ClassVar[int] + FREEZE_FIELD_NUMBER: _ClassVar[int] + CONSENSUSCREATETOPIC_FIELD_NUMBER: _ClassVar[int] + CONSENSUSUPDATETOPIC_FIELD_NUMBER: _ClassVar[int] + CONSENSUSDELETETOPIC_FIELD_NUMBER: _ClassVar[int] + CONSENSUSSUBMITMESSAGE_FIELD_NUMBER: _ClassVar[int] + TOKENCREATION_FIELD_NUMBER: _ClassVar[int] + TOKENFREEZE_FIELD_NUMBER: _ClassVar[int] + TOKENUNFREEZE_FIELD_NUMBER: _ClassVar[int] + TOKENGRANTKYC_FIELD_NUMBER: _ClassVar[int] + TOKENREVOKEKYC_FIELD_NUMBER: _ClassVar[int] + TOKENDELETION_FIELD_NUMBER: _ClassVar[int] + TOKENUPDATE_FIELD_NUMBER: _ClassVar[int] + TOKENMINT_FIELD_NUMBER: _ClassVar[int] + TOKENBURN_FIELD_NUMBER: _ClassVar[int] + TOKENWIPE_FIELD_NUMBER: _ClassVar[int] + TOKENASSOCIATE_FIELD_NUMBER: _ClassVar[int] + TOKENDISSOCIATE_FIELD_NUMBER: _ClassVar[int] + SCHEDULEDELETE_FIELD_NUMBER: _ClassVar[int] + TOKEN_PAUSE_FIELD_NUMBER: _ClassVar[int] + TOKEN_UNPAUSE_FIELD_NUMBER: _ClassVar[int] + CRYPTOAPPROVEALLOWANCE_FIELD_NUMBER: _ClassVar[int] + CRYPTODELETEALLOWANCE_FIELD_NUMBER: _ClassVar[int] + TOKEN_FEE_SCHEDULE_UPDATE_FIELD_NUMBER: _ClassVar[int] + UTIL_PRNG_FIELD_NUMBER: _ClassVar[int] + TOKEN_UPDATE_NFTS_FIELD_NUMBER: _ClassVar[int] + NODECREATE_FIELD_NUMBER: _ClassVar[int] + NODEUPDATE_FIELD_NUMBER: _ClassVar[int] + NODEDELETE_FIELD_NUMBER: _ClassVar[int] + TOKENREJECT_FIELD_NUMBER: _ClassVar[int] + TOKENCANCELAIRDROP_FIELD_NUMBER: _ClassVar[int] + TOKENCLAIMAIRDROP_FIELD_NUMBER: _ClassVar[int] + TOKENAIRDROP_FIELD_NUMBER: _ClassVar[int] + MAX_CUSTOM_FEES_FIELD_NUMBER: _ClassVar[int] + transactionFee: int + memo: str + contractCall: _contract_call_pb2.ContractCallTransactionBody + contractCreateInstance: _contract_create_pb2.ContractCreateTransactionBody + contractUpdateInstance: _contract_update_pb2.ContractUpdateTransactionBody + contractDeleteInstance: _contract_delete_pb2.ContractDeleteTransactionBody + cryptoCreateAccount: _crypto_create_pb2.CryptoCreateTransactionBody + cryptoDelete: _crypto_delete_pb2.CryptoDeleteTransactionBody + cryptoTransfer: _crypto_transfer_pb2.CryptoTransferTransactionBody + cryptoUpdateAccount: _crypto_update_pb2.CryptoUpdateTransactionBody + fileAppend: _file_append_pb2.FileAppendTransactionBody + fileCreate: _file_create_pb2.FileCreateTransactionBody + fileDelete: _file_delete_pb2.FileDeleteTransactionBody + fileUpdate: _file_update_pb2.FileUpdateTransactionBody + systemDelete: _system_delete_pb2.SystemDeleteTransactionBody + systemUndelete: _system_undelete_pb2.SystemUndeleteTransactionBody + freeze: _freeze_pb2.FreezeTransactionBody + consensusCreateTopic: _consensus_create_topic_pb2.ConsensusCreateTopicTransactionBody + consensusUpdateTopic: _consensus_update_topic_pb2.ConsensusUpdateTopicTransactionBody + consensusDeleteTopic: _consensus_delete_topic_pb2.ConsensusDeleteTopicTransactionBody + consensusSubmitMessage: _consensus_submit_message_pb2.ConsensusSubmitMessageTransactionBody + tokenCreation: _token_create_pb2.TokenCreateTransactionBody + tokenFreeze: _token_freeze_account_pb2.TokenFreezeAccountTransactionBody + tokenUnfreeze: _token_unfreeze_account_pb2.TokenUnfreezeAccountTransactionBody + tokenGrantKyc: _token_grant_kyc_pb2.TokenGrantKycTransactionBody + tokenRevokeKyc: _token_revoke_kyc_pb2.TokenRevokeKycTransactionBody + tokenDeletion: _token_delete_pb2.TokenDeleteTransactionBody + tokenUpdate: _token_update_pb2.TokenUpdateTransactionBody + tokenMint: _token_mint_pb2.TokenMintTransactionBody + tokenBurn: _token_burn_pb2.TokenBurnTransactionBody + tokenWipe: _token_wipe_account_pb2.TokenWipeAccountTransactionBody + tokenAssociate: _token_associate_pb2.TokenAssociateTransactionBody + tokenDissociate: _token_dissociate_pb2.TokenDissociateTransactionBody + scheduleDelete: _schedule_delete_pb2.ScheduleDeleteTransactionBody + token_pause: _token_pause_pb2.TokenPauseTransactionBody + token_unpause: _token_unpause_pb2.TokenUnpauseTransactionBody + cryptoApproveAllowance: _crypto_approve_allowance_pb2.CryptoApproveAllowanceTransactionBody + cryptoDeleteAllowance: _crypto_delete_allowance_pb2.CryptoDeleteAllowanceTransactionBody + token_fee_schedule_update: _token_fee_schedule_update_pb2.TokenFeeScheduleUpdateTransactionBody + util_prng: _util_prng_pb2.UtilPrngTransactionBody + token_update_nfts: _token_update_nfts_pb2.TokenUpdateNftsTransactionBody + nodeCreate: _node_create_pb2.NodeCreateTransactionBody + nodeUpdate: _node_update_pb2.NodeUpdateTransactionBody + nodeDelete: _node_delete_pb2.NodeDeleteTransactionBody + tokenReject: _token_reject_pb2.TokenRejectTransactionBody + tokenCancelAirdrop: _token_cancel_airdrop_pb2.TokenCancelAirdropTransactionBody + tokenClaimAirdrop: _token_claim_airdrop_pb2.TokenClaimAirdropTransactionBody + tokenAirdrop: _token_airdrop_pb2.TokenAirdropTransactionBody + max_custom_fees: _containers.RepeatedCompositeFieldContainer[_custom_fees_pb2.CustomFeeLimit] + def __init__(self, transactionFee: _Optional[int] = ..., memo: _Optional[str] = ..., contractCall: _Optional[_Union[_contract_call_pb2.ContractCallTransactionBody, _Mapping]] = ..., contractCreateInstance: _Optional[_Union[_contract_create_pb2.ContractCreateTransactionBody, _Mapping]] = ..., contractUpdateInstance: _Optional[_Union[_contract_update_pb2.ContractUpdateTransactionBody, _Mapping]] = ..., contractDeleteInstance: _Optional[_Union[_contract_delete_pb2.ContractDeleteTransactionBody, _Mapping]] = ..., cryptoCreateAccount: _Optional[_Union[_crypto_create_pb2.CryptoCreateTransactionBody, _Mapping]] = ..., cryptoDelete: _Optional[_Union[_crypto_delete_pb2.CryptoDeleteTransactionBody, _Mapping]] = ..., cryptoTransfer: _Optional[_Union[_crypto_transfer_pb2.CryptoTransferTransactionBody, _Mapping]] = ..., cryptoUpdateAccount: _Optional[_Union[_crypto_update_pb2.CryptoUpdateTransactionBody, _Mapping]] = ..., fileAppend: _Optional[_Union[_file_append_pb2.FileAppendTransactionBody, _Mapping]] = ..., fileCreate: _Optional[_Union[_file_create_pb2.FileCreateTransactionBody, _Mapping]] = ..., fileDelete: _Optional[_Union[_file_delete_pb2.FileDeleteTransactionBody, _Mapping]] = ..., fileUpdate: _Optional[_Union[_file_update_pb2.FileUpdateTransactionBody, _Mapping]] = ..., systemDelete: _Optional[_Union[_system_delete_pb2.SystemDeleteTransactionBody, _Mapping]] = ..., systemUndelete: _Optional[_Union[_system_undelete_pb2.SystemUndeleteTransactionBody, _Mapping]] = ..., freeze: _Optional[_Union[_freeze_pb2.FreezeTransactionBody, _Mapping]] = ..., consensusCreateTopic: _Optional[_Union[_consensus_create_topic_pb2.ConsensusCreateTopicTransactionBody, _Mapping]] = ..., consensusUpdateTopic: _Optional[_Union[_consensus_update_topic_pb2.ConsensusUpdateTopicTransactionBody, _Mapping]] = ..., consensusDeleteTopic: _Optional[_Union[_consensus_delete_topic_pb2.ConsensusDeleteTopicTransactionBody, _Mapping]] = ..., consensusSubmitMessage: _Optional[_Union[_consensus_submit_message_pb2.ConsensusSubmitMessageTransactionBody, _Mapping]] = ..., tokenCreation: _Optional[_Union[_token_create_pb2.TokenCreateTransactionBody, _Mapping]] = ..., tokenFreeze: _Optional[_Union[_token_freeze_account_pb2.TokenFreezeAccountTransactionBody, _Mapping]] = ..., tokenUnfreeze: _Optional[_Union[_token_unfreeze_account_pb2.TokenUnfreezeAccountTransactionBody, _Mapping]] = ..., tokenGrantKyc: _Optional[_Union[_token_grant_kyc_pb2.TokenGrantKycTransactionBody, _Mapping]] = ..., tokenRevokeKyc: _Optional[_Union[_token_revoke_kyc_pb2.TokenRevokeKycTransactionBody, _Mapping]] = ..., tokenDeletion: _Optional[_Union[_token_delete_pb2.TokenDeleteTransactionBody, _Mapping]] = ..., tokenUpdate: _Optional[_Union[_token_update_pb2.TokenUpdateTransactionBody, _Mapping]] = ..., tokenMint: _Optional[_Union[_token_mint_pb2.TokenMintTransactionBody, _Mapping]] = ..., tokenBurn: _Optional[_Union[_token_burn_pb2.TokenBurnTransactionBody, _Mapping]] = ..., tokenWipe: _Optional[_Union[_token_wipe_account_pb2.TokenWipeAccountTransactionBody, _Mapping]] = ..., tokenAssociate: _Optional[_Union[_token_associate_pb2.TokenAssociateTransactionBody, _Mapping]] = ..., tokenDissociate: _Optional[_Union[_token_dissociate_pb2.TokenDissociateTransactionBody, _Mapping]] = ..., scheduleDelete: _Optional[_Union[_schedule_delete_pb2.ScheduleDeleteTransactionBody, _Mapping]] = ..., token_pause: _Optional[_Union[_token_pause_pb2.TokenPauseTransactionBody, _Mapping]] = ..., token_unpause: _Optional[_Union[_token_unpause_pb2.TokenUnpauseTransactionBody, _Mapping]] = ..., cryptoApproveAllowance: _Optional[_Union[_crypto_approve_allowance_pb2.CryptoApproveAllowanceTransactionBody, _Mapping]] = ..., cryptoDeleteAllowance: _Optional[_Union[_crypto_delete_allowance_pb2.CryptoDeleteAllowanceTransactionBody, _Mapping]] = ..., token_fee_schedule_update: _Optional[_Union[_token_fee_schedule_update_pb2.TokenFeeScheduleUpdateTransactionBody, _Mapping]] = ..., util_prng: _Optional[_Union[_util_prng_pb2.UtilPrngTransactionBody, _Mapping]] = ..., token_update_nfts: _Optional[_Union[_token_update_nfts_pb2.TokenUpdateNftsTransactionBody, _Mapping]] = ..., nodeCreate: _Optional[_Union[_node_create_pb2.NodeCreateTransactionBody, _Mapping]] = ..., nodeUpdate: _Optional[_Union[_node_update_pb2.NodeUpdateTransactionBody, _Mapping]] = ..., nodeDelete: _Optional[_Union[_node_delete_pb2.NodeDeleteTransactionBody, _Mapping]] = ..., tokenReject: _Optional[_Union[_token_reject_pb2.TokenRejectTransactionBody, _Mapping]] = ..., tokenCancelAirdrop: _Optional[_Union[_token_cancel_airdrop_pb2.TokenCancelAirdropTransactionBody, _Mapping]] = ..., tokenClaimAirdrop: _Optional[_Union[_token_claim_airdrop_pb2.TokenClaimAirdropTransactionBody, _Mapping]] = ..., tokenAirdrop: _Optional[_Union[_token_airdrop_pb2.TokenAirdropTransactionBody, _Mapping]] = ..., max_custom_fees: _Optional[_Iterable[_Union[_custom_fees_pb2.CustomFeeLimit, _Mapping]]] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/schedulable_transaction_body_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/schedulable_transaction_body_pb2_grpc.py new file mode 100644 index 000000000..540385bc2 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/schedulable_transaction_body_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/schedulable_transaction_body_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/schedule_create_pb2.py b/src/hiero_sdk_python/hapi/services/schedule_create_pb2.py new file mode 100644 index 000000000..a61c1b638 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/schedule_create_pb2.py @@ -0,0 +1,36 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/schedule_create.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/schedule_create.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import basic_types_pb2 as services_dot_basic__types__pb2 +from . import timestamp_pb2 as services_dot_timestamp__pb2 +from . import schedulable_transaction_body_pb2 as services_dot_schedulable__transaction__body__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1eservices/schedule_create.proto\x12\x05proto\x1a\x1aservices/basic_types.proto\x1a\x18services/timestamp.proto\x1a+services/schedulable_transaction_body.proto\"\xfe\x01\n\x1dScheduleCreateTransactionBody\x12\x43\n\x18scheduledTransactionBody\x18\x01 \x01(\x0b\x32!.proto.SchedulableTransactionBody\x12\x0c\n\x04memo\x18\x02 \x01(\t\x12\x1c\n\x08\x61\x64minKey\x18\x03 \x01(\x0b\x32\n.proto.Key\x12(\n\x0epayerAccountID\x18\x04 \x01(\x0b\x32\x10.proto.AccountID\x12)\n\x0f\x65xpiration_time\x18\x05 \x01(\x0b\x32\x10.proto.Timestamp\x12\x17\n\x0fwait_for_expiry\x18\r \x01(\x08\x42&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.schedule_create_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_SCHEDULECREATETRANSACTIONBODY']._serialized_start=141 + _globals['_SCHEDULECREATETRANSACTIONBODY']._serialized_end=395 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/schedule_create_pb2.pyi b/src/hiero_sdk_python/hapi/services/schedule_create_pb2.pyi new file mode 100644 index 000000000..a9c2bf16e --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/schedule_create_pb2.pyi @@ -0,0 +1,25 @@ +from . import basic_types_pb2 as _basic_types_pb2 +from . import timestamp_pb2 as _timestamp_pb2 +from . import schedulable_transaction_body_pb2 as _schedulable_transaction_body_pb2 +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class ScheduleCreateTransactionBody(_message.Message): + __slots__ = ("scheduledTransactionBody", "memo", "adminKey", "payerAccountID", "expiration_time", "wait_for_expiry") + SCHEDULEDTRANSACTIONBODY_FIELD_NUMBER: _ClassVar[int] + MEMO_FIELD_NUMBER: _ClassVar[int] + ADMINKEY_FIELD_NUMBER: _ClassVar[int] + PAYERACCOUNTID_FIELD_NUMBER: _ClassVar[int] + EXPIRATION_TIME_FIELD_NUMBER: _ClassVar[int] + WAIT_FOR_EXPIRY_FIELD_NUMBER: _ClassVar[int] + scheduledTransactionBody: _schedulable_transaction_body_pb2.SchedulableTransactionBody + memo: str + adminKey: _basic_types_pb2.Key + payerAccountID: _basic_types_pb2.AccountID + expiration_time: _timestamp_pb2.Timestamp + wait_for_expiry: bool + def __init__(self, scheduledTransactionBody: _Optional[_Union[_schedulable_transaction_body_pb2.SchedulableTransactionBody, _Mapping]] = ..., memo: _Optional[str] = ..., adminKey: _Optional[_Union[_basic_types_pb2.Key, _Mapping]] = ..., payerAccountID: _Optional[_Union[_basic_types_pb2.AccountID, _Mapping]] = ..., expiration_time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., wait_for_expiry: bool = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/schedule_create_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/schedule_create_pb2_grpc.py new file mode 100644 index 000000000..3e3a65435 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/schedule_create_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/schedule_create_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/schedule_delete_pb2.py b/src/hiero_sdk_python/hapi/services/schedule_delete_pb2.py new file mode 100644 index 000000000..84b7c6f2d --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/schedule_delete_pb2.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/schedule_delete.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/schedule_delete.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import basic_types_pb2 as services_dot_basic__types__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1eservices/schedule_delete.proto\x12\x05proto\x1a\x1aservices/basic_types.proto\"F\n\x1dScheduleDeleteTransactionBody\x12%\n\nscheduleID\x18\x01 \x01(\x0b\x32\x11.proto.ScheduleIDB&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.schedule_delete_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_SCHEDULEDELETETRANSACTIONBODY']._serialized_start=69 + _globals['_SCHEDULEDELETETRANSACTIONBODY']._serialized_end=139 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/schedule_delete_pb2.pyi b/src/hiero_sdk_python/hapi/services/schedule_delete_pb2.pyi new file mode 100644 index 000000000..d10734d0c --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/schedule_delete_pb2.pyi @@ -0,0 +1,13 @@ +from . import basic_types_pb2 as _basic_types_pb2 +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class ScheduleDeleteTransactionBody(_message.Message): + __slots__ = ("scheduleID",) + SCHEDULEID_FIELD_NUMBER: _ClassVar[int] + scheduleID: _basic_types_pb2.ScheduleID + def __init__(self, scheduleID: _Optional[_Union[_basic_types_pb2.ScheduleID, _Mapping]] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/schedule_delete_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/schedule_delete_pb2_grpc.py new file mode 100644 index 000000000..a275be4b7 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/schedule_delete_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/schedule_delete_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/schedule_get_info_pb2.py b/src/hiero_sdk_python/hapi/services/schedule_get_info_pb2.py new file mode 100644 index 000000000..56d223e62 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/schedule_get_info_pb2.py @@ -0,0 +1,42 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/schedule_get_info.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/schedule_get_info.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import basic_types_pb2 as services_dot_basic__types__pb2 +from . import timestamp_pb2 as services_dot_timestamp__pb2 +from . import query_header_pb2 as services_dot_query__header__pb2 +from . import response_header_pb2 as services_dot_response__header__pb2 +from . import schedulable_transaction_body_pb2 as services_dot_schedulable__transaction__body__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n services/schedule_get_info.proto\x12\x05proto\x1a\x1aservices/basic_types.proto\x1a\x18services/timestamp.proto\x1a\x1bservices/query_header.proto\x1a\x1eservices/response_header.proto\x1a+services/schedulable_transaction_body.proto\"a\n\x14ScheduleGetInfoQuery\x12\"\n\x06header\x18\x01 \x01(\x0b\x32\x12.proto.QueryHeader\x12%\n\nscheduleID\x18\x02 \x01(\x0b\x32\x11.proto.ScheduleID\"\x88\x04\n\x0cScheduleInfo\x12%\n\nscheduleID\x18\x01 \x01(\x0b\x32\x11.proto.ScheduleID\x12)\n\rdeletion_time\x18\x02 \x01(\x0b\x32\x10.proto.TimestampH\x00\x12*\n\x0e\x65xecution_time\x18\x03 \x01(\x0b\x32\x10.proto.TimestampH\x00\x12(\n\x0e\x65xpirationTime\x18\x04 \x01(\x0b\x32\x10.proto.Timestamp\x12\x43\n\x18scheduledTransactionBody\x18\x05 \x01(\x0b\x32!.proto.SchedulableTransactionBody\x12\x0c\n\x04memo\x18\x06 \x01(\t\x12\x1c\n\x08\x61\x64minKey\x18\x07 \x01(\x0b\x32\n.proto.Key\x12\x1f\n\x07signers\x18\x08 \x01(\x0b\x32\x0e.proto.KeyList\x12*\n\x10\x63reatorAccountID\x18\t \x01(\x0b\x32\x10.proto.AccountID\x12(\n\x0epayerAccountID\x18\n \x01(\x0b\x32\x10.proto.AccountID\x12\x34\n\x16scheduledTransactionID\x18\x0b \x01(\x0b\x32\x14.proto.TransactionID\x12\x11\n\tledger_id\x18\x0c \x01(\x0c\x12\x17\n\x0fwait_for_expiry\x18\r \x01(\x08\x42\x06\n\x04\x64\x61ta\"k\n\x17ScheduleGetInfoResponse\x12%\n\x06header\x18\x01 \x01(\x0b\x32\x15.proto.ResponseHeader\x12)\n\x0cscheduleInfo\x18\x02 \x01(\x0b\x32\x13.proto.ScheduleInfoB&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.schedule_get_info_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_SCHEDULEGETINFOQUERY']._serialized_start=203 + _globals['_SCHEDULEGETINFOQUERY']._serialized_end=300 + _globals['_SCHEDULEINFO']._serialized_start=303 + _globals['_SCHEDULEINFO']._serialized_end=823 + _globals['_SCHEDULEGETINFORESPONSE']._serialized_start=825 + _globals['_SCHEDULEGETINFORESPONSE']._serialized_end=932 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/schedule_get_info_pb2.pyi b/src/hiero_sdk_python/hapi/services/schedule_get_info_pb2.pyi new file mode 100644 index 000000000..13ea9e99e --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/schedule_get_info_pb2.pyi @@ -0,0 +1,57 @@ +from . import basic_types_pb2 as _basic_types_pb2 +from . import timestamp_pb2 as _timestamp_pb2 +from . import query_header_pb2 as _query_header_pb2 +from . import response_header_pb2 as _response_header_pb2 +from . import schedulable_transaction_body_pb2 as _schedulable_transaction_body_pb2 +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class ScheduleGetInfoQuery(_message.Message): + __slots__ = ("header", "scheduleID") + HEADER_FIELD_NUMBER: _ClassVar[int] + SCHEDULEID_FIELD_NUMBER: _ClassVar[int] + header: _query_header_pb2.QueryHeader + scheduleID: _basic_types_pb2.ScheduleID + def __init__(self, header: _Optional[_Union[_query_header_pb2.QueryHeader, _Mapping]] = ..., scheduleID: _Optional[_Union[_basic_types_pb2.ScheduleID, _Mapping]] = ...) -> None: ... + +class ScheduleInfo(_message.Message): + __slots__ = ("scheduleID", "deletion_time", "execution_time", "expirationTime", "scheduledTransactionBody", "memo", "adminKey", "signers", "creatorAccountID", "payerAccountID", "scheduledTransactionID", "ledger_id", "wait_for_expiry") + SCHEDULEID_FIELD_NUMBER: _ClassVar[int] + DELETION_TIME_FIELD_NUMBER: _ClassVar[int] + EXECUTION_TIME_FIELD_NUMBER: _ClassVar[int] + EXPIRATIONTIME_FIELD_NUMBER: _ClassVar[int] + SCHEDULEDTRANSACTIONBODY_FIELD_NUMBER: _ClassVar[int] + MEMO_FIELD_NUMBER: _ClassVar[int] + ADMINKEY_FIELD_NUMBER: _ClassVar[int] + SIGNERS_FIELD_NUMBER: _ClassVar[int] + CREATORACCOUNTID_FIELD_NUMBER: _ClassVar[int] + PAYERACCOUNTID_FIELD_NUMBER: _ClassVar[int] + SCHEDULEDTRANSACTIONID_FIELD_NUMBER: _ClassVar[int] + LEDGER_ID_FIELD_NUMBER: _ClassVar[int] + WAIT_FOR_EXPIRY_FIELD_NUMBER: _ClassVar[int] + scheduleID: _basic_types_pb2.ScheduleID + deletion_time: _timestamp_pb2.Timestamp + execution_time: _timestamp_pb2.Timestamp + expirationTime: _timestamp_pb2.Timestamp + scheduledTransactionBody: _schedulable_transaction_body_pb2.SchedulableTransactionBody + memo: str + adminKey: _basic_types_pb2.Key + signers: _basic_types_pb2.KeyList + creatorAccountID: _basic_types_pb2.AccountID + payerAccountID: _basic_types_pb2.AccountID + scheduledTransactionID: _basic_types_pb2.TransactionID + ledger_id: bytes + wait_for_expiry: bool + def __init__(self, scheduleID: _Optional[_Union[_basic_types_pb2.ScheduleID, _Mapping]] = ..., deletion_time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., execution_time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., expirationTime: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., scheduledTransactionBody: _Optional[_Union[_schedulable_transaction_body_pb2.SchedulableTransactionBody, _Mapping]] = ..., memo: _Optional[str] = ..., adminKey: _Optional[_Union[_basic_types_pb2.Key, _Mapping]] = ..., signers: _Optional[_Union[_basic_types_pb2.KeyList, _Mapping]] = ..., creatorAccountID: _Optional[_Union[_basic_types_pb2.AccountID, _Mapping]] = ..., payerAccountID: _Optional[_Union[_basic_types_pb2.AccountID, _Mapping]] = ..., scheduledTransactionID: _Optional[_Union[_basic_types_pb2.TransactionID, _Mapping]] = ..., ledger_id: _Optional[bytes] = ..., wait_for_expiry: bool = ...) -> None: ... + +class ScheduleGetInfoResponse(_message.Message): + __slots__ = ("header", "scheduleInfo") + HEADER_FIELD_NUMBER: _ClassVar[int] + SCHEDULEINFO_FIELD_NUMBER: _ClassVar[int] + header: _response_header_pb2.ResponseHeader + scheduleInfo: ScheduleInfo + def __init__(self, header: _Optional[_Union[_response_header_pb2.ResponseHeader, _Mapping]] = ..., scheduleInfo: _Optional[_Union[ScheduleInfo, _Mapping]] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/schedule_get_info_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/schedule_get_info_pb2_grpc.py new file mode 100644 index 000000000..a1adb59fd --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/schedule_get_info_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/schedule_get_info_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/schedule_service_pb2.py b/src/hiero_sdk_python/hapi/services/schedule_service_pb2.py new file mode 100644 index 000000000..af84e222f --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/schedule_service_pb2.py @@ -0,0 +1,37 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/schedule_service.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/schedule_service.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import query_pb2 as services_dot_query__pb2 +from . import response_pb2 as services_dot_response__pb2 +from . import transaction_response_pb2 as services_dot_transaction__response__pb2 +from . import transaction_pb2 as services_dot_transaction__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1fservices/schedule_service.proto\x12\x05proto\x1a\x14services/query.proto\x1a\x17services/response.proto\x1a#services/transaction_response.proto\x1a\x1aservices/transaction.proto2\x87\x02\n\x0fScheduleService\x12@\n\x0e\x63reateSchedule\x12\x12.proto.Transaction\x1a\x1a.proto.TransactionResponse\x12>\n\x0csignSchedule\x12\x12.proto.Transaction\x1a\x1a.proto.TransactionResponse\x12@\n\x0e\x64\x65leteSchedule\x12\x12.proto.Transaction\x1a\x1a.proto.TransactionResponse\x12\x30\n\x0fgetScheduleInfo\x12\x0c.proto.Query\x1a\x0f.proto.ResponseB(\n&com.hederahashgraph.service.proto.javab\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.schedule_service_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n&com.hederahashgraph.service.proto.java' + _globals['_SCHEDULESERVICE']._serialized_start=155 + _globals['_SCHEDULESERVICE']._serialized_end=418 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/schedule_service_pb2.pyi b/src/hiero_sdk_python/hapi/services/schedule_service_pb2.pyi new file mode 100644 index 000000000..ce90eb498 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/schedule_service_pb2.pyi @@ -0,0 +1,8 @@ +from . import query_pb2 as _query_pb2 +from . import response_pb2 as _response_pb2 +from . import transaction_response_pb2 as _transaction_response_pb2 +from . import transaction_pb2 as _transaction_pb2 +from google.protobuf import descriptor as _descriptor +from typing import ClassVar as _ClassVar + +DESCRIPTOR: _descriptor.FileDescriptor diff --git a/src/hiero_sdk_python/hapi/services/schedule_service_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/schedule_service_pb2_grpc.py new file mode 100644 index 000000000..b1ddcec7f --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/schedule_service_pb2_grpc.py @@ -0,0 +1,389 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings +from . import query_pb2 as services_dot_query__pb2 +from . import response_pb2 as services_dot_response__pb2 +from . import transaction_pb2 as services_dot_transaction__pb2 +from . import transaction_response_pb2 as services_dot_transaction__response__pb2 +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/schedule_service_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) + + +class ScheduleServiceStub(object): + """* + Transactions and queries for the Schedule Service.
      + The Schedule Service enables transactions to be submitted without all + required signatures and offers a `scheduleSign` transaction to provide + additional signatures independently after the schedule is created. The + scheduled transaction may be executed immediately when all required + signatures are present, or at expiration if "long term" schedules + are enabled in network configuration. + + ### Execution + Scheduled transactions SHALL be executed under the following conditions. + 1. If "long term" schedules are enabled and `wait_for_expiry` is set for + that schedule then the transaction SHALL NOT be executed before the + network consensus time matches or exceeds the `expiration_time` field + for that schedule. + 1. If "long term" schedules are enabled and `wait_for_expiry` is _not_ set + for that schedule, then the transaction SHALL be executed when all + signatures required by the scheduled transaction are active for that + schedule. This MAY be immediately after the `scheduleCreate` or a + subsequent `scheduleSign` transaction, or MAY be at expiration if + the signature requirements are met at that time. + 1. If "long term" schedules are _disabled_, then the scheduled transaction + SHALL be executed immediately after all signature requirements for the + scheduled transaction are met during the `scheduleCreate` or a subsequent + `scheduleSign` transaction. The scheduled transaction SHALL NOT be + on expiration when "long term" schedules are disabled. + + A schedule SHALL remain in state and MAY be queried with a `getScheduleInfo` + transaction after execution, until the schedule expires.
      + When network consensus time matches or exceeds the `expiration_time` for + a schedule, that schedule SHALL be removed from state, whether it has + executed or not.
      + If "long term" schedules are _disabled_, the maximum expiration time SHALL + be the consensus time of the `scheduleCreate` transaction extended by + the network configuration value `ledger.scheduleTxExpiryTimeSecs`. + + ### Block Stream Effects + When a scheduled transaction is executed, the timestamp in the transaction + identifier for that transaction SHALL be 1 nanosecond after the consensus + timestamp for the transaction that resulted in its execution. If execution + occurred at expiration, that transaction may be almost any transaction, + including another scheduled transaction that executed at expiration.
      + The transaction identifier for a scheduled transaction that is executed + SHALL have the `scheduled` flag set and SHALL inherit the `accountID` and + `transactionValidStart` values from the `scheduleCreate` that created the + schedule.
      + The `scheduleRef` property of the record for a scheduled transaction SHALL + be populated with the schedule identifier of the schedule that executed. + """ + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.createSchedule = channel.unary_unary( + '/proto.ScheduleService/createSchedule', + request_serializer=services_dot_transaction__pb2.Transaction.SerializeToString, + response_deserializer=services_dot_transaction__response__pb2.TransactionResponse.FromString, + _registered_method=True) + self.signSchedule = channel.unary_unary( + '/proto.ScheduleService/signSchedule', + request_serializer=services_dot_transaction__pb2.Transaction.SerializeToString, + response_deserializer=services_dot_transaction__response__pb2.TransactionResponse.FromString, + _registered_method=True) + self.deleteSchedule = channel.unary_unary( + '/proto.ScheduleService/deleteSchedule', + request_serializer=services_dot_transaction__pb2.Transaction.SerializeToString, + response_deserializer=services_dot_transaction__response__pb2.TransactionResponse.FromString, + _registered_method=True) + self.getScheduleInfo = channel.unary_unary( + '/proto.ScheduleService/getScheduleInfo', + request_serializer=services_dot_query__pb2.Query.SerializeToString, + response_deserializer=services_dot_response__pb2.Response.FromString, + _registered_method=True) + + +class ScheduleServiceServicer(object): + """* + Transactions and queries for the Schedule Service.
      + The Schedule Service enables transactions to be submitted without all + required signatures and offers a `scheduleSign` transaction to provide + additional signatures independently after the schedule is created. The + scheduled transaction may be executed immediately when all required + signatures are present, or at expiration if "long term" schedules + are enabled in network configuration. + + ### Execution + Scheduled transactions SHALL be executed under the following conditions. + 1. If "long term" schedules are enabled and `wait_for_expiry` is set for + that schedule then the transaction SHALL NOT be executed before the + network consensus time matches or exceeds the `expiration_time` field + for that schedule. + 1. If "long term" schedules are enabled and `wait_for_expiry` is _not_ set + for that schedule, then the transaction SHALL be executed when all + signatures required by the scheduled transaction are active for that + schedule. This MAY be immediately after the `scheduleCreate` or a + subsequent `scheduleSign` transaction, or MAY be at expiration if + the signature requirements are met at that time. + 1. If "long term" schedules are _disabled_, then the scheduled transaction + SHALL be executed immediately after all signature requirements for the + scheduled transaction are met during the `scheduleCreate` or a subsequent + `scheduleSign` transaction. The scheduled transaction SHALL NOT be + on expiration when "long term" schedules are disabled. + + A schedule SHALL remain in state and MAY be queried with a `getScheduleInfo` + transaction after execution, until the schedule expires.
      + When network consensus time matches or exceeds the `expiration_time` for + a schedule, that schedule SHALL be removed from state, whether it has + executed or not.
      + If "long term" schedules are _disabled_, the maximum expiration time SHALL + be the consensus time of the `scheduleCreate` transaction extended by + the network configuration value `ledger.scheduleTxExpiryTimeSecs`. + + ### Block Stream Effects + When a scheduled transaction is executed, the timestamp in the transaction + identifier for that transaction SHALL be 1 nanosecond after the consensus + timestamp for the transaction that resulted in its execution. If execution + occurred at expiration, that transaction may be almost any transaction, + including another scheduled transaction that executed at expiration.
      + The transaction identifier for a scheduled transaction that is executed + SHALL have the `scheduled` flag set and SHALL inherit the `accountID` and + `transactionValidStart` values from the `scheduleCreate` that created the + schedule.
      + The `scheduleRef` property of the record for a scheduled transaction SHALL + be populated with the schedule identifier of the schedule that executed. + """ + + def createSchedule(self, request, context): + """* + Create a new Schedule. +

      + If all signature requirements are met with this transaction, the + scheduled transaction MAY execute immediately. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def signSchedule(self, request, context): + """* + Add signatures to an existing schedule. +

      + Signatures on this transaction SHALL be added to the set of active + signatures on the schedule, and MAY result in execution of the + scheduled transaction if all signature requirements are met. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def deleteSchedule(self, request, context): + """* + Mark an existing schedule deleted. +

      + Once deleted a schedule SHALL NOT be executed and any subsequent + `scheduleSign` transaction SHALL fail. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def getScheduleInfo(self, request, context): + """* + Retrieve the metadata for a schedule. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_ScheduleServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'createSchedule': grpc.unary_unary_rpc_method_handler( + servicer.createSchedule, + request_deserializer=services_dot_transaction__pb2.Transaction.FromString, + response_serializer=services_dot_transaction__response__pb2.TransactionResponse.SerializeToString, + ), + 'signSchedule': grpc.unary_unary_rpc_method_handler( + servicer.signSchedule, + request_deserializer=services_dot_transaction__pb2.Transaction.FromString, + response_serializer=services_dot_transaction__response__pb2.TransactionResponse.SerializeToString, + ), + 'deleteSchedule': grpc.unary_unary_rpc_method_handler( + servicer.deleteSchedule, + request_deserializer=services_dot_transaction__pb2.Transaction.FromString, + response_serializer=services_dot_transaction__response__pb2.TransactionResponse.SerializeToString, + ), + 'getScheduleInfo': grpc.unary_unary_rpc_method_handler( + servicer.getScheduleInfo, + request_deserializer=services_dot_query__pb2.Query.FromString, + response_serializer=services_dot_response__pb2.Response.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'proto.ScheduleService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + server.add_registered_method_handlers('proto.ScheduleService', rpc_method_handlers) + + + # This class is part of an EXPERIMENTAL API. +class ScheduleService(object): + """* + Transactions and queries for the Schedule Service.
      + The Schedule Service enables transactions to be submitted without all + required signatures and offers a `scheduleSign` transaction to provide + additional signatures independently after the schedule is created. The + scheduled transaction may be executed immediately when all required + signatures are present, or at expiration if "long term" schedules + are enabled in network configuration. + + ### Execution + Scheduled transactions SHALL be executed under the following conditions. + 1. If "long term" schedules are enabled and `wait_for_expiry` is set for + that schedule then the transaction SHALL NOT be executed before the + network consensus time matches or exceeds the `expiration_time` field + for that schedule. + 1. If "long term" schedules are enabled and `wait_for_expiry` is _not_ set + for that schedule, then the transaction SHALL be executed when all + signatures required by the scheduled transaction are active for that + schedule. This MAY be immediately after the `scheduleCreate` or a + subsequent `scheduleSign` transaction, or MAY be at expiration if + the signature requirements are met at that time. + 1. If "long term" schedules are _disabled_, then the scheduled transaction + SHALL be executed immediately after all signature requirements for the + scheduled transaction are met during the `scheduleCreate` or a subsequent + `scheduleSign` transaction. The scheduled transaction SHALL NOT be + on expiration when "long term" schedules are disabled. + + A schedule SHALL remain in state and MAY be queried with a `getScheduleInfo` + transaction after execution, until the schedule expires.
      + When network consensus time matches or exceeds the `expiration_time` for + a schedule, that schedule SHALL be removed from state, whether it has + executed or not.
      + If "long term" schedules are _disabled_, the maximum expiration time SHALL + be the consensus time of the `scheduleCreate` transaction extended by + the network configuration value `ledger.scheduleTxExpiryTimeSecs`. + + ### Block Stream Effects + When a scheduled transaction is executed, the timestamp in the transaction + identifier for that transaction SHALL be 1 nanosecond after the consensus + timestamp for the transaction that resulted in its execution. If execution + occurred at expiration, that transaction may be almost any transaction, + including another scheduled transaction that executed at expiration.
      + The transaction identifier for a scheduled transaction that is executed + SHALL have the `scheduled` flag set and SHALL inherit the `accountID` and + `transactionValidStart` values from the `scheduleCreate` that created the + schedule.
      + The `scheduleRef` property of the record for a scheduled transaction SHALL + be populated with the schedule identifier of the schedule that executed. + """ + + @staticmethod + def createSchedule(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/proto.ScheduleService/createSchedule', + services_dot_transaction__pb2.Transaction.SerializeToString, + services_dot_transaction__response__pb2.TransactionResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def signSchedule(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/proto.ScheduleService/signSchedule', + services_dot_transaction__pb2.Transaction.SerializeToString, + services_dot_transaction__response__pb2.TransactionResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def deleteSchedule(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/proto.ScheduleService/deleteSchedule', + services_dot_transaction__pb2.Transaction.SerializeToString, + services_dot_transaction__response__pb2.TransactionResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def getScheduleInfo(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/proto.ScheduleService/getScheduleInfo', + services_dot_query__pb2.Query.SerializeToString, + services_dot_response__pb2.Response.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) diff --git a/src/hiero_sdk_python/hapi/services/schedule_sign_pb2.py b/src/hiero_sdk_python/hapi/services/schedule_sign_pb2.py new file mode 100644 index 000000000..1c8be1470 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/schedule_sign_pb2.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/schedule_sign.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/schedule_sign.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import basic_types_pb2 as services_dot_basic__types__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cservices/schedule_sign.proto\x12\x05proto\x1a\x1aservices/basic_types.proto\"D\n\x1bScheduleSignTransactionBody\x12%\n\nscheduleID\x18\x01 \x01(\x0b\x32\x11.proto.ScheduleIDB&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.schedule_sign_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_SCHEDULESIGNTRANSACTIONBODY']._serialized_start=67 + _globals['_SCHEDULESIGNTRANSACTIONBODY']._serialized_end=135 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/schedule_sign_pb2.pyi b/src/hiero_sdk_python/hapi/services/schedule_sign_pb2.pyi new file mode 100644 index 000000000..e9c205bee --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/schedule_sign_pb2.pyi @@ -0,0 +1,13 @@ +from . import basic_types_pb2 as _basic_types_pb2 +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class ScheduleSignTransactionBody(_message.Message): + __slots__ = ("scheduleID",) + SCHEDULEID_FIELD_NUMBER: _ClassVar[int] + scheduleID: _basic_types_pb2.ScheduleID + def __init__(self, scheduleID: _Optional[_Union[_basic_types_pb2.ScheduleID, _Mapping]] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/schedule_sign_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/schedule_sign_pb2_grpc.py new file mode 100644 index 000000000..d5973a851 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/schedule_sign_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/schedule_sign_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/smart_contract_service_pb2.py b/src/hiero_sdk_python/hapi/services/smart_contract_service_pb2.py new file mode 100644 index 000000000..0958fb287 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/smart_contract_service_pb2.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/smart_contract_service.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/smart_contract_service.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import transaction_response_pb2 as services_dot_transaction__response__pb2 +from . import query_pb2 as services_dot_query__pb2 +from . import response_pb2 as services_dot_response__pb2 +from . import transaction_pb2 as services_dot_transaction__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n%services/smart_contract_service.proto\x12\x05proto\x1a#services/transaction_response.proto\x1a\x14services/query.proto\x1a\x17services/response.proto\x1a\x1aservices/transaction.proto2\xc6\x06\n\x14SmartContractService\x12@\n\x0e\x63reateContract\x12\x12.proto.Transaction\x1a\x1a.proto.TransactionResponse\x12@\n\x0eupdateContract\x12\x12.proto.Transaction\x1a\x1a.proto.TransactionResponse\x12\x44\n\x12\x63ontractCallMethod\x12\x12.proto.Transaction\x1a\x1a.proto.TransactionResponse\x12\x38\n\x17\x63ontractCallLocalMethod\x12\x0c.proto.Query\x1a\x0f.proto.Response\x12\x30\n\x0fgetContractInfo\x12\x0c.proto.Query\x1a\x0f.proto.Response\x12\x34\n\x13\x43ontractGetBytecode\x12\x0c.proto.Query\x1a\x0f.proto.Response\x12\x35\n\x0fgetBySolidityID\x12\x0c.proto.Query\x1a\x0f.proto.Response\"\x03\x88\x02\x01\x12=\n\x17getTxRecordByContractID\x12\x0c.proto.Query\x1a\x0f.proto.Response\"\x03\x88\x02\x01\x12@\n\x0e\x64\x65leteContract\x12\x12.proto.Transaction\x1a\x1a.proto.TransactionResponse\x12\x43\n\x0csystemDelete\x12\x12.proto.Transaction\x1a\x1a.proto.TransactionResponse\"\x03\x88\x02\x01\x12\x45\n\x0esystemUndelete\x12\x12.proto.Transaction\x1a\x1a.proto.TransactionResponse\"\x03\x88\x02\x01\x12>\n\x0c\x63\x61llEthereum\x12\x12.proto.Transaction\x1a\x1a.proto.TransactionResponse\x12>\n\x0clambdaSStore\x12\x12.proto.Transaction\x1a\x1a.proto.TransactionResponseB(\n&com.hederahashgraph.service.proto.javab\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.smart_contract_service_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n&com.hederahashgraph.service.proto.java' + _globals['_SMARTCONTRACTSERVICE'].methods_by_name['getBySolidityID']._loaded_options = None + _globals['_SMARTCONTRACTSERVICE'].methods_by_name['getBySolidityID']._serialized_options = b'\210\002\001' + _globals['_SMARTCONTRACTSERVICE'].methods_by_name['getTxRecordByContractID']._loaded_options = None + _globals['_SMARTCONTRACTSERVICE'].methods_by_name['getTxRecordByContractID']._serialized_options = b'\210\002\001' + _globals['_SMARTCONTRACTSERVICE'].methods_by_name['systemDelete']._loaded_options = None + _globals['_SMARTCONTRACTSERVICE'].methods_by_name['systemDelete']._serialized_options = b'\210\002\001' + _globals['_SMARTCONTRACTSERVICE'].methods_by_name['systemUndelete']._loaded_options = None + _globals['_SMARTCONTRACTSERVICE'].methods_by_name['systemUndelete']._serialized_options = b'\210\002\001' + _globals['_SMARTCONTRACTSERVICE']._serialized_start=161 + _globals['_SMARTCONTRACTSERVICE']._serialized_end=999 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/smart_contract_service_pb2.pyi b/src/hiero_sdk_python/hapi/services/smart_contract_service_pb2.pyi new file mode 100644 index 000000000..8639aea89 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/smart_contract_service_pb2.pyi @@ -0,0 +1,8 @@ +from . import transaction_response_pb2 as _transaction_response_pb2 +from . import query_pb2 as _query_pb2 +from . import response_pb2 as _response_pb2 +from . import transaction_pb2 as _transaction_pb2 +from google.protobuf import descriptor as _descriptor +from typing import ClassVar as _ClassVar + +DESCRIPTOR: _descriptor.FileDescriptor diff --git a/src/hiero_sdk_python/hapi/services/smart_contract_service_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/smart_contract_service_pb2_grpc.py new file mode 100644 index 000000000..19a03663b --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/smart_contract_service_pb2_grpc.py @@ -0,0 +1,737 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings +from . import query_pb2 as services_dot_query__pb2 +from . import response_pb2 as services_dot_response__pb2 +from . import transaction_pb2 as services_dot_transaction__pb2 +from . import transaction_response_pb2 as services_dot_transaction__response__pb2 +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/smart_contract_service_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) + + +class SmartContractServiceStub(object): + """* + The Hedera Smart Contract Service (HSCS) provides an interface to an EVM + compatible environment to create, store, manage, and execute smart contract + calls. Smart Contracts implement useful and often highly complex + interactions between individuals, systems, and the distributed ledger. + """ + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.createContract = channel.unary_unary( + '/proto.SmartContractService/createContract', + request_serializer=services_dot_transaction__pb2.Transaction.SerializeToString, + response_deserializer=services_dot_transaction__response__pb2.TransactionResponse.FromString, + _registered_method=True) + self.updateContract = channel.unary_unary( + '/proto.SmartContractService/updateContract', + request_serializer=services_dot_transaction__pb2.Transaction.SerializeToString, + response_deserializer=services_dot_transaction__response__pb2.TransactionResponse.FromString, + _registered_method=True) + self.contractCallMethod = channel.unary_unary( + '/proto.SmartContractService/contractCallMethod', + request_serializer=services_dot_transaction__pb2.Transaction.SerializeToString, + response_deserializer=services_dot_transaction__response__pb2.TransactionResponse.FromString, + _registered_method=True) + self.contractCallLocalMethod = channel.unary_unary( + '/proto.SmartContractService/contractCallLocalMethod', + request_serializer=services_dot_query__pb2.Query.SerializeToString, + response_deserializer=services_dot_response__pb2.Response.FromString, + _registered_method=True) + self.getContractInfo = channel.unary_unary( + '/proto.SmartContractService/getContractInfo', + request_serializer=services_dot_query__pb2.Query.SerializeToString, + response_deserializer=services_dot_response__pb2.Response.FromString, + _registered_method=True) + self.ContractGetBytecode = channel.unary_unary( + '/proto.SmartContractService/ContractGetBytecode', + request_serializer=services_dot_query__pb2.Query.SerializeToString, + response_deserializer=services_dot_response__pb2.Response.FromString, + _registered_method=True) + self.getBySolidityID = channel.unary_unary( + '/proto.SmartContractService/getBySolidityID', + request_serializer=services_dot_query__pb2.Query.SerializeToString, + response_deserializer=services_dot_response__pb2.Response.FromString, + _registered_method=True) + self.getTxRecordByContractID = channel.unary_unary( + '/proto.SmartContractService/getTxRecordByContractID', + request_serializer=services_dot_query__pb2.Query.SerializeToString, + response_deserializer=services_dot_response__pb2.Response.FromString, + _registered_method=True) + self.deleteContract = channel.unary_unary( + '/proto.SmartContractService/deleteContract', + request_serializer=services_dot_transaction__pb2.Transaction.SerializeToString, + response_deserializer=services_dot_transaction__response__pb2.TransactionResponse.FromString, + _registered_method=True) + self.systemDelete = channel.unary_unary( + '/proto.SmartContractService/systemDelete', + request_serializer=services_dot_transaction__pb2.Transaction.SerializeToString, + response_deserializer=services_dot_transaction__response__pb2.TransactionResponse.FromString, + _registered_method=True) + self.systemUndelete = channel.unary_unary( + '/proto.SmartContractService/systemUndelete', + request_serializer=services_dot_transaction__pb2.Transaction.SerializeToString, + response_deserializer=services_dot_transaction__response__pb2.TransactionResponse.FromString, + _registered_method=True) + self.callEthereum = channel.unary_unary( + '/proto.SmartContractService/callEthereum', + request_serializer=services_dot_transaction__pb2.Transaction.SerializeToString, + response_deserializer=services_dot_transaction__response__pb2.TransactionResponse.FromString, + _registered_method=True) + self.lambdaSStore = channel.unary_unary( + '/proto.SmartContractService/lambdaSStore', + request_serializer=services_dot_transaction__pb2.Transaction.SerializeToString, + response_deserializer=services_dot_transaction__response__pb2.TransactionResponse.FromString, + _registered_method=True) + + +class SmartContractServiceServicer(object): + """* + The Hedera Smart Contract Service (HSCS) provides an interface to an EVM + compatible environment to create, store, manage, and execute smart contract + calls. Smart Contracts implement useful and often highly complex + interactions between individuals, systems, and the distributed ledger. + """ + + def createContract(self, request, context): + """* + Create a new smart contract. +

      + If this transaction succeeds, the `ContractID` for the new smart + contract SHALL be set in the transaction receipt.
      + The contract is defined by the initial bytecode (or `initcode`). + The `initcode` SHALL be provided either in a previously created file, + or in the transaction body itself for very small contracts.
      + As part of contract creation, the constructor defined for the new + smart contract SHALL run with the parameters provided in + the `constructorParameters` field.
      + The gas to "power" that constructor MUST be provided via the `gas` + field, and SHALL be charged to the payer for this transaction.
      + If the contract _constructor_ stores information, it is charged gas for + that storage. There is a separate fee in HBAR to maintain that storage + until the expiration, and that fee SHALL be added to this transaction + as part of the _transaction fee_, rather than gas. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def updateContract(self, request, context): + """* + Modify a smart contract.
      + Any change other than updating the expiration time requires that the + contract be modifiable (has a valid `adminKey`) and that the + transaction be signed by the `adminKey` +

      + Fields _not set_ on the request SHALL NOT be modified. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def contractCallMethod(self, request, context): + """* + Call a function of a given smart contract, providing function parameter + inputs as needed. +

      + Resource ("gas") charges SHALL include all relevant fees incurred by + the contract execution, including any storage required.
      + The total transaction fee SHALL incorporate all of the "gas" actually + consumed as well as the standard fees for transaction handling, + data transfers, signature verification, etc... + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def contractCallLocalMethod(self, request, context): + """* + Call a query function of a given smart contract, providing + function parameter inputs as needed.
      + This is performed locally on the particular node that the client is + communicating with. Executing the call locally is faster and less + costly, but imposes certain restrictions. +

      + The call MUST NOT change the state of the contract instance. This also + precludes any expenditure or transfer of HBAR or other tokens.
      + The call SHALL NOT have a separate consensus timestamp.
      + The call SHALL NOT generate a record nor a receipt.
      + The response SHALL contain the output returned by the function call.
      +

      + This is generally useful for calling accessor functions which read + (query) state without changes or side effects. Any contract call that + would use the `STATICCALL` opcode MAY be called via contract call local + with performance and cost benefits. +

      + Unlike a ContractCall transaction, the node SHALL always consume the + _entire_ amount of offered "gas" in determining the fee for this query, + so accurate gas estimation is important. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def getContractInfo(self, request, context): + """* + A standard query to obtain detailed information for a smart contract. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ContractGetBytecode(self, request, context): + """* + A standard query to read the current bytecode for a smart contract. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def getBySolidityID(self, request, context): + """* + A standard query to obtain account and contract identifiers for a smart + contract, given the Solidity identifier for that contract. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def getTxRecordByContractID(self, request, context): + """* +

      This query is no longer supported.
      + This query always returned an empty record list. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def deleteContract(self, request, context): + """* + Delete a smart contract, and transfer any remaining HBAR balance + to a designated account. +

      + If this call succeeds then all subsequent calls to that smart + contract SHALL fail.
      + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def systemDelete(self, request, context): + """* + Delete a smart contract, as a system-initiated deletion, this + SHALL NOT transfer balances. +

      + This call is an administrative function of the Hedera network, and + SHALL require network administration authorization.
      + This transaction MUST be signed by one of the network administration + accounts (typically `0.0.2` through `0.0.59`, as defined in the + `api-permission.properties` file). +
      + If this call succeeds then all subsequent calls to that smart + contract SHALL fail.
      + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def systemUndelete(self, request, context): + """* + Un-Delete a smart contract, returning it (mostly) to its state + prior to deletion. +

      + The contract to be restored MUST have been deleted via `systemDelete`. + If the contract was deleted via `deleteContract`, it + SHALL NOT be recoverable. +

      + This call is an administrative function of the Hedera network, and + SHALL require network administration authorization.
      + This transaction MUST be signed by one of the network administration + accounts (typically `0.0.2` through `0.0.59`, as defined in the + `api-permission.properties` file). +
      + If this call succeeds then subsequent calls to that smart + contract MAY succeed.
      + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def callEthereum(self, request, context): + """* + Make an Ethereum transaction "call" with all data in Ethereum formats, + including the contract alias. +

      + Call data MAY be in the transaction, or stored within a "File".
      + The caller MAY offer additional gas above what is offered in the call + data, but MAY be charged up to 80% of that value if the amount required + is less than this "floor" amount. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def lambdaSStore(self, request, context): + """* + Update zero or more slots of a lambda. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_SmartContractServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'createContract': grpc.unary_unary_rpc_method_handler( + servicer.createContract, + request_deserializer=services_dot_transaction__pb2.Transaction.FromString, + response_serializer=services_dot_transaction__response__pb2.TransactionResponse.SerializeToString, + ), + 'updateContract': grpc.unary_unary_rpc_method_handler( + servicer.updateContract, + request_deserializer=services_dot_transaction__pb2.Transaction.FromString, + response_serializer=services_dot_transaction__response__pb2.TransactionResponse.SerializeToString, + ), + 'contractCallMethod': grpc.unary_unary_rpc_method_handler( + servicer.contractCallMethod, + request_deserializer=services_dot_transaction__pb2.Transaction.FromString, + response_serializer=services_dot_transaction__response__pb2.TransactionResponse.SerializeToString, + ), + 'contractCallLocalMethod': grpc.unary_unary_rpc_method_handler( + servicer.contractCallLocalMethod, + request_deserializer=services_dot_query__pb2.Query.FromString, + response_serializer=services_dot_response__pb2.Response.SerializeToString, + ), + 'getContractInfo': grpc.unary_unary_rpc_method_handler( + servicer.getContractInfo, + request_deserializer=services_dot_query__pb2.Query.FromString, + response_serializer=services_dot_response__pb2.Response.SerializeToString, + ), + 'ContractGetBytecode': grpc.unary_unary_rpc_method_handler( + servicer.ContractGetBytecode, + request_deserializer=services_dot_query__pb2.Query.FromString, + response_serializer=services_dot_response__pb2.Response.SerializeToString, + ), + 'getBySolidityID': grpc.unary_unary_rpc_method_handler( + servicer.getBySolidityID, + request_deserializer=services_dot_query__pb2.Query.FromString, + response_serializer=services_dot_response__pb2.Response.SerializeToString, + ), + 'getTxRecordByContractID': grpc.unary_unary_rpc_method_handler( + servicer.getTxRecordByContractID, + request_deserializer=services_dot_query__pb2.Query.FromString, + response_serializer=services_dot_response__pb2.Response.SerializeToString, + ), + 'deleteContract': grpc.unary_unary_rpc_method_handler( + servicer.deleteContract, + request_deserializer=services_dot_transaction__pb2.Transaction.FromString, + response_serializer=services_dot_transaction__response__pb2.TransactionResponse.SerializeToString, + ), + 'systemDelete': grpc.unary_unary_rpc_method_handler( + servicer.systemDelete, + request_deserializer=services_dot_transaction__pb2.Transaction.FromString, + response_serializer=services_dot_transaction__response__pb2.TransactionResponse.SerializeToString, + ), + 'systemUndelete': grpc.unary_unary_rpc_method_handler( + servicer.systemUndelete, + request_deserializer=services_dot_transaction__pb2.Transaction.FromString, + response_serializer=services_dot_transaction__response__pb2.TransactionResponse.SerializeToString, + ), + 'callEthereum': grpc.unary_unary_rpc_method_handler( + servicer.callEthereum, + request_deserializer=services_dot_transaction__pb2.Transaction.FromString, + response_serializer=services_dot_transaction__response__pb2.TransactionResponse.SerializeToString, + ), + 'lambdaSStore': grpc.unary_unary_rpc_method_handler( + servicer.lambdaSStore, + request_deserializer=services_dot_transaction__pb2.Transaction.FromString, + response_serializer=services_dot_transaction__response__pb2.TransactionResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'proto.SmartContractService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + server.add_registered_method_handlers('proto.SmartContractService', rpc_method_handlers) + + + # This class is part of an EXPERIMENTAL API. +class SmartContractService(object): + """* + The Hedera Smart Contract Service (HSCS) provides an interface to an EVM + compatible environment to create, store, manage, and execute smart contract + calls. Smart Contracts implement useful and often highly complex + interactions between individuals, systems, and the distributed ledger. + """ + + @staticmethod + def createContract(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/proto.SmartContractService/createContract', + services_dot_transaction__pb2.Transaction.SerializeToString, + services_dot_transaction__response__pb2.TransactionResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def updateContract(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/proto.SmartContractService/updateContract', + services_dot_transaction__pb2.Transaction.SerializeToString, + services_dot_transaction__response__pb2.TransactionResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def contractCallMethod(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/proto.SmartContractService/contractCallMethod', + services_dot_transaction__pb2.Transaction.SerializeToString, + services_dot_transaction__response__pb2.TransactionResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def contractCallLocalMethod(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/proto.SmartContractService/contractCallLocalMethod', + services_dot_query__pb2.Query.SerializeToString, + services_dot_response__pb2.Response.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def getContractInfo(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/proto.SmartContractService/getContractInfo', + services_dot_query__pb2.Query.SerializeToString, + services_dot_response__pb2.Response.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def ContractGetBytecode(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/proto.SmartContractService/ContractGetBytecode', + services_dot_query__pb2.Query.SerializeToString, + services_dot_response__pb2.Response.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def getBySolidityID(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/proto.SmartContractService/getBySolidityID', + services_dot_query__pb2.Query.SerializeToString, + services_dot_response__pb2.Response.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def getTxRecordByContractID(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/proto.SmartContractService/getTxRecordByContractID', + services_dot_query__pb2.Query.SerializeToString, + services_dot_response__pb2.Response.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def deleteContract(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/proto.SmartContractService/deleteContract', + services_dot_transaction__pb2.Transaction.SerializeToString, + services_dot_transaction__response__pb2.TransactionResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def systemDelete(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/proto.SmartContractService/systemDelete', + services_dot_transaction__pb2.Transaction.SerializeToString, + services_dot_transaction__response__pb2.TransactionResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def systemUndelete(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/proto.SmartContractService/systemUndelete', + services_dot_transaction__pb2.Transaction.SerializeToString, + services_dot_transaction__response__pb2.TransactionResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def callEthereum(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/proto.SmartContractService/callEthereum', + services_dot_transaction__pb2.Transaction.SerializeToString, + services_dot_transaction__response__pb2.TransactionResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def lambdaSStore(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/proto.SmartContractService/lambdaSStore', + services_dot_transaction__pb2.Transaction.SerializeToString, + services_dot_transaction__response__pb2.TransactionResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) diff --git a/src/hiero_sdk_python/hapi/services/state/__init__.py b/src/hiero_sdk_python/hapi/services/state/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/src/hiero_sdk_python/hapi/services/state/hints/__init__.py b/src/hiero_sdk_python/hapi/services/state/hints/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/src/hiero_sdk_python/hapi/services/state/hints/hints_types_pb2.py b/src/hiero_sdk_python/hapi/services/state/hints/hints_types_pb2.py new file mode 100644 index 000000000..80d7b4583 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/state/hints/hints_types_pb2.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/state/hints/hints_types.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/state/hints/hints_types.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from ... import timestamp_pb2 as services_dot_timestamp__pb2 +from google.protobuf import wrappers_pb2 as google_dot_protobuf_dot_wrappers__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n&services/state/hints/hints_types.proto\x12 com.hedera.hapi.node.state.hints\x1a\x18services/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\"5\n\x0cHintsPartyId\x12\x10\n\x08party_id\x18\x01 \x01(\r\x12\x13\n\x0bnum_parties\x18\x02 \x01(\r\"f\n\x0bHintsKeySet\x12\x0f\n\x07node_id\x18\x01 \x01(\x04\x12\'\n\radoption_time\x18\x02 \x01(\x0b\x32\x10.proto.Timestamp\x12\x0b\n\x03key\x18\x03 \x01(\x0c\x12\x10\n\x08next_key\x18\x04 \x01(\x0c\"E\n\x10PreprocessedKeys\x12\x17\n\x0f\x61ggregation_key\x18\x01 \x01(\x0c\x12\x18\n\x10verification_key\x18\x02 \x01(\x0c\"?\n\x13PreprocessingVoteId\x12\x17\n\x0f\x63onstruction_id\x18\x01 \x01(\x04\x12\x0f\n\x07node_id\x18\x02 \x01(\x04\"\x89\x01\n\x11PreprocessingVote\x12O\n\x11preprocessed_keys\x18\x01 \x01(\x0b\x32\x32.com.hedera.hapi.node.state.hints.PreprocessedKeysH\x00\x12\x1b\n\x11\x63ongruent_node_id\x18\x02 \x01(\x04H\x00\x42\x06\n\x04vote\"F\n\x0bNodePartyId\x12\x0f\n\x07node_id\x18\x01 \x01(\x04\x12\x10\n\x08party_id\x18\x02 \x01(\r\x12\x14\n\x0cparty_weight\x18\x03 \x01(\x04\"\xa3\x01\n\x0bHintsScheme\x12M\n\x11preprocessed_keys\x18\x01 \x01(\x0b\x32\x32.com.hedera.hapi.node.state.hints.PreprocessedKeys\x12\x45\n\x0enode_party_ids\x18\x02 \x03(\x0b\x32-.com.hedera.hapi.node.state.hints.NodePartyId\"\xab\x02\n\x11HintsConstruction\x12\x17\n\x0f\x63onstruction_id\x18\x01 \x01(\x04\x12\x1a\n\x12source_roster_hash\x18\x02 \x01(\x0c\x12\x1a\n\x12target_roster_hash\x18\x03 \x01(\x0c\x12\x31\n\x15grace_period_end_time\x18\x04 \x01(\x0b\x32\x10.proto.TimestampH\x00\x12\x34\n\x18preprocessing_start_time\x18\x05 \x01(\x0b\x32\x10.proto.TimestampH\x00\x12\x45\n\x0chints_scheme\x18\x06 \x01(\x0b\x32-.com.hedera.hapi.node.state.hints.HintsSchemeH\x00\x42\x15\n\x13preprocessing_state\"\xc4\x01\n\x08\x43RSState\x12\x0b\n\x03\x63rs\x18\x01 \x01(\x0c\x12\x39\n\x05stage\x18\x02 \x01(\x0e\x32*.com.hedera.hapi.node.state.hints.CRSStage\x12?\n\x19next_contributing_node_id\x18\x03 \x01(\x0b\x32\x1c.google.protobuf.UInt64Value\x12/\n\x15\x63ontribution_end_time\x18\x04 \x01(\x0b\x32\x10.proto.Timestamp*Z\n\x08\x43RSStage\x12\x1b\n\x17GATHERING_CONTRIBUTIONS\x10\x00\x12\"\n\x1eWAITING_FOR_ADOPTING_FINAL_CRS\x10\x01\x12\r\n\tCOMPLETED\x10\x02\x42&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.state.hints.hints_types_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_CRSSTAGE']._serialized_start=1308 + _globals['_CRSSTAGE']._serialized_end=1398 + _globals['_HINTSPARTYID']._serialized_start=134 + _globals['_HINTSPARTYID']._serialized_end=187 + _globals['_HINTSKEYSET']._serialized_start=189 + _globals['_HINTSKEYSET']._serialized_end=291 + _globals['_PREPROCESSEDKEYS']._serialized_start=293 + _globals['_PREPROCESSEDKEYS']._serialized_end=362 + _globals['_PREPROCESSINGVOTEID']._serialized_start=364 + _globals['_PREPROCESSINGVOTEID']._serialized_end=427 + _globals['_PREPROCESSINGVOTE']._serialized_start=430 + _globals['_PREPROCESSINGVOTE']._serialized_end=567 + _globals['_NODEPARTYID']._serialized_start=569 + _globals['_NODEPARTYID']._serialized_end=639 + _globals['_HINTSSCHEME']._serialized_start=642 + _globals['_HINTSSCHEME']._serialized_end=805 + _globals['_HINTSCONSTRUCTION']._serialized_start=808 + _globals['_HINTSCONSTRUCTION']._serialized_end=1107 + _globals['_CRSSTATE']._serialized_start=1110 + _globals['_CRSSTATE']._serialized_end=1306 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/state/hints/hints_types_pb2.pyi b/src/hiero_sdk_python/hapi/services/state/hints/hints_types_pb2.pyi new file mode 100644 index 000000000..56eecae19 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/state/hints/hints_types_pb2.pyi @@ -0,0 +1,109 @@ +from ... import timestamp_pb2 as _timestamp_pb2 +from google.protobuf import wrappers_pb2 as _wrappers_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Iterable as _Iterable, Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class CRSStage(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = () + GATHERING_CONTRIBUTIONS: _ClassVar[CRSStage] + WAITING_FOR_ADOPTING_FINAL_CRS: _ClassVar[CRSStage] + COMPLETED: _ClassVar[CRSStage] +GATHERING_CONTRIBUTIONS: CRSStage +WAITING_FOR_ADOPTING_FINAL_CRS: CRSStage +COMPLETED: CRSStage + +class HintsPartyId(_message.Message): + __slots__ = ("party_id", "num_parties") + PARTY_ID_FIELD_NUMBER: _ClassVar[int] + NUM_PARTIES_FIELD_NUMBER: _ClassVar[int] + party_id: int + num_parties: int + def __init__(self, party_id: _Optional[int] = ..., num_parties: _Optional[int] = ...) -> None: ... + +class HintsKeySet(_message.Message): + __slots__ = ("node_id", "adoption_time", "key", "next_key") + NODE_ID_FIELD_NUMBER: _ClassVar[int] + ADOPTION_TIME_FIELD_NUMBER: _ClassVar[int] + KEY_FIELD_NUMBER: _ClassVar[int] + NEXT_KEY_FIELD_NUMBER: _ClassVar[int] + node_id: int + adoption_time: _timestamp_pb2.Timestamp + key: bytes + next_key: bytes + def __init__(self, node_id: _Optional[int] = ..., adoption_time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., key: _Optional[bytes] = ..., next_key: _Optional[bytes] = ...) -> None: ... + +class PreprocessedKeys(_message.Message): + __slots__ = ("aggregation_key", "verification_key") + AGGREGATION_KEY_FIELD_NUMBER: _ClassVar[int] + VERIFICATION_KEY_FIELD_NUMBER: _ClassVar[int] + aggregation_key: bytes + verification_key: bytes + def __init__(self, aggregation_key: _Optional[bytes] = ..., verification_key: _Optional[bytes] = ...) -> None: ... + +class PreprocessingVoteId(_message.Message): + __slots__ = ("construction_id", "node_id") + CONSTRUCTION_ID_FIELD_NUMBER: _ClassVar[int] + NODE_ID_FIELD_NUMBER: _ClassVar[int] + construction_id: int + node_id: int + def __init__(self, construction_id: _Optional[int] = ..., node_id: _Optional[int] = ...) -> None: ... + +class PreprocessingVote(_message.Message): + __slots__ = ("preprocessed_keys", "congruent_node_id") + PREPROCESSED_KEYS_FIELD_NUMBER: _ClassVar[int] + CONGRUENT_NODE_ID_FIELD_NUMBER: _ClassVar[int] + preprocessed_keys: PreprocessedKeys + congruent_node_id: int + def __init__(self, preprocessed_keys: _Optional[_Union[PreprocessedKeys, _Mapping]] = ..., congruent_node_id: _Optional[int] = ...) -> None: ... + +class NodePartyId(_message.Message): + __slots__ = ("node_id", "party_id", "party_weight") + NODE_ID_FIELD_NUMBER: _ClassVar[int] + PARTY_ID_FIELD_NUMBER: _ClassVar[int] + PARTY_WEIGHT_FIELD_NUMBER: _ClassVar[int] + node_id: int + party_id: int + party_weight: int + def __init__(self, node_id: _Optional[int] = ..., party_id: _Optional[int] = ..., party_weight: _Optional[int] = ...) -> None: ... + +class HintsScheme(_message.Message): + __slots__ = ("preprocessed_keys", "node_party_ids") + PREPROCESSED_KEYS_FIELD_NUMBER: _ClassVar[int] + NODE_PARTY_IDS_FIELD_NUMBER: _ClassVar[int] + preprocessed_keys: PreprocessedKeys + node_party_ids: _containers.RepeatedCompositeFieldContainer[NodePartyId] + def __init__(self, preprocessed_keys: _Optional[_Union[PreprocessedKeys, _Mapping]] = ..., node_party_ids: _Optional[_Iterable[_Union[NodePartyId, _Mapping]]] = ...) -> None: ... + +class HintsConstruction(_message.Message): + __slots__ = ("construction_id", "source_roster_hash", "target_roster_hash", "grace_period_end_time", "preprocessing_start_time", "hints_scheme") + CONSTRUCTION_ID_FIELD_NUMBER: _ClassVar[int] + SOURCE_ROSTER_HASH_FIELD_NUMBER: _ClassVar[int] + TARGET_ROSTER_HASH_FIELD_NUMBER: _ClassVar[int] + GRACE_PERIOD_END_TIME_FIELD_NUMBER: _ClassVar[int] + PREPROCESSING_START_TIME_FIELD_NUMBER: _ClassVar[int] + HINTS_SCHEME_FIELD_NUMBER: _ClassVar[int] + construction_id: int + source_roster_hash: bytes + target_roster_hash: bytes + grace_period_end_time: _timestamp_pb2.Timestamp + preprocessing_start_time: _timestamp_pb2.Timestamp + hints_scheme: HintsScheme + def __init__(self, construction_id: _Optional[int] = ..., source_roster_hash: _Optional[bytes] = ..., target_roster_hash: _Optional[bytes] = ..., grace_period_end_time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., preprocessing_start_time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., hints_scheme: _Optional[_Union[HintsScheme, _Mapping]] = ...) -> None: ... + +class CRSState(_message.Message): + __slots__ = ("crs", "stage", "next_contributing_node_id", "contribution_end_time") + CRS_FIELD_NUMBER: _ClassVar[int] + STAGE_FIELD_NUMBER: _ClassVar[int] + NEXT_CONTRIBUTING_NODE_ID_FIELD_NUMBER: _ClassVar[int] + CONTRIBUTION_END_TIME_FIELD_NUMBER: _ClassVar[int] + crs: bytes + stage: CRSStage + next_contributing_node_id: _wrappers_pb2.UInt64Value + contribution_end_time: _timestamp_pb2.Timestamp + def __init__(self, crs: _Optional[bytes] = ..., stage: _Optional[_Union[CRSStage, str]] = ..., next_contributing_node_id: _Optional[_Union[_wrappers_pb2.UInt64Value, _Mapping]] = ..., contribution_end_time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/state/hints/hints_types_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/state/hints/hints_types_pb2_grpc.py new file mode 100644 index 000000000..27401cced --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/state/hints/hints_types_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/state/hints/hints_types_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/state/history/__init__.py b/src/hiero_sdk_python/hapi/services/state/history/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/src/hiero_sdk_python/hapi/services/state/history/history_types_pb2.py b/src/hiero_sdk_python/hapi/services/state/history/history_types_pb2.py new file mode 100644 index 000000000..ee5a789ad --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/state/history/history_types_pb2.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/state/history/history_types.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/state/history/history_types.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from ... import timestamp_pb2 as services_dot_timestamp__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n*services/state/history/history_types.proto\x12\"com.hedera.hapi.node.state.history\x1a\x18services/timestamp.proto\"U\n\x0bProofKeySet\x12\'\n\radoption_time\x18\x02 \x01(\x0b\x32\x10.proto.Timestamp\x12\x0b\n\x03key\x18\x03 \x01(\x0c\x12\x10\n\x08next_key\x18\x04 \x01(\x0c\"(\n\x08ProofKey\x12\x0f\n\x07node_id\x18\x01 \x01(\x04\x12\x0b\n\x03key\x18\x02 \x01(\x0c\"6\n\x07History\x12\x19\n\x11\x61\x64\x64ress_book_hash\x18\x01 \x01(\x0c\x12\x10\n\x08metadata\x18\x02 \x01(\x0c\"\xcd\x01\n\x0cHistoryProof\x12 \n\x18source_address_book_hash\x18\x01 \x01(\x0c\x12G\n\x11target_proof_keys\x18\x02 \x03(\x0b\x32,.com.hedera.hapi.node.state.history.ProofKey\x12\x43\n\x0etarget_history\x18\x03 \x01(\x0b\x32+.com.hedera.hapi.node.state.history.History\x12\r\n\x05proof\x18\x04 \x01(\x0c\"\x8a\x03\n\x18HistoryProofConstruction\x12\x17\n\x0f\x63onstruction_id\x18\x01 \x01(\x04\x12\x1a\n\x12source_roster_hash\x18\x02 \x01(\x0c\x12\x46\n\x0csource_proof\x18\x03 \x01(\x0b\x32\x30.com.hedera.hapi.node.state.history.HistoryProof\x12\x1a\n\x12target_roster_hash\x18\x04 \x01(\x0c\x12\x31\n\x15grace_period_end_time\x18\x05 \x01(\x0b\x32\x10.proto.TimestampH\x00\x12/\n\x13\x61ssembly_start_time\x18\x06 \x01(\x0b\x32\x10.proto.TimestampH\x00\x12H\n\x0ctarget_proof\x18\x07 \x01(\x0b\x32\x30.com.hedera.hapi.node.state.history.HistoryProofH\x00\x12\x18\n\x0e\x66\x61ilure_reason\x18\x08 \x01(\tH\x00\x42\r\n\x0bproof_state\">\n\x12\x43onstructionNodeId\x12\x17\n\x0f\x63onstruction_id\x18\x01 \x01(\x04\x12\x0f\n\x07node_id\x18\x02 \x01(\x04\"z\n\x10HistoryProofVote\x12\x41\n\x05proof\x18\x01 \x01(\x0b\x32\x30.com.hedera.hapi.node.state.history.HistoryProofH\x00\x12\x1b\n\x11\x63ongruent_node_id\x18\x02 \x01(\x04H\x00\x42\x06\n\x04vote\"c\n\x10HistorySignature\x12<\n\x07history\x18\x01 \x01(\x0b\x32+.com.hedera.hapi.node.state.history.History\x12\x11\n\tsignature\x18\x02 \x01(\x0c\"\x93\x01\n\x18RecordedHistorySignature\x12&\n\x0csigning_time\x18\x01 \x01(\x0b\x32\x10.proto.Timestamp\x12O\n\x11history_signature\x18\x02 \x01(\x0b\x32\x34.com.hedera.hapi.node.state.history.HistorySignatureB&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.state.history.history_types_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_PROOFKEYSET']._serialized_start=108 + _globals['_PROOFKEYSET']._serialized_end=193 + _globals['_PROOFKEY']._serialized_start=195 + _globals['_PROOFKEY']._serialized_end=235 + _globals['_HISTORY']._serialized_start=237 + _globals['_HISTORY']._serialized_end=291 + _globals['_HISTORYPROOF']._serialized_start=294 + _globals['_HISTORYPROOF']._serialized_end=499 + _globals['_HISTORYPROOFCONSTRUCTION']._serialized_start=502 + _globals['_HISTORYPROOFCONSTRUCTION']._serialized_end=896 + _globals['_CONSTRUCTIONNODEID']._serialized_start=898 + _globals['_CONSTRUCTIONNODEID']._serialized_end=960 + _globals['_HISTORYPROOFVOTE']._serialized_start=962 + _globals['_HISTORYPROOFVOTE']._serialized_end=1084 + _globals['_HISTORYSIGNATURE']._serialized_start=1086 + _globals['_HISTORYSIGNATURE']._serialized_end=1185 + _globals['_RECORDEDHISTORYSIGNATURE']._serialized_start=1188 + _globals['_RECORDEDHISTORYSIGNATURE']._serialized_end=1335 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/state/history/history_types_pb2.pyi b/src/hiero_sdk_python/hapi/services/state/history/history_types_pb2.pyi new file mode 100644 index 000000000..37ee3809a --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/state/history/history_types_pb2.pyi @@ -0,0 +1,98 @@ +from ... import timestamp_pb2 as _timestamp_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Iterable as _Iterable, Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class ProofKeySet(_message.Message): + __slots__ = ("adoption_time", "key", "next_key") + ADOPTION_TIME_FIELD_NUMBER: _ClassVar[int] + KEY_FIELD_NUMBER: _ClassVar[int] + NEXT_KEY_FIELD_NUMBER: _ClassVar[int] + adoption_time: _timestamp_pb2.Timestamp + key: bytes + next_key: bytes + def __init__(self, adoption_time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., key: _Optional[bytes] = ..., next_key: _Optional[bytes] = ...) -> None: ... + +class ProofKey(_message.Message): + __slots__ = ("node_id", "key") + NODE_ID_FIELD_NUMBER: _ClassVar[int] + KEY_FIELD_NUMBER: _ClassVar[int] + node_id: int + key: bytes + def __init__(self, node_id: _Optional[int] = ..., key: _Optional[bytes] = ...) -> None: ... + +class History(_message.Message): + __slots__ = ("address_book_hash", "metadata") + ADDRESS_BOOK_HASH_FIELD_NUMBER: _ClassVar[int] + METADATA_FIELD_NUMBER: _ClassVar[int] + address_book_hash: bytes + metadata: bytes + def __init__(self, address_book_hash: _Optional[bytes] = ..., metadata: _Optional[bytes] = ...) -> None: ... + +class HistoryProof(_message.Message): + __slots__ = ("source_address_book_hash", "target_proof_keys", "target_history", "proof") + SOURCE_ADDRESS_BOOK_HASH_FIELD_NUMBER: _ClassVar[int] + TARGET_PROOF_KEYS_FIELD_NUMBER: _ClassVar[int] + TARGET_HISTORY_FIELD_NUMBER: _ClassVar[int] + PROOF_FIELD_NUMBER: _ClassVar[int] + source_address_book_hash: bytes + target_proof_keys: _containers.RepeatedCompositeFieldContainer[ProofKey] + target_history: History + proof: bytes + def __init__(self, source_address_book_hash: _Optional[bytes] = ..., target_proof_keys: _Optional[_Iterable[_Union[ProofKey, _Mapping]]] = ..., target_history: _Optional[_Union[History, _Mapping]] = ..., proof: _Optional[bytes] = ...) -> None: ... + +class HistoryProofConstruction(_message.Message): + __slots__ = ("construction_id", "source_roster_hash", "source_proof", "target_roster_hash", "grace_period_end_time", "assembly_start_time", "target_proof", "failure_reason") + CONSTRUCTION_ID_FIELD_NUMBER: _ClassVar[int] + SOURCE_ROSTER_HASH_FIELD_NUMBER: _ClassVar[int] + SOURCE_PROOF_FIELD_NUMBER: _ClassVar[int] + TARGET_ROSTER_HASH_FIELD_NUMBER: _ClassVar[int] + GRACE_PERIOD_END_TIME_FIELD_NUMBER: _ClassVar[int] + ASSEMBLY_START_TIME_FIELD_NUMBER: _ClassVar[int] + TARGET_PROOF_FIELD_NUMBER: _ClassVar[int] + FAILURE_REASON_FIELD_NUMBER: _ClassVar[int] + construction_id: int + source_roster_hash: bytes + source_proof: HistoryProof + target_roster_hash: bytes + grace_period_end_time: _timestamp_pb2.Timestamp + assembly_start_time: _timestamp_pb2.Timestamp + target_proof: HistoryProof + failure_reason: str + def __init__(self, construction_id: _Optional[int] = ..., source_roster_hash: _Optional[bytes] = ..., source_proof: _Optional[_Union[HistoryProof, _Mapping]] = ..., target_roster_hash: _Optional[bytes] = ..., grace_period_end_time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., assembly_start_time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., target_proof: _Optional[_Union[HistoryProof, _Mapping]] = ..., failure_reason: _Optional[str] = ...) -> None: ... + +class ConstructionNodeId(_message.Message): + __slots__ = ("construction_id", "node_id") + CONSTRUCTION_ID_FIELD_NUMBER: _ClassVar[int] + NODE_ID_FIELD_NUMBER: _ClassVar[int] + construction_id: int + node_id: int + def __init__(self, construction_id: _Optional[int] = ..., node_id: _Optional[int] = ...) -> None: ... + +class HistoryProofVote(_message.Message): + __slots__ = ("proof", "congruent_node_id") + PROOF_FIELD_NUMBER: _ClassVar[int] + CONGRUENT_NODE_ID_FIELD_NUMBER: _ClassVar[int] + proof: HistoryProof + congruent_node_id: int + def __init__(self, proof: _Optional[_Union[HistoryProof, _Mapping]] = ..., congruent_node_id: _Optional[int] = ...) -> None: ... + +class HistorySignature(_message.Message): + __slots__ = ("history", "signature") + HISTORY_FIELD_NUMBER: _ClassVar[int] + SIGNATURE_FIELD_NUMBER: _ClassVar[int] + history: History + signature: bytes + def __init__(self, history: _Optional[_Union[History, _Mapping]] = ..., signature: _Optional[bytes] = ...) -> None: ... + +class RecordedHistorySignature(_message.Message): + __slots__ = ("signing_time", "history_signature") + SIGNING_TIME_FIELD_NUMBER: _ClassVar[int] + HISTORY_SIGNATURE_FIELD_NUMBER: _ClassVar[int] + signing_time: _timestamp_pb2.Timestamp + history_signature: HistorySignature + def __init__(self, signing_time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., history_signature: _Optional[_Union[HistorySignature, _Mapping]] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/state/history/history_types_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/state/history/history_types_pb2_grpc.py new file mode 100644 index 000000000..7ae76b221 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/state/history/history_types_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/state/history/history_types_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/system_delete_pb2.py b/src/hiero_sdk_python/hapi/services/system_delete_pb2.py new file mode 100644 index 000000000..73e5d5fcd --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/system_delete_pb2.py @@ -0,0 +1,35 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/system_delete.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/system_delete.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import basic_types_pb2 as services_dot_basic__types__pb2 +from . import timestamp_pb2 as services_dot_timestamp__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cservices/system_delete.proto\x12\x05proto\x1a\x1aservices/basic_types.proto\x1a\x18services/timestamp.proto\"\x9e\x01\n\x1bSystemDeleteTransactionBody\x12\x1f\n\x06\x66ileID\x18\x01 \x01(\x0b\x32\r.proto.FileIDH\x00\x12\'\n\ncontractID\x18\x02 \x01(\x0b\x32\x11.proto.ContractIDH\x00\x12/\n\x0e\x65xpirationTime\x18\x03 \x01(\x0b\x32\x17.proto.TimestampSecondsB\x04\n\x02idB&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.system_delete_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_SYSTEMDELETETRANSACTIONBODY']._serialized_start=94 + _globals['_SYSTEMDELETETRANSACTIONBODY']._serialized_end=252 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/system_delete_pb2.pyi b/src/hiero_sdk_python/hapi/services/system_delete_pb2.pyi new file mode 100644 index 000000000..940c3ad35 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/system_delete_pb2.pyi @@ -0,0 +1,18 @@ +from . import basic_types_pb2 as _basic_types_pb2 +from . import timestamp_pb2 as _timestamp_pb2 +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class SystemDeleteTransactionBody(_message.Message): + __slots__ = ("fileID", "contractID", "expirationTime") + FILEID_FIELD_NUMBER: _ClassVar[int] + CONTRACTID_FIELD_NUMBER: _ClassVar[int] + EXPIRATIONTIME_FIELD_NUMBER: _ClassVar[int] + fileID: _basic_types_pb2.FileID + contractID: _basic_types_pb2.ContractID + expirationTime: _timestamp_pb2.TimestampSeconds + def __init__(self, fileID: _Optional[_Union[_basic_types_pb2.FileID, _Mapping]] = ..., contractID: _Optional[_Union[_basic_types_pb2.ContractID, _Mapping]] = ..., expirationTime: _Optional[_Union[_timestamp_pb2.TimestampSeconds, _Mapping]] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/system_delete_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/system_delete_pb2_grpc.py new file mode 100644 index 000000000..093b5b320 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/system_delete_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/system_delete_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/system_undelete_pb2.py b/src/hiero_sdk_python/hapi/services/system_undelete_pb2.py new file mode 100644 index 000000000..240a7c731 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/system_undelete_pb2.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/system_undelete.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/system_undelete.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import basic_types_pb2 as services_dot_basic__types__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1eservices/system_undelete.proto\x12\x05proto\x1a\x1aservices/basic_types.proto\"o\n\x1dSystemUndeleteTransactionBody\x12\x1f\n\x06\x66ileID\x18\x01 \x01(\x0b\x32\r.proto.FileIDH\x00\x12\'\n\ncontractID\x18\x02 \x01(\x0b\x32\x11.proto.ContractIDH\x00\x42\x04\n\x02idB&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.system_undelete_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_SYSTEMUNDELETETRANSACTIONBODY']._serialized_start=69 + _globals['_SYSTEMUNDELETETRANSACTIONBODY']._serialized_end=180 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/system_undelete_pb2.pyi b/src/hiero_sdk_python/hapi/services/system_undelete_pb2.pyi new file mode 100644 index 000000000..f97af661d --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/system_undelete_pb2.pyi @@ -0,0 +1,15 @@ +from . import basic_types_pb2 as _basic_types_pb2 +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class SystemUndeleteTransactionBody(_message.Message): + __slots__ = ("fileID", "contractID") + FILEID_FIELD_NUMBER: _ClassVar[int] + CONTRACTID_FIELD_NUMBER: _ClassVar[int] + fileID: _basic_types_pb2.FileID + contractID: _basic_types_pb2.ContractID + def __init__(self, fileID: _Optional[_Union[_basic_types_pb2.FileID, _Mapping]] = ..., contractID: _Optional[_Union[_basic_types_pb2.ContractID, _Mapping]] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/system_undelete_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/system_undelete_pb2_grpc.py new file mode 100644 index 000000000..a6530b3a3 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/system_undelete_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/system_undelete_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/throttle_definitions_pb2.py b/src/hiero_sdk_python/hapi/services/throttle_definitions_pb2.py new file mode 100644 index 000000000..4e52b8acd --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/throttle_definitions_pb2.py @@ -0,0 +1,38 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/throttle_definitions.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/throttle_definitions.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import basic_types_pb2 as services_dot_basic__types__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n#services/throttle_definitions.proto\x12\x05proto\x1a\x1aservices/basic_types.proto\"W\n\rThrottleGroup\x12.\n\noperations\x18\x01 \x03(\x0e\x32\x1a.proto.HederaFunctionality\x12\x16\n\x0emilliOpsPerSec\x18\x02 \x01(\x04\"c\n\x0eThrottleBucket\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x15\n\rburstPeriodMs\x18\x02 \x01(\x04\x12,\n\x0ethrottleGroups\x18\x03 \x03(\x0b\x32\x14.proto.ThrottleGroup\"E\n\x13ThrottleDefinitions\x12.\n\x0fthrottleBuckets\x18\x01 \x03(\x0b\x32\x15.proto.ThrottleBucketB&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.throttle_definitions_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_THROTTLEGROUP']._serialized_start=74 + _globals['_THROTTLEGROUP']._serialized_end=161 + _globals['_THROTTLEBUCKET']._serialized_start=163 + _globals['_THROTTLEBUCKET']._serialized_end=262 + _globals['_THROTTLEDEFINITIONS']._serialized_start=264 + _globals['_THROTTLEDEFINITIONS']._serialized_end=333 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/throttle_definitions_pb2.pyi b/src/hiero_sdk_python/hapi/services/throttle_definitions_pb2.pyi new file mode 100644 index 000000000..27f336a10 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/throttle_definitions_pb2.pyi @@ -0,0 +1,32 @@ +from . import basic_types_pb2 as _basic_types_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Iterable as _Iterable, Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class ThrottleGroup(_message.Message): + __slots__ = ("operations", "milliOpsPerSec") + OPERATIONS_FIELD_NUMBER: _ClassVar[int] + MILLIOPSPERSEC_FIELD_NUMBER: _ClassVar[int] + operations: _containers.RepeatedScalarFieldContainer[_basic_types_pb2.HederaFunctionality] + milliOpsPerSec: int + def __init__(self, operations: _Optional[_Iterable[_Union[_basic_types_pb2.HederaFunctionality, str]]] = ..., milliOpsPerSec: _Optional[int] = ...) -> None: ... + +class ThrottleBucket(_message.Message): + __slots__ = ("name", "burstPeriodMs", "throttleGroups") + NAME_FIELD_NUMBER: _ClassVar[int] + BURSTPERIODMS_FIELD_NUMBER: _ClassVar[int] + THROTTLEGROUPS_FIELD_NUMBER: _ClassVar[int] + name: str + burstPeriodMs: int + throttleGroups: _containers.RepeatedCompositeFieldContainer[ThrottleGroup] + def __init__(self, name: _Optional[str] = ..., burstPeriodMs: _Optional[int] = ..., throttleGroups: _Optional[_Iterable[_Union[ThrottleGroup, _Mapping]]] = ...) -> None: ... + +class ThrottleDefinitions(_message.Message): + __slots__ = ("throttleBuckets",) + THROTTLEBUCKETS_FIELD_NUMBER: _ClassVar[int] + throttleBuckets: _containers.RepeatedCompositeFieldContainer[ThrottleBucket] + def __init__(self, throttleBuckets: _Optional[_Iterable[_Union[ThrottleBucket, _Mapping]]] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/throttle_definitions_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/throttle_definitions_pb2_grpc.py new file mode 100644 index 000000000..8c56ae4ec --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/throttle_definitions_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/throttle_definitions_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/timestamp_pb2.py b/src/hiero_sdk_python/hapi/services/timestamp_pb2.py new file mode 100644 index 000000000..679eab8b2 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/timestamp_pb2.py @@ -0,0 +1,39 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/timestamp.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/timestamp.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x18services/timestamp.proto\x12\x05proto\"+\n\tTimestamp\x12\x0f\n\x07seconds\x18\x01 \x01(\x03\x12\r\n\x05nanos\x18\x02 \x01(\x05\"#\n\x10TimestampSeconds\x12\x0f\n\x07seconds\x18\x01 \x01(\x03\x42&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.timestamp_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_TIMESTAMP']._serialized_start=35 + _globals['_TIMESTAMP']._serialized_end=78 + _globals['_TIMESTAMPSECONDS']._serialized_start=80 + _globals['_TIMESTAMPSECONDS']._serialized_end=115 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/timestamp_pb2.pyi b/src/hiero_sdk_python/hapi/services/timestamp_pb2.pyi new file mode 100644 index 000000000..fd38284c0 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/timestamp_pb2.pyi @@ -0,0 +1,19 @@ +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Optional as _Optional + +DESCRIPTOR: _descriptor.FileDescriptor + +class Timestamp(_message.Message): + __slots__ = ("seconds", "nanos") + SECONDS_FIELD_NUMBER: _ClassVar[int] + NANOS_FIELD_NUMBER: _ClassVar[int] + seconds: int + nanos: int + def __init__(self, seconds: _Optional[int] = ..., nanos: _Optional[int] = ...) -> None: ... + +class TimestampSeconds(_message.Message): + __slots__ = ("seconds",) + SECONDS_FIELD_NUMBER: _ClassVar[int] + seconds: int + def __init__(self, seconds: _Optional[int] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/timestamp_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/timestamp_pb2_grpc.py new file mode 100644 index 000000000..97def2ded --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/timestamp_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/timestamp_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/token_airdrop_pb2.py b/src/hiero_sdk_python/hapi/services/token_airdrop_pb2.py new file mode 100644 index 000000000..c7a3605fb --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/token_airdrop_pb2.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/token_airdrop.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/token_airdrop.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import basic_types_pb2 as services_dot_basic__types__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cservices/token_airdrop.proto\x12\x05proto\x1a\x1aservices/basic_types.proto\"P\n\x1bTokenAirdropTransactionBody\x12\x31\n\x0ftoken_transfers\x18\x01 \x03(\x0b\x32\x18.proto.TokenTransferListB&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.token_airdrop_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_TOKENAIRDROPTRANSACTIONBODY']._serialized_start=67 + _globals['_TOKENAIRDROPTRANSACTIONBODY']._serialized_end=147 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/token_airdrop_pb2.pyi b/src/hiero_sdk_python/hapi/services/token_airdrop_pb2.pyi new file mode 100644 index 000000000..8f288ae2c --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/token_airdrop_pb2.pyi @@ -0,0 +1,14 @@ +from . import basic_types_pb2 as _basic_types_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Iterable as _Iterable, Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class TokenAirdropTransactionBody(_message.Message): + __slots__ = ("token_transfers",) + TOKEN_TRANSFERS_FIELD_NUMBER: _ClassVar[int] + token_transfers: _containers.RepeatedCompositeFieldContainer[_basic_types_pb2.TokenTransferList] + def __init__(self, token_transfers: _Optional[_Iterable[_Union[_basic_types_pb2.TokenTransferList, _Mapping]]] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/token_airdrop_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/token_airdrop_pb2_grpc.py new file mode 100644 index 000000000..3bf2e454b --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/token_airdrop_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/token_airdrop_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/token_associate_pb2.py b/src/hiero_sdk_python/hapi/services/token_associate_pb2.py new file mode 100644 index 000000000..5b7dc80f5 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/token_associate_pb2.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/token_associate.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/token_associate.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import basic_types_pb2 as services_dot_basic__types__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1eservices/token_associate.proto\x12\x05proto\x1a\x1aservices/basic_types.proto\"b\n\x1dTokenAssociateTransactionBody\x12!\n\x07\x61\x63\x63ount\x18\x01 \x01(\x0b\x32\x10.proto.AccountID\x12\x1e\n\x06tokens\x18\x02 \x03(\x0b\x32\x0e.proto.TokenIDB&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.token_associate_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_TOKENASSOCIATETRANSACTIONBODY']._serialized_start=69 + _globals['_TOKENASSOCIATETRANSACTIONBODY']._serialized_end=167 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/token_associate_pb2.pyi b/src/hiero_sdk_python/hapi/services/token_associate_pb2.pyi new file mode 100644 index 000000000..decbfaa75 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/token_associate_pb2.pyi @@ -0,0 +1,16 @@ +from . import basic_types_pb2 as _basic_types_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Iterable as _Iterable, Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class TokenAssociateTransactionBody(_message.Message): + __slots__ = ("account", "tokens") + ACCOUNT_FIELD_NUMBER: _ClassVar[int] + TOKENS_FIELD_NUMBER: _ClassVar[int] + account: _basic_types_pb2.AccountID + tokens: _containers.RepeatedCompositeFieldContainer[_basic_types_pb2.TokenID] + def __init__(self, account: _Optional[_Union[_basic_types_pb2.AccountID, _Mapping]] = ..., tokens: _Optional[_Iterable[_Union[_basic_types_pb2.TokenID, _Mapping]]] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/token_associate_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/token_associate_pb2_grpc.py new file mode 100644 index 000000000..379e5b1dd --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/token_associate_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/token_associate_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/token_burn_pb2.py b/src/hiero_sdk_python/hapi/services/token_burn_pb2.py new file mode 100644 index 000000000..70662b11e --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/token_burn_pb2.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/token_burn.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/token_burn.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import basic_types_pb2 as services_dot_basic__types__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x19services/token_burn.proto\x12\x05proto\x1a\x1aservices/basic_types.proto\"`\n\x18TokenBurnTransactionBody\x12\x1d\n\x05token\x18\x01 \x01(\x0b\x32\x0e.proto.TokenID\x12\x0e\n\x06\x61mount\x18\x02 \x01(\x04\x12\x15\n\rserialNumbers\x18\x03 \x03(\x03\x42&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.token_burn_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_TOKENBURNTRANSACTIONBODY']._serialized_start=64 + _globals['_TOKENBURNTRANSACTIONBODY']._serialized_end=160 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/token_burn_pb2.pyi b/src/hiero_sdk_python/hapi/services/token_burn_pb2.pyi new file mode 100644 index 000000000..4880c6d14 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/token_burn_pb2.pyi @@ -0,0 +1,18 @@ +from . import basic_types_pb2 as _basic_types_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Iterable as _Iterable, Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class TokenBurnTransactionBody(_message.Message): + __slots__ = ("token", "amount", "serialNumbers") + TOKEN_FIELD_NUMBER: _ClassVar[int] + AMOUNT_FIELD_NUMBER: _ClassVar[int] + SERIALNUMBERS_FIELD_NUMBER: _ClassVar[int] + token: _basic_types_pb2.TokenID + amount: int + serialNumbers: _containers.RepeatedScalarFieldContainer[int] + def __init__(self, token: _Optional[_Union[_basic_types_pb2.TokenID, _Mapping]] = ..., amount: _Optional[int] = ..., serialNumbers: _Optional[_Iterable[int]] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/token_burn_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/token_burn_pb2_grpc.py new file mode 100644 index 000000000..24b6b480a --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/token_burn_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/token_burn_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/token_cancel_airdrop_pb2.py b/src/hiero_sdk_python/hapi/services/token_cancel_airdrop_pb2.py new file mode 100644 index 000000000..23bca1526 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/token_cancel_airdrop_pb2.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/token_cancel_airdrop.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/token_cancel_airdrop.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import basic_types_pb2 as services_dot_basic__types__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n#services/token_cancel_airdrop.proto\x12\x05proto\x1a\x1aservices/basic_types.proto\"V\n!TokenCancelAirdropTransactionBody\x12\x31\n\x10pending_airdrops\x18\x01 \x03(\x0b\x32\x17.proto.PendingAirdropIdB&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.token_cancel_airdrop_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_TOKENCANCELAIRDROPTRANSACTIONBODY']._serialized_start=74 + _globals['_TOKENCANCELAIRDROPTRANSACTIONBODY']._serialized_end=160 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/token_cancel_airdrop_pb2.pyi b/src/hiero_sdk_python/hapi/services/token_cancel_airdrop_pb2.pyi new file mode 100644 index 000000000..30704536e --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/token_cancel_airdrop_pb2.pyi @@ -0,0 +1,14 @@ +from . import basic_types_pb2 as _basic_types_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Iterable as _Iterable, Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class TokenCancelAirdropTransactionBody(_message.Message): + __slots__ = ("pending_airdrops",) + PENDING_AIRDROPS_FIELD_NUMBER: _ClassVar[int] + pending_airdrops: _containers.RepeatedCompositeFieldContainer[_basic_types_pb2.PendingAirdropId] + def __init__(self, pending_airdrops: _Optional[_Iterable[_Union[_basic_types_pb2.PendingAirdropId, _Mapping]]] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/token_cancel_airdrop_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/token_cancel_airdrop_pb2_grpc.py new file mode 100644 index 000000000..80031ee49 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/token_cancel_airdrop_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/token_cancel_airdrop_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/token_claim_airdrop_pb2.py b/src/hiero_sdk_python/hapi/services/token_claim_airdrop_pb2.py new file mode 100644 index 000000000..f1e972af9 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/token_claim_airdrop_pb2.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/token_claim_airdrop.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/token_claim_airdrop.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import basic_types_pb2 as services_dot_basic__types__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"services/token_claim_airdrop.proto\x12\x05proto\x1a\x1aservices/basic_types.proto\"U\n TokenClaimAirdropTransactionBody\x12\x31\n\x10pending_airdrops\x18\x01 \x03(\x0b\x32\x17.proto.PendingAirdropIdB&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.token_claim_airdrop_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_TOKENCLAIMAIRDROPTRANSACTIONBODY']._serialized_start=73 + _globals['_TOKENCLAIMAIRDROPTRANSACTIONBODY']._serialized_end=158 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/token_claim_airdrop_pb2.pyi b/src/hiero_sdk_python/hapi/services/token_claim_airdrop_pb2.pyi new file mode 100644 index 000000000..0abfafdfe --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/token_claim_airdrop_pb2.pyi @@ -0,0 +1,14 @@ +from . import basic_types_pb2 as _basic_types_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Iterable as _Iterable, Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class TokenClaimAirdropTransactionBody(_message.Message): + __slots__ = ("pending_airdrops",) + PENDING_AIRDROPS_FIELD_NUMBER: _ClassVar[int] + pending_airdrops: _containers.RepeatedCompositeFieldContainer[_basic_types_pb2.PendingAirdropId] + def __init__(self, pending_airdrops: _Optional[_Iterable[_Union[_basic_types_pb2.PendingAirdropId, _Mapping]]] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/token_claim_airdrop_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/token_claim_airdrop_pb2_grpc.py new file mode 100644 index 000000000..dddd970c5 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/token_claim_airdrop_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/token_claim_airdrop_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/token_create_pb2.py b/src/hiero_sdk_python/hapi/services/token_create_pb2.py new file mode 100644 index 000000000..9f7c743e8 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/token_create_pb2.py @@ -0,0 +1,37 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/token_create.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/token_create.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import duration_pb2 as services_dot_duration__pb2 +from . import basic_types_pb2 as services_dot_basic__types__pb2 +from . import custom_fees_pb2 as services_dot_custom__fees__pb2 +from . import timestamp_pb2 as services_dot_timestamp__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1bservices/token_create.proto\x12\x05proto\x1a\x17services/duration.proto\x1a\x1aservices/basic_types.proto\x1a\x1aservices/custom_fees.proto\x1a\x18services/timestamp.proto\"\xbd\x05\n\x1aTokenCreateTransactionBody\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0e\n\x06symbol\x18\x02 \x01(\t\x12\x10\n\x08\x64\x65\x63imals\x18\x03 \x01(\r\x12\x15\n\rinitialSupply\x18\x04 \x01(\x04\x12\"\n\x08treasury\x18\x05 \x01(\x0b\x32\x10.proto.AccountID\x12\x1c\n\x08\x61\x64minKey\x18\x06 \x01(\x0b\x32\n.proto.Key\x12\x1a\n\x06kycKey\x18\x07 \x01(\x0b\x32\n.proto.Key\x12\x1d\n\tfreezeKey\x18\x08 \x01(\x0b\x32\n.proto.Key\x12\x1b\n\x07wipeKey\x18\t \x01(\x0b\x32\n.proto.Key\x12\x1d\n\tsupplyKey\x18\n \x01(\x0b\x32\n.proto.Key\x12\x15\n\rfreezeDefault\x18\x0b \x01(\x08\x12 \n\x06\x65xpiry\x18\r \x01(\x0b\x32\x10.proto.Timestamp\x12*\n\x10\x61utoRenewAccount\x18\x0e \x01(\x0b\x32\x10.proto.AccountID\x12(\n\x0f\x61utoRenewPeriod\x18\x0f \x01(\x0b\x32\x0f.proto.Duration\x12\x0c\n\x04memo\x18\x10 \x01(\t\x12#\n\ttokenType\x18\x11 \x01(\x0e\x32\x10.proto.TokenType\x12*\n\nsupplyType\x18\x12 \x01(\x0e\x32\x16.proto.TokenSupplyType\x12\x11\n\tmaxSupply\x18\x13 \x01(\x03\x12$\n\x10\x66\x65\x65_schedule_key\x18\x14 \x01(\x0b\x32\n.proto.Key\x12%\n\x0b\x63ustom_fees\x18\x15 \x03(\x0b\x32\x10.proto.CustomFee\x12\x1d\n\tpause_key\x18\x16 \x01(\x0b\x32\n.proto.Key\x12\x10\n\x08metadata\x18\x17 \x01(\x0c\x12 \n\x0cmetadata_key\x18\x18 \x01(\x0b\x32\n.proto.KeyB&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.token_create_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_TOKENCREATETRANSACTIONBODY']._serialized_start=146 + _globals['_TOKENCREATETRANSACTIONBODY']._serialized_end=847 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/token_create_pb2.pyi b/src/hiero_sdk_python/hapi/services/token_create_pb2.pyi new file mode 100644 index 000000000..7af0e0e90 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/token_create_pb2.pyi @@ -0,0 +1,61 @@ +from . import duration_pb2 as _duration_pb2 +from . import basic_types_pb2 as _basic_types_pb2 +from . import custom_fees_pb2 as _custom_fees_pb2 +from . import timestamp_pb2 as _timestamp_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Iterable as _Iterable, Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class TokenCreateTransactionBody(_message.Message): + __slots__ = ("name", "symbol", "decimals", "initialSupply", "treasury", "adminKey", "kycKey", "freezeKey", "wipeKey", "supplyKey", "freezeDefault", "expiry", "autoRenewAccount", "autoRenewPeriod", "memo", "tokenType", "supplyType", "maxSupply", "fee_schedule_key", "custom_fees", "pause_key", "metadata", "metadata_key") + NAME_FIELD_NUMBER: _ClassVar[int] + SYMBOL_FIELD_NUMBER: _ClassVar[int] + DECIMALS_FIELD_NUMBER: _ClassVar[int] + INITIALSUPPLY_FIELD_NUMBER: _ClassVar[int] + TREASURY_FIELD_NUMBER: _ClassVar[int] + ADMINKEY_FIELD_NUMBER: _ClassVar[int] + KYCKEY_FIELD_NUMBER: _ClassVar[int] + FREEZEKEY_FIELD_NUMBER: _ClassVar[int] + WIPEKEY_FIELD_NUMBER: _ClassVar[int] + SUPPLYKEY_FIELD_NUMBER: _ClassVar[int] + FREEZEDEFAULT_FIELD_NUMBER: _ClassVar[int] + EXPIRY_FIELD_NUMBER: _ClassVar[int] + AUTORENEWACCOUNT_FIELD_NUMBER: _ClassVar[int] + AUTORENEWPERIOD_FIELD_NUMBER: _ClassVar[int] + MEMO_FIELD_NUMBER: _ClassVar[int] + TOKENTYPE_FIELD_NUMBER: _ClassVar[int] + SUPPLYTYPE_FIELD_NUMBER: _ClassVar[int] + MAXSUPPLY_FIELD_NUMBER: _ClassVar[int] + FEE_SCHEDULE_KEY_FIELD_NUMBER: _ClassVar[int] + CUSTOM_FEES_FIELD_NUMBER: _ClassVar[int] + PAUSE_KEY_FIELD_NUMBER: _ClassVar[int] + METADATA_FIELD_NUMBER: _ClassVar[int] + METADATA_KEY_FIELD_NUMBER: _ClassVar[int] + name: str + symbol: str + decimals: int + initialSupply: int + treasury: _basic_types_pb2.AccountID + adminKey: _basic_types_pb2.Key + kycKey: _basic_types_pb2.Key + freezeKey: _basic_types_pb2.Key + wipeKey: _basic_types_pb2.Key + supplyKey: _basic_types_pb2.Key + freezeDefault: bool + expiry: _timestamp_pb2.Timestamp + autoRenewAccount: _basic_types_pb2.AccountID + autoRenewPeriod: _duration_pb2.Duration + memo: str + tokenType: _basic_types_pb2.TokenType + supplyType: _basic_types_pb2.TokenSupplyType + maxSupply: int + fee_schedule_key: _basic_types_pb2.Key + custom_fees: _containers.RepeatedCompositeFieldContainer[_custom_fees_pb2.CustomFee] + pause_key: _basic_types_pb2.Key + metadata: bytes + metadata_key: _basic_types_pb2.Key + def __init__(self, name: _Optional[str] = ..., symbol: _Optional[str] = ..., decimals: _Optional[int] = ..., initialSupply: _Optional[int] = ..., treasury: _Optional[_Union[_basic_types_pb2.AccountID, _Mapping]] = ..., adminKey: _Optional[_Union[_basic_types_pb2.Key, _Mapping]] = ..., kycKey: _Optional[_Union[_basic_types_pb2.Key, _Mapping]] = ..., freezeKey: _Optional[_Union[_basic_types_pb2.Key, _Mapping]] = ..., wipeKey: _Optional[_Union[_basic_types_pb2.Key, _Mapping]] = ..., supplyKey: _Optional[_Union[_basic_types_pb2.Key, _Mapping]] = ..., freezeDefault: bool = ..., expiry: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., autoRenewAccount: _Optional[_Union[_basic_types_pb2.AccountID, _Mapping]] = ..., autoRenewPeriod: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ..., memo: _Optional[str] = ..., tokenType: _Optional[_Union[_basic_types_pb2.TokenType, str]] = ..., supplyType: _Optional[_Union[_basic_types_pb2.TokenSupplyType, str]] = ..., maxSupply: _Optional[int] = ..., fee_schedule_key: _Optional[_Union[_basic_types_pb2.Key, _Mapping]] = ..., custom_fees: _Optional[_Iterable[_Union[_custom_fees_pb2.CustomFee, _Mapping]]] = ..., pause_key: _Optional[_Union[_basic_types_pb2.Key, _Mapping]] = ..., metadata: _Optional[bytes] = ..., metadata_key: _Optional[_Union[_basic_types_pb2.Key, _Mapping]] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/token_create_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/token_create_pb2_grpc.py new file mode 100644 index 000000000..44957b392 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/token_create_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/token_create_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/token_delete_pb2.py b/src/hiero_sdk_python/hapi/services/token_delete_pb2.py new file mode 100644 index 000000000..089151287 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/token_delete_pb2.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/token_delete.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/token_delete.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import basic_types_pb2 as services_dot_basic__types__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1bservices/token_delete.proto\x12\x05proto\x1a\x1aservices/basic_types.proto\";\n\x1aTokenDeleteTransactionBody\x12\x1d\n\x05token\x18\x01 \x01(\x0b\x32\x0e.proto.TokenIDB&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.token_delete_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_TOKENDELETETRANSACTIONBODY']._serialized_start=66 + _globals['_TOKENDELETETRANSACTIONBODY']._serialized_end=125 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/token_delete_pb2.pyi b/src/hiero_sdk_python/hapi/services/token_delete_pb2.pyi new file mode 100644 index 000000000..18d87d63a --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/token_delete_pb2.pyi @@ -0,0 +1,13 @@ +from . import basic_types_pb2 as _basic_types_pb2 +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class TokenDeleteTransactionBody(_message.Message): + __slots__ = ("token",) + TOKEN_FIELD_NUMBER: _ClassVar[int] + token: _basic_types_pb2.TokenID + def __init__(self, token: _Optional[_Union[_basic_types_pb2.TokenID, _Mapping]] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/token_delete_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/token_delete_pb2_grpc.py new file mode 100644 index 000000000..e8c9e7cd4 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/token_delete_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/token_delete_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/token_dissociate_pb2.py b/src/hiero_sdk_python/hapi/services/token_dissociate_pb2.py new file mode 100644 index 000000000..1d9f3845c --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/token_dissociate_pb2.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/token_dissociate.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/token_dissociate.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import basic_types_pb2 as services_dot_basic__types__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1fservices/token_dissociate.proto\x12\x05proto\x1a\x1aservices/basic_types.proto\"c\n\x1eTokenDissociateTransactionBody\x12!\n\x07\x61\x63\x63ount\x18\x01 \x01(\x0b\x32\x10.proto.AccountID\x12\x1e\n\x06tokens\x18\x02 \x03(\x0b\x32\x0e.proto.TokenIDB&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.token_dissociate_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_TOKENDISSOCIATETRANSACTIONBODY']._serialized_start=70 + _globals['_TOKENDISSOCIATETRANSACTIONBODY']._serialized_end=169 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/token_dissociate_pb2.pyi b/src/hiero_sdk_python/hapi/services/token_dissociate_pb2.pyi new file mode 100644 index 000000000..0993bdd6a --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/token_dissociate_pb2.pyi @@ -0,0 +1,16 @@ +from . import basic_types_pb2 as _basic_types_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Iterable as _Iterable, Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class TokenDissociateTransactionBody(_message.Message): + __slots__ = ("account", "tokens") + ACCOUNT_FIELD_NUMBER: _ClassVar[int] + TOKENS_FIELD_NUMBER: _ClassVar[int] + account: _basic_types_pb2.AccountID + tokens: _containers.RepeatedCompositeFieldContainer[_basic_types_pb2.TokenID] + def __init__(self, account: _Optional[_Union[_basic_types_pb2.AccountID, _Mapping]] = ..., tokens: _Optional[_Iterable[_Union[_basic_types_pb2.TokenID, _Mapping]]] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/token_dissociate_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/token_dissociate_pb2_grpc.py new file mode 100644 index 000000000..cbca34c61 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/token_dissociate_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/token_dissociate_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/token_fee_schedule_update_pb2.py b/src/hiero_sdk_python/hapi/services/token_fee_schedule_update_pb2.py new file mode 100644 index 000000000..ce5aeadbb --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/token_fee_schedule_update_pb2.py @@ -0,0 +1,35 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/token_fee_schedule_update.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/token_fee_schedule_update.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import basic_types_pb2 as services_dot_basic__types__pb2 +from . import custom_fees_pb2 as services_dot_custom__fees__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n(services/token_fee_schedule_update.proto\x12\x05proto\x1a\x1aservices/basic_types.proto\x1a\x1aservices/custom_fees.proto\"p\n%TokenFeeScheduleUpdateTransactionBody\x12 \n\x08token_id\x18\x01 \x01(\x0b\x32\x0e.proto.TokenID\x12%\n\x0b\x63ustom_fees\x18\x02 \x03(\x0b\x32\x10.proto.CustomFeeB&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.token_fee_schedule_update_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_TOKENFEESCHEDULEUPDATETRANSACTIONBODY']._serialized_start=107 + _globals['_TOKENFEESCHEDULEUPDATETRANSACTIONBODY']._serialized_end=219 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/token_fee_schedule_update_pb2.pyi b/src/hiero_sdk_python/hapi/services/token_fee_schedule_update_pb2.pyi new file mode 100644 index 000000000..e73f2b3a3 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/token_fee_schedule_update_pb2.pyi @@ -0,0 +1,17 @@ +from . import basic_types_pb2 as _basic_types_pb2 +from . import custom_fees_pb2 as _custom_fees_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Iterable as _Iterable, Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class TokenFeeScheduleUpdateTransactionBody(_message.Message): + __slots__ = ("token_id", "custom_fees") + TOKEN_ID_FIELD_NUMBER: _ClassVar[int] + CUSTOM_FEES_FIELD_NUMBER: _ClassVar[int] + token_id: _basic_types_pb2.TokenID + custom_fees: _containers.RepeatedCompositeFieldContainer[_custom_fees_pb2.CustomFee] + def __init__(self, token_id: _Optional[_Union[_basic_types_pb2.TokenID, _Mapping]] = ..., custom_fees: _Optional[_Iterable[_Union[_custom_fees_pb2.CustomFee, _Mapping]]] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/token_fee_schedule_update_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/token_fee_schedule_update_pb2_grpc.py new file mode 100644 index 000000000..37295405b --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/token_fee_schedule_update_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/token_fee_schedule_update_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/token_freeze_account_pb2.py b/src/hiero_sdk_python/hapi/services/token_freeze_account_pb2.py new file mode 100644 index 000000000..280e5ff11 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/token_freeze_account_pb2.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/token_freeze_account.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/token_freeze_account.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import basic_types_pb2 as services_dot_basic__types__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n#services/token_freeze_account.proto\x12\x05proto\x1a\x1aservices/basic_types.proto\"e\n!TokenFreezeAccountTransactionBody\x12\x1d\n\x05token\x18\x01 \x01(\x0b\x32\x0e.proto.TokenID\x12!\n\x07\x61\x63\x63ount\x18\x02 \x01(\x0b\x32\x10.proto.AccountIDB&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.token_freeze_account_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_TOKENFREEZEACCOUNTTRANSACTIONBODY']._serialized_start=74 + _globals['_TOKENFREEZEACCOUNTTRANSACTIONBODY']._serialized_end=175 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/token_freeze_account_pb2.pyi b/src/hiero_sdk_python/hapi/services/token_freeze_account_pb2.pyi new file mode 100644 index 000000000..e92f54651 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/token_freeze_account_pb2.pyi @@ -0,0 +1,15 @@ +from . import basic_types_pb2 as _basic_types_pb2 +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class TokenFreezeAccountTransactionBody(_message.Message): + __slots__ = ("token", "account") + TOKEN_FIELD_NUMBER: _ClassVar[int] + ACCOUNT_FIELD_NUMBER: _ClassVar[int] + token: _basic_types_pb2.TokenID + account: _basic_types_pb2.AccountID + def __init__(self, token: _Optional[_Union[_basic_types_pb2.TokenID, _Mapping]] = ..., account: _Optional[_Union[_basic_types_pb2.AccountID, _Mapping]] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/token_freeze_account_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/token_freeze_account_pb2_grpc.py new file mode 100644 index 000000000..40d226a74 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/token_freeze_account_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/token_freeze_account_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/token_get_account_nft_infos_pb2.py b/src/hiero_sdk_python/hapi/services/token_get_account_nft_infos_pb2.py new file mode 100644 index 000000000..29efc265d --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/token_get_account_nft_infos_pb2.py @@ -0,0 +1,39 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/token_get_account_nft_infos.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/token_get_account_nft_infos.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import basic_types_pb2 as services_dot_basic__types__pb2 +from . import token_get_nft_info_pb2 as services_dot_token__get__nft__info__pb2 +from . import query_header_pb2 as services_dot_query__header__pb2 +from . import response_header_pb2 as services_dot_response__header__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n*services/token_get_account_nft_infos.proto\x12\x05proto\x1a\x1aservices/basic_types.proto\x1a!services/token_get_nft_info.proto\x1a\x1bservices/query_header.proto\x1a\x1eservices/response_header.proto\"\x83\x01\n\x1cTokenGetAccountNftInfosQuery\x12\"\n\x06header\x18\x01 \x01(\x0b\x32\x12.proto.QueryHeader\x12#\n\taccountID\x18\x02 \x01(\x0b\x32\x10.proto.AccountID\x12\r\n\x05start\x18\x03 \x01(\x03\x12\x0b\n\x03\x65nd\x18\x04 \x01(\x03\"k\n\x1fTokenGetAccountNftInfosResponse\x12%\n\x06header\x18\x01 \x01(\x0b\x32\x15.proto.ResponseHeader\x12!\n\x04nfts\x18\x02 \x03(\x0b\x32\x13.proto.TokenNftInfoB&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.token_get_account_nft_infos_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_TOKENGETACCOUNTNFTINFOSQUERY']._serialized_start=178 + _globals['_TOKENGETACCOUNTNFTINFOSQUERY']._serialized_end=309 + _globals['_TOKENGETACCOUNTNFTINFOSRESPONSE']._serialized_start=311 + _globals['_TOKENGETACCOUNTNFTINFOSRESPONSE']._serialized_end=418 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/token_get_account_nft_infos_pb2.pyi b/src/hiero_sdk_python/hapi/services/token_get_account_nft_infos_pb2.pyi new file mode 100644 index 000000000..98e421a6a --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/token_get_account_nft_infos_pb2.pyi @@ -0,0 +1,31 @@ +from . import basic_types_pb2 as _basic_types_pb2 +from . import token_get_nft_info_pb2 as _token_get_nft_info_pb2 +from . import query_header_pb2 as _query_header_pb2 +from . import response_header_pb2 as _response_header_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Iterable as _Iterable, Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class TokenGetAccountNftInfosQuery(_message.Message): + __slots__ = ("header", "accountID", "start", "end") + HEADER_FIELD_NUMBER: _ClassVar[int] + ACCOUNTID_FIELD_NUMBER: _ClassVar[int] + START_FIELD_NUMBER: _ClassVar[int] + END_FIELD_NUMBER: _ClassVar[int] + header: _query_header_pb2.QueryHeader + accountID: _basic_types_pb2.AccountID + start: int + end: int + def __init__(self, header: _Optional[_Union[_query_header_pb2.QueryHeader, _Mapping]] = ..., accountID: _Optional[_Union[_basic_types_pb2.AccountID, _Mapping]] = ..., start: _Optional[int] = ..., end: _Optional[int] = ...) -> None: ... + +class TokenGetAccountNftInfosResponse(_message.Message): + __slots__ = ("header", "nfts") + HEADER_FIELD_NUMBER: _ClassVar[int] + NFTS_FIELD_NUMBER: _ClassVar[int] + header: _response_header_pb2.ResponseHeader + nfts: _containers.RepeatedCompositeFieldContainer[_token_get_nft_info_pb2.TokenNftInfo] + def __init__(self, header: _Optional[_Union[_response_header_pb2.ResponseHeader, _Mapping]] = ..., nfts: _Optional[_Iterable[_Union[_token_get_nft_info_pb2.TokenNftInfo, _Mapping]]] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/token_get_account_nft_infos_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/token_get_account_nft_infos_pb2_grpc.py new file mode 100644 index 000000000..53fd1619d --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/token_get_account_nft_infos_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/token_get_account_nft_infos_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/token_get_info_pb2.py b/src/hiero_sdk_python/hapi/services/token_get_info_pb2.py new file mode 100644 index 000000000..2b01c3051 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/token_get_info_pb2.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/token_get_info.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/token_get_info.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import basic_types_pb2 as services_dot_basic__types__pb2 +from . import custom_fees_pb2 as services_dot_custom__fees__pb2 +from . import query_header_pb2 as services_dot_query__header__pb2 +from . import response_header_pb2 as services_dot_response__header__pb2 +from . import timestamp_pb2 as services_dot_timestamp__pb2 +from . import duration_pb2 as services_dot_duration__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1dservices/token_get_info.proto\x12\x05proto\x1a\x1aservices/basic_types.proto\x1a\x1aservices/custom_fees.proto\x1a\x1bservices/query_header.proto\x1a\x1eservices/response_header.proto\x1a\x18services/timestamp.proto\x1a\x17services/duration.proto\"V\n\x11TokenGetInfoQuery\x12\"\n\x06header\x18\x01 \x01(\x0b\x32\x12.proto.QueryHeader\x12\x1d\n\x05token\x18\x02 \x01(\x0b\x32\x0e.proto.TokenID\"\xef\x06\n\tTokenInfo\x12\x1f\n\x07tokenId\x18\x01 \x01(\x0b\x32\x0e.proto.TokenID\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x0e\n\x06symbol\x18\x03 \x01(\t\x12\x10\n\x08\x64\x65\x63imals\x18\x04 \x01(\r\x12\x13\n\x0btotalSupply\x18\x05 \x01(\x04\x12\"\n\x08treasury\x18\x06 \x01(\x0b\x32\x10.proto.AccountID\x12\x1c\n\x08\x61\x64minKey\x18\x07 \x01(\x0b\x32\n.proto.Key\x12\x1a\n\x06kycKey\x18\x08 \x01(\x0b\x32\n.proto.Key\x12\x1d\n\tfreezeKey\x18\t \x01(\x0b\x32\n.proto.Key\x12\x1b\n\x07wipeKey\x18\n \x01(\x0b\x32\n.proto.Key\x12\x1d\n\tsupplyKey\x18\x0b \x01(\x0b\x32\n.proto.Key\x12\x35\n\x13\x64\x65\x66\x61ultFreezeStatus\x18\x0c \x01(\x0e\x32\x18.proto.TokenFreezeStatus\x12/\n\x10\x64\x65\x66\x61ultKycStatus\x18\r \x01(\x0e\x32\x15.proto.TokenKycStatus\x12\x0f\n\x07\x64\x65leted\x18\x0e \x01(\x08\x12*\n\x10\x61utoRenewAccount\x18\x0f \x01(\x0b\x32\x10.proto.AccountID\x12(\n\x0f\x61utoRenewPeriod\x18\x10 \x01(\x0b\x32\x0f.proto.Duration\x12 \n\x06\x65xpiry\x18\x11 \x01(\x0b\x32\x10.proto.Timestamp\x12\x0c\n\x04memo\x18\x12 \x01(\t\x12#\n\ttokenType\x18\x13 \x01(\x0e\x32\x10.proto.TokenType\x12*\n\nsupplyType\x18\x14 \x01(\x0e\x32\x16.proto.TokenSupplyType\x12\x11\n\tmaxSupply\x18\x15 \x01(\x03\x12$\n\x10\x66\x65\x65_schedule_key\x18\x16 \x01(\x0b\x32\n.proto.Key\x12%\n\x0b\x63ustom_fees\x18\x17 \x03(\x0b\x32\x10.proto.CustomFee\x12\x1d\n\tpause_key\x18\x18 \x01(\x0b\x32\n.proto.Key\x12-\n\x0cpause_status\x18\x19 \x01(\x0e\x32\x17.proto.TokenPauseStatus\x12\x11\n\tledger_id\x18\x1a \x01(\x0c\x12\x10\n\x08metadata\x18\x1b \x01(\x0c\x12 \n\x0cmetadata_key\x18\x1c \x01(\x0b\x32\n.proto.Key\"b\n\x14TokenGetInfoResponse\x12%\n\x06header\x18\x01 \x01(\x0b\x32\x15.proto.ResponseHeader\x12#\n\ttokenInfo\x18\x02 \x01(\x0b\x32\x10.proto.TokenInfoB&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.token_get_info_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_TOKENGETINFOQUERY']._serialized_start=208 + _globals['_TOKENGETINFOQUERY']._serialized_end=294 + _globals['_TOKENINFO']._serialized_start=297 + _globals['_TOKENINFO']._serialized_end=1176 + _globals['_TOKENGETINFORESPONSE']._serialized_start=1178 + _globals['_TOKENGETINFORESPONSE']._serialized_end=1276 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/token_get_info_pb2.pyi b/src/hiero_sdk_python/hapi/services/token_get_info_pb2.pyi new file mode 100644 index 000000000..ab8f99c6a --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/token_get_info_pb2.pyi @@ -0,0 +1,89 @@ +from . import basic_types_pb2 as _basic_types_pb2 +from . import custom_fees_pb2 as _custom_fees_pb2 +from . import query_header_pb2 as _query_header_pb2 +from . import response_header_pb2 as _response_header_pb2 +from . import timestamp_pb2 as _timestamp_pb2 +from . import duration_pb2 as _duration_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Iterable as _Iterable, Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class TokenGetInfoQuery(_message.Message): + __slots__ = ("header", "token") + HEADER_FIELD_NUMBER: _ClassVar[int] + TOKEN_FIELD_NUMBER: _ClassVar[int] + header: _query_header_pb2.QueryHeader + token: _basic_types_pb2.TokenID + def __init__(self, header: _Optional[_Union[_query_header_pb2.QueryHeader, _Mapping]] = ..., token: _Optional[_Union[_basic_types_pb2.TokenID, _Mapping]] = ...) -> None: ... + +class TokenInfo(_message.Message): + __slots__ = ("tokenId", "name", "symbol", "decimals", "totalSupply", "treasury", "adminKey", "kycKey", "freezeKey", "wipeKey", "supplyKey", "defaultFreezeStatus", "defaultKycStatus", "deleted", "autoRenewAccount", "autoRenewPeriod", "expiry", "memo", "tokenType", "supplyType", "maxSupply", "fee_schedule_key", "custom_fees", "pause_key", "pause_status", "ledger_id", "metadata", "metadata_key") + TOKENID_FIELD_NUMBER: _ClassVar[int] + NAME_FIELD_NUMBER: _ClassVar[int] + SYMBOL_FIELD_NUMBER: _ClassVar[int] + DECIMALS_FIELD_NUMBER: _ClassVar[int] + TOTALSUPPLY_FIELD_NUMBER: _ClassVar[int] + TREASURY_FIELD_NUMBER: _ClassVar[int] + ADMINKEY_FIELD_NUMBER: _ClassVar[int] + KYCKEY_FIELD_NUMBER: _ClassVar[int] + FREEZEKEY_FIELD_NUMBER: _ClassVar[int] + WIPEKEY_FIELD_NUMBER: _ClassVar[int] + SUPPLYKEY_FIELD_NUMBER: _ClassVar[int] + DEFAULTFREEZESTATUS_FIELD_NUMBER: _ClassVar[int] + DEFAULTKYCSTATUS_FIELD_NUMBER: _ClassVar[int] + DELETED_FIELD_NUMBER: _ClassVar[int] + AUTORENEWACCOUNT_FIELD_NUMBER: _ClassVar[int] + AUTORENEWPERIOD_FIELD_NUMBER: _ClassVar[int] + EXPIRY_FIELD_NUMBER: _ClassVar[int] + MEMO_FIELD_NUMBER: _ClassVar[int] + TOKENTYPE_FIELD_NUMBER: _ClassVar[int] + SUPPLYTYPE_FIELD_NUMBER: _ClassVar[int] + MAXSUPPLY_FIELD_NUMBER: _ClassVar[int] + FEE_SCHEDULE_KEY_FIELD_NUMBER: _ClassVar[int] + CUSTOM_FEES_FIELD_NUMBER: _ClassVar[int] + PAUSE_KEY_FIELD_NUMBER: _ClassVar[int] + PAUSE_STATUS_FIELD_NUMBER: _ClassVar[int] + LEDGER_ID_FIELD_NUMBER: _ClassVar[int] + METADATA_FIELD_NUMBER: _ClassVar[int] + METADATA_KEY_FIELD_NUMBER: _ClassVar[int] + tokenId: _basic_types_pb2.TokenID + name: str + symbol: str + decimals: int + totalSupply: int + treasury: _basic_types_pb2.AccountID + adminKey: _basic_types_pb2.Key + kycKey: _basic_types_pb2.Key + freezeKey: _basic_types_pb2.Key + wipeKey: _basic_types_pb2.Key + supplyKey: _basic_types_pb2.Key + defaultFreezeStatus: _basic_types_pb2.TokenFreezeStatus + defaultKycStatus: _basic_types_pb2.TokenKycStatus + deleted: bool + autoRenewAccount: _basic_types_pb2.AccountID + autoRenewPeriod: _duration_pb2.Duration + expiry: _timestamp_pb2.Timestamp + memo: str + tokenType: _basic_types_pb2.TokenType + supplyType: _basic_types_pb2.TokenSupplyType + maxSupply: int + fee_schedule_key: _basic_types_pb2.Key + custom_fees: _containers.RepeatedCompositeFieldContainer[_custom_fees_pb2.CustomFee] + pause_key: _basic_types_pb2.Key + pause_status: _basic_types_pb2.TokenPauseStatus + ledger_id: bytes + metadata: bytes + metadata_key: _basic_types_pb2.Key + def __init__(self, tokenId: _Optional[_Union[_basic_types_pb2.TokenID, _Mapping]] = ..., name: _Optional[str] = ..., symbol: _Optional[str] = ..., decimals: _Optional[int] = ..., totalSupply: _Optional[int] = ..., treasury: _Optional[_Union[_basic_types_pb2.AccountID, _Mapping]] = ..., adminKey: _Optional[_Union[_basic_types_pb2.Key, _Mapping]] = ..., kycKey: _Optional[_Union[_basic_types_pb2.Key, _Mapping]] = ..., freezeKey: _Optional[_Union[_basic_types_pb2.Key, _Mapping]] = ..., wipeKey: _Optional[_Union[_basic_types_pb2.Key, _Mapping]] = ..., supplyKey: _Optional[_Union[_basic_types_pb2.Key, _Mapping]] = ..., defaultFreezeStatus: _Optional[_Union[_basic_types_pb2.TokenFreezeStatus, str]] = ..., defaultKycStatus: _Optional[_Union[_basic_types_pb2.TokenKycStatus, str]] = ..., deleted: bool = ..., autoRenewAccount: _Optional[_Union[_basic_types_pb2.AccountID, _Mapping]] = ..., autoRenewPeriod: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ..., expiry: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., memo: _Optional[str] = ..., tokenType: _Optional[_Union[_basic_types_pb2.TokenType, str]] = ..., supplyType: _Optional[_Union[_basic_types_pb2.TokenSupplyType, str]] = ..., maxSupply: _Optional[int] = ..., fee_schedule_key: _Optional[_Union[_basic_types_pb2.Key, _Mapping]] = ..., custom_fees: _Optional[_Iterable[_Union[_custom_fees_pb2.CustomFee, _Mapping]]] = ..., pause_key: _Optional[_Union[_basic_types_pb2.Key, _Mapping]] = ..., pause_status: _Optional[_Union[_basic_types_pb2.TokenPauseStatus, str]] = ..., ledger_id: _Optional[bytes] = ..., metadata: _Optional[bytes] = ..., metadata_key: _Optional[_Union[_basic_types_pb2.Key, _Mapping]] = ...) -> None: ... + +class TokenGetInfoResponse(_message.Message): + __slots__ = ("header", "tokenInfo") + HEADER_FIELD_NUMBER: _ClassVar[int] + TOKENINFO_FIELD_NUMBER: _ClassVar[int] + header: _response_header_pb2.ResponseHeader + tokenInfo: TokenInfo + def __init__(self, header: _Optional[_Union[_response_header_pb2.ResponseHeader, _Mapping]] = ..., tokenInfo: _Optional[_Union[TokenInfo, _Mapping]] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/token_get_info_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/token_get_info_pb2_grpc.py new file mode 100644 index 000000000..85a4765dd --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/token_get_info_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/token_get_info_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/token_get_nft_info_pb2.py b/src/hiero_sdk_python/hapi/services/token_get_nft_info_pb2.py new file mode 100644 index 000000000..97af86abb --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/token_get_nft_info_pb2.py @@ -0,0 +1,41 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/token_get_nft_info.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/token_get_nft_info.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import basic_types_pb2 as services_dot_basic__types__pb2 +from . import query_header_pb2 as services_dot_query__header__pb2 +from . import response_header_pb2 as services_dot_response__header__pb2 +from . import timestamp_pb2 as services_dot_timestamp__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!services/token_get_nft_info.proto\x12\x05proto\x1a\x1aservices/basic_types.proto\x1a\x1bservices/query_header.proto\x1a\x1eservices/response_header.proto\x1a\x18services/timestamp.proto\"W\n\x14TokenGetNftInfoQuery\x12\"\n\x06header\x18\x01 \x01(\x0b\x32\x12.proto.QueryHeader\x12\x1b\n\x05nftID\x18\x02 \x01(\x0b\x32\x0c.proto.NftID\"\xc3\x01\n\x0cTokenNftInfo\x12\x1b\n\x05nftID\x18\x01 \x01(\x0b\x32\x0c.proto.NftID\x12#\n\taccountID\x18\x02 \x01(\x0b\x32\x10.proto.AccountID\x12&\n\x0c\x63reationTime\x18\x03 \x01(\x0b\x32\x10.proto.Timestamp\x12\x10\n\x08metadata\x18\x04 \x01(\x0c\x12\x11\n\tledger_id\x18\x05 \x01(\x0c\x12$\n\nspender_id\x18\x06 \x01(\x0b\x32\x10.proto.AccountID\"b\n\x17TokenGetNftInfoResponse\x12%\n\x06header\x18\x01 \x01(\x0b\x32\x15.proto.ResponseHeader\x12 \n\x03nft\x18\x02 \x01(\x0b\x32\x13.proto.TokenNftInfoB&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.token_get_nft_info_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_TOKENGETNFTINFOQUERY']._serialized_start=159 + _globals['_TOKENGETNFTINFOQUERY']._serialized_end=246 + _globals['_TOKENNFTINFO']._serialized_start=249 + _globals['_TOKENNFTINFO']._serialized_end=444 + _globals['_TOKENGETNFTINFORESPONSE']._serialized_start=446 + _globals['_TOKENGETNFTINFORESPONSE']._serialized_end=544 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/token_get_nft_info_pb2.pyi b/src/hiero_sdk_python/hapi/services/token_get_nft_info_pb2.pyi new file mode 100644 index 000000000..c4fbc58b8 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/token_get_nft_info_pb2.pyi @@ -0,0 +1,42 @@ +from . import basic_types_pb2 as _basic_types_pb2 +from . import query_header_pb2 as _query_header_pb2 +from . import response_header_pb2 as _response_header_pb2 +from . import timestamp_pb2 as _timestamp_pb2 +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class TokenGetNftInfoQuery(_message.Message): + __slots__ = ("header", "nftID") + HEADER_FIELD_NUMBER: _ClassVar[int] + NFTID_FIELD_NUMBER: _ClassVar[int] + header: _query_header_pb2.QueryHeader + nftID: _basic_types_pb2.NftID + def __init__(self, header: _Optional[_Union[_query_header_pb2.QueryHeader, _Mapping]] = ..., nftID: _Optional[_Union[_basic_types_pb2.NftID, _Mapping]] = ...) -> None: ... + +class TokenNftInfo(_message.Message): + __slots__ = ("nftID", "accountID", "creationTime", "metadata", "ledger_id", "spender_id") + NFTID_FIELD_NUMBER: _ClassVar[int] + ACCOUNTID_FIELD_NUMBER: _ClassVar[int] + CREATIONTIME_FIELD_NUMBER: _ClassVar[int] + METADATA_FIELD_NUMBER: _ClassVar[int] + LEDGER_ID_FIELD_NUMBER: _ClassVar[int] + SPENDER_ID_FIELD_NUMBER: _ClassVar[int] + nftID: _basic_types_pb2.NftID + accountID: _basic_types_pb2.AccountID + creationTime: _timestamp_pb2.Timestamp + metadata: bytes + ledger_id: bytes + spender_id: _basic_types_pb2.AccountID + def __init__(self, nftID: _Optional[_Union[_basic_types_pb2.NftID, _Mapping]] = ..., accountID: _Optional[_Union[_basic_types_pb2.AccountID, _Mapping]] = ..., creationTime: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., metadata: _Optional[bytes] = ..., ledger_id: _Optional[bytes] = ..., spender_id: _Optional[_Union[_basic_types_pb2.AccountID, _Mapping]] = ...) -> None: ... + +class TokenGetNftInfoResponse(_message.Message): + __slots__ = ("header", "nft") + HEADER_FIELD_NUMBER: _ClassVar[int] + NFT_FIELD_NUMBER: _ClassVar[int] + header: _response_header_pb2.ResponseHeader + nft: TokenNftInfo + def __init__(self, header: _Optional[_Union[_response_header_pb2.ResponseHeader, _Mapping]] = ..., nft: _Optional[_Union[TokenNftInfo, _Mapping]] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/token_get_nft_info_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/token_get_nft_info_pb2_grpc.py new file mode 100644 index 000000000..f05015ff9 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/token_get_nft_info_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/token_get_nft_info_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/token_get_nft_infos_pb2.py b/src/hiero_sdk_python/hapi/services/token_get_nft_infos_pb2.py new file mode 100644 index 000000000..8b75c6728 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/token_get_nft_infos_pb2.py @@ -0,0 +1,39 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/token_get_nft_infos.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/token_get_nft_infos.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import basic_types_pb2 as services_dot_basic__types__pb2 +from . import token_get_nft_info_pb2 as services_dot_token__get__nft__info__pb2 +from . import query_header_pb2 as services_dot_query__header__pb2 +from . import response_header_pb2 as services_dot_response__header__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"services/token_get_nft_infos.proto\x12\x05proto\x1a\x1aservices/basic_types.proto\x1a!services/token_get_nft_info.proto\x1a\x1bservices/query_header.proto\x1a\x1eservices/response_header.proto\"x\n\x15TokenGetNftInfosQuery\x12\"\n\x06header\x18\x01 \x01(\x0b\x32\x12.proto.QueryHeader\x12\x1f\n\x07tokenID\x18\x02 \x01(\x0b\x32\x0e.proto.TokenID\x12\r\n\x05start\x18\x03 \x01(\x03\x12\x0b\n\x03\x65nd\x18\x04 \x01(\x03\"\x85\x01\n\x18TokenGetNftInfosResponse\x12%\n\x06header\x18\x01 \x01(\x0b\x32\x15.proto.ResponseHeader\x12\x1f\n\x07tokenID\x18\x02 \x01(\x0b\x32\x0e.proto.TokenID\x12!\n\x04nfts\x18\x03 \x03(\x0b\x32\x13.proto.TokenNftInfoB&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.token_get_nft_infos_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_TOKENGETNFTINFOSQUERY']._serialized_start=169 + _globals['_TOKENGETNFTINFOSQUERY']._serialized_end=289 + _globals['_TOKENGETNFTINFOSRESPONSE']._serialized_start=292 + _globals['_TOKENGETNFTINFOSRESPONSE']._serialized_end=425 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/token_get_nft_infos_pb2.pyi b/src/hiero_sdk_python/hapi/services/token_get_nft_infos_pb2.pyi new file mode 100644 index 000000000..2e09d6b49 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/token_get_nft_infos_pb2.pyi @@ -0,0 +1,33 @@ +from . import basic_types_pb2 as _basic_types_pb2 +from . import token_get_nft_info_pb2 as _token_get_nft_info_pb2 +from . import query_header_pb2 as _query_header_pb2 +from . import response_header_pb2 as _response_header_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Iterable as _Iterable, Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class TokenGetNftInfosQuery(_message.Message): + __slots__ = ("header", "tokenID", "start", "end") + HEADER_FIELD_NUMBER: _ClassVar[int] + TOKENID_FIELD_NUMBER: _ClassVar[int] + START_FIELD_NUMBER: _ClassVar[int] + END_FIELD_NUMBER: _ClassVar[int] + header: _query_header_pb2.QueryHeader + tokenID: _basic_types_pb2.TokenID + start: int + end: int + def __init__(self, header: _Optional[_Union[_query_header_pb2.QueryHeader, _Mapping]] = ..., tokenID: _Optional[_Union[_basic_types_pb2.TokenID, _Mapping]] = ..., start: _Optional[int] = ..., end: _Optional[int] = ...) -> None: ... + +class TokenGetNftInfosResponse(_message.Message): + __slots__ = ("header", "tokenID", "nfts") + HEADER_FIELD_NUMBER: _ClassVar[int] + TOKENID_FIELD_NUMBER: _ClassVar[int] + NFTS_FIELD_NUMBER: _ClassVar[int] + header: _response_header_pb2.ResponseHeader + tokenID: _basic_types_pb2.TokenID + nfts: _containers.RepeatedCompositeFieldContainer[_token_get_nft_info_pb2.TokenNftInfo] + def __init__(self, header: _Optional[_Union[_response_header_pb2.ResponseHeader, _Mapping]] = ..., tokenID: _Optional[_Union[_basic_types_pb2.TokenID, _Mapping]] = ..., nfts: _Optional[_Iterable[_Union[_token_get_nft_info_pb2.TokenNftInfo, _Mapping]]] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/token_get_nft_infos_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/token_get_nft_infos_pb2_grpc.py new file mode 100644 index 000000000..89b300339 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/token_get_nft_infos_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/token_get_nft_infos_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/token_grant_kyc_pb2.py b/src/hiero_sdk_python/hapi/services/token_grant_kyc_pb2.py new file mode 100644 index 000000000..6bae03f17 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/token_grant_kyc_pb2.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/token_grant_kyc.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/token_grant_kyc.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import basic_types_pb2 as services_dot_basic__types__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1eservices/token_grant_kyc.proto\x12\x05proto\x1a\x1aservices/basic_types.proto\"`\n\x1cTokenGrantKycTransactionBody\x12\x1d\n\x05token\x18\x01 \x01(\x0b\x32\x0e.proto.TokenID\x12!\n\x07\x61\x63\x63ount\x18\x02 \x01(\x0b\x32\x10.proto.AccountIDB&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.token_grant_kyc_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_TOKENGRANTKYCTRANSACTIONBODY']._serialized_start=69 + _globals['_TOKENGRANTKYCTRANSACTIONBODY']._serialized_end=165 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/token_grant_kyc_pb2.pyi b/src/hiero_sdk_python/hapi/services/token_grant_kyc_pb2.pyi new file mode 100644 index 000000000..e5adf488a --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/token_grant_kyc_pb2.pyi @@ -0,0 +1,15 @@ +from . import basic_types_pb2 as _basic_types_pb2 +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class TokenGrantKycTransactionBody(_message.Message): + __slots__ = ("token", "account") + TOKEN_FIELD_NUMBER: _ClassVar[int] + ACCOUNT_FIELD_NUMBER: _ClassVar[int] + token: _basic_types_pb2.TokenID + account: _basic_types_pb2.AccountID + def __init__(self, token: _Optional[_Union[_basic_types_pb2.TokenID, _Mapping]] = ..., account: _Optional[_Union[_basic_types_pb2.AccountID, _Mapping]] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/token_grant_kyc_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/token_grant_kyc_pb2_grpc.py new file mode 100644 index 000000000..ca086a9b6 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/token_grant_kyc_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/token_grant_kyc_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/token_mint_pb2.py b/src/hiero_sdk_python/hapi/services/token_mint_pb2.py new file mode 100644 index 000000000..4bd00158c --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/token_mint_pb2.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/token_mint.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/token_mint.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import basic_types_pb2 as services_dot_basic__types__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x19services/token_mint.proto\x12\x05proto\x1a\x1aservices/basic_types.proto\"[\n\x18TokenMintTransactionBody\x12\x1d\n\x05token\x18\x01 \x01(\x0b\x32\x0e.proto.TokenID\x12\x0e\n\x06\x61mount\x18\x02 \x01(\x04\x12\x10\n\x08metadata\x18\x03 \x03(\x0c\x42&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.token_mint_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_TOKENMINTTRANSACTIONBODY']._serialized_start=64 + _globals['_TOKENMINTTRANSACTIONBODY']._serialized_end=155 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/token_mint_pb2.pyi b/src/hiero_sdk_python/hapi/services/token_mint_pb2.pyi new file mode 100644 index 000000000..76b9614fb --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/token_mint_pb2.pyi @@ -0,0 +1,18 @@ +from . import basic_types_pb2 as _basic_types_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Iterable as _Iterable, Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class TokenMintTransactionBody(_message.Message): + __slots__ = ("token", "amount", "metadata") + TOKEN_FIELD_NUMBER: _ClassVar[int] + AMOUNT_FIELD_NUMBER: _ClassVar[int] + METADATA_FIELD_NUMBER: _ClassVar[int] + token: _basic_types_pb2.TokenID + amount: int + metadata: _containers.RepeatedScalarFieldContainer[bytes] + def __init__(self, token: _Optional[_Union[_basic_types_pb2.TokenID, _Mapping]] = ..., amount: _Optional[int] = ..., metadata: _Optional[_Iterable[bytes]] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/token_mint_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/token_mint_pb2_grpc.py new file mode 100644 index 000000000..f1be32831 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/token_mint_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/token_mint_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/token_pause_pb2.py b/src/hiero_sdk_python/hapi/services/token_pause_pb2.py new file mode 100644 index 000000000..f0272138b --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/token_pause_pb2.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/token_pause.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/token_pause.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import basic_types_pb2 as services_dot_basic__types__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1aservices/token_pause.proto\x12\x05proto\x1a\x1aservices/basic_types.proto\":\n\x19TokenPauseTransactionBody\x12\x1d\n\x05token\x18\x01 \x01(\x0b\x32\x0e.proto.TokenIDB&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.token_pause_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_TOKENPAUSETRANSACTIONBODY']._serialized_start=65 + _globals['_TOKENPAUSETRANSACTIONBODY']._serialized_end=123 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/token_pause_pb2.pyi b/src/hiero_sdk_python/hapi/services/token_pause_pb2.pyi new file mode 100644 index 000000000..a00f8a555 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/token_pause_pb2.pyi @@ -0,0 +1,13 @@ +from . import basic_types_pb2 as _basic_types_pb2 +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class TokenPauseTransactionBody(_message.Message): + __slots__ = ("token",) + TOKEN_FIELD_NUMBER: _ClassVar[int] + token: _basic_types_pb2.TokenID + def __init__(self, token: _Optional[_Union[_basic_types_pb2.TokenID, _Mapping]] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/token_pause_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/token_pause_pb2_grpc.py new file mode 100644 index 000000000..8489e63b4 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/token_pause_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/token_pause_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/token_reject_pb2.py b/src/hiero_sdk_python/hapi/services/token_reject_pb2.py new file mode 100644 index 000000000..3e8e829a3 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/token_reject_pb2.py @@ -0,0 +1,36 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/token_reject.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/token_reject.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import basic_types_pb2 as services_dot_basic__types__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1bservices/token_reject.proto\x12\x05proto\x1a\x1aservices/basic_types.proto\"h\n\x1aTokenRejectTransactionBody\x12\x1f\n\x05owner\x18\x01 \x01(\x0b\x32\x10.proto.AccountID\x12)\n\nrejections\x18\x02 \x03(\x0b\x32\x15.proto.TokenReference\"k\n\x0eTokenReference\x12(\n\x0e\x66ungible_token\x18\x01 \x01(\x0b\x32\x0e.proto.TokenIDH\x00\x12\x1b\n\x03nft\x18\x02 \x01(\x0b\x32\x0c.proto.NftIDH\x00\x42\x12\n\x10token_identifierB&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.token_reject_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_TOKENREJECTTRANSACTIONBODY']._serialized_start=66 + _globals['_TOKENREJECTTRANSACTIONBODY']._serialized_end=170 + _globals['_TOKENREFERENCE']._serialized_start=172 + _globals['_TOKENREFERENCE']._serialized_end=279 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/token_reject_pb2.pyi b/src/hiero_sdk_python/hapi/services/token_reject_pb2.pyi new file mode 100644 index 000000000..364c3d038 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/token_reject_pb2.pyi @@ -0,0 +1,24 @@ +from . import basic_types_pb2 as _basic_types_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Iterable as _Iterable, Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class TokenRejectTransactionBody(_message.Message): + __slots__ = ("owner", "rejections") + OWNER_FIELD_NUMBER: _ClassVar[int] + REJECTIONS_FIELD_NUMBER: _ClassVar[int] + owner: _basic_types_pb2.AccountID + rejections: _containers.RepeatedCompositeFieldContainer[TokenReference] + def __init__(self, owner: _Optional[_Union[_basic_types_pb2.AccountID, _Mapping]] = ..., rejections: _Optional[_Iterable[_Union[TokenReference, _Mapping]]] = ...) -> None: ... + +class TokenReference(_message.Message): + __slots__ = ("fungible_token", "nft") + FUNGIBLE_TOKEN_FIELD_NUMBER: _ClassVar[int] + NFT_FIELD_NUMBER: _ClassVar[int] + fungible_token: _basic_types_pb2.TokenID + nft: _basic_types_pb2.NftID + def __init__(self, fungible_token: _Optional[_Union[_basic_types_pb2.TokenID, _Mapping]] = ..., nft: _Optional[_Union[_basic_types_pb2.NftID, _Mapping]] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/token_reject_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/token_reject_pb2_grpc.py new file mode 100644 index 000000000..9f157291f --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/token_reject_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/token_reject_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/token_revoke_kyc_pb2.py b/src/hiero_sdk_python/hapi/services/token_revoke_kyc_pb2.py new file mode 100644 index 000000000..c3197fcae --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/token_revoke_kyc_pb2.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/token_revoke_kyc.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/token_revoke_kyc.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import basic_types_pb2 as services_dot_basic__types__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1fservices/token_revoke_kyc.proto\x12\x05proto\x1a\x1aservices/basic_types.proto\"a\n\x1dTokenRevokeKycTransactionBody\x12\x1d\n\x05token\x18\x01 \x01(\x0b\x32\x0e.proto.TokenID\x12!\n\x07\x61\x63\x63ount\x18\x02 \x01(\x0b\x32\x10.proto.AccountIDB&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.token_revoke_kyc_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_TOKENREVOKEKYCTRANSACTIONBODY']._serialized_start=70 + _globals['_TOKENREVOKEKYCTRANSACTIONBODY']._serialized_end=167 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/token_revoke_kyc_pb2.pyi b/src/hiero_sdk_python/hapi/services/token_revoke_kyc_pb2.pyi new file mode 100644 index 000000000..b5f9bc61f --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/token_revoke_kyc_pb2.pyi @@ -0,0 +1,15 @@ +from . import basic_types_pb2 as _basic_types_pb2 +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class TokenRevokeKycTransactionBody(_message.Message): + __slots__ = ("token", "account") + TOKEN_FIELD_NUMBER: _ClassVar[int] + ACCOUNT_FIELD_NUMBER: _ClassVar[int] + token: _basic_types_pb2.TokenID + account: _basic_types_pb2.AccountID + def __init__(self, token: _Optional[_Union[_basic_types_pb2.TokenID, _Mapping]] = ..., account: _Optional[_Union[_basic_types_pb2.AccountID, _Mapping]] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/token_revoke_kyc_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/token_revoke_kyc_pb2_grpc.py new file mode 100644 index 000000000..b4d3df364 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/token_revoke_kyc_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/token_revoke_kyc_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/token_service_pb2.py b/src/hiero_sdk_python/hapi/services/token_service_pb2.py new file mode 100644 index 000000000..df39f103e --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/token_service_pb2.py @@ -0,0 +1,37 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/token_service.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/token_service.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import query_pb2 as services_dot_query__pb2 +from . import response_pb2 as services_dot_response__pb2 +from . import transaction_response_pb2 as services_dot_transaction__response__pb2 +from . import transaction_pb2 as services_dot_transaction__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cservices/token_service.proto\x12\x05proto\x1a\x14services/query.proto\x1a\x17services/response.proto\x1a#services/transaction_response.proto\x1a\x1aservices/transaction.proto2\x9d\x0b\n\x0cTokenService\x12=\n\x0b\x63reateToken\x12\x12.proto.Transaction\x1a\x1a.proto.TransactionResponse\x12=\n\x0bupdateToken\x12\x12.proto.Transaction\x1a\x1a.proto.TransactionResponse\x12;\n\tmintToken\x12\x12.proto.Transaction\x1a\x1a.proto.TransactionResponse\x12;\n\tburnToken\x12\x12.proto.Transaction\x1a\x1a.proto.TransactionResponse\x12=\n\x0b\x64\x65leteToken\x12\x12.proto.Transaction\x1a\x1a.proto.TransactionResponse\x12\x42\n\x10wipeTokenAccount\x12\x12.proto.Transaction\x1a\x1a.proto.TransactionResponse\x12\x44\n\x12\x66reezeTokenAccount\x12\x12.proto.Transaction\x1a\x1a.proto.TransactionResponse\x12\x46\n\x14unfreezeTokenAccount\x12\x12.proto.Transaction\x1a\x1a.proto.TransactionResponse\x12H\n\x16grantKycToTokenAccount\x12\x12.proto.Transaction\x1a\x1a.proto.TransactionResponse\x12K\n\x19revokeKycFromTokenAccount\x12\x12.proto.Transaction\x1a\x1a.proto.TransactionResponse\x12\x41\n\x0f\x61ssociateTokens\x12\x12.proto.Transaction\x1a\x1a.proto.TransactionResponse\x12\x42\n\x10\x64issociateTokens\x12\x12.proto.Transaction\x1a\x1a.proto.TransactionResponse\x12H\n\x16updateTokenFeeSchedule\x12\x12.proto.Transaction\x1a\x1a.proto.TransactionResponse\x12-\n\x0cgetTokenInfo\x12\x0c.proto.Query\x1a\x0f.proto.Response\x12\x30\n\x0fgetTokenNftInfo\x12\x0c.proto.Query\x1a\x0f.proto.Response\x12<\n\npauseToken\x12\x12.proto.Transaction\x1a\x1a.proto.TransactionResponse\x12>\n\x0cunpauseToken\x12\x12.proto.Transaction\x1a\x1a.proto.TransactionResponse\x12<\n\nupdateNfts\x12\x12.proto.Transaction\x1a\x1a.proto.TransactionResponse\x12=\n\x0brejectToken\x12\x12.proto.Transaction\x1a\x1a.proto.TransactionResponse\x12?\n\rairdropTokens\x12\x12.proto.Transaction\x1a\x1a.proto.TransactionResponse\x12?\n\rcancelAirdrop\x12\x12.proto.Transaction\x1a\x1a.proto.TransactionResponse\x12>\n\x0c\x63laimAirdrop\x12\x12.proto.Transaction\x1a\x1a.proto.TransactionResponseB(\n&com.hederahashgraph.service.proto.javab\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.token_service_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n&com.hederahashgraph.service.proto.java' + _globals['_TOKENSERVICE']._serialized_start=152 + _globals['_TOKENSERVICE']._serialized_end=1589 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/token_service_pb2.pyi b/src/hiero_sdk_python/hapi/services/token_service_pb2.pyi new file mode 100644 index 000000000..ce90eb498 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/token_service_pb2.pyi @@ -0,0 +1,8 @@ +from . import query_pb2 as _query_pb2 +from . import response_pb2 as _response_pb2 +from . import transaction_response_pb2 as _transaction_response_pb2 +from . import transaction_pb2 as _transaction_pb2 +from google.protobuf import descriptor as _descriptor +from typing import ClassVar as _ClassVar + +DESCRIPTOR: _descriptor.FileDescriptor diff --git a/src/hiero_sdk_python/hapi/services/token_service_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/token_service_pb2_grpc.py new file mode 100644 index 000000000..8836bd421 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/token_service_pb2_grpc.py @@ -0,0 +1,1135 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings +from . import query_pb2 as services_dot_query__pb2 +from . import response_pb2 as services_dot_response__pb2 +from . import transaction_pb2 as services_dot_transaction__pb2 +from . import transaction_response_pb2 as services_dot_transaction__response__pb2 +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/token_service_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) + + +class TokenServiceStub(object): + """* + Transactions and queries for the Token Service + The following queries are permanently removed + getAccountNftInfos, getTokenNftInfos + """ + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.createToken = channel.unary_unary( + '/proto.TokenService/createToken', + request_serializer=services_dot_transaction__pb2.Transaction.SerializeToString, + response_deserializer=services_dot_transaction__response__pb2.TransactionResponse.FromString, + _registered_method=True) + self.updateToken = channel.unary_unary( + '/proto.TokenService/updateToken', + request_serializer=services_dot_transaction__pb2.Transaction.SerializeToString, + response_deserializer=services_dot_transaction__response__pb2.TransactionResponse.FromString, + _registered_method=True) + self.mintToken = channel.unary_unary( + '/proto.TokenService/mintToken', + request_serializer=services_dot_transaction__pb2.Transaction.SerializeToString, + response_deserializer=services_dot_transaction__response__pb2.TransactionResponse.FromString, + _registered_method=True) + self.burnToken = channel.unary_unary( + '/proto.TokenService/burnToken', + request_serializer=services_dot_transaction__pb2.Transaction.SerializeToString, + response_deserializer=services_dot_transaction__response__pb2.TransactionResponse.FromString, + _registered_method=True) + self.deleteToken = channel.unary_unary( + '/proto.TokenService/deleteToken', + request_serializer=services_dot_transaction__pb2.Transaction.SerializeToString, + response_deserializer=services_dot_transaction__response__pb2.TransactionResponse.FromString, + _registered_method=True) + self.wipeTokenAccount = channel.unary_unary( + '/proto.TokenService/wipeTokenAccount', + request_serializer=services_dot_transaction__pb2.Transaction.SerializeToString, + response_deserializer=services_dot_transaction__response__pb2.TransactionResponse.FromString, + _registered_method=True) + self.freezeTokenAccount = channel.unary_unary( + '/proto.TokenService/freezeTokenAccount', + request_serializer=services_dot_transaction__pb2.Transaction.SerializeToString, + response_deserializer=services_dot_transaction__response__pb2.TransactionResponse.FromString, + _registered_method=True) + self.unfreezeTokenAccount = channel.unary_unary( + '/proto.TokenService/unfreezeTokenAccount', + request_serializer=services_dot_transaction__pb2.Transaction.SerializeToString, + response_deserializer=services_dot_transaction__response__pb2.TransactionResponse.FromString, + _registered_method=True) + self.grantKycToTokenAccount = channel.unary_unary( + '/proto.TokenService/grantKycToTokenAccount', + request_serializer=services_dot_transaction__pb2.Transaction.SerializeToString, + response_deserializer=services_dot_transaction__response__pb2.TransactionResponse.FromString, + _registered_method=True) + self.revokeKycFromTokenAccount = channel.unary_unary( + '/proto.TokenService/revokeKycFromTokenAccount', + request_serializer=services_dot_transaction__pb2.Transaction.SerializeToString, + response_deserializer=services_dot_transaction__response__pb2.TransactionResponse.FromString, + _registered_method=True) + self.associateTokens = channel.unary_unary( + '/proto.TokenService/associateTokens', + request_serializer=services_dot_transaction__pb2.Transaction.SerializeToString, + response_deserializer=services_dot_transaction__response__pb2.TransactionResponse.FromString, + _registered_method=True) + self.dissociateTokens = channel.unary_unary( + '/proto.TokenService/dissociateTokens', + request_serializer=services_dot_transaction__pb2.Transaction.SerializeToString, + response_deserializer=services_dot_transaction__response__pb2.TransactionResponse.FromString, + _registered_method=True) + self.updateTokenFeeSchedule = channel.unary_unary( + '/proto.TokenService/updateTokenFeeSchedule', + request_serializer=services_dot_transaction__pb2.Transaction.SerializeToString, + response_deserializer=services_dot_transaction__response__pb2.TransactionResponse.FromString, + _registered_method=True) + self.getTokenInfo = channel.unary_unary( + '/proto.TokenService/getTokenInfo', + request_serializer=services_dot_query__pb2.Query.SerializeToString, + response_deserializer=services_dot_response__pb2.Response.FromString, + _registered_method=True) + self.getTokenNftInfo = channel.unary_unary( + '/proto.TokenService/getTokenNftInfo', + request_serializer=services_dot_query__pb2.Query.SerializeToString, + response_deserializer=services_dot_response__pb2.Response.FromString, + _registered_method=True) + self.pauseToken = channel.unary_unary( + '/proto.TokenService/pauseToken', + request_serializer=services_dot_transaction__pb2.Transaction.SerializeToString, + response_deserializer=services_dot_transaction__response__pb2.TransactionResponse.FromString, + _registered_method=True) + self.unpauseToken = channel.unary_unary( + '/proto.TokenService/unpauseToken', + request_serializer=services_dot_transaction__pb2.Transaction.SerializeToString, + response_deserializer=services_dot_transaction__response__pb2.TransactionResponse.FromString, + _registered_method=True) + self.updateNfts = channel.unary_unary( + '/proto.TokenService/updateNfts', + request_serializer=services_dot_transaction__pb2.Transaction.SerializeToString, + response_deserializer=services_dot_transaction__response__pb2.TransactionResponse.FromString, + _registered_method=True) + self.rejectToken = channel.unary_unary( + '/proto.TokenService/rejectToken', + request_serializer=services_dot_transaction__pb2.Transaction.SerializeToString, + response_deserializer=services_dot_transaction__response__pb2.TransactionResponse.FromString, + _registered_method=True) + self.airdropTokens = channel.unary_unary( + '/proto.TokenService/airdropTokens', + request_serializer=services_dot_transaction__pb2.Transaction.SerializeToString, + response_deserializer=services_dot_transaction__response__pb2.TransactionResponse.FromString, + _registered_method=True) + self.cancelAirdrop = channel.unary_unary( + '/proto.TokenService/cancelAirdrop', + request_serializer=services_dot_transaction__pb2.Transaction.SerializeToString, + response_deserializer=services_dot_transaction__response__pb2.TransactionResponse.FromString, + _registered_method=True) + self.claimAirdrop = channel.unary_unary( + '/proto.TokenService/claimAirdrop', + request_serializer=services_dot_transaction__pb2.Transaction.SerializeToString, + response_deserializer=services_dot_transaction__response__pb2.TransactionResponse.FromString, + _registered_method=True) + + +class TokenServiceServicer(object): + """* + Transactions and queries for the Token Service + The following queries are permanently removed + getAccountNftInfos, getTokenNftInfos + """ + + def createToken(self, request, context): + """* + Create a new token. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def updateToken(self, request, context): + """* + Update a token. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def mintToken(self, request, context): + """* + Mint one or more tokens to the treasury account. +

      + This MAY specify a quantity of fungible/common tokens or + a list of specific non-fungible/unique tokes, but + MUST NOT specify both. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def burnToken(self, request, context): + """* + Burn one or more tokens from the treasury account. +

      + This MAY specify a quantity of fungible/common tokens or + a list of specific non-fungible/unique tokes, but + MUST NOT specify both. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def deleteToken(self, request, context): + """* + Delete a token. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def wipeTokenAccount(self, request, context): + """* + Wipe one or more tokens from an identified Account. +

      + This MAY specify a quantity of fungible/common tokens or + a list of specific non-fungible/unique tokes, but + MUST NOT specify both. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def freezeTokenAccount(self, request, context): + """* + Freeze the transfer of tokens to or from an identified Account. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def unfreezeTokenAccount(self, request, context): + """* + Unfreeze the transfer of tokens to or from an identified Account. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def grantKycToTokenAccount(self, request, context): + """* + Assert that KYC requirements are met for a specific account with + respect to a specific token. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def revokeKycFromTokenAccount(self, request, context): + """* + Assert that KYC requirements are _not_ met for a specific account with + respect to a specific token. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def associateTokens(self, request, context): + """* + Associate one or more tokens to an account. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def dissociateTokens(self, request, context): + """* + Dissociate one or more tokens from an account. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def updateTokenFeeSchedule(self, request, context): + """* + Update the custom fee schedule for a token. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def getTokenInfo(self, request, context): + """* + Retrieve the detail characteristics for a token. +

      + This query SHALL return information for the token type as a whole.
      + This query SHALL NOT return information for individual tokens. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def getTokenNftInfo(self, request, context): + """* + Retrieve the metadata for a specific non-fungible/unique token.
      + The NFT to query is identified by token identifier and serial number. +

      + This query SHALL return token metadata and, if an allowance is defined, + the designated "spender" account for the queried NFT. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def pauseToken(self, request, context): + """* + Pause a token. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def unpauseToken(self, request, context): + """* + Unpause (resume) a token. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def updateNfts(self, request, context): + """* + Update multiple non-fungible/unique tokens (NFTs) in a collection.
      + The NFTs are identified by token identifier and one or more + serial numbers. +

      + This transaction SHALL update NFT metadata only.
      + This transaction MUST be signed by the token `metadata_key`. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def rejectToken(self, request, context): + """* + Reject one or more tokens. +

      + This transaction SHALL transfer the full balance of one or more tokens + from the requesting account to the treasury for each token.
      + This transfer SHALL NOT charge any custom fee or royalty defined for + the token(s) to be rejected.
      + ### Effects on success +

        +
      • If the rejected token is fungible/common, the requesting account + SHALL have a balance of 0 for the rejected token.
        + The treasury balance SHALL increase by the amount that the + requesting account decreased.
      • +
      • If the rejected token is non-fungible/unique the requesting + account SHALL NOT hold the specific serialized token that + is rejected.
        + The treasury account SHALL hold each specific serialized token + that was rejected.
      • + + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def airdropTokens(self, request, context): + """* + Airdrop one or more tokens to one or more accounts. +

        + This transaction SHALL distribute tokens from the balance of one or + more sending account(s) to the balance of one or more + recipient accounts.
        + Accounts SHALL receive the tokens in one of four ways. +

          +
        • An account already associated to the token to be distributed + SHALL receive the airdropped tokens immediately to the + recipient account balance.
        • +
        • An account with available automatic association slots SHALL + be automatically associated to the token, and SHALL + immediately receive the airdropped tokens to the recipient + account balance.
        • +
        • An account with "receiver signature required" set SHALL have + a "Pending Airdrop" created and MUST claim that airdrop with + a `claimAirdrop` transaction.
        • +
        • An account with no available automatic association slots SHALL + have a "Pending Airdrop" created and MUST claim that airdrop + with a `claimAirdrop` transaction.
        • +
        + Any airdrop that completes immediately SHALL be irreversible.
        + Any airdrop that results in a "Pending Airdrop" MAY be canceled via + a `cancelAirdrop` transaction.
        + All transfer fees (including custom fees and royalties), as well as + the rent cost for the first auto-renewal period for any + automatic-association slot occupied by the airdropped tokens, + SHALL be charged to the account submitting this transaction. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def cancelAirdrop(self, request, context): + """* + Cancel one or more pending airdrops. +

        + This transaction MUST be signed by _each_ account *sending* an + airdrop to be canceled. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def claimAirdrop(self, request, context): + """* + Claim one or more pending airdrops. +

        + This transaction MUST be signed by _each_ account **receiving** + an airdrop to be claimed.
        + If a "Sender" lacks sufficient balance to fulfill the airdrop at + the time the claim is made, that claim SHALL fail. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_TokenServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'createToken': grpc.unary_unary_rpc_method_handler( + servicer.createToken, + request_deserializer=services_dot_transaction__pb2.Transaction.FromString, + response_serializer=services_dot_transaction__response__pb2.TransactionResponse.SerializeToString, + ), + 'updateToken': grpc.unary_unary_rpc_method_handler( + servicer.updateToken, + request_deserializer=services_dot_transaction__pb2.Transaction.FromString, + response_serializer=services_dot_transaction__response__pb2.TransactionResponse.SerializeToString, + ), + 'mintToken': grpc.unary_unary_rpc_method_handler( + servicer.mintToken, + request_deserializer=services_dot_transaction__pb2.Transaction.FromString, + response_serializer=services_dot_transaction__response__pb2.TransactionResponse.SerializeToString, + ), + 'burnToken': grpc.unary_unary_rpc_method_handler( + servicer.burnToken, + request_deserializer=services_dot_transaction__pb2.Transaction.FromString, + response_serializer=services_dot_transaction__response__pb2.TransactionResponse.SerializeToString, + ), + 'deleteToken': grpc.unary_unary_rpc_method_handler( + servicer.deleteToken, + request_deserializer=services_dot_transaction__pb2.Transaction.FromString, + response_serializer=services_dot_transaction__response__pb2.TransactionResponse.SerializeToString, + ), + 'wipeTokenAccount': grpc.unary_unary_rpc_method_handler( + servicer.wipeTokenAccount, + request_deserializer=services_dot_transaction__pb2.Transaction.FromString, + response_serializer=services_dot_transaction__response__pb2.TransactionResponse.SerializeToString, + ), + 'freezeTokenAccount': grpc.unary_unary_rpc_method_handler( + servicer.freezeTokenAccount, + request_deserializer=services_dot_transaction__pb2.Transaction.FromString, + response_serializer=services_dot_transaction__response__pb2.TransactionResponse.SerializeToString, + ), + 'unfreezeTokenAccount': grpc.unary_unary_rpc_method_handler( + servicer.unfreezeTokenAccount, + request_deserializer=services_dot_transaction__pb2.Transaction.FromString, + response_serializer=services_dot_transaction__response__pb2.TransactionResponse.SerializeToString, + ), + 'grantKycToTokenAccount': grpc.unary_unary_rpc_method_handler( + servicer.grantKycToTokenAccount, + request_deserializer=services_dot_transaction__pb2.Transaction.FromString, + response_serializer=services_dot_transaction__response__pb2.TransactionResponse.SerializeToString, + ), + 'revokeKycFromTokenAccount': grpc.unary_unary_rpc_method_handler( + servicer.revokeKycFromTokenAccount, + request_deserializer=services_dot_transaction__pb2.Transaction.FromString, + response_serializer=services_dot_transaction__response__pb2.TransactionResponse.SerializeToString, + ), + 'associateTokens': grpc.unary_unary_rpc_method_handler( + servicer.associateTokens, + request_deserializer=services_dot_transaction__pb2.Transaction.FromString, + response_serializer=services_dot_transaction__response__pb2.TransactionResponse.SerializeToString, + ), + 'dissociateTokens': grpc.unary_unary_rpc_method_handler( + servicer.dissociateTokens, + request_deserializer=services_dot_transaction__pb2.Transaction.FromString, + response_serializer=services_dot_transaction__response__pb2.TransactionResponse.SerializeToString, + ), + 'updateTokenFeeSchedule': grpc.unary_unary_rpc_method_handler( + servicer.updateTokenFeeSchedule, + request_deserializer=services_dot_transaction__pb2.Transaction.FromString, + response_serializer=services_dot_transaction__response__pb2.TransactionResponse.SerializeToString, + ), + 'getTokenInfo': grpc.unary_unary_rpc_method_handler( + servicer.getTokenInfo, + request_deserializer=services_dot_query__pb2.Query.FromString, + response_serializer=services_dot_response__pb2.Response.SerializeToString, + ), + 'getTokenNftInfo': grpc.unary_unary_rpc_method_handler( + servicer.getTokenNftInfo, + request_deserializer=services_dot_query__pb2.Query.FromString, + response_serializer=services_dot_response__pb2.Response.SerializeToString, + ), + 'pauseToken': grpc.unary_unary_rpc_method_handler( + servicer.pauseToken, + request_deserializer=services_dot_transaction__pb2.Transaction.FromString, + response_serializer=services_dot_transaction__response__pb2.TransactionResponse.SerializeToString, + ), + 'unpauseToken': grpc.unary_unary_rpc_method_handler( + servicer.unpauseToken, + request_deserializer=services_dot_transaction__pb2.Transaction.FromString, + response_serializer=services_dot_transaction__response__pb2.TransactionResponse.SerializeToString, + ), + 'updateNfts': grpc.unary_unary_rpc_method_handler( + servicer.updateNfts, + request_deserializer=services_dot_transaction__pb2.Transaction.FromString, + response_serializer=services_dot_transaction__response__pb2.TransactionResponse.SerializeToString, + ), + 'rejectToken': grpc.unary_unary_rpc_method_handler( + servicer.rejectToken, + request_deserializer=services_dot_transaction__pb2.Transaction.FromString, + response_serializer=services_dot_transaction__response__pb2.TransactionResponse.SerializeToString, + ), + 'airdropTokens': grpc.unary_unary_rpc_method_handler( + servicer.airdropTokens, + request_deserializer=services_dot_transaction__pb2.Transaction.FromString, + response_serializer=services_dot_transaction__response__pb2.TransactionResponse.SerializeToString, + ), + 'cancelAirdrop': grpc.unary_unary_rpc_method_handler( + servicer.cancelAirdrop, + request_deserializer=services_dot_transaction__pb2.Transaction.FromString, + response_serializer=services_dot_transaction__response__pb2.TransactionResponse.SerializeToString, + ), + 'claimAirdrop': grpc.unary_unary_rpc_method_handler( + servicer.claimAirdrop, + request_deserializer=services_dot_transaction__pb2.Transaction.FromString, + response_serializer=services_dot_transaction__response__pb2.TransactionResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'proto.TokenService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + server.add_registered_method_handlers('proto.TokenService', rpc_method_handlers) + + + # This class is part of an EXPERIMENTAL API. +class TokenService(object): + """* + Transactions and queries for the Token Service + The following queries are permanently removed + getAccountNftInfos, getTokenNftInfos + """ + + @staticmethod + def createToken(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/proto.TokenService/createToken', + services_dot_transaction__pb2.Transaction.SerializeToString, + services_dot_transaction__response__pb2.TransactionResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def updateToken(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/proto.TokenService/updateToken', + services_dot_transaction__pb2.Transaction.SerializeToString, + services_dot_transaction__response__pb2.TransactionResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def mintToken(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/proto.TokenService/mintToken', + services_dot_transaction__pb2.Transaction.SerializeToString, + services_dot_transaction__response__pb2.TransactionResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def burnToken(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/proto.TokenService/burnToken', + services_dot_transaction__pb2.Transaction.SerializeToString, + services_dot_transaction__response__pb2.TransactionResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def deleteToken(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/proto.TokenService/deleteToken', + services_dot_transaction__pb2.Transaction.SerializeToString, + services_dot_transaction__response__pb2.TransactionResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def wipeTokenAccount(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/proto.TokenService/wipeTokenAccount', + services_dot_transaction__pb2.Transaction.SerializeToString, + services_dot_transaction__response__pb2.TransactionResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def freezeTokenAccount(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/proto.TokenService/freezeTokenAccount', + services_dot_transaction__pb2.Transaction.SerializeToString, + services_dot_transaction__response__pb2.TransactionResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def unfreezeTokenAccount(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/proto.TokenService/unfreezeTokenAccount', + services_dot_transaction__pb2.Transaction.SerializeToString, + services_dot_transaction__response__pb2.TransactionResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def grantKycToTokenAccount(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/proto.TokenService/grantKycToTokenAccount', + services_dot_transaction__pb2.Transaction.SerializeToString, + services_dot_transaction__response__pb2.TransactionResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def revokeKycFromTokenAccount(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/proto.TokenService/revokeKycFromTokenAccount', + services_dot_transaction__pb2.Transaction.SerializeToString, + services_dot_transaction__response__pb2.TransactionResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def associateTokens(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/proto.TokenService/associateTokens', + services_dot_transaction__pb2.Transaction.SerializeToString, + services_dot_transaction__response__pb2.TransactionResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def dissociateTokens(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/proto.TokenService/dissociateTokens', + services_dot_transaction__pb2.Transaction.SerializeToString, + services_dot_transaction__response__pb2.TransactionResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def updateTokenFeeSchedule(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/proto.TokenService/updateTokenFeeSchedule', + services_dot_transaction__pb2.Transaction.SerializeToString, + services_dot_transaction__response__pb2.TransactionResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def getTokenInfo(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/proto.TokenService/getTokenInfo', + services_dot_query__pb2.Query.SerializeToString, + services_dot_response__pb2.Response.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def getTokenNftInfo(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/proto.TokenService/getTokenNftInfo', + services_dot_query__pb2.Query.SerializeToString, + services_dot_response__pb2.Response.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def pauseToken(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/proto.TokenService/pauseToken', + services_dot_transaction__pb2.Transaction.SerializeToString, + services_dot_transaction__response__pb2.TransactionResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def unpauseToken(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/proto.TokenService/unpauseToken', + services_dot_transaction__pb2.Transaction.SerializeToString, + services_dot_transaction__response__pb2.TransactionResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def updateNfts(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/proto.TokenService/updateNfts', + services_dot_transaction__pb2.Transaction.SerializeToString, + services_dot_transaction__response__pb2.TransactionResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def rejectToken(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/proto.TokenService/rejectToken', + services_dot_transaction__pb2.Transaction.SerializeToString, + services_dot_transaction__response__pb2.TransactionResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def airdropTokens(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/proto.TokenService/airdropTokens', + services_dot_transaction__pb2.Transaction.SerializeToString, + services_dot_transaction__response__pb2.TransactionResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def cancelAirdrop(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/proto.TokenService/cancelAirdrop', + services_dot_transaction__pb2.Transaction.SerializeToString, + services_dot_transaction__response__pb2.TransactionResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def claimAirdrop(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/proto.TokenService/claimAirdrop', + services_dot_transaction__pb2.Transaction.SerializeToString, + services_dot_transaction__response__pb2.TransactionResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) diff --git a/src/hiero_sdk_python/hapi/services/token_unfreeze_account_pb2.py b/src/hiero_sdk_python/hapi/services/token_unfreeze_account_pb2.py new file mode 100644 index 000000000..0d9ce49e2 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/token_unfreeze_account_pb2.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/token_unfreeze_account.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/token_unfreeze_account.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import basic_types_pb2 as services_dot_basic__types__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n%services/token_unfreeze_account.proto\x12\x05proto\x1a\x1aservices/basic_types.proto\"g\n#TokenUnfreezeAccountTransactionBody\x12\x1d\n\x05token\x18\x01 \x01(\x0b\x32\x0e.proto.TokenID\x12!\n\x07\x61\x63\x63ount\x18\x02 \x01(\x0b\x32\x10.proto.AccountIDB&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.token_unfreeze_account_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_TOKENUNFREEZEACCOUNTTRANSACTIONBODY']._serialized_start=76 + _globals['_TOKENUNFREEZEACCOUNTTRANSACTIONBODY']._serialized_end=179 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/token_unfreeze_account_pb2.pyi b/src/hiero_sdk_python/hapi/services/token_unfreeze_account_pb2.pyi new file mode 100644 index 000000000..bd644d06f --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/token_unfreeze_account_pb2.pyi @@ -0,0 +1,15 @@ +from . import basic_types_pb2 as _basic_types_pb2 +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class TokenUnfreezeAccountTransactionBody(_message.Message): + __slots__ = ("token", "account") + TOKEN_FIELD_NUMBER: _ClassVar[int] + ACCOUNT_FIELD_NUMBER: _ClassVar[int] + token: _basic_types_pb2.TokenID + account: _basic_types_pb2.AccountID + def __init__(self, token: _Optional[_Union[_basic_types_pb2.TokenID, _Mapping]] = ..., account: _Optional[_Union[_basic_types_pb2.AccountID, _Mapping]] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/token_unfreeze_account_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/token_unfreeze_account_pb2_grpc.py new file mode 100644 index 000000000..88eb95b1b --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/token_unfreeze_account_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/token_unfreeze_account_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/token_unpause_pb2.py b/src/hiero_sdk_python/hapi/services/token_unpause_pb2.py new file mode 100644 index 000000000..05b47a464 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/token_unpause_pb2.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/token_unpause.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/token_unpause.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import basic_types_pb2 as services_dot_basic__types__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cservices/token_unpause.proto\x12\x05proto\x1a\x1aservices/basic_types.proto\"<\n\x1bTokenUnpauseTransactionBody\x12\x1d\n\x05token\x18\x01 \x01(\x0b\x32\x0e.proto.TokenIDB&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.token_unpause_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_TOKENUNPAUSETRANSACTIONBODY']._serialized_start=67 + _globals['_TOKENUNPAUSETRANSACTIONBODY']._serialized_end=127 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/token_unpause_pb2.pyi b/src/hiero_sdk_python/hapi/services/token_unpause_pb2.pyi new file mode 100644 index 000000000..a0f17c295 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/token_unpause_pb2.pyi @@ -0,0 +1,13 @@ +from . import basic_types_pb2 as _basic_types_pb2 +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class TokenUnpauseTransactionBody(_message.Message): + __slots__ = ("token",) + TOKEN_FIELD_NUMBER: _ClassVar[int] + token: _basic_types_pb2.TokenID + def __init__(self, token: _Optional[_Union[_basic_types_pb2.TokenID, _Mapping]] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/token_unpause_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/token_unpause_pb2_grpc.py new file mode 100644 index 000000000..0a7d01c17 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/token_unpause_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/token_unpause_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/token_update_nfts_pb2.py b/src/hiero_sdk_python/hapi/services/token_update_nfts_pb2.py new file mode 100644 index 000000000..5449d8859 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/token_update_nfts_pb2.py @@ -0,0 +1,37 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/token_update_nfts.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/token_update_nfts.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import basic_types_pb2 as services_dot_basic__types__pb2 +from google.protobuf import wrappers_pb2 as google_dot_protobuf_dot_wrappers__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n services/token_update_nfts.proto\x12\x05proto\x1a\x1aservices/basic_types.proto\x1a\x1egoogle/protobuf/wrappers.proto\"\x86\x01\n\x1eTokenUpdateNftsTransactionBody\x12\x1d\n\x05token\x18\x01 \x01(\x0b\x32\x0e.proto.TokenID\x12\x16\n\x0eserial_numbers\x18\x02 \x03(\x03\x12-\n\x08metadata\x18\x03 \x01(\x0b\x32\x1b.google.protobuf.BytesValueB&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.token_update_nfts_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_TOKENUPDATENFTSTRANSACTIONBODY']._serialized_start=104 + _globals['_TOKENUPDATENFTSTRANSACTIONBODY']._serialized_end=238 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/token_update_nfts_pb2.pyi b/src/hiero_sdk_python/hapi/services/token_update_nfts_pb2.pyi new file mode 100644 index 000000000..9ccf3e241 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/token_update_nfts_pb2.pyi @@ -0,0 +1,19 @@ +from . import basic_types_pb2 as _basic_types_pb2 +from google.protobuf import wrappers_pb2 as _wrappers_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Iterable as _Iterable, Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class TokenUpdateNftsTransactionBody(_message.Message): + __slots__ = ("token", "serial_numbers", "metadata") + TOKEN_FIELD_NUMBER: _ClassVar[int] + SERIAL_NUMBERS_FIELD_NUMBER: _ClassVar[int] + METADATA_FIELD_NUMBER: _ClassVar[int] + token: _basic_types_pb2.TokenID + serial_numbers: _containers.RepeatedScalarFieldContainer[int] + metadata: _wrappers_pb2.BytesValue + def __init__(self, token: _Optional[_Union[_basic_types_pb2.TokenID, _Mapping]] = ..., serial_numbers: _Optional[_Iterable[int]] = ..., metadata: _Optional[_Union[_wrappers_pb2.BytesValue, _Mapping]] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/token_update_nfts_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/token_update_nfts_pb2_grpc.py new file mode 100644 index 000000000..f0cdf225f --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/token_update_nfts_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/token_update_nfts_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/token_update_pb2.py b/src/hiero_sdk_python/hapi/services/token_update_pb2.py new file mode 100644 index 000000000..7e6a42f15 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/token_update_pb2.py @@ -0,0 +1,39 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/token_update.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/token_update.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import basic_types_pb2 as services_dot_basic__types__pb2 +from . import duration_pb2 as services_dot_duration__pb2 +from . import timestamp_pb2 as services_dot_timestamp__pb2 +from google.protobuf import wrappers_pb2 as google_dot_protobuf_dot_wrappers__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1bservices/token_update.proto\x12\x05proto\x1a\x1aservices/basic_types.proto\x1a\x17services/duration.proto\x1a\x18services/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\"\x86\x05\n\x1aTokenUpdateTransactionBody\x12\x1d\n\x05token\x18\x01 \x01(\x0b\x32\x0e.proto.TokenID\x12\x0e\n\x06symbol\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\"\n\x08treasury\x18\x04 \x01(\x0b\x32\x10.proto.AccountID\x12\x1c\n\x08\x61\x64minKey\x18\x05 \x01(\x0b\x32\n.proto.Key\x12\x1a\n\x06kycKey\x18\x06 \x01(\x0b\x32\n.proto.Key\x12\x1d\n\tfreezeKey\x18\x07 \x01(\x0b\x32\n.proto.Key\x12\x1b\n\x07wipeKey\x18\x08 \x01(\x0b\x32\n.proto.Key\x12\x1d\n\tsupplyKey\x18\t \x01(\x0b\x32\n.proto.Key\x12*\n\x10\x61utoRenewAccount\x18\n \x01(\x0b\x32\x10.proto.AccountID\x12(\n\x0f\x61utoRenewPeriod\x18\x0b \x01(\x0b\x32\x0f.proto.Duration\x12 \n\x06\x65xpiry\x18\x0c \x01(\x0b\x32\x10.proto.Timestamp\x12*\n\x04memo\x18\r \x01(\x0b\x32\x1c.google.protobuf.StringValue\x12$\n\x10\x66\x65\x65_schedule_key\x18\x0e \x01(\x0b\x32\n.proto.Key\x12\x1d\n\tpause_key\x18\x0f \x01(\x0b\x32\n.proto.Key\x12-\n\x08metadata\x18\x10 \x01(\x0b\x32\x1b.google.protobuf.BytesValue\x12 \n\x0cmetadata_key\x18\x11 \x01(\x0b\x32\n.proto.Key\x12\x38\n\x15key_verification_mode\x18\x12 \x01(\x0e\x32\x19.proto.TokenKeyValidationB&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.token_update_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_TOKENUPDATETRANSACTIONBODY']._serialized_start=150 + _globals['_TOKENUPDATETRANSACTIONBODY']._serialized_end=796 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/token_update_pb2.pyi b/src/hiero_sdk_python/hapi/services/token_update_pb2.pyi new file mode 100644 index 000000000..4252aee17 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/token_update_pb2.pyi @@ -0,0 +1,50 @@ +from . import basic_types_pb2 as _basic_types_pb2 +from . import duration_pb2 as _duration_pb2 +from . import timestamp_pb2 as _timestamp_pb2 +from google.protobuf import wrappers_pb2 as _wrappers_pb2 +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class TokenUpdateTransactionBody(_message.Message): + __slots__ = ("token", "symbol", "name", "treasury", "adminKey", "kycKey", "freezeKey", "wipeKey", "supplyKey", "autoRenewAccount", "autoRenewPeriod", "expiry", "memo", "fee_schedule_key", "pause_key", "metadata", "metadata_key", "key_verification_mode") + TOKEN_FIELD_NUMBER: _ClassVar[int] + SYMBOL_FIELD_NUMBER: _ClassVar[int] + NAME_FIELD_NUMBER: _ClassVar[int] + TREASURY_FIELD_NUMBER: _ClassVar[int] + ADMINKEY_FIELD_NUMBER: _ClassVar[int] + KYCKEY_FIELD_NUMBER: _ClassVar[int] + FREEZEKEY_FIELD_NUMBER: _ClassVar[int] + WIPEKEY_FIELD_NUMBER: _ClassVar[int] + SUPPLYKEY_FIELD_NUMBER: _ClassVar[int] + AUTORENEWACCOUNT_FIELD_NUMBER: _ClassVar[int] + AUTORENEWPERIOD_FIELD_NUMBER: _ClassVar[int] + EXPIRY_FIELD_NUMBER: _ClassVar[int] + MEMO_FIELD_NUMBER: _ClassVar[int] + FEE_SCHEDULE_KEY_FIELD_NUMBER: _ClassVar[int] + PAUSE_KEY_FIELD_NUMBER: _ClassVar[int] + METADATA_FIELD_NUMBER: _ClassVar[int] + METADATA_KEY_FIELD_NUMBER: _ClassVar[int] + KEY_VERIFICATION_MODE_FIELD_NUMBER: _ClassVar[int] + token: _basic_types_pb2.TokenID + symbol: str + name: str + treasury: _basic_types_pb2.AccountID + adminKey: _basic_types_pb2.Key + kycKey: _basic_types_pb2.Key + freezeKey: _basic_types_pb2.Key + wipeKey: _basic_types_pb2.Key + supplyKey: _basic_types_pb2.Key + autoRenewAccount: _basic_types_pb2.AccountID + autoRenewPeriod: _duration_pb2.Duration + expiry: _timestamp_pb2.Timestamp + memo: _wrappers_pb2.StringValue + fee_schedule_key: _basic_types_pb2.Key + pause_key: _basic_types_pb2.Key + metadata: _wrappers_pb2.BytesValue + metadata_key: _basic_types_pb2.Key + key_verification_mode: _basic_types_pb2.TokenKeyValidation + def __init__(self, token: _Optional[_Union[_basic_types_pb2.TokenID, _Mapping]] = ..., symbol: _Optional[str] = ..., name: _Optional[str] = ..., treasury: _Optional[_Union[_basic_types_pb2.AccountID, _Mapping]] = ..., adminKey: _Optional[_Union[_basic_types_pb2.Key, _Mapping]] = ..., kycKey: _Optional[_Union[_basic_types_pb2.Key, _Mapping]] = ..., freezeKey: _Optional[_Union[_basic_types_pb2.Key, _Mapping]] = ..., wipeKey: _Optional[_Union[_basic_types_pb2.Key, _Mapping]] = ..., supplyKey: _Optional[_Union[_basic_types_pb2.Key, _Mapping]] = ..., autoRenewAccount: _Optional[_Union[_basic_types_pb2.AccountID, _Mapping]] = ..., autoRenewPeriod: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ..., expiry: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., memo: _Optional[_Union[_wrappers_pb2.StringValue, _Mapping]] = ..., fee_schedule_key: _Optional[_Union[_basic_types_pb2.Key, _Mapping]] = ..., pause_key: _Optional[_Union[_basic_types_pb2.Key, _Mapping]] = ..., metadata: _Optional[_Union[_wrappers_pb2.BytesValue, _Mapping]] = ..., metadata_key: _Optional[_Union[_basic_types_pb2.Key, _Mapping]] = ..., key_verification_mode: _Optional[_Union[_basic_types_pb2.TokenKeyValidation, str]] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/token_update_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/token_update_pb2_grpc.py new file mode 100644 index 000000000..8af32fed6 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/token_update_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/token_update_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/token_wipe_account_pb2.py b/src/hiero_sdk_python/hapi/services/token_wipe_account_pb2.py new file mode 100644 index 000000000..22d79cd97 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/token_wipe_account_pb2.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/token_wipe_account.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/token_wipe_account.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import basic_types_pb2 as services_dot_basic__types__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!services/token_wipe_account.proto\x12\x05proto\x1a\x1aservices/basic_types.proto\"\x8a\x01\n\x1fTokenWipeAccountTransactionBody\x12\x1d\n\x05token\x18\x01 \x01(\x0b\x32\x0e.proto.TokenID\x12!\n\x07\x61\x63\x63ount\x18\x02 \x01(\x0b\x32\x10.proto.AccountID\x12\x0e\n\x06\x61mount\x18\x03 \x01(\x04\x12\x15\n\rserialNumbers\x18\x04 \x03(\x03\x42&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.token_wipe_account_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_TOKENWIPEACCOUNTTRANSACTIONBODY']._serialized_start=73 + _globals['_TOKENWIPEACCOUNTTRANSACTIONBODY']._serialized_end=211 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/token_wipe_account_pb2.pyi b/src/hiero_sdk_python/hapi/services/token_wipe_account_pb2.pyi new file mode 100644 index 000000000..460cbb3c9 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/token_wipe_account_pb2.pyi @@ -0,0 +1,20 @@ +from . import basic_types_pb2 as _basic_types_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Iterable as _Iterable, Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class TokenWipeAccountTransactionBody(_message.Message): + __slots__ = ("token", "account", "amount", "serialNumbers") + TOKEN_FIELD_NUMBER: _ClassVar[int] + ACCOUNT_FIELD_NUMBER: _ClassVar[int] + AMOUNT_FIELD_NUMBER: _ClassVar[int] + SERIALNUMBERS_FIELD_NUMBER: _ClassVar[int] + token: _basic_types_pb2.TokenID + account: _basic_types_pb2.AccountID + amount: int + serialNumbers: _containers.RepeatedScalarFieldContainer[int] + def __init__(self, token: _Optional[_Union[_basic_types_pb2.TokenID, _Mapping]] = ..., account: _Optional[_Union[_basic_types_pb2.AccountID, _Mapping]] = ..., amount: _Optional[int] = ..., serialNumbers: _Optional[_Iterable[int]] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/token_wipe_account_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/token_wipe_account_pb2_grpc.py new file mode 100644 index 000000000..e5a8ee4c3 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/token_wipe_account_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/token_wipe_account_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/transaction_contents_pb2.py b/src/hiero_sdk_python/hapi/services/transaction_contents_pb2.py new file mode 100644 index 000000000..afb5dd4b9 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/transaction_contents_pb2.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/transaction_contents.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/transaction_contents.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import basic_types_pb2 as services_dot_basic__types__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n#services/transaction_contents.proto\x12\x05proto\x1a\x1aservices/basic_types.proto\"}\n\x11SignedTransaction\x12\x11\n\tbodyBytes\x18\x01 \x01(\x0c\x12#\n\x06sigMap\x18\x02 \x01(\x0b\x32\x13.proto.SignatureMap\x12\x30\n(use_serialized_tx_message_hash_algorithm\x18\x03 \x01(\x08\x42&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.transaction_contents_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_SIGNEDTRANSACTION']._serialized_start=74 + _globals['_SIGNEDTRANSACTION']._serialized_end=199 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/transaction_contents_pb2.pyi b/src/hiero_sdk_python/hapi/services/transaction_contents_pb2.pyi new file mode 100644 index 000000000..243e88428 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/transaction_contents_pb2.pyi @@ -0,0 +1,17 @@ +from . import basic_types_pb2 as _basic_types_pb2 +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class SignedTransaction(_message.Message): + __slots__ = ("bodyBytes", "sigMap", "use_serialized_tx_message_hash_algorithm") + BODYBYTES_FIELD_NUMBER: _ClassVar[int] + SIGMAP_FIELD_NUMBER: _ClassVar[int] + USE_SERIALIZED_TX_MESSAGE_HASH_ALGORITHM_FIELD_NUMBER: _ClassVar[int] + bodyBytes: bytes + sigMap: _basic_types_pb2.SignatureMap + use_serialized_tx_message_hash_algorithm: bool + def __init__(self, bodyBytes: _Optional[bytes] = ..., sigMap: _Optional[_Union[_basic_types_pb2.SignatureMap, _Mapping]] = ..., use_serialized_tx_message_hash_algorithm: bool = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/transaction_contents_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/transaction_contents_pb2_grpc.py new file mode 100644 index 000000000..45ffe18d4 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/transaction_contents_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/transaction_contents_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/transaction_get_fast_record_pb2.py b/src/hiero_sdk_python/hapi/services/transaction_get_fast_record_pb2.py new file mode 100644 index 000000000..aaada7d40 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/transaction_get_fast_record_pb2.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/transaction_get_fast_record.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/transaction_get_fast_record.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import transaction_record_pb2 as services_dot_transaction__record__pb2 +from . import basic_types_pb2 as services_dot_basic__types__pb2 +from . import query_header_pb2 as services_dot_query__header__pb2 +from . import response_header_pb2 as services_dot_response__header__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n*services/transaction_get_fast_record.proto\x12\x05proto\x1a!services/transaction_record.proto\x1a\x1aservices/basic_types.proto\x1a\x1bservices/query_header.proto\x1a\x1eservices/response_header.proto\"t\n\x1dTransactionGetFastRecordQuery\x12\"\n\x06header\x18\x01 \x01(\x0b\x32\x12.proto.QueryHeader\x12+\n\rtransactionID\x18\x02 \x01(\x0b\x32\x14.proto.TransactionID:\x02\x18\x01\"\x82\x01\n TransactionGetFastRecordResponse\x12%\n\x06header\x18\x01 \x01(\x0b\x32\x15.proto.ResponseHeader\x12\x33\n\x11transactionRecord\x18\x02 \x01(\x0b\x32\x18.proto.TransactionRecord:\x02\x18\x01\x42&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.transaction_get_fast_record_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_TRANSACTIONGETFASTRECORDQUERY']._loaded_options = None + _globals['_TRANSACTIONGETFASTRECORDQUERY']._serialized_options = b'\030\001' + _globals['_TRANSACTIONGETFASTRECORDRESPONSE']._loaded_options = None + _globals['_TRANSACTIONGETFASTRECORDRESPONSE']._serialized_options = b'\030\001' + _globals['_TRANSACTIONGETFASTRECORDQUERY']._serialized_start=177 + _globals['_TRANSACTIONGETFASTRECORDQUERY']._serialized_end=293 + _globals['_TRANSACTIONGETFASTRECORDRESPONSE']._serialized_start=296 + _globals['_TRANSACTIONGETFASTRECORDRESPONSE']._serialized_end=426 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/transaction_get_fast_record_pb2.pyi b/src/hiero_sdk_python/hapi/services/transaction_get_fast_record_pb2.pyi new file mode 100644 index 000000000..89084af7b --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/transaction_get_fast_record_pb2.pyi @@ -0,0 +1,26 @@ +from . import transaction_record_pb2 as _transaction_record_pb2 +from . import basic_types_pb2 as _basic_types_pb2 +from . import query_header_pb2 as _query_header_pb2 +from . import response_header_pb2 as _response_header_pb2 +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class TransactionGetFastRecordQuery(_message.Message): + __slots__ = ("header", "transactionID") + HEADER_FIELD_NUMBER: _ClassVar[int] + TRANSACTIONID_FIELD_NUMBER: _ClassVar[int] + header: _query_header_pb2.QueryHeader + transactionID: _basic_types_pb2.TransactionID + def __init__(self, header: _Optional[_Union[_query_header_pb2.QueryHeader, _Mapping]] = ..., transactionID: _Optional[_Union[_basic_types_pb2.TransactionID, _Mapping]] = ...) -> None: ... + +class TransactionGetFastRecordResponse(_message.Message): + __slots__ = ("header", "transactionRecord") + HEADER_FIELD_NUMBER: _ClassVar[int] + TRANSACTIONRECORD_FIELD_NUMBER: _ClassVar[int] + header: _response_header_pb2.ResponseHeader + transactionRecord: _transaction_record_pb2.TransactionRecord + def __init__(self, header: _Optional[_Union[_response_header_pb2.ResponseHeader, _Mapping]] = ..., transactionRecord: _Optional[_Union[_transaction_record_pb2.TransactionRecord, _Mapping]] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/transaction_get_fast_record_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/transaction_get_fast_record_pb2_grpc.py new file mode 100644 index 000000000..0874c7633 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/transaction_get_fast_record_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/transaction_get_fast_record_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/transaction_get_receipt_pb2.py b/src/hiero_sdk_python/hapi/services/transaction_get_receipt_pb2.py new file mode 100644 index 000000000..f68755548 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/transaction_get_receipt_pb2.py @@ -0,0 +1,39 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/transaction_get_receipt.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/transaction_get_receipt.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import transaction_receipt_pb2 as services_dot_transaction__receipt__pb2 +from . import basic_types_pb2 as services_dot_basic__types__pb2 +from . import query_header_pb2 as services_dot_query__header__pb2 +from . import response_header_pb2 as services_dot_response__header__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n&services/transaction_get_receipt.proto\x12\x05proto\x1a\"services/transaction_receipt.proto\x1a\x1aservices/basic_types.proto\x1a\x1bservices/query_header.proto\x1a\x1eservices/response_header.proto\"\xa8\x01\n\x1aTransactionGetReceiptQuery\x12\"\n\x06header\x18\x01 \x01(\x0b\x32\x12.proto.QueryHeader\x12+\n\rtransactionID\x18\x02 \x01(\x0b\x32\x14.proto.TransactionID\x12\x19\n\x11includeDuplicates\x18\x03 \x01(\x08\x12\x1e\n\x16include_child_receipts\x18\x04 \x01(\x08\"\xf2\x01\n\x1dTransactionGetReceiptResponse\x12%\n\x06header\x18\x01 \x01(\x0b\x32\x15.proto.ResponseHeader\x12*\n\x07receipt\x18\x02 \x01(\x0b\x32\x19.proto.TransactionReceipt\x12?\n\x1c\x64uplicateTransactionReceipts\x18\x04 \x03(\x0b\x32\x19.proto.TransactionReceipt\x12=\n\x1a\x63hild_transaction_receipts\x18\x05 \x03(\x0b\x32\x19.proto.TransactionReceiptB&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.transaction_get_receipt_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_TRANSACTIONGETRECEIPTQUERY']._serialized_start=175 + _globals['_TRANSACTIONGETRECEIPTQUERY']._serialized_end=343 + _globals['_TRANSACTIONGETRECEIPTRESPONSE']._serialized_start=346 + _globals['_TRANSACTIONGETRECEIPTRESPONSE']._serialized_end=588 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/transaction_get_receipt_pb2.pyi b/src/hiero_sdk_python/hapi/services/transaction_get_receipt_pb2.pyi new file mode 100644 index 000000000..735ad0437 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/transaction_get_receipt_pb2.pyi @@ -0,0 +1,35 @@ +from . import transaction_receipt_pb2 as _transaction_receipt_pb2 +from . import basic_types_pb2 as _basic_types_pb2 +from . import query_header_pb2 as _query_header_pb2 +from . import response_header_pb2 as _response_header_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Iterable as _Iterable, Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class TransactionGetReceiptQuery(_message.Message): + __slots__ = ("header", "transactionID", "includeDuplicates", "include_child_receipts") + HEADER_FIELD_NUMBER: _ClassVar[int] + TRANSACTIONID_FIELD_NUMBER: _ClassVar[int] + INCLUDEDUPLICATES_FIELD_NUMBER: _ClassVar[int] + INCLUDE_CHILD_RECEIPTS_FIELD_NUMBER: _ClassVar[int] + header: _query_header_pb2.QueryHeader + transactionID: _basic_types_pb2.TransactionID + includeDuplicates: bool + include_child_receipts: bool + def __init__(self, header: _Optional[_Union[_query_header_pb2.QueryHeader, _Mapping]] = ..., transactionID: _Optional[_Union[_basic_types_pb2.TransactionID, _Mapping]] = ..., includeDuplicates: bool = ..., include_child_receipts: bool = ...) -> None: ... + +class TransactionGetReceiptResponse(_message.Message): + __slots__ = ("header", "receipt", "duplicateTransactionReceipts", "child_transaction_receipts") + HEADER_FIELD_NUMBER: _ClassVar[int] + RECEIPT_FIELD_NUMBER: _ClassVar[int] + DUPLICATETRANSACTIONRECEIPTS_FIELD_NUMBER: _ClassVar[int] + CHILD_TRANSACTION_RECEIPTS_FIELD_NUMBER: _ClassVar[int] + header: _response_header_pb2.ResponseHeader + receipt: _transaction_receipt_pb2.TransactionReceipt + duplicateTransactionReceipts: _containers.RepeatedCompositeFieldContainer[_transaction_receipt_pb2.TransactionReceipt] + child_transaction_receipts: _containers.RepeatedCompositeFieldContainer[_transaction_receipt_pb2.TransactionReceipt] + def __init__(self, header: _Optional[_Union[_response_header_pb2.ResponseHeader, _Mapping]] = ..., receipt: _Optional[_Union[_transaction_receipt_pb2.TransactionReceipt, _Mapping]] = ..., duplicateTransactionReceipts: _Optional[_Iterable[_Union[_transaction_receipt_pb2.TransactionReceipt, _Mapping]]] = ..., child_transaction_receipts: _Optional[_Iterable[_Union[_transaction_receipt_pb2.TransactionReceipt, _Mapping]]] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/transaction_get_receipt_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/transaction_get_receipt_pb2_grpc.py new file mode 100644 index 000000000..634c6e7ef --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/transaction_get_receipt_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/transaction_get_receipt_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/transaction_get_record_pb2.py b/src/hiero_sdk_python/hapi/services/transaction_get_record_pb2.py new file mode 100644 index 000000000..b7949b602 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/transaction_get_record_pb2.py @@ -0,0 +1,39 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/transaction_get_record.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/transaction_get_record.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import transaction_record_pb2 as services_dot_transaction__record__pb2 +from . import basic_types_pb2 as services_dot_basic__types__pb2 +from . import query_header_pb2 as services_dot_query__header__pb2 +from . import response_header_pb2 as services_dot_response__header__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n%services/transaction_get_record.proto\x12\x05proto\x1a!services/transaction_record.proto\x1a\x1aservices/basic_types.proto\x1a\x1bservices/query_header.proto\x1a\x1eservices/response_header.proto\"\xa6\x01\n\x19TransactionGetRecordQuery\x12\"\n\x06header\x18\x01 \x01(\x0b\x32\x12.proto.QueryHeader\x12+\n\rtransactionID\x18\x02 \x01(\x0b\x32\x14.proto.TransactionID\x12\x19\n\x11includeDuplicates\x18\x03 \x01(\x08\x12\x1d\n\x15include_child_records\x18\x04 \x01(\x08\"\xf6\x01\n\x1cTransactionGetRecordResponse\x12%\n\x06header\x18\x01 \x01(\x0b\x32\x15.proto.ResponseHeader\x12\x33\n\x11transactionRecord\x18\x03 \x01(\x0b\x32\x18.proto.TransactionRecord\x12=\n\x1b\x64uplicateTransactionRecords\x18\x04 \x03(\x0b\x32\x18.proto.TransactionRecord\x12;\n\x19\x63hild_transaction_records\x18\x05 \x03(\x0b\x32\x18.proto.TransactionRecordB&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.transaction_get_record_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_TRANSACTIONGETRECORDQUERY']._serialized_start=173 + _globals['_TRANSACTIONGETRECORDQUERY']._serialized_end=339 + _globals['_TRANSACTIONGETRECORDRESPONSE']._serialized_start=342 + _globals['_TRANSACTIONGETRECORDRESPONSE']._serialized_end=588 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/transaction_get_record_pb2.pyi b/src/hiero_sdk_python/hapi/services/transaction_get_record_pb2.pyi new file mode 100644 index 000000000..052bf565d --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/transaction_get_record_pb2.pyi @@ -0,0 +1,35 @@ +from . import transaction_record_pb2 as _transaction_record_pb2 +from . import basic_types_pb2 as _basic_types_pb2 +from . import query_header_pb2 as _query_header_pb2 +from . import response_header_pb2 as _response_header_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Iterable as _Iterable, Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class TransactionGetRecordQuery(_message.Message): + __slots__ = ("header", "transactionID", "includeDuplicates", "include_child_records") + HEADER_FIELD_NUMBER: _ClassVar[int] + TRANSACTIONID_FIELD_NUMBER: _ClassVar[int] + INCLUDEDUPLICATES_FIELD_NUMBER: _ClassVar[int] + INCLUDE_CHILD_RECORDS_FIELD_NUMBER: _ClassVar[int] + header: _query_header_pb2.QueryHeader + transactionID: _basic_types_pb2.TransactionID + includeDuplicates: bool + include_child_records: bool + def __init__(self, header: _Optional[_Union[_query_header_pb2.QueryHeader, _Mapping]] = ..., transactionID: _Optional[_Union[_basic_types_pb2.TransactionID, _Mapping]] = ..., includeDuplicates: bool = ..., include_child_records: bool = ...) -> None: ... + +class TransactionGetRecordResponse(_message.Message): + __slots__ = ("header", "transactionRecord", "duplicateTransactionRecords", "child_transaction_records") + HEADER_FIELD_NUMBER: _ClassVar[int] + TRANSACTIONRECORD_FIELD_NUMBER: _ClassVar[int] + DUPLICATETRANSACTIONRECORDS_FIELD_NUMBER: _ClassVar[int] + CHILD_TRANSACTION_RECORDS_FIELD_NUMBER: _ClassVar[int] + header: _response_header_pb2.ResponseHeader + transactionRecord: _transaction_record_pb2.TransactionRecord + duplicateTransactionRecords: _containers.RepeatedCompositeFieldContainer[_transaction_record_pb2.TransactionRecord] + child_transaction_records: _containers.RepeatedCompositeFieldContainer[_transaction_record_pb2.TransactionRecord] + def __init__(self, header: _Optional[_Union[_response_header_pb2.ResponseHeader, _Mapping]] = ..., transactionRecord: _Optional[_Union[_transaction_record_pb2.TransactionRecord, _Mapping]] = ..., duplicateTransactionRecords: _Optional[_Iterable[_Union[_transaction_record_pb2.TransactionRecord, _Mapping]]] = ..., child_transaction_records: _Optional[_Iterable[_Union[_transaction_record_pb2.TransactionRecord, _Mapping]]] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/transaction_get_record_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/transaction_get_record_pb2_grpc.py new file mode 100644 index 000000000..356c1b021 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/transaction_get_record_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/transaction_get_record_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/transaction_pb2.py b/src/hiero_sdk_python/hapi/services/transaction_pb2.py new file mode 100644 index 000000000..7e0a40c09 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/transaction_pb2.py @@ -0,0 +1,117 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/transaction.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/transaction.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import basic_types_pb2 as services_dot_basic__types__pb2 +from . import system_delete_pb2 as services_dot_system__delete__pb2 +from . import system_undelete_pb2 as services_dot_system__undelete__pb2 +from . import freeze_pb2 as services_dot_freeze__pb2 +from . import contract_call_pb2 as services_dot_contract__call__pb2 +from . import contract_create_pb2 as services_dot_contract__create__pb2 +from . import contract_update_pb2 as services_dot_contract__update__pb2 +from . import crypto_add_live_hash_pb2 as services_dot_crypto__add__live__hash__pb2 +from . import crypto_create_pb2 as services_dot_crypto__create__pb2 +from . import crypto_delete_pb2 as services_dot_crypto__delete__pb2 +from . import crypto_delete_live_hash_pb2 as services_dot_crypto__delete__live__hash__pb2 +from . import crypto_transfer_pb2 as services_dot_crypto__transfer__pb2 +from . import crypto_update_pb2 as services_dot_crypto__update__pb2 +from . import crypto_approve_allowance_pb2 as services_dot_crypto__approve__allowance__pb2 +from . import crypto_delete_allowance_pb2 as services_dot_crypto__delete__allowance__pb2 +from . import ethereum_transaction_pb2 as services_dot_ethereum__transaction__pb2 +from . import file_append_pb2 as services_dot_file__append__pb2 +from . import file_create_pb2 as services_dot_file__create__pb2 +from . import file_delete_pb2 as services_dot_file__delete__pb2 +from . import file_update_pb2 as services_dot_file__update__pb2 +from . import duration_pb2 as services_dot_duration__pb2 +from . import contract_delete_pb2 as services_dot_contract__delete__pb2 +from . import consensus_create_topic_pb2 as services_dot_consensus__create__topic__pb2 +from . import consensus_update_topic_pb2 as services_dot_consensus__update__topic__pb2 +from . import consensus_delete_topic_pb2 as services_dot_consensus__delete__topic__pb2 +from . import consensus_submit_message_pb2 as services_dot_consensus__submit__message__pb2 +from . import unchecked_submit_pb2 as services_dot_unchecked__submit__pb2 +from . import token_create_pb2 as services_dot_token__create__pb2 +from . import token_freeze_account_pb2 as services_dot_token__freeze__account__pb2 +from . import token_unfreeze_account_pb2 as services_dot_token__unfreeze__account__pb2 +from . import token_grant_kyc_pb2 as services_dot_token__grant__kyc__pb2 +from . import token_revoke_kyc_pb2 as services_dot_token__revoke__kyc__pb2 +from . import token_delete_pb2 as services_dot_token__delete__pb2 +from . import token_update_pb2 as services_dot_token__update__pb2 +from . import token_mint_pb2 as services_dot_token__mint__pb2 +from . import token_burn_pb2 as services_dot_token__burn__pb2 +from . import token_wipe_account_pb2 as services_dot_token__wipe__account__pb2 +from . import token_associate_pb2 as services_dot_token__associate__pb2 +from . import token_dissociate_pb2 as services_dot_token__dissociate__pb2 +from . import token_fee_schedule_update_pb2 as services_dot_token__fee__schedule__update__pb2 +from . import token_pause_pb2 as services_dot_token__pause__pb2 +from . import token_unpause_pb2 as services_dot_token__unpause__pb2 +from . import token_update_nfts_pb2 as services_dot_token__update__nfts__pb2 +from . import token_reject_pb2 as services_dot_token__reject__pb2 +from . import token_airdrop_pb2 as services_dot_token__airdrop__pb2 +from . import token_cancel_airdrop_pb2 as services_dot_token__cancel__airdrop__pb2 +from . import token_claim_airdrop_pb2 as services_dot_token__claim__airdrop__pb2 +from . import schedule_create_pb2 as services_dot_schedule__create__pb2 +from . import schedule_delete_pb2 as services_dot_schedule__delete__pb2 +from . import schedule_sign_pb2 as services_dot_schedule__sign__pb2 +from . import node_stake_update_pb2 as services_dot_node__stake__update__pb2 +from . import util_prng_pb2 as services_dot_util__prng__pb2 +from . import node_create_pb2 as services_dot_node__create__pb2 +from . import node_update_pb2 as services_dot_node__update__pb2 +from . import node_delete_pb2 as services_dot_node__delete__pb2 +from . import custom_fees_pb2 as services_dot_custom__fees__pb2 +from ..platform.event import state_signature_transaction_pb2 as platform_dot_event_dot_state__signature__transaction__pb2 +from .auxiliary.hints import hints_key_publication_pb2 as services_dot_auxiliary_dot_hints_dot_hints__key__publication__pb2 +from .auxiliary.hints import hints_preprocessing_vote_pb2 as services_dot_auxiliary_dot_hints_dot_hints__preprocessing__vote__pb2 +from .auxiliary.hints import hints_partial_signature_pb2 as services_dot_auxiliary_dot_hints_dot_hints__partial__signature__pb2 +from .auxiliary.hints import crs_publication_pb2 as services_dot_auxiliary_dot_hints_dot_crs__publication__pb2 +from .auxiliary.history import history_proof_signature_pb2 as services_dot_auxiliary_dot_history_dot_history__proof__signature__pb2 +from .auxiliary.history import history_proof_key_publication_pb2 as services_dot_auxiliary_dot_history_dot_history__proof__key__publication__pb2 +from .auxiliary.history import history_proof_vote_pb2 as services_dot_auxiliary_dot_history_dot_history__proof__vote__pb2 +from . import lambda_sstore_pb2 as services_dot_lambda__sstore__pb2 +from . import hook_dispatch_pb2 as services_dot_hook__dispatch__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1aservices/transaction.proto\x12\x05proto\x1a\x1aservices/basic_types.proto\x1a\x1cservices/system_delete.proto\x1a\x1eservices/system_undelete.proto\x1a\x15services/freeze.proto\x1a\x1cservices/contract_call.proto\x1a\x1eservices/contract_create.proto\x1a\x1eservices/contract_update.proto\x1a#services/crypto_add_live_hash.proto\x1a\x1cservices/crypto_create.proto\x1a\x1cservices/crypto_delete.proto\x1a&services/crypto_delete_live_hash.proto\x1a\x1eservices/crypto_transfer.proto\x1a\x1cservices/crypto_update.proto\x1a\'services/crypto_approve_allowance.proto\x1a&services/crypto_delete_allowance.proto\x1a#services/ethereum_transaction.proto\x1a\x1aservices/file_append.proto\x1a\x1aservices/file_create.proto\x1a\x1aservices/file_delete.proto\x1a\x1aservices/file_update.proto\x1a\x17services/duration.proto\x1a\x1eservices/contract_delete.proto\x1a%services/consensus_create_topic.proto\x1a%services/consensus_update_topic.proto\x1a%services/consensus_delete_topic.proto\x1a\'services/consensus_submit_message.proto\x1a\x1fservices/unchecked_submit.proto\x1a\x1bservices/token_create.proto\x1a#services/token_freeze_account.proto\x1a%services/token_unfreeze_account.proto\x1a\x1eservices/token_grant_kyc.proto\x1a\x1fservices/token_revoke_kyc.proto\x1a\x1bservices/token_delete.proto\x1a\x1bservices/token_update.proto\x1a\x19services/token_mint.proto\x1a\x19services/token_burn.proto\x1a!services/token_wipe_account.proto\x1a\x1eservices/token_associate.proto\x1a\x1fservices/token_dissociate.proto\x1a(services/token_fee_schedule_update.proto\x1a\x1aservices/token_pause.proto\x1a\x1cservices/token_unpause.proto\x1a services/token_update_nfts.proto\x1a\x1bservices/token_reject.proto\x1a\x1cservices/token_airdrop.proto\x1a#services/token_cancel_airdrop.proto\x1a\"services/token_claim_airdrop.proto\x1a\x1eservices/schedule_create.proto\x1a\x1eservices/schedule_delete.proto\x1a\x1cservices/schedule_sign.proto\x1a services/node_stake_update.proto\x1a\x18services/util_prng.proto\x1a\x1aservices/node_create.proto\x1a\x1aservices/node_update.proto\x1a\x1aservices/node_delete.proto\x1a\x1aservices/custom_fees.proto\x1a\x30platform/event/state_signature_transaction.proto\x1a\x34services/auxiliary/hints/hints_key_publication.proto\x1a\x37services/auxiliary/hints/hints_preprocessing_vote.proto\x1a\x36services/auxiliary/hints/hints_partial_signature.proto\x1a.services/auxiliary/hints/crs_publication.proto\x1a\x38services/auxiliary/history/history_proof_signature.proto\x1a>services/auxiliary/history/history_proof_key_publication.proto\x1a\x33services/auxiliary/history/history_proof_vote.proto\x1a\x1cservices/lambda_sstore.proto\x1a\x1cservices/hook_dispatch.proto\"\xbf\x01\n\x0bTransaction\x12(\n\x04\x62ody\x18\x01 \x01(\x0b\x32\x16.proto.TransactionBodyB\x02\x18\x01\x12&\n\x04sigs\x18\x02 \x01(\x0b\x32\x14.proto.SignatureListB\x02\x18\x01\x12\'\n\x06sigMap\x18\x03 \x01(\x0b\x32\x13.proto.SignatureMapB\x02\x18\x01\x12\x15\n\tbodyBytes\x18\x04 \x01(\x0c\x42\x02\x18\x01\x12\x1e\n\x16signedTransactionBytes\x18\x05 \x01(\x0c\"\x8c\'\n\x0fTransactionBody\x12+\n\rtransactionID\x18\x01 \x01(\x0b\x32\x14.proto.TransactionID\x12\'\n\rnodeAccountID\x18\x02 \x01(\x0b\x32\x10.proto.AccountID\x12\x16\n\x0etransactionFee\x18\x03 \x01(\x04\x12\x31\n\x18transactionValidDuration\x18\x04 \x01(\x0b\x32\x0f.proto.Duration\x12\x1a\n\x0egenerateRecord\x18\x05 \x01(\x08\x42\x02\x18\x01\x12\x0c\n\x04memo\x18\x06 \x01(\t\x12\x1d\n\tbatch_key\x18I \x01(\x0b\x32\n.proto.Key\x12:\n\x0c\x63ontractCall\x18\x07 \x01(\x0b\x32\".proto.ContractCallTransactionBodyH\x00\x12\x46\n\x16\x63ontractCreateInstance\x18\x08 \x01(\x0b\x32$.proto.ContractCreateTransactionBodyH\x00\x12\x46\n\x16\x63ontractUpdateInstance\x18\t \x01(\x0b\x32$.proto.ContractUpdateTransactionBodyH\x00\x12H\n\x11\x63ryptoAddLiveHash\x18\n \x01(\x0b\x32\'.proto.CryptoAddLiveHashTransactionBodyB\x02\x18\x01H\x00\x12\x41\n\x13\x63ryptoCreateAccount\x18\x0b \x01(\x0b\x32\".proto.CryptoCreateTransactionBodyH\x00\x12:\n\x0c\x63ryptoDelete\x18\x0c \x01(\x0b\x32\".proto.CryptoDeleteTransactionBodyH\x00\x12N\n\x14\x63ryptoDeleteLiveHash\x18\r \x01(\x0b\x32*.proto.CryptoDeleteLiveHashTransactionBodyB\x02\x18\x01H\x00\x12>\n\x0e\x63ryptoTransfer\x18\x0e \x01(\x0b\x32$.proto.CryptoTransferTransactionBodyH\x00\x12\x41\n\x13\x63ryptoUpdateAccount\x18\x0f \x01(\x0b\x32\".proto.CryptoUpdateTransactionBodyH\x00\x12\x36\n\nfileAppend\x18\x10 \x01(\x0b\x32 .proto.FileAppendTransactionBodyH\x00\x12\x36\n\nfileCreate\x18\x11 \x01(\x0b\x32 .proto.FileCreateTransactionBodyH\x00\x12\x36\n\nfileDelete\x18\x12 \x01(\x0b\x32 .proto.FileDeleteTransactionBodyH\x00\x12\x36\n\nfileUpdate\x18\x13 \x01(\x0b\x32 .proto.FileUpdateTransactionBodyH\x00\x12:\n\x0csystemDelete\x18\x14 \x01(\x0b\x32\".proto.SystemDeleteTransactionBodyH\x00\x12>\n\x0esystemUndelete\x18\x15 \x01(\x0b\x32$.proto.SystemUndeleteTransactionBodyH\x00\x12\x46\n\x16\x63ontractDeleteInstance\x18\x16 \x01(\x0b\x32$.proto.ContractDeleteTransactionBodyH\x00\x12.\n\x06\x66reeze\x18\x17 \x01(\x0b\x32\x1c.proto.FreezeTransactionBodyH\x00\x12J\n\x14\x63onsensusCreateTopic\x18\x18 \x01(\x0b\x32*.proto.ConsensusCreateTopicTransactionBodyH\x00\x12J\n\x14\x63onsensusUpdateTopic\x18\x19 \x01(\x0b\x32*.proto.ConsensusUpdateTopicTransactionBodyH\x00\x12J\n\x14\x63onsensusDeleteTopic\x18\x1a \x01(\x0b\x32*.proto.ConsensusDeleteTopicTransactionBodyH\x00\x12N\n\x16\x63onsensusSubmitMessage\x18\x1b \x01(\x0b\x32,.proto.ConsensusSubmitMessageTransactionBodyH\x00\x12\x35\n\x0funcheckedSubmit\x18\x1c \x01(\x0b\x32\x1a.proto.UncheckedSubmitBodyH\x00\x12:\n\rtokenCreation\x18\x1d \x01(\x0b\x32!.proto.TokenCreateTransactionBodyH\x00\x12?\n\x0btokenFreeze\x18\x1f \x01(\x0b\x32(.proto.TokenFreezeAccountTransactionBodyH\x00\x12\x43\n\rtokenUnfreeze\x18 \x01(\x0b\x32*.proto.TokenUnfreezeAccountTransactionBodyH\x00\x12<\n\rtokenGrantKyc\x18! \x01(\x0b\x32#.proto.TokenGrantKycTransactionBodyH\x00\x12>\n\x0etokenRevokeKyc\x18\" \x01(\x0b\x32$.proto.TokenRevokeKycTransactionBodyH\x00\x12:\n\rtokenDeletion\x18# \x01(\x0b\x32!.proto.TokenDeleteTransactionBodyH\x00\x12\x38\n\x0btokenUpdate\x18$ \x01(\x0b\x32!.proto.TokenUpdateTransactionBodyH\x00\x12\x34\n\ttokenMint\x18% \x01(\x0b\x32\x1f.proto.TokenMintTransactionBodyH\x00\x12\x34\n\ttokenBurn\x18& \x01(\x0b\x32\x1f.proto.TokenBurnTransactionBodyH\x00\x12;\n\ttokenWipe\x18\' \x01(\x0b\x32&.proto.TokenWipeAccountTransactionBodyH\x00\x12>\n\x0etokenAssociate\x18( \x01(\x0b\x32$.proto.TokenAssociateTransactionBodyH\x00\x12@\n\x0ftokenDissociate\x18) \x01(\x0b\x32%.proto.TokenDissociateTransactionBodyH\x00\x12>\n\x0escheduleCreate\x18* \x01(\x0b\x32$.proto.ScheduleCreateTransactionBodyH\x00\x12>\n\x0escheduleDelete\x18+ \x01(\x0b\x32$.proto.ScheduleDeleteTransactionBodyH\x00\x12:\n\x0cscheduleSign\x18, \x01(\x0b\x32\".proto.ScheduleSignTransactionBodyH\x00\x12Q\n\x19token_fee_schedule_update\x18- \x01(\x0b\x32,.proto.TokenFeeScheduleUpdateTransactionBodyH\x00\x12\x37\n\x0btoken_pause\x18. \x01(\x0b\x32 .proto.TokenPauseTransactionBodyH\x00\x12;\n\rtoken_unpause\x18/ \x01(\x0b\x32\".proto.TokenUnpauseTransactionBodyH\x00\x12N\n\x16\x63ryptoApproveAllowance\x18\x30 \x01(\x0b\x32,.proto.CryptoApproveAllowanceTransactionBodyH\x00\x12L\n\x15\x63ryptoDeleteAllowance\x18\x31 \x01(\x0b\x32+.proto.CryptoDeleteAllowanceTransactionBodyH\x00\x12=\n\x13\x65thereumTransaction\x18\x32 \x01(\x0b\x32\x1e.proto.EthereumTransactionBodyH\x00\x12\x42\n\x11node_stake_update\x18\x33 \x01(\x0b\x32%.proto.NodeStakeUpdateTransactionBodyH\x00\x12\x33\n\tutil_prng\x18\x34 \x01(\x0b\x32\x1e.proto.UtilPrngTransactionBodyH\x00\x12\x42\n\x11token_update_nfts\x18\x35 \x01(\x0b\x32%.proto.TokenUpdateNftsTransactionBodyH\x00\x12Q\n\nnodeCreate\x18\x36 \x01(\x0b\x32;.com.hedera.hapi.node.addressbook.NodeCreateTransactionBodyH\x00\x12Q\n\nnodeUpdate\x18\x37 \x01(\x0b\x32;.com.hedera.hapi.node.addressbook.NodeUpdateTransactionBodyH\x00\x12Q\n\nnodeDelete\x18\x38 \x01(\x0b\x32;.com.hedera.hapi.node.addressbook.NodeDeleteTransactionBodyH\x00\x12\x38\n\x0btokenReject\x18\x39 \x01(\x0b\x32!.proto.TokenRejectTransactionBodyH\x00\x12:\n\x0ctokenAirdrop\x18: \x01(\x0b\x32\".proto.TokenAirdropTransactionBodyH\x00\x12\x46\n\x12tokenCancelAirdrop\x18; \x01(\x0b\x32(.proto.TokenCancelAirdropTransactionBodyH\x00\x12\x44\n\x11tokenClaimAirdrop\x18< \x01(\x0b\x32\'.proto.TokenClaimAirdropTransactionBodyH\x00\x12`\n\x1bstate_signature_transaction\x18\x41 \x01(\x0b\x32\x39.com.hedera.hapi.platform.event.StateSignatureTransactionH\x00\x12s\n\x18hints_preprocessing_vote\x18\x42 \x01(\x0b\x32O.com.hedera.hapi.services.auxiliary.hints.HintsPreprocessingVoteTransactionBodyH\x00\x12m\n\x15hints_key_publication\x18\x43 \x01(\x0b\x32L.com.hedera.hapi.services.auxiliary.hints.HintsKeyPublicationTransactionBodyH\x00\x12q\n\x17hints_partial_signature\x18\x44 \x01(\x0b\x32N.com.hedera.hapi.services.auxiliary.hints.HintsPartialSignatureTransactionBodyH\x00\x12s\n\x17history_proof_signature\x18\x45 \x01(\x0b\x32P.com.hedera.hapi.services.auxiliary.history.HistoryProofSignatureTransactionBodyH\x00\x12~\n\x1dhistory_proof_key_publication\x18\x46 \x01(\x0b\x32U.com.hedera.hapi.services.auxiliary.history.HistoryProofKeyPublicationTransactionBodyH\x00\x12i\n\x12history_proof_vote\x18G \x01(\x0b\x32K.com.hedera.hapi.services.auxiliary.history.HistoryProofVoteTransactionBodyH\x00\x12\x62\n\x0f\x63rs_publication\x18H \x01(\x0b\x32G.com.hedera.hapi.services.auxiliary.hints.CrsPublicationTransactionBodyH\x00\x12\x39\n\x0c\x61tomic_batch\x18J \x01(\x0b\x32!.proto.AtomicBatchTransactionBodyH\x00\x12P\n\rlambda_sstore\x18K \x01(\x0b\x32\x37.com.hedera.hapi.node.hooks.LambdaSStoreTransactionBodyH\x00\x12P\n\rhook_dispatch\x18L \x01(\x0b\x32\x37.com.hedera.hapi.node.hooks.HookDispatchTransactionBodyH\x00\x12/\n\x0fmax_custom_fees\x18\xe9\x07 \x03(\x0b\x32\x15.proto.CustomFeeLimitB\x06\n\x04\x64\x61taJ\x04\x08\x1e\x10\x1fJ\x04\x08=\x10>J\x04\x08>\x10?J\x04\x08?\x10@J\x04\x08@\x10\x41R\ntssMessageR\x07tssVoteR\x11tssShareSignatureR\x10tssEncryptionKey\"2\n\x1a\x41tomicBatchTransactionBody\x12\x14\n\x0ctransactions\x18\x01 \x03(\x0c\x42&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.transaction_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_TRANSACTION'].fields_by_name['body']._loaded_options = None + _globals['_TRANSACTION'].fields_by_name['body']._serialized_options = b'\030\001' + _globals['_TRANSACTION'].fields_by_name['sigs']._loaded_options = None + _globals['_TRANSACTION'].fields_by_name['sigs']._serialized_options = b'\030\001' + _globals['_TRANSACTION'].fields_by_name['sigMap']._loaded_options = None + _globals['_TRANSACTION'].fields_by_name['sigMap']._serialized_options = b'\030\001' + _globals['_TRANSACTION'].fields_by_name['bodyBytes']._loaded_options = None + _globals['_TRANSACTION'].fields_by_name['bodyBytes']._serialized_options = b'\030\001' + _globals['_TRANSACTIONBODY'].fields_by_name['generateRecord']._loaded_options = None + _globals['_TRANSACTIONBODY'].fields_by_name['generateRecord']._serialized_options = b'\030\001' + _globals['_TRANSACTIONBODY'].fields_by_name['cryptoAddLiveHash']._loaded_options = None + _globals['_TRANSACTIONBODY'].fields_by_name['cryptoAddLiveHash']._serialized_options = b'\030\001' + _globals['_TRANSACTIONBODY'].fields_by_name['cryptoDeleteLiveHash']._loaded_options = None + _globals['_TRANSACTIONBODY'].fields_by_name['cryptoDeleteLiveHash']._serialized_options = b'\030\001' + _globals['_TRANSACTION']._serialized_start=2336 + _globals['_TRANSACTION']._serialized_end=2527 + _globals['_TRANSACTIONBODY']._serialized_start=2530 + _globals['_TRANSACTIONBODY']._serialized_end=7534 + _globals['_ATOMICBATCHTRANSACTIONBODY']._serialized_start=7536 + _globals['_ATOMICBATCHTRANSACTIONBODY']._serialized_end=7586 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/transaction_pb2.pyi b/src/hiero_sdk_python/hapi/services/transaction_pb2.pyi new file mode 100644 index 000000000..51733248d --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/transaction_pb2.pyi @@ -0,0 +1,241 @@ +from . import basic_types_pb2 as _basic_types_pb2 +from . import system_delete_pb2 as _system_delete_pb2 +from . import system_undelete_pb2 as _system_undelete_pb2 +from . import freeze_pb2 as _freeze_pb2 +from . import contract_call_pb2 as _contract_call_pb2 +from . import contract_create_pb2 as _contract_create_pb2 +from . import contract_update_pb2 as _contract_update_pb2 +from . import crypto_add_live_hash_pb2 as _crypto_add_live_hash_pb2 +from . import crypto_create_pb2 as _crypto_create_pb2 +from . import crypto_delete_pb2 as _crypto_delete_pb2 +from . import crypto_delete_live_hash_pb2 as _crypto_delete_live_hash_pb2 +from . import crypto_transfer_pb2 as _crypto_transfer_pb2 +from . import crypto_update_pb2 as _crypto_update_pb2 +from . import crypto_approve_allowance_pb2 as _crypto_approve_allowance_pb2 +from . import crypto_delete_allowance_pb2 as _crypto_delete_allowance_pb2 +from . import ethereum_transaction_pb2 as _ethereum_transaction_pb2 +from . import file_append_pb2 as _file_append_pb2 +from . import file_create_pb2 as _file_create_pb2 +from . import file_delete_pb2 as _file_delete_pb2 +from . import file_update_pb2 as _file_update_pb2 +from . import duration_pb2 as _duration_pb2 +from . import contract_delete_pb2 as _contract_delete_pb2 +from . import consensus_create_topic_pb2 as _consensus_create_topic_pb2 +from . import consensus_update_topic_pb2 as _consensus_update_topic_pb2 +from . import consensus_delete_topic_pb2 as _consensus_delete_topic_pb2 +from . import consensus_submit_message_pb2 as _consensus_submit_message_pb2 +from . import unchecked_submit_pb2 as _unchecked_submit_pb2 +from . import token_create_pb2 as _token_create_pb2 +from . import token_freeze_account_pb2 as _token_freeze_account_pb2 +from . import token_unfreeze_account_pb2 as _token_unfreeze_account_pb2 +from . import token_grant_kyc_pb2 as _token_grant_kyc_pb2 +from . import token_revoke_kyc_pb2 as _token_revoke_kyc_pb2 +from . import token_delete_pb2 as _token_delete_pb2 +from . import token_update_pb2 as _token_update_pb2 +from . import token_mint_pb2 as _token_mint_pb2 +from . import token_burn_pb2 as _token_burn_pb2 +from . import token_wipe_account_pb2 as _token_wipe_account_pb2 +from . import token_associate_pb2 as _token_associate_pb2 +from . import token_dissociate_pb2 as _token_dissociate_pb2 +from . import token_fee_schedule_update_pb2 as _token_fee_schedule_update_pb2 +from . import token_pause_pb2 as _token_pause_pb2 +from . import token_unpause_pb2 as _token_unpause_pb2 +from . import token_update_nfts_pb2 as _token_update_nfts_pb2 +from . import token_reject_pb2 as _token_reject_pb2 +from . import token_airdrop_pb2 as _token_airdrop_pb2 +from . import token_cancel_airdrop_pb2 as _token_cancel_airdrop_pb2 +from . import token_claim_airdrop_pb2 as _token_claim_airdrop_pb2 +from . import schedule_create_pb2 as _schedule_create_pb2 +from . import schedule_delete_pb2 as _schedule_delete_pb2 +from . import schedule_sign_pb2 as _schedule_sign_pb2 +from . import node_stake_update_pb2 as _node_stake_update_pb2 +from . import util_prng_pb2 as _util_prng_pb2 +from . import node_create_pb2 as _node_create_pb2 +from . import node_update_pb2 as _node_update_pb2 +from . import node_delete_pb2 as _node_delete_pb2 +from . import custom_fees_pb2 as _custom_fees_pb2 +from ..platform.event import state_signature_transaction_pb2 as _state_signature_transaction_pb2 +from .auxiliary.hints import hints_key_publication_pb2 as _hints_key_publication_pb2 +from .auxiliary.hints import hints_preprocessing_vote_pb2 as _hints_preprocessing_vote_pb2 +from .auxiliary.hints import hints_partial_signature_pb2 as _hints_partial_signature_pb2 +from .auxiliary.hints import crs_publication_pb2 as _crs_publication_pb2 +from .auxiliary.history import history_proof_signature_pb2 as _history_proof_signature_pb2 +from .auxiliary.history import history_proof_key_publication_pb2 as _history_proof_key_publication_pb2 +from .auxiliary.history import history_proof_vote_pb2 as _history_proof_vote_pb2 +from . import lambda_sstore_pb2 as _lambda_sstore_pb2 +from . import hook_dispatch_pb2 as _hook_dispatch_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Iterable as _Iterable, Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class Transaction(_message.Message): + __slots__ = ("body", "sigs", "sigMap", "bodyBytes", "signedTransactionBytes") + BODY_FIELD_NUMBER: _ClassVar[int] + SIGS_FIELD_NUMBER: _ClassVar[int] + SIGMAP_FIELD_NUMBER: _ClassVar[int] + BODYBYTES_FIELD_NUMBER: _ClassVar[int] + SIGNEDTRANSACTIONBYTES_FIELD_NUMBER: _ClassVar[int] + body: TransactionBody + sigs: _basic_types_pb2.SignatureList + sigMap: _basic_types_pb2.SignatureMap + bodyBytes: bytes + signedTransactionBytes: bytes + def __init__(self, body: _Optional[_Union[TransactionBody, _Mapping]] = ..., sigs: _Optional[_Union[_basic_types_pb2.SignatureList, _Mapping]] = ..., sigMap: _Optional[_Union[_basic_types_pb2.SignatureMap, _Mapping]] = ..., bodyBytes: _Optional[bytes] = ..., signedTransactionBytes: _Optional[bytes] = ...) -> None: ... + +class TransactionBody(_message.Message): + __slots__ = ("transactionID", "nodeAccountID", "transactionFee", "transactionValidDuration", "generateRecord", "memo", "batch_key", "contractCall", "contractCreateInstance", "contractUpdateInstance", "cryptoAddLiveHash", "cryptoCreateAccount", "cryptoDelete", "cryptoDeleteLiveHash", "cryptoTransfer", "cryptoUpdateAccount", "fileAppend", "fileCreate", "fileDelete", "fileUpdate", "systemDelete", "systemUndelete", "contractDeleteInstance", "freeze", "consensusCreateTopic", "consensusUpdateTopic", "consensusDeleteTopic", "consensusSubmitMessage", "uncheckedSubmit", "tokenCreation", "tokenFreeze", "tokenUnfreeze", "tokenGrantKyc", "tokenRevokeKyc", "tokenDeletion", "tokenUpdate", "tokenMint", "tokenBurn", "tokenWipe", "tokenAssociate", "tokenDissociate", "scheduleCreate", "scheduleDelete", "scheduleSign", "token_fee_schedule_update", "token_pause", "token_unpause", "cryptoApproveAllowance", "cryptoDeleteAllowance", "ethereumTransaction", "node_stake_update", "util_prng", "token_update_nfts", "nodeCreate", "nodeUpdate", "nodeDelete", "tokenReject", "tokenAirdrop", "tokenCancelAirdrop", "tokenClaimAirdrop", "state_signature_transaction", "hints_preprocessing_vote", "hints_key_publication", "hints_partial_signature", "history_proof_signature", "history_proof_key_publication", "history_proof_vote", "crs_publication", "atomic_batch", "lambda_sstore", "hook_dispatch", "max_custom_fees") + TRANSACTIONID_FIELD_NUMBER: _ClassVar[int] + NODEACCOUNTID_FIELD_NUMBER: _ClassVar[int] + TRANSACTIONFEE_FIELD_NUMBER: _ClassVar[int] + TRANSACTIONVALIDDURATION_FIELD_NUMBER: _ClassVar[int] + GENERATERECORD_FIELD_NUMBER: _ClassVar[int] + MEMO_FIELD_NUMBER: _ClassVar[int] + BATCH_KEY_FIELD_NUMBER: _ClassVar[int] + CONTRACTCALL_FIELD_NUMBER: _ClassVar[int] + CONTRACTCREATEINSTANCE_FIELD_NUMBER: _ClassVar[int] + CONTRACTUPDATEINSTANCE_FIELD_NUMBER: _ClassVar[int] + CRYPTOADDLIVEHASH_FIELD_NUMBER: _ClassVar[int] + CRYPTOCREATEACCOUNT_FIELD_NUMBER: _ClassVar[int] + CRYPTODELETE_FIELD_NUMBER: _ClassVar[int] + CRYPTODELETELIVEHASH_FIELD_NUMBER: _ClassVar[int] + CRYPTOTRANSFER_FIELD_NUMBER: _ClassVar[int] + CRYPTOUPDATEACCOUNT_FIELD_NUMBER: _ClassVar[int] + FILEAPPEND_FIELD_NUMBER: _ClassVar[int] + FILECREATE_FIELD_NUMBER: _ClassVar[int] + FILEDELETE_FIELD_NUMBER: _ClassVar[int] + FILEUPDATE_FIELD_NUMBER: _ClassVar[int] + SYSTEMDELETE_FIELD_NUMBER: _ClassVar[int] + SYSTEMUNDELETE_FIELD_NUMBER: _ClassVar[int] + CONTRACTDELETEINSTANCE_FIELD_NUMBER: _ClassVar[int] + FREEZE_FIELD_NUMBER: _ClassVar[int] + CONSENSUSCREATETOPIC_FIELD_NUMBER: _ClassVar[int] + CONSENSUSUPDATETOPIC_FIELD_NUMBER: _ClassVar[int] + CONSENSUSDELETETOPIC_FIELD_NUMBER: _ClassVar[int] + CONSENSUSSUBMITMESSAGE_FIELD_NUMBER: _ClassVar[int] + UNCHECKEDSUBMIT_FIELD_NUMBER: _ClassVar[int] + TOKENCREATION_FIELD_NUMBER: _ClassVar[int] + TOKENFREEZE_FIELD_NUMBER: _ClassVar[int] + TOKENUNFREEZE_FIELD_NUMBER: _ClassVar[int] + TOKENGRANTKYC_FIELD_NUMBER: _ClassVar[int] + TOKENREVOKEKYC_FIELD_NUMBER: _ClassVar[int] + TOKENDELETION_FIELD_NUMBER: _ClassVar[int] + TOKENUPDATE_FIELD_NUMBER: _ClassVar[int] + TOKENMINT_FIELD_NUMBER: _ClassVar[int] + TOKENBURN_FIELD_NUMBER: _ClassVar[int] + TOKENWIPE_FIELD_NUMBER: _ClassVar[int] + TOKENASSOCIATE_FIELD_NUMBER: _ClassVar[int] + TOKENDISSOCIATE_FIELD_NUMBER: _ClassVar[int] + SCHEDULECREATE_FIELD_NUMBER: _ClassVar[int] + SCHEDULEDELETE_FIELD_NUMBER: _ClassVar[int] + SCHEDULESIGN_FIELD_NUMBER: _ClassVar[int] + TOKEN_FEE_SCHEDULE_UPDATE_FIELD_NUMBER: _ClassVar[int] + TOKEN_PAUSE_FIELD_NUMBER: _ClassVar[int] + TOKEN_UNPAUSE_FIELD_NUMBER: _ClassVar[int] + CRYPTOAPPROVEALLOWANCE_FIELD_NUMBER: _ClassVar[int] + CRYPTODELETEALLOWANCE_FIELD_NUMBER: _ClassVar[int] + ETHEREUMTRANSACTION_FIELD_NUMBER: _ClassVar[int] + NODE_STAKE_UPDATE_FIELD_NUMBER: _ClassVar[int] + UTIL_PRNG_FIELD_NUMBER: _ClassVar[int] + TOKEN_UPDATE_NFTS_FIELD_NUMBER: _ClassVar[int] + NODECREATE_FIELD_NUMBER: _ClassVar[int] + NODEUPDATE_FIELD_NUMBER: _ClassVar[int] + NODEDELETE_FIELD_NUMBER: _ClassVar[int] + TOKENREJECT_FIELD_NUMBER: _ClassVar[int] + TOKENAIRDROP_FIELD_NUMBER: _ClassVar[int] + TOKENCANCELAIRDROP_FIELD_NUMBER: _ClassVar[int] + TOKENCLAIMAIRDROP_FIELD_NUMBER: _ClassVar[int] + STATE_SIGNATURE_TRANSACTION_FIELD_NUMBER: _ClassVar[int] + HINTS_PREPROCESSING_VOTE_FIELD_NUMBER: _ClassVar[int] + HINTS_KEY_PUBLICATION_FIELD_NUMBER: _ClassVar[int] + HINTS_PARTIAL_SIGNATURE_FIELD_NUMBER: _ClassVar[int] + HISTORY_PROOF_SIGNATURE_FIELD_NUMBER: _ClassVar[int] + HISTORY_PROOF_KEY_PUBLICATION_FIELD_NUMBER: _ClassVar[int] + HISTORY_PROOF_VOTE_FIELD_NUMBER: _ClassVar[int] + CRS_PUBLICATION_FIELD_NUMBER: _ClassVar[int] + ATOMIC_BATCH_FIELD_NUMBER: _ClassVar[int] + LAMBDA_SSTORE_FIELD_NUMBER: _ClassVar[int] + HOOK_DISPATCH_FIELD_NUMBER: _ClassVar[int] + MAX_CUSTOM_FEES_FIELD_NUMBER: _ClassVar[int] + transactionID: _basic_types_pb2.TransactionID + nodeAccountID: _basic_types_pb2.AccountID + transactionFee: int + transactionValidDuration: _duration_pb2.Duration + generateRecord: bool + memo: str + batch_key: _basic_types_pb2.Key + contractCall: _contract_call_pb2.ContractCallTransactionBody + contractCreateInstance: _contract_create_pb2.ContractCreateTransactionBody + contractUpdateInstance: _contract_update_pb2.ContractUpdateTransactionBody + cryptoAddLiveHash: _crypto_add_live_hash_pb2.CryptoAddLiveHashTransactionBody + cryptoCreateAccount: _crypto_create_pb2.CryptoCreateTransactionBody + cryptoDelete: _crypto_delete_pb2.CryptoDeleteTransactionBody + cryptoDeleteLiveHash: _crypto_delete_live_hash_pb2.CryptoDeleteLiveHashTransactionBody + cryptoTransfer: _crypto_transfer_pb2.CryptoTransferTransactionBody + cryptoUpdateAccount: _crypto_update_pb2.CryptoUpdateTransactionBody + fileAppend: _file_append_pb2.FileAppendTransactionBody + fileCreate: _file_create_pb2.FileCreateTransactionBody + fileDelete: _file_delete_pb2.FileDeleteTransactionBody + fileUpdate: _file_update_pb2.FileUpdateTransactionBody + systemDelete: _system_delete_pb2.SystemDeleteTransactionBody + systemUndelete: _system_undelete_pb2.SystemUndeleteTransactionBody + contractDeleteInstance: _contract_delete_pb2.ContractDeleteTransactionBody + freeze: _freeze_pb2.FreezeTransactionBody + consensusCreateTopic: _consensus_create_topic_pb2.ConsensusCreateTopicTransactionBody + consensusUpdateTopic: _consensus_update_topic_pb2.ConsensusUpdateTopicTransactionBody + consensusDeleteTopic: _consensus_delete_topic_pb2.ConsensusDeleteTopicTransactionBody + consensusSubmitMessage: _consensus_submit_message_pb2.ConsensusSubmitMessageTransactionBody + uncheckedSubmit: _unchecked_submit_pb2.UncheckedSubmitBody + tokenCreation: _token_create_pb2.TokenCreateTransactionBody + tokenFreeze: _token_freeze_account_pb2.TokenFreezeAccountTransactionBody + tokenUnfreeze: _token_unfreeze_account_pb2.TokenUnfreezeAccountTransactionBody + tokenGrantKyc: _token_grant_kyc_pb2.TokenGrantKycTransactionBody + tokenRevokeKyc: _token_revoke_kyc_pb2.TokenRevokeKycTransactionBody + tokenDeletion: _token_delete_pb2.TokenDeleteTransactionBody + tokenUpdate: _token_update_pb2.TokenUpdateTransactionBody + tokenMint: _token_mint_pb2.TokenMintTransactionBody + tokenBurn: _token_burn_pb2.TokenBurnTransactionBody + tokenWipe: _token_wipe_account_pb2.TokenWipeAccountTransactionBody + tokenAssociate: _token_associate_pb2.TokenAssociateTransactionBody + tokenDissociate: _token_dissociate_pb2.TokenDissociateTransactionBody + scheduleCreate: _schedule_create_pb2.ScheduleCreateTransactionBody + scheduleDelete: _schedule_delete_pb2.ScheduleDeleteTransactionBody + scheduleSign: _schedule_sign_pb2.ScheduleSignTransactionBody + token_fee_schedule_update: _token_fee_schedule_update_pb2.TokenFeeScheduleUpdateTransactionBody + token_pause: _token_pause_pb2.TokenPauseTransactionBody + token_unpause: _token_unpause_pb2.TokenUnpauseTransactionBody + cryptoApproveAllowance: _crypto_approve_allowance_pb2.CryptoApproveAllowanceTransactionBody + cryptoDeleteAllowance: _crypto_delete_allowance_pb2.CryptoDeleteAllowanceTransactionBody + ethereumTransaction: _ethereum_transaction_pb2.EthereumTransactionBody + node_stake_update: _node_stake_update_pb2.NodeStakeUpdateTransactionBody + util_prng: _util_prng_pb2.UtilPrngTransactionBody + token_update_nfts: _token_update_nfts_pb2.TokenUpdateNftsTransactionBody + nodeCreate: _node_create_pb2.NodeCreateTransactionBody + nodeUpdate: _node_update_pb2.NodeUpdateTransactionBody + nodeDelete: _node_delete_pb2.NodeDeleteTransactionBody + tokenReject: _token_reject_pb2.TokenRejectTransactionBody + tokenAirdrop: _token_airdrop_pb2.TokenAirdropTransactionBody + tokenCancelAirdrop: _token_cancel_airdrop_pb2.TokenCancelAirdropTransactionBody + tokenClaimAirdrop: _token_claim_airdrop_pb2.TokenClaimAirdropTransactionBody + state_signature_transaction: _state_signature_transaction_pb2.StateSignatureTransaction + hints_preprocessing_vote: _hints_preprocessing_vote_pb2.HintsPreprocessingVoteTransactionBody + hints_key_publication: _hints_key_publication_pb2.HintsKeyPublicationTransactionBody + hints_partial_signature: _hints_partial_signature_pb2.HintsPartialSignatureTransactionBody + history_proof_signature: _history_proof_signature_pb2.HistoryProofSignatureTransactionBody + history_proof_key_publication: _history_proof_key_publication_pb2.HistoryProofKeyPublicationTransactionBody + history_proof_vote: _history_proof_vote_pb2.HistoryProofVoteTransactionBody + crs_publication: _crs_publication_pb2.CrsPublicationTransactionBody + atomic_batch: AtomicBatchTransactionBody + lambda_sstore: _lambda_sstore_pb2.LambdaSStoreTransactionBody + hook_dispatch: _hook_dispatch_pb2.HookDispatchTransactionBody + max_custom_fees: _containers.RepeatedCompositeFieldContainer[_custom_fees_pb2.CustomFeeLimit] + def __init__(self, transactionID: _Optional[_Union[_basic_types_pb2.TransactionID, _Mapping]] = ..., nodeAccountID: _Optional[_Union[_basic_types_pb2.AccountID, _Mapping]] = ..., transactionFee: _Optional[int] = ..., transactionValidDuration: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ..., generateRecord: bool = ..., memo: _Optional[str] = ..., batch_key: _Optional[_Union[_basic_types_pb2.Key, _Mapping]] = ..., contractCall: _Optional[_Union[_contract_call_pb2.ContractCallTransactionBody, _Mapping]] = ..., contractCreateInstance: _Optional[_Union[_contract_create_pb2.ContractCreateTransactionBody, _Mapping]] = ..., contractUpdateInstance: _Optional[_Union[_contract_update_pb2.ContractUpdateTransactionBody, _Mapping]] = ..., cryptoAddLiveHash: _Optional[_Union[_crypto_add_live_hash_pb2.CryptoAddLiveHashTransactionBody, _Mapping]] = ..., cryptoCreateAccount: _Optional[_Union[_crypto_create_pb2.CryptoCreateTransactionBody, _Mapping]] = ..., cryptoDelete: _Optional[_Union[_crypto_delete_pb2.CryptoDeleteTransactionBody, _Mapping]] = ..., cryptoDeleteLiveHash: _Optional[_Union[_crypto_delete_live_hash_pb2.CryptoDeleteLiveHashTransactionBody, _Mapping]] = ..., cryptoTransfer: _Optional[_Union[_crypto_transfer_pb2.CryptoTransferTransactionBody, _Mapping]] = ..., cryptoUpdateAccount: _Optional[_Union[_crypto_update_pb2.CryptoUpdateTransactionBody, _Mapping]] = ..., fileAppend: _Optional[_Union[_file_append_pb2.FileAppendTransactionBody, _Mapping]] = ..., fileCreate: _Optional[_Union[_file_create_pb2.FileCreateTransactionBody, _Mapping]] = ..., fileDelete: _Optional[_Union[_file_delete_pb2.FileDeleteTransactionBody, _Mapping]] = ..., fileUpdate: _Optional[_Union[_file_update_pb2.FileUpdateTransactionBody, _Mapping]] = ..., systemDelete: _Optional[_Union[_system_delete_pb2.SystemDeleteTransactionBody, _Mapping]] = ..., systemUndelete: _Optional[_Union[_system_undelete_pb2.SystemUndeleteTransactionBody, _Mapping]] = ..., contractDeleteInstance: _Optional[_Union[_contract_delete_pb2.ContractDeleteTransactionBody, _Mapping]] = ..., freeze: _Optional[_Union[_freeze_pb2.FreezeTransactionBody, _Mapping]] = ..., consensusCreateTopic: _Optional[_Union[_consensus_create_topic_pb2.ConsensusCreateTopicTransactionBody, _Mapping]] = ..., consensusUpdateTopic: _Optional[_Union[_consensus_update_topic_pb2.ConsensusUpdateTopicTransactionBody, _Mapping]] = ..., consensusDeleteTopic: _Optional[_Union[_consensus_delete_topic_pb2.ConsensusDeleteTopicTransactionBody, _Mapping]] = ..., consensusSubmitMessage: _Optional[_Union[_consensus_submit_message_pb2.ConsensusSubmitMessageTransactionBody, _Mapping]] = ..., uncheckedSubmit: _Optional[_Union[_unchecked_submit_pb2.UncheckedSubmitBody, _Mapping]] = ..., tokenCreation: _Optional[_Union[_token_create_pb2.TokenCreateTransactionBody, _Mapping]] = ..., tokenFreeze: _Optional[_Union[_token_freeze_account_pb2.TokenFreezeAccountTransactionBody, _Mapping]] = ..., tokenUnfreeze: _Optional[_Union[_token_unfreeze_account_pb2.TokenUnfreezeAccountTransactionBody, _Mapping]] = ..., tokenGrantKyc: _Optional[_Union[_token_grant_kyc_pb2.TokenGrantKycTransactionBody, _Mapping]] = ..., tokenRevokeKyc: _Optional[_Union[_token_revoke_kyc_pb2.TokenRevokeKycTransactionBody, _Mapping]] = ..., tokenDeletion: _Optional[_Union[_token_delete_pb2.TokenDeleteTransactionBody, _Mapping]] = ..., tokenUpdate: _Optional[_Union[_token_update_pb2.TokenUpdateTransactionBody, _Mapping]] = ..., tokenMint: _Optional[_Union[_token_mint_pb2.TokenMintTransactionBody, _Mapping]] = ..., tokenBurn: _Optional[_Union[_token_burn_pb2.TokenBurnTransactionBody, _Mapping]] = ..., tokenWipe: _Optional[_Union[_token_wipe_account_pb2.TokenWipeAccountTransactionBody, _Mapping]] = ..., tokenAssociate: _Optional[_Union[_token_associate_pb2.TokenAssociateTransactionBody, _Mapping]] = ..., tokenDissociate: _Optional[_Union[_token_dissociate_pb2.TokenDissociateTransactionBody, _Mapping]] = ..., scheduleCreate: _Optional[_Union[_schedule_create_pb2.ScheduleCreateTransactionBody, _Mapping]] = ..., scheduleDelete: _Optional[_Union[_schedule_delete_pb2.ScheduleDeleteTransactionBody, _Mapping]] = ..., scheduleSign: _Optional[_Union[_schedule_sign_pb2.ScheduleSignTransactionBody, _Mapping]] = ..., token_fee_schedule_update: _Optional[_Union[_token_fee_schedule_update_pb2.TokenFeeScheduleUpdateTransactionBody, _Mapping]] = ..., token_pause: _Optional[_Union[_token_pause_pb2.TokenPauseTransactionBody, _Mapping]] = ..., token_unpause: _Optional[_Union[_token_unpause_pb2.TokenUnpauseTransactionBody, _Mapping]] = ..., cryptoApproveAllowance: _Optional[_Union[_crypto_approve_allowance_pb2.CryptoApproveAllowanceTransactionBody, _Mapping]] = ..., cryptoDeleteAllowance: _Optional[_Union[_crypto_delete_allowance_pb2.CryptoDeleteAllowanceTransactionBody, _Mapping]] = ..., ethereumTransaction: _Optional[_Union[_ethereum_transaction_pb2.EthereumTransactionBody, _Mapping]] = ..., node_stake_update: _Optional[_Union[_node_stake_update_pb2.NodeStakeUpdateTransactionBody, _Mapping]] = ..., util_prng: _Optional[_Union[_util_prng_pb2.UtilPrngTransactionBody, _Mapping]] = ..., token_update_nfts: _Optional[_Union[_token_update_nfts_pb2.TokenUpdateNftsTransactionBody, _Mapping]] = ..., nodeCreate: _Optional[_Union[_node_create_pb2.NodeCreateTransactionBody, _Mapping]] = ..., nodeUpdate: _Optional[_Union[_node_update_pb2.NodeUpdateTransactionBody, _Mapping]] = ..., nodeDelete: _Optional[_Union[_node_delete_pb2.NodeDeleteTransactionBody, _Mapping]] = ..., tokenReject: _Optional[_Union[_token_reject_pb2.TokenRejectTransactionBody, _Mapping]] = ..., tokenAirdrop: _Optional[_Union[_token_airdrop_pb2.TokenAirdropTransactionBody, _Mapping]] = ..., tokenCancelAirdrop: _Optional[_Union[_token_cancel_airdrop_pb2.TokenCancelAirdropTransactionBody, _Mapping]] = ..., tokenClaimAirdrop: _Optional[_Union[_token_claim_airdrop_pb2.TokenClaimAirdropTransactionBody, _Mapping]] = ..., state_signature_transaction: _Optional[_Union[_state_signature_transaction_pb2.StateSignatureTransaction, _Mapping]] = ..., hints_preprocessing_vote: _Optional[_Union[_hints_preprocessing_vote_pb2.HintsPreprocessingVoteTransactionBody, _Mapping]] = ..., hints_key_publication: _Optional[_Union[_hints_key_publication_pb2.HintsKeyPublicationTransactionBody, _Mapping]] = ..., hints_partial_signature: _Optional[_Union[_hints_partial_signature_pb2.HintsPartialSignatureTransactionBody, _Mapping]] = ..., history_proof_signature: _Optional[_Union[_history_proof_signature_pb2.HistoryProofSignatureTransactionBody, _Mapping]] = ..., history_proof_key_publication: _Optional[_Union[_history_proof_key_publication_pb2.HistoryProofKeyPublicationTransactionBody, _Mapping]] = ..., history_proof_vote: _Optional[_Union[_history_proof_vote_pb2.HistoryProofVoteTransactionBody, _Mapping]] = ..., crs_publication: _Optional[_Union[_crs_publication_pb2.CrsPublicationTransactionBody, _Mapping]] = ..., atomic_batch: _Optional[_Union[AtomicBatchTransactionBody, _Mapping]] = ..., lambda_sstore: _Optional[_Union[_lambda_sstore_pb2.LambdaSStoreTransactionBody, _Mapping]] = ..., hook_dispatch: _Optional[_Union[_hook_dispatch_pb2.HookDispatchTransactionBody, _Mapping]] = ..., max_custom_fees: _Optional[_Iterable[_Union[_custom_fees_pb2.CustomFeeLimit, _Mapping]]] = ...) -> None: ... + +class AtomicBatchTransactionBody(_message.Message): + __slots__ = ("transactions",) + TRANSACTIONS_FIELD_NUMBER: _ClassVar[int] + transactions: _containers.RepeatedScalarFieldContainer[bytes] + def __init__(self, transactions: _Optional[_Iterable[bytes]] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/transaction_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/transaction_pb2_grpc.py new file mode 100644 index 000000000..08371e86a --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/transaction_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/transaction_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/transaction_receipt_pb2.py b/src/hiero_sdk_python/hapi/services/transaction_receipt_pb2.py new file mode 100644 index 000000000..7f7618ba7 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/transaction_receipt_pb2.py @@ -0,0 +1,36 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/transaction_receipt.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/transaction_receipt.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import basic_types_pb2 as services_dot_basic__types__pb2 +from . import response_code_pb2 as services_dot_response__code__pb2 +from . import exchange_rate_pb2 as services_dot_exchange__rate__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"services/transaction_receipt.proto\x12\x05proto\x1a\x1aservices/basic_types.proto\x1a\x1cservices/response_code.proto\x1a\x1cservices/exchange_rate.proto\"\x8d\x04\n\x12TransactionReceipt\x12\'\n\x06status\x18\x01 \x01(\x0e\x32\x17.proto.ResponseCodeEnum\x12#\n\taccountID\x18\x02 \x01(\x0b\x32\x10.proto.AccountID\x12\x1d\n\x06\x66ileID\x18\x03 \x01(\x0b\x32\r.proto.FileID\x12%\n\ncontractID\x18\x04 \x01(\x0b\x32\x11.proto.ContractID\x12,\n\x0c\x65xchangeRate\x18\x05 \x01(\x0b\x32\x16.proto.ExchangeRateSet\x12\x1f\n\x07topicID\x18\x06 \x01(\x0b\x32\x0e.proto.TopicID\x12\x1b\n\x13topicSequenceNumber\x18\x07 \x01(\x04\x12\x18\n\x10topicRunningHash\x18\x08 \x01(\x0c\x12\x1f\n\x17topicRunningHashVersion\x18\t \x01(\x04\x12\x1f\n\x07tokenID\x18\n \x01(\x0b\x32\x0e.proto.TokenID\x12\x16\n\x0enewTotalSupply\x18\x0b \x01(\x04\x12%\n\nscheduleID\x18\x0c \x01(\x0b\x32\x11.proto.ScheduleID\x12\x34\n\x16scheduledTransactionID\x18\r \x01(\x0b\x32\x14.proto.TransactionID\x12\x15\n\rserialNumbers\x18\x0e \x03(\x03\x12\x0f\n\x07node_id\x18\x0f \x01(\x04\x42&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.transaction_receipt_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_TRANSACTIONRECEIPT']._serialized_start=134 + _globals['_TRANSACTIONRECEIPT']._serialized_end=659 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/transaction_receipt_pb2.pyi b/src/hiero_sdk_python/hapi/services/transaction_receipt_pb2.pyi new file mode 100644 index 000000000..ca17507d7 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/transaction_receipt_pb2.pyi @@ -0,0 +1,44 @@ +from . import basic_types_pb2 as _basic_types_pb2 +from . import response_code_pb2 as _response_code_pb2 +from . import exchange_rate_pb2 as _exchange_rate_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Iterable as _Iterable, Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class TransactionReceipt(_message.Message): + __slots__ = ("status", "accountID", "fileID", "contractID", "exchangeRate", "topicID", "topicSequenceNumber", "topicRunningHash", "topicRunningHashVersion", "tokenID", "newTotalSupply", "scheduleID", "scheduledTransactionID", "serialNumbers", "node_id") + STATUS_FIELD_NUMBER: _ClassVar[int] + ACCOUNTID_FIELD_NUMBER: _ClassVar[int] + FILEID_FIELD_NUMBER: _ClassVar[int] + CONTRACTID_FIELD_NUMBER: _ClassVar[int] + EXCHANGERATE_FIELD_NUMBER: _ClassVar[int] + TOPICID_FIELD_NUMBER: _ClassVar[int] + TOPICSEQUENCENUMBER_FIELD_NUMBER: _ClassVar[int] + TOPICRUNNINGHASH_FIELD_NUMBER: _ClassVar[int] + TOPICRUNNINGHASHVERSION_FIELD_NUMBER: _ClassVar[int] + TOKENID_FIELD_NUMBER: _ClassVar[int] + NEWTOTALSUPPLY_FIELD_NUMBER: _ClassVar[int] + SCHEDULEID_FIELD_NUMBER: _ClassVar[int] + SCHEDULEDTRANSACTIONID_FIELD_NUMBER: _ClassVar[int] + SERIALNUMBERS_FIELD_NUMBER: _ClassVar[int] + NODE_ID_FIELD_NUMBER: _ClassVar[int] + status: _response_code_pb2.ResponseCodeEnum + accountID: _basic_types_pb2.AccountID + fileID: _basic_types_pb2.FileID + contractID: _basic_types_pb2.ContractID + exchangeRate: _exchange_rate_pb2.ExchangeRateSet + topicID: _basic_types_pb2.TopicID + topicSequenceNumber: int + topicRunningHash: bytes + topicRunningHashVersion: int + tokenID: _basic_types_pb2.TokenID + newTotalSupply: int + scheduleID: _basic_types_pb2.ScheduleID + scheduledTransactionID: _basic_types_pb2.TransactionID + serialNumbers: _containers.RepeatedScalarFieldContainer[int] + node_id: int + def __init__(self, status: _Optional[_Union[_response_code_pb2.ResponseCodeEnum, str]] = ..., accountID: _Optional[_Union[_basic_types_pb2.AccountID, _Mapping]] = ..., fileID: _Optional[_Union[_basic_types_pb2.FileID, _Mapping]] = ..., contractID: _Optional[_Union[_basic_types_pb2.ContractID, _Mapping]] = ..., exchangeRate: _Optional[_Union[_exchange_rate_pb2.ExchangeRateSet, _Mapping]] = ..., topicID: _Optional[_Union[_basic_types_pb2.TopicID, _Mapping]] = ..., topicSequenceNumber: _Optional[int] = ..., topicRunningHash: _Optional[bytes] = ..., topicRunningHashVersion: _Optional[int] = ..., tokenID: _Optional[_Union[_basic_types_pb2.TokenID, _Mapping]] = ..., newTotalSupply: _Optional[int] = ..., scheduleID: _Optional[_Union[_basic_types_pb2.ScheduleID, _Mapping]] = ..., scheduledTransactionID: _Optional[_Union[_basic_types_pb2.TransactionID, _Mapping]] = ..., serialNumbers: _Optional[_Iterable[int]] = ..., node_id: _Optional[int] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/transaction_receipt_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/transaction_receipt_pb2_grpc.py new file mode 100644 index 000000000..94e515cad --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/transaction_receipt_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/transaction_receipt_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/transaction_record_pb2.py b/src/hiero_sdk_python/hapi/services/transaction_record_pb2.py new file mode 100644 index 000000000..6a1ce1891 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/transaction_record_pb2.py @@ -0,0 +1,40 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/transaction_record.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/transaction_record.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import timestamp_pb2 as services_dot_timestamp__pb2 +from . import basic_types_pb2 as services_dot_basic__types__pb2 +from . import custom_fees_pb2 as services_dot_custom__fees__pb2 +from . import transaction_receipt_pb2 as services_dot_transaction__receipt__pb2 +from . import contract_types_pb2 as services_dot_contract__types__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!services/transaction_record.proto\x12\x05proto\x1a\x18services/timestamp.proto\x1a\x1aservices/basic_types.proto\x1a\x1aservices/custom_fees.proto\x1a\"services/transaction_receipt.proto\x1a\x1dservices/contract_types.proto\"\xf5\x06\n\x11TransactionRecord\x12*\n\x07receipt\x18\x01 \x01(\x0b\x32\x19.proto.TransactionReceipt\x12\x17\n\x0ftransactionHash\x18\x02 \x01(\x0c\x12,\n\x12\x63onsensusTimestamp\x18\x03 \x01(\x0b\x32\x10.proto.Timestamp\x12+\n\rtransactionID\x18\x04 \x01(\x0b\x32\x14.proto.TransactionID\x12\x0c\n\x04memo\x18\x05 \x01(\t\x12\x16\n\x0etransactionFee\x18\x06 \x01(\x04\x12;\n\x12\x63ontractCallResult\x18\x07 \x01(\x0b\x32\x1d.proto.ContractFunctionResultH\x00\x12=\n\x14\x63ontractCreateResult\x18\x08 \x01(\x0b\x32\x1d.proto.ContractFunctionResultH\x00\x12)\n\x0ctransferList\x18\n \x01(\x0b\x32\x13.proto.TransferList\x12\x34\n\x12tokenTransferLists\x18\x0b \x03(\x0b\x32\x18.proto.TokenTransferList\x12&\n\x0bscheduleRef\x18\x0c \x01(\x0b\x32\x11.proto.ScheduleID\x12\x36\n\x14\x61ssessed_custom_fees\x18\r \x03(\x0b\x32\x18.proto.AssessedCustomFee\x12=\n\x1c\x61utomatic_token_associations\x18\x0e \x03(\x0b\x32\x17.proto.TokenAssociation\x12\x34\n\x1aparent_consensus_timestamp\x18\x0f \x01(\x0b\x32\x10.proto.Timestamp\x12\r\n\x05\x61lias\x18\x10 \x01(\x0c\x12\x15\n\rethereum_hash\x18\x11 \x01(\x0c\x12\x32\n\x14paid_staking_rewards\x18\x12 \x03(\x0b\x32\x14.proto.AccountAmount\x12\x14\n\nprng_bytes\x18\x13 \x01(\x0cH\x01\x12\x15\n\x0bprng_number\x18\x14 \x01(\x05H\x01\x12\x13\n\x0b\x65vm_address\x18\x15 \x01(\x0c\x12\x39\n\x14new_pending_airdrops\x18\x16 \x03(\x0b\x32\x1b.proto.PendingAirdropRecordB\x06\n\x04\x62odyB\t\n\x07\x65ntropy\"\x86\x01\n\x14PendingAirdropRecord\x12\x33\n\x12pending_airdrop_id\x18\x01 \x01(\x0b\x32\x17.proto.PendingAirdropId\x12\x39\n\x15pending_airdrop_value\x18\x02 \x01(\x0b\x32\x1a.proto.PendingAirdropValueB&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.transaction_record_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_TRANSACTIONRECORD']._serialized_start=194 + _globals['_TRANSACTIONRECORD']._serialized_end=1079 + _globals['_PENDINGAIRDROPRECORD']._serialized_start=1082 + _globals['_PENDINGAIRDROPRECORD']._serialized_end=1216 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/transaction_record_pb2.pyi b/src/hiero_sdk_python/hapi/services/transaction_record_pb2.pyi new file mode 100644 index 000000000..cd5ebf62a --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/transaction_record_pb2.pyi @@ -0,0 +1,66 @@ +from . import timestamp_pb2 as _timestamp_pb2 +from . import basic_types_pb2 as _basic_types_pb2 +from . import custom_fees_pb2 as _custom_fees_pb2 +from . import transaction_receipt_pb2 as _transaction_receipt_pb2 +from . import contract_types_pb2 as _contract_types_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Iterable as _Iterable, Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class TransactionRecord(_message.Message): + __slots__ = ("receipt", "transactionHash", "consensusTimestamp", "transactionID", "memo", "transactionFee", "contractCallResult", "contractCreateResult", "transferList", "tokenTransferLists", "scheduleRef", "assessed_custom_fees", "automatic_token_associations", "parent_consensus_timestamp", "alias", "ethereum_hash", "paid_staking_rewards", "prng_bytes", "prng_number", "evm_address", "new_pending_airdrops") + RECEIPT_FIELD_NUMBER: _ClassVar[int] + TRANSACTIONHASH_FIELD_NUMBER: _ClassVar[int] + CONSENSUSTIMESTAMP_FIELD_NUMBER: _ClassVar[int] + TRANSACTIONID_FIELD_NUMBER: _ClassVar[int] + MEMO_FIELD_NUMBER: _ClassVar[int] + TRANSACTIONFEE_FIELD_NUMBER: _ClassVar[int] + CONTRACTCALLRESULT_FIELD_NUMBER: _ClassVar[int] + CONTRACTCREATERESULT_FIELD_NUMBER: _ClassVar[int] + TRANSFERLIST_FIELD_NUMBER: _ClassVar[int] + TOKENTRANSFERLISTS_FIELD_NUMBER: _ClassVar[int] + SCHEDULEREF_FIELD_NUMBER: _ClassVar[int] + ASSESSED_CUSTOM_FEES_FIELD_NUMBER: _ClassVar[int] + AUTOMATIC_TOKEN_ASSOCIATIONS_FIELD_NUMBER: _ClassVar[int] + PARENT_CONSENSUS_TIMESTAMP_FIELD_NUMBER: _ClassVar[int] + ALIAS_FIELD_NUMBER: _ClassVar[int] + ETHEREUM_HASH_FIELD_NUMBER: _ClassVar[int] + PAID_STAKING_REWARDS_FIELD_NUMBER: _ClassVar[int] + PRNG_BYTES_FIELD_NUMBER: _ClassVar[int] + PRNG_NUMBER_FIELD_NUMBER: _ClassVar[int] + EVM_ADDRESS_FIELD_NUMBER: _ClassVar[int] + NEW_PENDING_AIRDROPS_FIELD_NUMBER: _ClassVar[int] + receipt: _transaction_receipt_pb2.TransactionReceipt + transactionHash: bytes + consensusTimestamp: _timestamp_pb2.Timestamp + transactionID: _basic_types_pb2.TransactionID + memo: str + transactionFee: int + contractCallResult: _contract_types_pb2.ContractFunctionResult + contractCreateResult: _contract_types_pb2.ContractFunctionResult + transferList: _basic_types_pb2.TransferList + tokenTransferLists: _containers.RepeatedCompositeFieldContainer[_basic_types_pb2.TokenTransferList] + scheduleRef: _basic_types_pb2.ScheduleID + assessed_custom_fees: _containers.RepeatedCompositeFieldContainer[_custom_fees_pb2.AssessedCustomFee] + automatic_token_associations: _containers.RepeatedCompositeFieldContainer[_basic_types_pb2.TokenAssociation] + parent_consensus_timestamp: _timestamp_pb2.Timestamp + alias: bytes + ethereum_hash: bytes + paid_staking_rewards: _containers.RepeatedCompositeFieldContainer[_basic_types_pb2.AccountAmount] + prng_bytes: bytes + prng_number: int + evm_address: bytes + new_pending_airdrops: _containers.RepeatedCompositeFieldContainer[PendingAirdropRecord] + def __init__(self, receipt: _Optional[_Union[_transaction_receipt_pb2.TransactionReceipt, _Mapping]] = ..., transactionHash: _Optional[bytes] = ..., consensusTimestamp: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., transactionID: _Optional[_Union[_basic_types_pb2.TransactionID, _Mapping]] = ..., memo: _Optional[str] = ..., transactionFee: _Optional[int] = ..., contractCallResult: _Optional[_Union[_contract_types_pb2.ContractFunctionResult, _Mapping]] = ..., contractCreateResult: _Optional[_Union[_contract_types_pb2.ContractFunctionResult, _Mapping]] = ..., transferList: _Optional[_Union[_basic_types_pb2.TransferList, _Mapping]] = ..., tokenTransferLists: _Optional[_Iterable[_Union[_basic_types_pb2.TokenTransferList, _Mapping]]] = ..., scheduleRef: _Optional[_Union[_basic_types_pb2.ScheduleID, _Mapping]] = ..., assessed_custom_fees: _Optional[_Iterable[_Union[_custom_fees_pb2.AssessedCustomFee, _Mapping]]] = ..., automatic_token_associations: _Optional[_Iterable[_Union[_basic_types_pb2.TokenAssociation, _Mapping]]] = ..., parent_consensus_timestamp: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., alias: _Optional[bytes] = ..., ethereum_hash: _Optional[bytes] = ..., paid_staking_rewards: _Optional[_Iterable[_Union[_basic_types_pb2.AccountAmount, _Mapping]]] = ..., prng_bytes: _Optional[bytes] = ..., prng_number: _Optional[int] = ..., evm_address: _Optional[bytes] = ..., new_pending_airdrops: _Optional[_Iterable[_Union[PendingAirdropRecord, _Mapping]]] = ...) -> None: ... + +class PendingAirdropRecord(_message.Message): + __slots__ = ("pending_airdrop_id", "pending_airdrop_value") + PENDING_AIRDROP_ID_FIELD_NUMBER: _ClassVar[int] + PENDING_AIRDROP_VALUE_FIELD_NUMBER: _ClassVar[int] + pending_airdrop_id: _basic_types_pb2.PendingAirdropId + pending_airdrop_value: _basic_types_pb2.PendingAirdropValue + def __init__(self, pending_airdrop_id: _Optional[_Union[_basic_types_pb2.PendingAirdropId, _Mapping]] = ..., pending_airdrop_value: _Optional[_Union[_basic_types_pb2.PendingAirdropValue, _Mapping]] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/transaction_record_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/transaction_record_pb2_grpc.py new file mode 100644 index 000000000..38773cf4e --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/transaction_record_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/transaction_record_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/transaction_response_pb2.py b/src/hiero_sdk_python/hapi/services/transaction_response_pb2.py new file mode 100644 index 000000000..c4ced466e --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/transaction_response_pb2.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/transaction_response.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/transaction_response.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import response_code_pb2 as services_dot_response__code__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n#services/transaction_response.proto\x12\x05proto\x1a\x1cservices/response_code.proto\"a\n\x13TransactionResponse\x12<\n\x1bnodeTransactionPrecheckCode\x18\x01 \x01(\x0e\x32\x17.proto.ResponseCodeEnum\x12\x0c\n\x04\x63ost\x18\x02 \x01(\x04\x42&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.transaction_response_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_TRANSACTIONRESPONSE']._serialized_start=76 + _globals['_TRANSACTIONRESPONSE']._serialized_end=173 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/transaction_response_pb2.pyi b/src/hiero_sdk_python/hapi/services/transaction_response_pb2.pyi new file mode 100644 index 000000000..e5aa1f9f2 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/transaction_response_pb2.pyi @@ -0,0 +1,14 @@ +from . import response_code_pb2 as _response_code_pb2 +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class TransactionResponse(_message.Message): + __slots__ = ("nodeTransactionPrecheckCode", "cost") + NODETRANSACTIONPRECHECKCODE_FIELD_NUMBER: _ClassVar[int] + COST_FIELD_NUMBER: _ClassVar[int] + nodeTransactionPrecheckCode: _response_code_pb2.ResponseCodeEnum + cost: int + def __init__(self, nodeTransactionPrecheckCode: _Optional[_Union[_response_code_pb2.ResponseCodeEnum, str]] = ..., cost: _Optional[int] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/transaction_response_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/transaction_response_pb2_grpc.py new file mode 100644 index 000000000..a93d40116 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/transaction_response_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/transaction_response_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/unchecked_submit_pb2.py b/src/hiero_sdk_python/hapi/services/unchecked_submit_pb2.py new file mode 100644 index 000000000..bb540c666 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/unchecked_submit_pb2.py @@ -0,0 +1,39 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/unchecked_submit.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/unchecked_submit.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1fservices/unchecked_submit.proto\x12\x05proto\"3\n\x13UncheckedSubmitBody\x12\x18\n\x10transactionBytes\x18\x01 \x01(\x0c:\x02\x18\x01\x42&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.unchecked_submit_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_UNCHECKEDSUBMITBODY']._loaded_options = None + _globals['_UNCHECKEDSUBMITBODY']._serialized_options = b'\030\001' + _globals['_UNCHECKEDSUBMITBODY']._serialized_start=42 + _globals['_UNCHECKEDSUBMITBODY']._serialized_end=93 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/unchecked_submit_pb2.pyi b/src/hiero_sdk_python/hapi/services/unchecked_submit_pb2.pyi new file mode 100644 index 000000000..fe26fb76e --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/unchecked_submit_pb2.pyi @@ -0,0 +1,11 @@ +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Optional as _Optional + +DESCRIPTOR: _descriptor.FileDescriptor + +class UncheckedSubmitBody(_message.Message): + __slots__ = ("transactionBytes",) + TRANSACTIONBYTES_FIELD_NUMBER: _ClassVar[int] + transactionBytes: bytes + def __init__(self, transactionBytes: _Optional[bytes] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/unchecked_submit_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/unchecked_submit_pb2_grpc.py new file mode 100644 index 000000000..9cc3d7b52 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/unchecked_submit_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/unchecked_submit_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/util_prng_pb2.py b/src/hiero_sdk_python/hapi/services/util_prng_pb2.py new file mode 100644 index 000000000..d2ec28dae --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/util_prng_pb2.py @@ -0,0 +1,37 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/util_prng.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/util_prng.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x18services/util_prng.proto\x12\x05proto\"(\n\x17UtilPrngTransactionBody\x12\r\n\x05range\x18\x01 \x01(\x05\x42&\n\"com.hederahashgraph.api.proto.javaP\x01\x62\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.util_prng_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\"com.hederahashgraph.api.proto.javaP\001' + _globals['_UTILPRNGTRANSACTIONBODY']._serialized_start=35 + _globals['_UTILPRNGTRANSACTIONBODY']._serialized_end=75 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/util_prng_pb2.pyi b/src/hiero_sdk_python/hapi/services/util_prng_pb2.pyi new file mode 100644 index 000000000..047aad0b3 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/util_prng_pb2.pyi @@ -0,0 +1,11 @@ +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Optional as _Optional + +DESCRIPTOR: _descriptor.FileDescriptor + +class UtilPrngTransactionBody(_message.Message): + __slots__ = ("range",) + RANGE_FIELD_NUMBER: _ClassVar[int] + range: int + def __init__(self, range: _Optional[int] = ...) -> None: ... diff --git a/src/hiero_sdk_python/hapi/services/util_prng_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/util_prng_pb2_grpc.py new file mode 100644 index 000000000..c2b9cd977 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/util_prng_pb2_grpc.py @@ -0,0 +1,24 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + + +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/util_prng_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) diff --git a/src/hiero_sdk_python/hapi/services/util_service_pb2.py b/src/hiero_sdk_python/hapi/services/util_service_pb2.py new file mode 100644 index 000000000..6f827c687 --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/util_service_pb2.py @@ -0,0 +1,35 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: services/util_service.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'services/util_service.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() +from . import transaction_response_pb2 as services_dot_transaction__response__pb2 +from . import transaction_pb2 as services_dot_transaction__pb2 +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1bservices/util_service.proto\x12\x05proto\x1a#services/transaction_response.proto\x1a\x1aservices/transaction.proto2\x84\x01\n\x0bUtilService\x12\x36\n\x04prng\x12\x12.proto.Transaction\x1a\x1a.proto.TransactionResponse\x12=\n\x0b\x61tomicBatch\x12\x12.proto.Transaction\x1a\x1a.proto.TransactionResponseB(\n&com.hederahashgraph.service.proto.javab\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.util_service_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n&com.hederahashgraph.service.proto.java' + _globals['_UTILSERVICE']._serialized_start=104 + _globals['_UTILSERVICE']._serialized_end=236 +# @@protoc_insertion_point(module_scope) diff --git a/src/hiero_sdk_python/hapi/services/util_service_pb2.pyi b/src/hiero_sdk_python/hapi/services/util_service_pb2.pyi new file mode 100644 index 000000000..4119f125c --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/util_service_pb2.pyi @@ -0,0 +1,6 @@ +from . import transaction_response_pb2 as _transaction_response_pb2 +from . import transaction_pb2 as _transaction_pb2 +from google.protobuf import descriptor as _descriptor +from typing import ClassVar as _ClassVar + +DESCRIPTOR: _descriptor.FileDescriptor diff --git a/src/hiero_sdk_python/hapi/services/util_service_pb2_grpc.py b/src/hiero_sdk_python/hapi/services/util_service_pb2_grpc.py new file mode 100644 index 000000000..410d8c7ec --- /dev/null +++ b/src/hiero_sdk_python/hapi/services/util_service_pb2_grpc.py @@ -0,0 +1,177 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings +from . import transaction_pb2 as services_dot_transaction__pb2 +from . import transaction_response_pb2 as services_dot_transaction__response__pb2 +GRPC_GENERATED_VERSION = '1.76.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in services/util_service_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) + + +class UtilServiceStub(object): + """* + The Utility Service provides a pseudo-random number generator. + + The single gRPC call defined for this service simply reports a single + pseudo-random number in the transaction record. That value may either + be a 32-bit integer within a requested range, or a 384-bit byte array. + + ### Block Stream Effects + The requested value is reported exclusively in a `UtilPrngOutput` message. + """ + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.prng = channel.unary_unary( + '/proto.UtilService/prng', + request_serializer=services_dot_transaction__pb2.Transaction.SerializeToString, + response_deserializer=services_dot_transaction__response__pb2.TransactionResponse.FromString, + _registered_method=True) + self.atomicBatch = channel.unary_unary( + '/proto.UtilService/atomicBatch', + request_serializer=services_dot_transaction__pb2.Transaction.SerializeToString, + response_deserializer=services_dot_transaction__response__pb2.TransactionResponse.FromString, + _registered_method=True) + + +class UtilServiceServicer(object): + """* + The Utility Service provides a pseudo-random number generator. + + The single gRPC call defined for this service simply reports a single + pseudo-random number in the transaction record. That value may either + be a 32-bit integer within a requested range, or a 384-bit byte array. + + ### Block Stream Effects + The requested value is reported exclusively in a `UtilPrngOutput` message. + """ + + def prng(self, request, context): + """* + Generate a pseudo-random value. +

        + The request body MUST be a + [UtilPrngTransactionBody](#proto.UtilPrngTransactionBody) + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def atomicBatch(self, request, context): + """* + Execute a batch of transactions atomically. +

        + All transactions in the batch will be executed in order, and if any + transaction fails, the entire batch will fail. + // TODO: Add more details about the batch transaction + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_UtilServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'prng': grpc.unary_unary_rpc_method_handler( + servicer.prng, + request_deserializer=services_dot_transaction__pb2.Transaction.FromString, + response_serializer=services_dot_transaction__response__pb2.TransactionResponse.SerializeToString, + ), + 'atomicBatch': grpc.unary_unary_rpc_method_handler( + servicer.atomicBatch, + request_deserializer=services_dot_transaction__pb2.Transaction.FromString, + response_serializer=services_dot_transaction__response__pb2.TransactionResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'proto.UtilService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + server.add_registered_method_handlers('proto.UtilService', rpc_method_handlers) + + + # This class is part of an EXPERIMENTAL API. +class UtilService(object): + """* + The Utility Service provides a pseudo-random number generator. + + The single gRPC call defined for this service simply reports a single + pseudo-random number in the transaction record. That value may either + be a 32-bit integer within a requested range, or a 384-bit byte array. + + ### Block Stream Effects + The requested value is reported exclusively in a `UtilPrngOutput` message. + """ + + @staticmethod + def prng(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/proto.UtilService/prng', + services_dot_transaction__pb2.Transaction.SerializeToString, + services_dot_transaction__response__pb2.TransactionResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def atomicBatch(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/proto.UtilService/atomicBatch', + services_dot_transaction__pb2.Transaction.SerializeToString, + services_dot_transaction__response__pb2.TransactionResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) diff --git a/src/hiero_sdk_python/query/account_info_query.py b/src/hiero_sdk_python/query/account_info_query.py index 0c74c2f6a..047ab2a26 100644 --- a/src/hiero_sdk_python/query/account_info_query.py +++ b/src/hiero_sdk_python/query/account_info_query.py @@ -25,7 +25,6 @@ def __init__(self, account_id: Optional[AccountId] = None): account_id (Optional[AccountId], optional): The ID of the account to query. """ super().__init__() - self.account_id : Optional[AccountId] = account_id def set_account_id(self, account_id: AccountId): """ diff --git a/tests/unit/account_info_test.py b/tests/unit/account_info_test.py index ad0bbf29e..2c432bd6b 100644 --- a/tests/unit/account_info_test.py +++ b/tests/unit/account_info_test.py @@ -9,6 +9,7 @@ from hiero_sdk_python.tokens.token_relationship import TokenRelationship from hiero_sdk_python.tokens.token_id import TokenId from hiero_sdk_python.hapi.services.crypto_get_info_pb2 import CryptoGetInfoResponse +from hiero_sdk_python.staking_info import StakingInfo pytestmark = pytest.mark.unit @@ -28,6 +29,8 @@ def account_info(): token_relationships=[], account_memo="Test account memo", owned_nfts=5, + max_automatic_token_associations=10, + staking_info=None ) @@ -47,6 +50,8 @@ def proto_account_info(): tokenRelationships=[], memo="Test account memo", ownedNfts=5, + max_automatic_token_associations=10, + staking_info=None ) return proto @@ -65,6 +70,32 @@ def test_account_info_initialization(account_info): assert account_info.token_relationships == [] assert account_info.account_memo == "Test account memo" assert account_info.owned_nfts == 5 + assert account_info.max_automatic_token_associations == 10 + assert account_info.staking_info is None + +def test_from_proto_with_staking_info(): + """Test the from_proto method of the AccountInfo class with staking info""" + public_key = PrivateKey.generate_ed25519().public_key() + + staking_info={ + "decline_reward": True, + "staked_node_id": 3, + "staked_account_id": None + } + + proto = CryptoGetInfoResponse.AccountInfo( + accountID=AccountId(0, 0, 100)._to_proto(), + key=public_key._to_proto(), + balance=5000000, + + + ) + + account_info = AccountInfo._from_proto(proto) + + assert account_info.staking_info is not None + assert account_info.staking_info.decline_reward is True + assert account_info.staking_info.staked_node_id == 3 def test_account_info_default_initialization(): @@ -82,7 +113,25 @@ def test_account_info_default_initialization(): assert account_info.token_relationships == [] assert account_info.account_memo is None assert account_info.owned_nfts is None + assert account_info.max_automatic_token_associations is None + assert account_info.staking_info is None + +def test_staking_info_persistence(account_info): + """Ensure staking info is preserved through proto conversion""" + + account_info.staking_info = StakingInfo( + decline_reward=True, + staked_node_id=5, + staked_account_id=None + ) + + proto = account_info._to_proto() + converted_info = AccountInfo._from_proto(proto) + assert converted_info.staking_info is not None + assert converted_info.staking_info.decline_reward is True + assert converted_info.staking_info.staked_node_id == 5 + assert converted_info.staking_info.staked_account_id is None def test_from_proto(proto_account_info): """Test the from_proto method of the AccountInfo class""" @@ -100,6 +149,8 @@ def test_from_proto(proto_account_info): assert account_info.token_relationships == [] assert account_info.account_memo == "Test account memo" assert account_info.owned_nfts == 5 + assert account_info.max_automatic_token_associations == 10 + assert account_info.staking_info == None def test_from_proto_with_token_relationships(): @@ -141,6 +192,11 @@ def test_to_proto(account_info): assert proto.tokenRelationships == [] assert proto.memo == "Test account memo" assert proto.ownedNfts == 5 + assert proto.max_automatic_token_associations == 10 + assert not proto.HasField("staking_info") + + + def test_to_proto_with_none_values(): @@ -192,6 +248,7 @@ def test_proto_conversion(account_info): ) assert converted_account_info.account_memo == account_info.account_memo assert converted_account_info.owned_nfts == account_info.owned_nfts + assert converted_account_info.staking_info == account_info.staking_info def test_str_and_repr(account_info): diff --git a/tests/unit/topic_info_test.py b/tests/unit/topic_info_test.py index ca6b69abd..c1c208b7f 100644 --- a/tests/unit/topic_info_test.py +++ b/tests/unit/topic_info_test.py @@ -253,7 +253,7 @@ def test_repr_and_str(topic_info): assert "memo='Test topic memo'" in repr_output assert "sequence_number=42" in repr_output assert "running_hash=0x0102030405060708" in repr_output - assert "expiration_time=2021-07-01 00:00:00" in repr_output + assert "expiration_time=2021-07-01" in str_output assert "auto_renew_period=7776000" in repr_output def test_str_formatting(topic_info): @@ -264,7 +264,8 @@ def test_str_formatting(topic_info): assert "memo='Test topic memo'" in str_output assert "running_hash=0x0102030405060708" in str_output assert "sequence_number=42" in str_output - assert "expiration_time=2021-07-01 00:00:00" in str_output + # Instead of the full date-time string + assert "expiration_time=2021-07-01" in str_output assert "admin_key=ed25519(" in str_output assert "submit_key=ed25519(" in str_output assert "auto_renew_period=7776000" in str_output