Skip to content

Commit

Permalink
feat: Updated protobufs
Browse files Browse the repository at this point in the history
  • Loading branch information
andrix10 committed Feb 12, 2021
1 parent ededec1 commit c8515e7
Show file tree
Hide file tree
Showing 164 changed files with 4,053 additions and 2,259 deletions.
1,140 changes: 713 additions & 427 deletions proto/BasicTypes.pb.go

Large diffs are not rendered by default.

50 changes: 43 additions & 7 deletions proto/BasicTypes.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package proto;
* ‌
* Hedera Network Services Protobuf
* ​
* Copyright (C) 2018 - 2020 Hedera Hashgraph, LLC
* 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.
Expand Down Expand Up @@ -62,10 +62,19 @@ message ContractID {
int64 contractNum = 3; //A nonnegative number unique within its realm
}

/* The ID for a transaction. This is used for retrieving receipts and records for a transaction, for appending to a file right after creating it, for instantiating a smart contract with bytecode in a file just created, and internally by the network for detecting when duplicate transactions are submitted. A user might get a transaction processed faster by submitting it to N nodes, each with a different node account, but all with the same TransactionID. Then, the transaction will take effect when the first of all those nodes submits the transaction and it reaches consensus. The other transactions will not take effect. So this could make the transaction take effect faster, if any given node might be slow. However, the full transaction fee is charged for each transaction, so the total fee is N times as much if the transaction is sent to N nodes. */
/*
The ID for a transaction. This is used for retrieving receipts and records for a transaction, for appending to a file right after creating it, for instantiating a smart contract with bytecode in a file just created, and internally by the network for detecting when duplicate transactions are submitted. A user might get a transaction processed faster by submitting it to N nodes, each with a different node account, but all with the same TransactionID. Then, the transaction will take effect when the first of all those nodes submits the transaction and it reaches consensus. The other transactions will not take effect. So this could make the transaction take effect faster, if any given node might be slow. However, the full transaction fee is charged for each transaction, so the total fee is N times as much if the transaction is sent to N nodes.
Applicable to Scheduled Transactions:
- The ID of a Scheduled Transaction has transactionValidStart and accountIDs inherited from the ScheduleCreate transaction that created it. That is to say that they are equal
- The scheduled property is true for Scheduled Transactions
- transactionValidStart, accountID and scheduled properties should be omitted
- Scheduled Transactions should be submitted with only nonce populated (if desired). Nonce is an additional option presented to users so that they can create multiple sequential Scheduled Transactions that have the same transaction body.
*/
message TransactionID {
Timestamp transactionValidStart = 1; // The transaction is invalid if consensusTimestamp < transactionID.transactionStartValid
AccountID accountID = 2; //The Account ID that paid for this transaction
AccountID accountID = 2; // The Account ID that paid for this transaction
bool scheduled = 3; // Whether the Transaction is of type Scheduled or no
bytes nonce = 4; // Used to manipulate the uniqueness check for idempotent schedule transaction creation
}

/* An account, and the amount that it sends or receives during a cryptocurrency or token transfer. */
Expand Down Expand Up @@ -99,6 +108,13 @@ message TokenID {
int64 tokenNum = 3; // A nonnegative token number
}

/* Unique identifier for a Schedule */
message ScheduleID {
int64 shardNum = 1; // A nonnegative shard number
int64 realmNum = 2; // A nonnegative realm number
int64 scheduleNum = 3; // A nonnegative schedule number
}

