
shgraph.hedera-protobuf-java-api.0.13.2.source-code.FileCreate.proto Maven / Gradle / Ivy
syntax = "proto3";
package proto;
/*-
*
* Hedera Network Services Protobuf
*
* Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
option java_package = "com.hederahashgraph.api.proto.java";
option java_multiple_files = true;
import "BasicTypes.proto";
import "Timestamp.proto";
/* Create a new file, containing the given contents.
After the file is created, the FileID for it can be found in the receipt, or record, or retrieved with a GetByKey query.
The file contains the specified contents (possibly empty). The file will automatically disappear at the expirationTime, unless its expiration is extended by another transaction before that time. If the file is deleted, then its contents will become empty and it will be marked as deleted until it expires, and then it will cease to exist.
The keys field is a list of keys. All the keys on the list must sign to create or modify a file, but only one of them needs to sign in order to delete the file. Each of those "keys" may itself be threshold key containing other keys (including other threshold keys). In other words, the behavior is an AND for create/modify, OR for delete. This is useful for acting as a revocation server. If it is desired to have the behavior be AND for all 3 operations (or OR for all 3), then the list should have only a single Key, which is a threshold key, with N=1 for OR, N=M for AND.
If a file is created without ANY keys in the keys field, the file is immutable and ONLY the expirationTime of the file can be changed with a FileUpdate transaction. The file contents or its keys cannot be changed.
An entity (account, file, or smart contract instance) must be created in a particular realm. If the realmID is left null, then a new realm will be created with the given admin key. If a new realm has a null adminKey, then anyone can create/modify/delete entities in that realm. But if an admin key is given, then any transaction to create/modify/delete an entity in that realm must be signed by that key, though anyone can still call functions on smart contract instances that exist in that realm. A realm ceases to exist when everything within it has expired and no longer exists.
The current API ignores shardID, realmID, and newRealmAdminKey, and creates everything in shard 0 and realm 0, with a null key. Future versions of the API will support multiple realms and multiple shards.
*/
message FileCreateTransactionBody {
Timestamp expirationTime = 2; // The time at which this file should expire (unless FileUpdateTransaction is used before then to extend its life)
KeyList keys = 3; // All these keys must sign to create or modify the file. Any one of them can sign to delete the file.
bytes contents = 4; // The bytes that are the contents of the file
ShardID shardID = 5; // Shard in which this file is created
RealmID realmID = 6; // The Realm in which to the file is created (leave this null to create a new realm)
Key newRealmAdminKey = 7; // If realmID is null, then this the admin key for the new realm that will be created
string memo = 8; // The memo associated with the file (UTF-8 encoding max 100 bytes)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy