-
Notifications
You must be signed in to change notification settings - Fork 25
/
crypto_create.proto
172 lines (151 loc) · 7.11 KB
/
crypto_create.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
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";
// <<<pbj.java_package = "com.hedera.hapi.node.token">>> 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. After the account is created, the AccountID for it is in the receipt. It
* can also be retrieved with a GetByKey query. Threshold values can be defined, and records are
* generated and stored for 25 hours for any transfer that exceeds the thresholds. This account is
* charged for each record generated, so the thresholds are useful for limiting record generation to
* happen only for large transactions.
*
* The Key field is the key used to sign transactions for this account. If the account has
* receiverSigRequired set to true, then all cryptocurrency transfers must be signed by this
* account's key, both for transfers in and out. If it is false, then only transfers out have to be
* signed by it. When the account is created, the payer account is charged enough hbars so that the
* new account will not expire for the next autoRenewPeriod seconds. When it reaches the expiration
* time, the new account will then be automatically charged to renew for another autoRenewPeriod
* seconds. If it does not have enough hbars to renew for that long, then the remaining hbars are
* used to extend its expiration as long as possible. If it is has a zero balance when it expires,
* then it is deleted. This transaction must be signed by the payer account. If receiverSigRequired
* is false, then the transaction does not have to be signed by the keys in the keys field. If it is
* true, then it must be signed by them, in addition to the keys of the payer account. If the
* auto_renew_account field is set, the key of the referenced account must sign.
*
* An entity (account, file, or smart contract instance) must be created in a particular realm. If
* the realmID is left null, then a new realm will be created with the given admin key. If a new
* realm has a null adminKey, then anyone can create/modify/delete entities in that realm. But if an
* admin key is given, then any transaction to create/modify/delete an entity in that realm must be
* signed by that key, though anyone can still call functions on smart contract instances that exist
* in that realm. A realm ceases to exist when everything within it has expired and no longer
* exists.
*
* The current API ignores shardID, realmID, and newRealmAdminKey, and creates everything in shard 0
* and realm 0, with a null key. Future versions of the API will support multiple realms and
* multiple shards.
*/
message CryptoCreateTransactionBody {
/**
* The key that must sign each transfer out of the account. If receiverSigRequired is true, then
* it must also sign any transfer into the account.
*/
Key key = 1;
/**
* The initial number of tinybars to put into the account
*/
uint64 initialBalance = 2;
/**
* [Deprecated] ID of the account to which this account is proxy staked. If proxyAccountID is null, or is an
* invalid account, or is an account that isn't a node, then this account is automatically proxy
* staked to a node chosen by the network, but without earning payments. If the proxyAccountID
* account refuses to accept proxy staking , or if it is not currently running a node, then it
* will behave as if proxyAccountID was null.
*/
AccountID proxyAccountID = 3 [deprecated = true];
/**
* [Deprecated]. The threshold amount (in tinybars) for which an account record is created for
* any send/withdraw transaction
*/
uint64 sendRecordThreshold = 6 [deprecated=true];
/**
* [Deprecated]. The threshold amount (in tinybars) for which an account record is created for
* any receive/deposit transaction
*/
uint64 receiveRecordThreshold = 7 [deprecated=true];
/**
* If true, this account's key must sign any transaction depositing into this account (in
* addition to all withdrawals)
*/
bool receiverSigRequired = 8;
/**
* The account is charged to extend its expiration date every this many seconds. If it doesn't
* have enough balance, it extends as long as possible. If it is empty when it expires, then it
* is deleted.
*/
Duration autoRenewPeriod = 9;
/**
* The shard in which this account is created
*/
ShardID shardID = 10;
/**
* The realm in which this account is created (leave this null to create a new realm)
*/
RealmID realmID = 11;
/**
* If realmID is null, then this the admin key for the new realm that will be created
*/
Key newRealmAdminKey = 12;
/**
* The memo associated with the account (UTF-8 encoding max 100 bytes)
*/
string memo = 13;
/**
* The maximum number of tokens that an Account can be implicitly associated with. Defaults to 0
* and up to a maximum value of 1000.
*/
int32 max_automatic_token_associations = 14;
/**
* ID of the account or node to which this account is staking.
*/
oneof staked_id {
/**
* ID of the account to which this account is staking.
*/
AccountID staked_account_id = 15;
/**
* ID of the node this account is staked to.
*/
int64 staked_node_id = 16;
}
/**
* If true, the account declines receiving a staking reward. The default value is false.
*/
bool decline_reward = 17;
/**
* The bytes to be used as the account's alias. It will be the
* serialization of a protobuf Key message for an ED25519/ECDSA_SECP256K1 primitive key type. Currently only primitive key bytes are
* supported as the key for an account with an alias. ThresholdKey, KeyList, ContractID, and
* delegatable_contract_id are not supported.
*
* May also be the EOA 20-byte address to create that is derived from the keccak-256 hash of a ECDSA_SECP256K1 primitive key.
*
* A given alias can map to at most one account on the network at a time. This uniqueness will be enforced
* relative to aliases currently on the network at alias assignment.
*
* If a transaction creates an account using an alias, any further crypto transfers to that alias will
* simply be deposited in that account, without creating anything, and with no creation fee being charged.
*/
bytes alias = 18;
}