/* Possible Freeze statuses returned on TokenGetInfoQuery or CryptoGetInfoResponse in TokenRelationship */
enum TokenFreezeStatus {
FreezeNotApplicable = 0;
Expand Down Expand Up @@ -129,8 +145,8 @@ message Key {
oneof key {
ContractID contractID = 1; // smart contract instance that is authorized as if it had signed with a key
bytes ed25519 = 2; // ed25519 public key bytes
bytes RSA_3072 = 3; //RSA-3072 public key bytes
bytes ECDSA_384 = 4; //ECDSA with the p-384 curve public key bytes
bytes RSA_3072 = 3; // RSA-3072 public key bytes
bytes ECDSA_384 = 4; // ECDSA with the p-384 curve public key bytes
ThresholdKey thresholdKey = 5; // a threshold N followed by a list of M keys, any N of which are required to form a valid signature
KeyList keyList = 6; // A list of Keys of the Key type.
}
Expand Down Expand Up @@ -253,7 +269,7 @@ enum HederaFunctionality {
ConsensusSubmitMessage = 54; // Submit message to topic
UncheckedSubmit = 55;
TokenCreate = 56; // Create Token
TokenGetInfo = 58; // Get token information
TokenGetInfo = 58; // Get Token information
TokenFreezeAccount = 59; // Freeze Account
TokenUnfreezeAccount = 60; // Unfreeze Account
TokenGrantKycToAccount = 61; // Grant KYC to Account
Expand All @@ -265,6 +281,10 @@ enum HederaFunctionality {
TokenAccountWipe = 67; // Wipe token amount from Account holder
TokenAssociateToAccount = 68; // Associate tokens to an account
TokenDissociateFromAccount = 69; // Dissociate tokens from an account
ScheduleCreate = 70; // Create Scheduled Transaction
ScheduleDelete = 71; // Delete Scheduled Transaction
ScheduleSign = 72; // Sign Scheduled Transaction
ScheduleGetInfo = 73; // Get Scheduled Transaction Information
}

/*
Expand Down Expand Up @@ -357,12 +377,28 @@ message ServicesConfigurationList {
repeated Setting nameValue = 1; // list of name value pairs of the application properties
}


/* Token's information related to the given Account */
message TokenRelationship {
TokenID tokenId = 1; // The ID of the token
string symbol = 2; // The Symbol of the token
uint64 balance = 3; // The balance that the Account holds in the smallest denomination
TokenKycStatus kycStatus = 4; // The KYC status of the account (KycNotApplicable, Granted or Revoked). If the token does not have KYC key, KycNotApplicable is returned
TokenFreezeStatus freezeStatus = 5; // The Freeze status of the account (FreezeNotApplicable, Frozen or Unfrozen). If the token does not have Freeze key, FreezeNotApplicable is returned
uint32 decimals = 6; // Tokens divide into <tt>10<sup>decimals</sup></tt> pieces
}

/* A number of <i>transferable units</i> of a certain token.
The transferable unit of a token is its smallest denomination, as given by the token's <tt>decimals</tt> property---each minted token contains <tt>10<sup>decimals</sup></tt> transferable units. For example, we could think of the cent as the transferable unit of the US dollar (<tt>decimals=2</tt>); and the tinybar as the transferable unit of hbar (<tt>decimals=8</tt>).
Transferable units are not directly comparable across different tokens. */
message TokenBalance {
TokenID tokenId = 1; // A unique token id
uint64 balance = 2; // A number of transferable units of the identified token
uint32 decimals = 3; // Tokens divide into <tt>10<sup>decimals</sup></tt> pieces
}

/* A sequence of token balances */
message TokenBalances {
repeated TokenBalance tokenBalances = 1;
}
9 changes: 2 additions & 7 deletions proto/ConsensusCreateTopic.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion proto/ConsensusCreateTopic.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package proto;
* ‌
* Hedera Network Services Protobuf
* ​
* Copyright (C) 2018 - 2020 Hedera Hashgraph, LLC
* 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.
Expand Down
9 changes: 2 additions & 7 deletions proto/ConsensusDeleteTopic.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion proto/ConsensusDeleteTopic.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package proto;
* ‌
* Hedera Network Services Protobuf
* ​
* Copyright (C) 2018 - 2020 Hedera Hashgraph, LLC
* 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.
Expand Down
9 changes: 2 additions & 7 deletions proto/ConsensusGetTopicInfo.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion proto/ConsensusGetTopicInfo.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package proto;
* ‌
* Hedera Network Services Protobuf
* ​
* Copyright (C) 2018 - 2020 Hedera Hashgraph, LLC
* 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.
Expand Down
9 changes: 2 additions & 7 deletions proto/ConsensusService.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion proto/ConsensusService.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package proto;
* ‌
* Hedera Network Services Protobuf
* ​
* Copyright (C) 2018 - 2020 Hedera Hashgraph, LLC
* 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.
Expand Down
9 changes: 2 additions & 7 deletions proto/ConsensusSubmitMessage.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion proto/ConsensusSubmitMessage.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package proto;
* ‌
* Hedera Network Services Protobuf
* ​
* Copyright (C) 2018 - 2020 Hedera Hashgraph, LLC
* 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.
Expand Down
19 changes: 7 additions & 12 deletions proto/ConsensusTopicInfo.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions proto/ConsensusTopicInfo.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package proto;
* ‌
* Hedera Network Services Protobuf
* ​
* Copyright (C) 2018 - 2020 Hedera Hashgraph, LLC
* 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.
Expand All @@ -32,7 +32,7 @@ import "proto/Timestamp.proto";

// Current state of a topic.
message ConsensusTopicInfo {
string memo = 1; // Short publicly visible memo about the topic. No guarantee of uniqueness.
string memo = 1; // The memo associated with the topic (UTF-8 encoding max 100 bytes)

// When a topic is created, its running hash is initialized to 48 bytes of binary zeros.
// For each submitted message, the topic's running hash is then updated to the output
Expand All @@ -52,6 +52,6 @@ message ConsensusTopicInfo {
Key adminKey = 5; // Access control for update/delete of the topic. Null if there is no key.
Key submitKey = 6; // Access control for ConsensusService.submitMessage. Null if there is no key.

Duration autoRenewPeriod = 7;
AccountID autoRenewAccount = 8; // Null if there is no autoRenewAccount.
Duration autoRenewPeriod = 7; // If an auto-renew account is specified, when the topic expires, its lifetime will be extended by up to this duration (depending on the solvency of the auto-renew account). If the auto-renew account has no funds at all, the topic will be deleted instead.
AccountID autoRenewAccount = 8; // The account, if any, to charge for automatic renewal of the topic's lifetime upon expiry.
}
Loading

0 comments on commit c8515e7

Please sign in to comment.