github.com/hashgraph/hedera-sdk-go/v2@v2.48.0/request_type.go (about) 1 package hedera 2 3 /*- 4 * 5 * Hedera Go SDK 6 * 7 * Copyright (C) 2020 - 2024 Hedera Hashgraph, LLC 8 * 9 * Licensed under the Apache License, Version 2.0 (the "License"); 10 * you may not use this file except in compliance with the License. 11 * You may obtain a copy of the License at 12 * 13 * http://www.apache.org/licenses/LICENSE-2.0 14 * 15 * Unless required by applicable law or agreed to in writing, software 16 * distributed under the License is distributed on an "AS IS" BASIS, 17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 * See the License for the specific language governing permissions and 19 * limitations under the License. 20 * 21 */ 22 23 import ( 24 "fmt" 25 ) 26 27 type RequestType uint32 28 29 const ( 30 // UNSPECIFIED - Need to keep first value as unspecified because first element is ignored and not parsed (0 is ignored by parser) 31 RequestTypeNone RequestType = 0 32 // crypto transfe 33 RequestTypeCryptoTransfer RequestType = 1 34 // crypto update account 35 RequestTypeCryptoUpdate RequestType = 2 36 // crypto delete account 37 RequestTypeCryptoDelete RequestType = 3 38 // Add a livehash to a crypto account 39 RequestTypeCryptoAddLiveHash RequestType = 4 40 // Delete a livehash from a crypto account 41 RequestTypeCryptoDeleteLiveHash RequestType = 5 42 // Smart Contract Call 43 RequestTypeContractCall RequestType = 6 44 // Smart Contract Create Contract 45 RequestTypeContractCreate RequestType = 7 46 // Smart Contract update contract 47 RequestTypeContractUpdate RequestType = 8 48 // File Operation create file 49 RequestTypeFileCreate RequestType = 9 50 // File Operation append file 51 RequestTypeFileAppend RequestType = 10 52 // File Operation update file 53 RequestTypeFileUpdate RequestType = 11 54 // File Operation delete file 55 RequestTypeFileDelete RequestType = 12 56 // crypto get account balance 57 RequestTypeCryptoGetAccountBalance RequestType = 13 58 // crypto get account record 59 RequestTypeCryptoGetAccountRecords RequestType = 14 60 // Crypto get info 61 RequestTypeCryptoGetInfo RequestType = 15 62 // Smart Contract Call 63 RequestTypeContractCallLocal RequestType = 16 64 // Smart Contract get info 65 RequestTypeContractGetInfo RequestType = 17 66 // Smart Contract, get the byte code 67 RequestTypeContractGetBytecode RequestType = 18 68 // Smart Contract, get by _Solidity ID 69 RequestTypeGetBySolidityID RequestType = 19 70 // Smart Contract, get by key 71 RequestTypeGetByKey RequestType = 20 72 // Get a live hash from a crypto account 73 RequestTypeCryptoGetLiveHash RequestType = 21 74 // Crypto, get the stakers for the _Node 75 RequestTypeCryptoGetStakers RequestType = 22 76 // File Operations get file contents 77 RequestTypeFileGetContents RequestType = 23 78 // File Operations get the info of the file 79 RequestTypeFileGetInfo RequestType = 24 80 // Crypto get the transaction records 81 RequestTypeTransactionGetRecord RequestType = 25 82 // Contract get the transaction records 83 RequestTypeContractGetRecords RequestType = 26 84 // crypto create account 85 RequestTypeCryptoCreate RequestType = 27 86 // system delete file 87 RequestTypeSystemDelete RequestType = 28 88 // system undelete file 89 RequestTypeSystemUndelete RequestType = 29 90 // delete contract 91 RequestTypeContractDelete RequestType = 30 92 // freeze 93 RequestTypeFreeze RequestType = 31 94 // Create Tx Record 95 RequestTypeCreateTransactionRecord RequestType = 32 96 // Crypto Auto Renew 97 RequestTypeCryptoAccountAutoRenew RequestType = 33 98 // Contract Auto Renew 99 RequestTypeContractAutoRenew RequestType = 34 100 // Get Version 101 RequestTypeGetVersionInfo RequestType = 35 102 // Transaction Get Receipt 103 RequestTypeTransactionGetReceipt RequestType = 36 104 // Create Topic 105 RequestTypeConsensusCreateTopic RequestType = 50 106 // Update Topic 107 RequestTypeConsensusUpdateTopic RequestType = 51 108 // Delete Topic 109 RequestTypeConsensusDeleteTopic RequestType = 52 110 // Get Topic information 111 RequestTypeConsensusGetTopicInfo RequestType = 53 112 // Submit message to topic 113 RequestTypeConsensusSubmitMessage RequestType = 54 114 RequestTypeUncheckedSubmit RequestType = 55 115 // Create Token 116 RequestTypeTokenCreate RequestType = 56 117 // Get Token information 118 RequestTypeTokenGetInfo RequestType = 58 119 // Freeze Account 120 RequestTypeTokenFreezeAccount RequestType = 59 121 // Unfreeze Account 122 RequestTypeTokenUnfreezeAccount RequestType = 60 123 // Grant KYC to Account 124 RequestTypeTokenGrantKycToAccount RequestType = 61 125 // Revoke KYC from Account 126 RequestTypeTokenRevokeKycFromAccount RequestType = 62 127 // Delete Token 128 RequestTypeTokenDelete RequestType = 63 129 // Update Token 130 RequestTypeTokenUpdate RequestType = 64 131 // Mint tokens to treasury 132 RequestTypeTokenMint RequestType = 65 133 // Burn tokens from treasury 134 RequestTypeTokenBurn RequestType = 66 135 // Wipe token amount from Account holder 136 RequestTypeTokenAccountWipe RequestType = 67 137 // Associate tokens to an account 138 RequestTypeTokenAssociateToAccount RequestType = 68 139 // Dissociate tokens from an account 140 RequestTypeTokenDissociateFromAccount RequestType = 69 141 // Create Scheduled Transaction 142 RequestTypeScheduleCreate RequestType = 70 143 // Delete Scheduled Transaction 144 RequestTypeScheduleDelete RequestType = 71 145 // Sign Scheduled Transaction 146 RequestTypeScheduleSign RequestType = 72 147 // Get Scheduled Transaction Information 148 RequestTypeScheduleGetInfo RequestType = 73 149 ) 150 151 // String() returns a string representation of the status 152 func (requestType RequestType) String() string { // nolint 153 switch requestType { 154 case RequestTypeNone: 155 return "NONE" 156 case RequestTypeCryptoTransfer: 157 return "CRYPTO_TRANSFER" 158 case RequestTypeCryptoUpdate: 159 return "CRYPTO_UPDATE" 160 case RequestTypeCryptoDelete: 161 return "CRYPTO_DELETE" 162 case RequestTypeCryptoAddLiveHash: 163 return "CRYPTO_ADD_LIVE_HASH" 164 case RequestTypeCryptoDeleteLiveHash: 165 return "CRYPTO_DELETE_LIVE_HASH" 166 case RequestTypeContractCall: 167 return "CONTRACT_CALL" 168 case RequestTypeContractCreate: 169 return "CONTRACT_CREATE" 170 case RequestTypeContractUpdate: 171 return "CONTRACT_UPDATE" 172 case RequestTypeFileCreate: 173 return "FILE_CREATE" 174 case RequestTypeFileAppend: 175 return "FILE_APPEND" 176 case RequestTypeFileUpdate: 177 return "FILE_UPDATE" 178 case RequestTypeFileDelete: 179 return "FILE_DELETE" 180 case RequestTypeCryptoGetAccountBalance: 181 return "CRYPTO_GET_ACCOUNT_BALANCE" 182 case RequestTypeCryptoGetAccountRecords: 183 return "CRYPTO_GET_ACCOUNT_RECORDS" 184 case RequestTypeCryptoGetInfo: 185 return "CRYPTO_GET_INFO" 186 case RequestTypeContractCallLocal: 187 return "CONTRACT_CALL_LOCAL" 188 case RequestTypeContractGetInfo: 189 return "CONTRACT_GET_INFO" 190 case RequestTypeContractGetBytecode: 191 return "CONTRACT_GET_BYTECODE" 192 case RequestTypeGetBySolidityID: 193 return "GET_BY_SOLIDITY_ID" 194 case RequestTypeGetByKey: 195 return "GET_BY_KEY" 196 case RequestTypeCryptoGetLiveHash: 197 return "CRYPTO_GET_LIVE_HASH" 198 case RequestTypeCryptoGetStakers: 199 return "CRYPTO_GET_STAKERS" 200 case RequestTypeFileGetContents: 201 return "FILE_GET_CONTENTS" 202 case RequestTypeFileGetInfo: 203 return "FILE_GET_INFO" 204 case RequestTypeTransactionGetRecord: 205 return "TRANSACTION_GET_RECORD" 206 case RequestTypeContractGetRecords: 207 return "CONTRACT_GET_RECORDS" 208 case RequestTypeCryptoCreate: 209 return "CRYPTO_CREATE" 210 case RequestTypeSystemDelete: 211 return "SYSTEM_DELETE" 212 case RequestTypeSystemUndelete: 213 return "SYSTEM_UNDELETE" 214 case RequestTypeContractDelete: 215 return "CONTRACT_DELETE" 216 case RequestTypeFreeze: 217 return "FREEZE" 218 case RequestTypeCreateTransactionRecord: 219 return "CREATE_TRANSACTION_RECORD" 220 case RequestTypeCryptoAccountAutoRenew: 221 return "CRYPTO_ACCOUNT_AUTO_RENEW" 222 case RequestTypeContractAutoRenew: 223 return "CONTRACT_AUTO_RENEW" 224 case RequestTypeGetVersionInfo: 225 return "GET_VERSION_INFO" 226 case RequestTypeTransactionGetReceipt: 227 return "TRANSACTION_GET_RECEIPT" 228 case RequestTypeConsensusCreateTopic: 229 return "CONSENSUS_CREATE_TOPIC" 230 case RequestTypeConsensusUpdateTopic: 231 return "CONSENSUS_UPDATE_TOPIC" 232 case RequestTypeConsensusDeleteTopic: 233 return "CONSENSUS_DELETE_TOPIC" 234 case RequestTypeConsensusGetTopicInfo: 235 return "CONSENSUS_GET_TOPIC_INFO" 236 case RequestTypeConsensusSubmitMessage: 237 return "CONSENSUS_SUBMIT_MESSAGE" 238 case RequestTypeUncheckedSubmit: 239 return "UNCHECKED_SUBMIT" 240 case RequestTypeTokenCreate: 241 return "TOKEN_CREATE" 242 case RequestTypeTokenGetInfo: 243 return "TOKEN_GET_INFO" 244 case RequestTypeTokenFreezeAccount: 245 return "TOKEN_FREEZE_ACCOUNT" 246 case RequestTypeTokenUnfreezeAccount: 247 return "TOKEN_UNFREEZE_ACCOUNT" 248 case RequestTypeTokenGrantKycToAccount: 249 return "TOKEN_GRANT_KYC_TO_ACCOUNT" 250 case RequestTypeTokenRevokeKycFromAccount: 251 return "TOKEN_REVOKE_KYC_TO_ACCOUNT" 252 case RequestTypeTokenDelete: 253 return "TOKEN_DELETE" 254 case RequestTypeTokenUpdate: 255 return "TOKEN_UPDATE" 256 case RequestTypeTokenMint: 257 return "TOKEN_MINT" 258 case RequestTypeTokenBurn: 259 return "TOKEN_BURN" 260 case RequestTypeTokenAccountWipe: 261 return "TOKEN_ACCOUNT_WIPE" 262 case RequestTypeTokenAssociateToAccount: 263 return "TOKEN_ASSOCIATE_TO_ACCOUNT" 264 case RequestTypeTokenDissociateFromAccount: 265 return "TOKEN_DISSOCIATE_FROM_ACCOUNT" 266 case RequestTypeScheduleCreate: 267 return "SCHEDULE_CREATE" 268 case RequestTypeScheduleDelete: 269 return "SCHEDULE_DELETE" 270 case RequestTypeScheduleSign: 271 return "SCHEDULE_SIGN" 272 case RequestTypeScheduleGetInfo: 273 return "SCHEDULE_GET_INFO" 274 } 275 276 panic(fmt.Sprintf("unreachable: RequestType.String() switch statement is non-exhaustive. RequestType: %v", uint32(requestType))) 277 }