UNPKG

@hashgraph/sdk

Version:
1,088 lines (1,081 loc) 115 kB
// SPDX-License-Identifier: Apache-2.0 /** * @namespace proto * @typedef {import("@hashgraph/proto").proto.ResponseCodeEnum} HieroProto.proto.ResponseCodeEnum */ export default class Status { /** * @hideconstructor * @internal * @param {number} code */ constructor(code) { /** @readonly */ this._code = code; Object.freeze(this); } /** * @returns {string} */ toString() { switch (this) { case Status.Ok: return "OK"; case Status.InvalidTransaction: return "INVALID_TRANSACTION"; case Status.PayerAccountNotFound: return "PAYER_ACCOUNT_NOT_FOUND"; case Status.InvalidNodeAccount: return "INVALID_NODE_ACCOUNT"; case Status.TransactionExpired: return "TRANSACTION_EXPIRED"; case Status.InvalidTransactionStart: return "INVALID_TRANSACTION_START"; case Status.InvalidTransactionDuration: return "INVALID_TRANSACTION_DURATION"; case Status.InvalidSignature: return "INVALID_SIGNATURE"; case Status.MemoTooLong: return "MEMO_TOO_LONG"; case Status.InsufficientTxFee: return "INSUFFICIENT_TX_FEE"; case Status.InsufficientPayerBalance: return "INSUFFICIENT_PAYER_BALANCE"; case Status.DuplicateTransaction: return "DUPLICATE_TRANSACTION"; case Status.Busy: return "BUSY"; case Status.NotSupported: return "NOT_SUPPORTED"; case Status.InvalidFileId: return "INVALID_FILE_ID"; case Status.InvalidAccountId: return "INVALID_ACCOUNT_ID"; case Status.InvalidContractId: return "INVALID_CONTRACT_ID"; case Status.InvalidTransactionId: return "INVALID_TRANSACTION_ID"; case Status.ReceiptNotFound: return "RECEIPT_NOT_FOUND"; case Status.RecordNotFound: return "RECORD_NOT_FOUND"; case Status.InvalidSolidityId: return "INVALID_SOLIDITY_ID"; case Status.Unknown: return "UNKNOWN"; case Status.Success: return "SUCCESS"; case Status.FailInvalid: return "FAIL_INVALID"; case Status.FailFee: return "FAIL_FEE"; case Status.FailBalance: return "FAIL_BALANCE"; case Status.KeyRequired: return "KEY_REQUIRED"; case Status.BadEncoding: return "BAD_ENCODING"; case Status.InsufficientAccountBalance: return "INSUFFICIENT_ACCOUNT_BALANCE"; case Status.InvalidSolidityAddress: return "INVALID_SOLIDITY_ADDRESS"; case Status.InsufficientGas: return "INSUFFICIENT_GAS"; case Status.ContractSizeLimitExceeded: return "CONTRACT_SIZE_LIMIT_EXCEEDED"; case Status.LocalCallModificationException: return "LOCAL_CALL_MODIFICATION_EXCEPTION"; case Status.ContractRevertExecuted: return "CONTRACT_REVERT_EXECUTED"; case Status.ContractExecutionException: return "CONTRACT_EXECUTION_EXCEPTION"; case Status.InvalidReceivingNodeAccount: return "INVALID_RECEIVING_NODE_ACCOUNT"; case Status.MissingQueryHeader: return "MISSING_QUERY_HEADER"; case Status.AccountUpdateFailed: return "ACCOUNT_UPDATE_FAILED"; case Status.InvalidKeyEncoding: return "INVALID_KEY_ENCODING"; case Status.NullSolidityAddress: return "NULL_SOLIDITY_ADDRESS"; case Status.ContractUpdateFailed: return "CONTRACT_UPDATE_FAILED"; case Status.InvalidQueryHeader: return "INVALID_QUERY_HEADER"; case Status.InvalidFeeSubmitted: return "INVALID_FEE_SUBMITTED"; case Status.InvalidPayerSignature: return "INVALID_PAYER_SIGNATURE"; case Status.KeyNotProvided: return "KEY_NOT_PROVIDED"; case Status.InvalidExpirationTime: return "INVALID_EXPIRATION_TIME"; case Status.NoWaclKey: return "NO_WACL_KEY"; case Status.FileContentEmpty: return "FILE_CONTENT_EMPTY"; case Status.InvalidAccountAmounts: return "INVALID_ACCOUNT_AMOUNTS"; case Status.EmptyTransactionBody: return "EMPTY_TRANSACTION_BODY"; case Status.InvalidTransactionBody: return "INVALID_TRANSACTION_BODY"; case Status.InvalidSignatureTypeMismatchingKey: return "INVALID_SIGNATURE_TYPE_MISMATCHING_KEY"; case Status.InvalidSignatureCountMismatchingKey: return "INVALID_SIGNATURE_COUNT_MISMATCHING_KEY"; case Status.EmptyLiveHashBody: return "EMPTY_LIVE_HASH_BODY"; case Status.EmptyLiveHash: return "EMPTY_LIVE_HASH"; case Status.EmptyLiveHashKeys: return "EMPTY_LIVE_HASH_KEYS"; case Status.InvalidLiveHashSize: return "INVALID_LIVE_HASH_SIZE"; case Status.EmptyQueryBody: return "EMPTY_QUERY_BODY"; case Status.EmptyLiveHashQuery: return "EMPTY_LIVE_HASH_QUERY"; case Status.LiveHashNotFound: return "LIVE_HASH_NOT_FOUND"; case Status.AccountIdDoesNotExist: return "ACCOUNT_ID_DOES_NOT_EXIST"; case Status.LiveHashAlreadyExists: return "LIVE_HASH_ALREADY_EXISTS"; case Status.InvalidFileWacl: return "INVALID_FILE_WACL"; case Status.SerializationFailed: return "SERIALIZATION_FAILED"; case Status.TransactionOversize: return "TRANSACTION_OVERSIZE"; case Status.TransactionTooManyLayers: return "TRANSACTION_TOO_MANY_LAYERS"; case Status.ContractDeleted: return "CONTRACT_DELETED"; case Status.PlatformNotActive: return "PLATFORM_NOT_ACTIVE"; case Status.KeyPrefixMismatch: return "KEY_PREFIX_MISMATCH"; case Status.PlatformTransactionNotCreated: return "PLATFORM_TRANSACTION_NOT_CREATED"; case Status.InvalidRenewalPeriod: return "INVALID_RENEWAL_PERIOD"; case Status.InvalidPayerAccountId: return "INVALID_PAYER_ACCOUNT_ID"; case Status.AccountDeleted: return "ACCOUNT_DELETED"; case Status.FileDeleted: return "FILE_DELETED"; case Status.AccountRepeatedInAccountAmounts: return "ACCOUNT_REPEATED_IN_ACCOUNT_AMOUNTS"; case Status.SettingNegativeAccountBalance: return "SETTING_NEGATIVE_ACCOUNT_BALANCE"; case Status.ObtainerRequired: return "OBTAINER_REQUIRED"; case Status.ObtainerSameContractId: return "OBTAINER_SAME_CONTRACT_ID"; case Status.ObtainerDoesNotExist: return "OBTAINER_DOES_NOT_EXIST"; case Status.ModifyingImmutableContract: return "MODIFYING_IMMUTABLE_CONTRACT"; case Status.FileSystemException: return "FILE_SYSTEM_EXCEPTION"; case Status.AutorenewDurationNotInRange: return "AUTORENEW_DURATION_NOT_IN_RANGE"; case Status.ErrorDecodingBytestring: return "ERROR_DECODING_BYTESTRING"; case Status.ContractFileEmpty: return "CONTRACT_FILE_EMPTY"; case Status.ContractBytecodeEmpty: return "CONTRACT_BYTECODE_EMPTY"; case Status.InvalidInitialBalance: return "INVALID_INITIAL_BALANCE"; case Status.InvalidReceiveRecordThreshold: return "INVALID_RECEIVE_RECORD_THRESHOLD"; case Status.InvalidSendRecordThreshold: return "INVALID_SEND_RECORD_THRESHOLD"; case Status.AccountIsNotGenesisAccount: return "ACCOUNT_IS_NOT_GENESIS_ACCOUNT"; case Status.PayerAccountUnauthorized: return "PAYER_ACCOUNT_UNAUTHORIZED"; case Status.InvalidFreezeTransactionBody: return "INVALID_FREEZE_TRANSACTION_BODY"; case Status.FreezeTransactionBodyNotFound: return "FREEZE_TRANSACTION_BODY_NOT_FOUND"; case Status.TransferListSizeLimitExceeded: return "TRANSFER_LIST_SIZE_LIMIT_EXCEEDED"; case Status.ResultSizeLimitExceeded: return "RESULT_SIZE_LIMIT_EXCEEDED"; case Status.NotSpecialAccount: return "NOT_SPECIAL_ACCOUNT"; case Status.ContractNegativeGas: return "CONTRACT_NEGATIVE_GAS"; case Status.ContractNegativeValue: return "CONTRACT_NEGATIVE_VALUE"; case Status.InvalidFeeFile: return "INVALID_FEE_FILE"; case Status.InvalidExchangeRateFile: return "INVALID_EXCHANGE_RATE_FILE"; case Status.InsufficientLocalCallGas: return "INSUFFICIENT_LOCAL_CALL_GAS"; case Status.EntityNotAllowedToDelete: return "ENTITY_NOT_ALLOWED_TO_DELETE"; case Status.AuthorizationFailed: return "AUTHORIZATION_FAILED"; case Status.FileUploadedProtoInvalid: return "FILE_UPLOADED_PROTO_INVALID"; case Status.FileUploadedProtoNotSavedToDisk: return "FILE_UPLOADED_PROTO_NOT_SAVED_TO_DISK"; case Status.FeeScheduleFilePartUploaded: return "FEE_SCHEDULE_FILE_PART_UPLOADED"; case Status.ExchangeRateChangeLimitExceeded: return "EXCHANGE_RATE_CHANGE_LIMIT_EXCEEDED"; case Status.MaxContractStorageExceeded: return "MAX_CONTRACT_STORAGE_EXCEEDED"; case Status.TransferAccountSameAsDeleteAccount: return "TRANSFER_ACCOUNT_SAME_AS_DELETE_ACCOUNT"; case Status.TotalLedgerBalanceInvalid: return "TOTAL_LEDGER_BALANCE_INVALID"; case Status.ExpirationReductionNotAllowed: return "EXPIRATION_REDUCTION_NOT_ALLOWED"; case Status.MaxGasLimitExceeded: return "MAX_GAS_LIMIT_EXCEEDED"; case Status.MaxFileSizeExceeded: return "MAX_FILE_SIZE_EXCEEDED"; case Status.ReceiverSigRequired: return "RECEIVER_SIG_REQUIRED"; case Status.InvalidTopicId: return "INVALID_TOPIC_ID"; case Status.InvalidAdminKey: return "INVALID_ADMIN_KEY"; case Status.InvalidSubmitKey: return "INVALID_SUBMIT_KEY"; case Status.Unauthorized: return "UNAUTHORIZED"; case Status.InvalidTopicMessage: return "INVALID_TOPIC_MESSAGE"; case Status.InvalidAutorenewAccount: return "INVALID_AUTORENEW_ACCOUNT"; case Status.AutorenewAccountNotAllowed: return "AUTORENEW_ACCOUNT_NOT_ALLOWED"; case Status.TopicExpired: return "TOPIC_EXPIRED"; case Status.InvalidChunkNumber: return "INVALID_CHUNK_NUMBER"; case Status.InvalidChunkTransactionId: return "INVALID_CHUNK_TRANSACTION_ID"; case Status.AccountFrozenForToken: return "ACCOUNT_FROZEN_FOR_TOKEN"; case Status.TokensPerAccountLimitExceeded: return "TOKENS_PER_ACCOUNT_LIMIT_EXCEEDED"; case Status.InvalidTokenId: return "INVALID_TOKEN_ID"; case Status.InvalidTokenDecimals: return "INVALID_TOKEN_DECIMALS"; case Status.InvalidTokenInitialSupply: return "INVALID_TOKEN_INITIAL_SUPPLY"; case Status.InvalidTreasuryAccountForToken: return "INVALID_TREASURY_ACCOUNT_FOR_TOKEN"; case Status.InvalidTokenSymbol: return "INVALID_TOKEN_SYMBOL"; case Status.TokenHasNoFreezeKey: return "TOKEN_HAS_NO_FREEZE_KEY"; case Status.TransfersNotZeroSumForToken: return "TRANSFERS_NOT_ZERO_SUM_FOR_TOKEN"; case Status.MissingTokenSymbol: return "MISSING_TOKEN_SYMBOL"; case Status.TokenSymbolTooLong: return "TOKEN_SYMBOL_TOO_LONG"; case Status.AccountKycNotGrantedForToken: return "ACCOUNT_KYC_NOT_GRANTED_FOR_TOKEN"; case Status.TokenHasNoKycKey: return "TOKEN_HAS_NO_KYC_KEY"; case Status.InsufficientTokenBalance: return "INSUFFICIENT_TOKEN_BALANCE"; case Status.TokenWasDeleted: return "TOKEN_WAS_DELETED"; case Status.TokenHasNoSupplyKey: return "TOKEN_HAS_NO_SUPPLY_KEY"; case Status.TokenHasNoWipeKey: return "TOKEN_HAS_NO_WIPE_KEY"; case Status.InvalidTokenMintAmount: return "INVALID_TOKEN_MINT_AMOUNT"; case Status.InvalidTokenBurnAmount: return "INVALID_TOKEN_BURN_AMOUNT"; case Status.TokenNotAssociatedToAccount: return "TOKEN_NOT_ASSOCIATED_TO_ACCOUNT"; case Status.CannotWipeTokenTreasuryAccount: return "CANNOT_WIPE_TOKEN_TREASURY_ACCOUNT"; case Status.InvalidKycKey: return "INVALID_KYC_KEY"; case Status.InvalidWipeKey: return "INVALID_WIPE_KEY"; case Status.InvalidFreezeKey: return "INVALID_FREEZE_KEY"; case Status.InvalidSupplyKey: return "INVALID_SUPPLY_KEY"; case Status.MissingTokenName: return "MISSING_TOKEN_NAME"; case Status.TokenNameTooLong: return "TOKEN_NAME_TOO_LONG"; case Status.InvalidWipingAmount: return "INVALID_WIPING_AMOUNT"; case Status.TokenIsImmutable: return "TOKEN_IS_IMMUTABLE"; case Status.TokenAlreadyAssociatedToAccount: return "TOKEN_ALREADY_ASSOCIATED_TO_ACCOUNT"; case Status.TransactionRequiresZeroTokenBalances: return "TRANSACTION_REQUIRES_ZERO_TOKEN_BALANCES"; case Status.AccountIsTreasury: return "ACCOUNT_IS_TREASURY"; case Status.TokenIdRepeatedInTokenList: return "TOKEN_ID_REPEATED_IN_TOKEN_LIST"; case Status.TokenTransferListSizeLimitExceeded: return "TOKEN_TRANSFER_LIST_SIZE_LIMIT_EXCEEDED"; case Status.EmptyTokenTransferBody: return "EMPTY_TOKEN_TRANSFER_BODY"; case Status.EmptyTokenTransferAccountAmounts: return "EMPTY_TOKEN_TRANSFER_ACCOUNT_AMOUNTS"; case Status.InvalidScheduleId: return "INVALID_SCHEDULE_ID"; case Status.ScheduleIsImmutable: return "SCHEDULE_IS_IMMUTABLE"; case Status.InvalidSchedulePayerId: return "INVALID_SCHEDULE_PAYER_ID"; case Status.InvalidScheduleAccountId: return "INVALID_SCHEDULE_ACCOUNT_ID"; case Status.NoNewValidSignatures: return "NO_NEW_VALID_SIGNATURES"; case Status.UnresolvableRequiredSigners: return "UNRESOLVABLE_REQUIRED_SIGNERS"; case Status.ScheduledTransactionNotInWhitelist: return "SCHEDULED_TRANSACTION_NOT_IN_WHITELIST"; case Status.SomeSignaturesWereInvalid: return "SOME_SIGNATURES_WERE_INVALID"; case Status.TransactionIdFieldNotAllowed: return "TRANSACTION_ID_FIELD_NOT_ALLOWED"; case Status.IdenticalScheduleAlreadyCreated: return "IDENTICAL_SCHEDULE_ALREADY_CREATED"; case Status.InvalidZeroByteInString: return "INVALID_ZERO_BYTE_IN_STRING"; case Status.ScheduleAlreadyDeleted: return "SCHEDULE_ALREADY_DELETED"; case Status.ScheduleAlreadyExecuted: return "SCHEDULE_ALREADY_EXECUTED"; case Status.MessageSizeTooLarge: return "MESSAGE_SIZE_TOO_LARGE"; case Status.OperationRepeatedInBucketGroups: return "OPERATION_REPEATED_IN_BUCKET_GROUPS"; case Status.BucketCapacityOverflow: return "BUCKET_CAPACITY_OVERFLOW"; case Status.NodeCapacityNotSufficientForOperation: return "NODE_CAPACITY_NOT_SUFFICIENT_FOR_OPERATION"; case Status.BucketHasNoThrottleGroups: return "BUCKET_HAS_NO_THROTTLE_GROUPS"; case Status.ThrottleGroupHasZeroOpsPerSec: return "THROTTLE_GROUP_HAS_ZERO_OPS_PER_SEC"; case Status.SuccessButMissingExpectedOperation: return "SUCCESS_BUT_MISSING_EXPECTED_OPERATION"; case Status.UnparseableThrottleDefinitions: return "UNPARSEABLE_THROTTLE_DEFINITIONS"; case Status.InvalidThrottleDefinitions: return "INVALID_THROTTLE_DEFINITIONS"; case Status.AccountExpiredAndPendingRemoval: return "ACCOUNT_EXPIRED_AND_PENDING_REMOVAL"; case Status.InvalidTokenMaxSupply: return "INVALID_TOKEN_MAX_SUPPLY"; case Status.InvalidTokenNftSerialNumber: return "INVALID_TOKEN_NFT_SERIAL_NUMBER"; case Status.InvalidNftId: return "INVALID_NFT_ID"; case Status.MetadataTooLong: return "METADATA_TOO_LONG"; case Status.BatchSizeLimitExceeded: return "BATCH_SIZE_LIMIT_EXCEEDED"; case Status.InvalidQueryRange: return "INVALID_QUERY_RANGE"; case Status.FractionDividesByZero: return "FRACTION_DIVIDES_BY_ZERO"; case Status.InsufficientPayerBalanceForCustomFee: return "INSUFFICIENT_PAYER_BALANCE_FOR_CUSTOM_FEE"; case Status.CustomFeesListTooLong: return "CUSTOM_FEES_LIST_TOO_LONG"; case Status.InvalidCustomFeeCollector: return "INVALID_CUSTOM_FEE_COLLECTOR"; case Status.InvalidTokenIdInCustomFees: return "INVALID_TOKEN_ID_IN_CUSTOM_FEES"; case Status.TokenNotAssociatedToFeeCollector: return "TOKEN_NOT_ASSOCIATED_TO_FEE_COLLECTOR"; case Status.TokenMaxSupplyReached: return "TOKEN_MAX_SUPPLY_REACHED"; case Status.SenderDoesNotOwnNftSerialNo: return "SENDER_DOES_NOT_OWN_NFT_SERIAL_NO"; case Status.CustomFeeNotFullySpecified: return "CUSTOM_FEE_NOT_FULLY_SPECIFIED"; case Status.CustomFeeMustBePositive: return "CUSTOM_FEE_MUST_BE_POSITIVE"; case Status.TokenHasNoFeeScheduleKey: return "TOKEN_HAS_NO_FEE_SCHEDULE_KEY"; case Status.CustomFeeOutsideNumericRange: return "CUSTOM_FEE_OUTSIDE_NUMERIC_RANGE"; case Status.RoyaltyFractionCannotExceedOne: return "ROYALTY_FRACTION_CANNOT_EXCEED_ONE"; case Status.FractionalFeeMaxAmountLessThanMinAmount: return "FRACTIONAL_FEE_MAX_AMOUNT_LESS_THAN_MIN_AMOUNT"; case Status.CustomScheduleAlreadyHasNoFees: return "CUSTOM_SCHEDULE_ALREADY_HAS_NO_FEES"; case Status.CustomFeeDenominationMustBeFungibleCommon: return "CUSTOM_FEE_DENOMINATION_MUST_BE_FUNGIBLE_COMMON"; case Status.CustomFractionalFeeOnlyAllowedForFungibleCommon: return "CUSTOM_FRACTIONAL_FEE_ONLY_ALLOWED_FOR_FUNGIBLE_COMMON"; case Status.InvalidCustomFeeScheduleKey: return "INVALID_CUSTOM_FEE_SCHEDULE_KEY"; case Status.InvalidTokenMintMetadata: return "INVALID_TOKEN_MINT_METADATA"; case Status.InvalidTokenBurnMetadata: return "INVALID_TOKEN_BURN_METADATA"; case Status.CurrentTreasuryStillOwnsNfts: return "CURRENT_TREASURY_STILL_OWNS_NFTS"; case Status.AccountStillOwnsNfts: return "ACCOUNT_STILL_OWNS_NFTS"; case Status.TreasuryMustOwnBurnedNft: return "TREASURY_MUST_OWN_BURNED_NFT"; case Status.AccountDoesNotOwnWipedNft: return "ACCOUNT_DOES_NOT_OWN_WIPED_NFT"; case Status.AccountAmountTransfersOnlyAllowedForFungibleCommon: return "ACCOUNT_AMOUNT_TRANSFERS_ONLY_ALLOWED_FOR_FUNGIBLE_COMMON"; case Status.MaxNftsInPriceRegimeHaveBeenMinted: return "MAX_NFTS_IN_PRICE_REGIME_HAVE_BEEN_MINTED"; case Status.PayerAccountDeleted: return "PAYER_ACCOUNT_DELETED"; case Status.CustomFeeChargingExceededMaxRecursionDepth: return "CUSTOM_FEE_CHARGING_EXCEEDED_MAX_RECURSION_DEPTH"; case Status.CustomFeeChargingExceededMaxAccountAmounts: return "CUSTOM_FEE_CHARGING_EXCEEDED_MAX_ACCOUNT_AMOUNTS"; case Status.InsufficientSenderAccountBalanceForCustomFee: return "INSUFFICIENT_SENDER_ACCOUNT_BALANCE_FOR_CUSTOM_FEE"; case Status.SerialNumberLimitReached: return "SERIAL_NUMBER_LIMIT_REACHED"; case Status.CustomRoyaltyFeeOnlyAllowedForNonFungibleUnique: return "CUSTOM_ROYALTY_FEE_ONLY_ALLOWED_FOR_NON_FUNGIBLE_UNIQUE"; case Status.NoRemainingAutomaticAssociations: return "NO_REMAINING_AUTOMATIC_ASSOCIATIONS"; case Status.ExistingAutomaticAssociationsExceedGivenLimit: return "EXISTING_AUTOMATIC_ASSOCIATIONS_EXCEED_GIVEN_LIMIT"; case Status.RequestedNumAutomaticAssociationsExceedsAssociationLimit: return "REQUESTED_NUM_AUTOMATIC_ASSOCIATIONS_EXCEEDS_ASSOCIATION_LIMIT"; case Status.TokenIsPaused: return "TOKEN_IS_PAUSED"; case Status.TokenHasNoPauseKey: return "TOKEN_HAS_NO_PAUSE_KEY"; case Status.InvalidPauseKey: return "INVALID_PAUSE_KEY"; case Status.FreezeUpdateFileDoesNotExist: return "FREEZE_UPDATE_FILE_DOES_NOT_EXIST"; case Status.FreezeUpdateFileHashDoesNotMatch: return "FREEZE_UPDATE_FILE_HASH_DOES_NOT_MATCH"; case Status.NoUpgradeHasBeenPrepared: return "NO_UPGRADE_HAS_BEEN_PREPARED"; case Status.NoFreezeIsScheduled: return "NO_FREEZE_IS_SCHEDULED"; case Status.UpdateFileHashChangedSincePrepareUpgrade: return "UPDATE_FILE_HASH_CHANGED_SINCE_PREPARE_UPGRADE"; case Status.FreezeStartTimeMustBeFuture: return "FREEZE_START_TIME_MUST_BE_FUTURE"; case Status.PreparedUpdateFileIsImmutable: return "PREPARED_UPDATE_FILE_IS_IMMUTABLE"; case Status.FreezeAlreadyScheduled: return "FREEZE_ALREADY_SCHEDULED"; case Status.FreezeUpgradeInProgress: return "FREEZE_UPGRADE_IN_PROGRESS"; case Status.UpdateFileIdDoesNotMatchPrepared: return "UPDATE_FILE_ID_DOES_NOT_MATCH_PREPARED"; case Status.UpdateFileHashDoesNotMatchPrepared: return "UPDATE_FILE_HASH_DOES_NOT_MATCH_PREPARED"; case Status.ConsensusGasExhausted: return "CONSENSUS_GAS_EXHAUSTED"; case Status.RevertedSuccess: return "REVERTED_SUCCESS"; case Status.MaxStorageInPriceRegimeHasBeenUsed: return "MAX_STORAGE_IN_PRICE_REGIME_HAS_BEEN_USED"; case Status.InvalidAliasKey: return "INVALID_ALIAS_KEY"; case Status.UnexpectedTokenDecimals: return "UNEXPECTED_TOKEN_DECIMALS"; case Status.InvalidProxyAccountId: return "INVALID_PROXY_ACCOUNT_ID"; case Status.InvalidTransferAccountId: return "INVALID_TRANSFER_ACCOUNT_ID"; case Status.InvalidFeeCollectorAccountId: return "INVALID_FEE_COLLECTOR_ACCOUNT_ID"; case Status.AliasIsImmutable: return "ALIAS_IS_IMMUTABLE"; case Status.SpenderAccountSameAsOwner: return "SPENDER_ACCOUNT_SAME_AS_OWNER"; case Status.AmountExceedsTokenMaxSupply: return "AMOUNT_EXCEEDS_TOKEN_MAX_SUPPLY"; case Status.NegativeAllowanceAmount: return "NEGATIVE_ALLOWANCE_AMOUNT"; case Status.CannotApproveForAllFungibleCommon: return "CANNOT_APPROVE_FOR_ALL_FUNGIBLE_COMMON"; case Status.SpenderDoesNotHaveAllowance: return "SPENDER_DOES_NOT_HAVE_ALLOWANCE"; case Status.AmountExceedsAllowance: return "AMOUNT_EXCEEDS_ALLOWANCE"; case Status.MaxAllowancesExceeded: return "MAX_ALLOWANCES_EXCEEDED"; case Status.EmptyAllowances: return "EMPTY_ALLOWANCES"; case Status.SpenderAccountRepeatedInAllowances: return "SPENDER_ACCOUNT_REPEATED_IN_ALLOWANCES"; case Status.RepeatedSerialNumsInNftAllowances: return "REPEATED_SERIAL_NUMS_IN_NFT_ALLOWANCES"; case Status.FungibleTokenInNftAllowances: return "FUNGIBLE_TOKEN_IN_NFT_ALLOWANCES"; case Status.NftInFungibleTokenAllowances: return "NFT_IN_FUNGIBLE_TOKEN_ALLOWANCES"; case Status.InvalidAllowanceOwnerId: return "INVALID_ALLOWANCE_OWNER_ID"; case Status.InvalidAllowanceSpenderId: return "INVALID_ALLOWANCE_SPENDER_ID"; case Status.RepeatedAllowancesToDelete: return "REPEATED_ALLOWANCES_TO_DELETE"; case Status.InvalidDelegatingSpender: return "INVALID_DELEGATING_SPENDER"; case Status.DelegatingSpenderCannotGrantApproveForAll: return "DELEGATING_SPENDER_CANNOT_GRANT_APPROVE_FOR_ALL"; case Status.DelegatingSpenderDoesNotHaveApproveForAll: return "DELEGATING_SPENDER_DOES_NOT_HAVE_APPROVE_FOR_ALL"; case Status.ScheduleExpirationTimeTooFarInFuture: return "SCHEDULE_EXPIRATION_TIME_TOO_FAR_IN_FUTURE"; case Status.ScheduleExpirationTimeMustBeHigherThanConsensusTime: return "SCHEDULE_EXPIRATION_TIME_MUST_BE_HIGHER_THAN_CONSENSUS_TIME"; case Status.ScheduleFutureThrottleExceeded: return "SCHEDULE_FUTURE_THROTTLE_EXCEEDED"; case Status.ScheduleFutureGasLimitExceeded: return "SCHEDULE_FUTURE_GAS_LIMIT_EXCEEDED"; case Status.InvalidEthereumTransaction: return "INVALID_ETHEREUM_TRANSACTION"; case Status.WrongChainId: return "WRONG_CHAIN_ID"; case Status.WrongNonce: return "WRONG_NONCE"; case Status.AccessListUnsupported: return "ACCESS_LIST_UNSUPPORTED"; case Status.SchedulePendingExpiration: return "SCHEDULE_PENDING_EXPIRATION"; case Status.ContractIsTokenTreasury: return "CONTRACT_IS_TOKEN_TREASURY"; case Status.ContractHasNonZeroTokenBalances: return "CONTRACT_HAS_NON_ZERO_TOKEN_BALANCES"; case Status.ContractExpiredAndPendingRemoval: return "CONTRACT_EXPIRED_AND_PENDING_REMOVAL"; case Status.ContractHasNoAutoRenewAccount: return "CONTRACT_HAS_NO_AUTO_RENEW_ACCOUNT"; case Status.PermanentRemovalRequiresSystemInitiation: return "PERMANENT_REMOVAL_REQUIRES_SYSTEM_INITIATION"; case Status.ProxyAccountIdFieldIsDeprecated: return "PROXY_ACCOUNT_ID_FIELD_IS_DEPRECATED"; case Status.SelfStakingIsNotAllowed: return "SELF_STAKING_IS_NOT_ALLOWED"; case Status.InvalidStakingId: return "INVALID_STAKING_ID"; case Status.StakingNotEnabled: return "STAKING_NOT_ENABLED"; case Status.InvalidPrngRange: return "INVALID_PRNG_RANGE"; case Status.MaxEntitiesInPriceRegimeHaveBeenCreated: return "MAX_ENTITIES_IN_PRICE_REGIME_HAVE_BEEN_CREATED"; case Status.InvalidFullPrefixSignatureForPrecompile: return "INVALID_FULL_PREFIX_SIGNATURE_FOR_PRECOMPILE"; case Status.InsufficientBalancesForStorageRent: return "INSUFFICIENT_BALANCES_FOR_STORAGE_RENT"; case Status.MaxChildRecordsExceeded: return "MAX_CHILD_RECORDS_EXCEEDED"; case Status.InsufficientBalancesForRenewalFees: return "INSUFFICIENT_BALANCES_FOR_RENEWAL_FEES"; case Status.TransactionHasUnknownFields: return "TRANSACTION_HAS_UNKNOWN_FIELDS"; case Status.AccountIsImmutable: return "ACCOUNT_IS_IMMUTABLE"; case Status.AliasAlreadyAssigned: return "ALIAS_ALREADY_ASSIGNED"; case Status.InvalidMetadataKey: return "INVALID_METADATA_KEY"; case Status.TokenHasNoMetadataKey: return "TOKEN_HAS_NO_METADATA_KEY"; case Status.MissingTokenMetadata: return "MISSING_TOKEN_METADATA"; case Status.MissingSerialNumbers: return "MISSING_SERIAL_NUMBERS"; case Status.TokenHasNoAdminKey: return "TOKEN_HAS_NO_ADMIN_KEY"; case Status.NodeDeleted: return "NODE_DELETED"; case Status.InvalidNodeId: return "INVALID_NODE_ID"; case Status.InvalidGossipEndpoint: return "INVALID_GOSSIP_ENDPOINT"; case Status.InvalidNodeAccountId: return "INVALID_NODE_ACCOUNT_ID"; case Status.InvalidNodeDescription: return "INVALID_NODE_DESCRIPTION"; case Status.InvalidServiceEndpoint: return "INVALID_SERVICE_ENDPOINT"; case Status.InvalidGossipCaCertificate: return "INVALID_GOSSIP_CA_CERTIFICATE"; case Status.InvalidGrpcCertificate: return "INVALID_GRPC_CERTIFICATE"; case Status.InvalidMaxAutoAssociations: return "INVALID_MAX_AUTO_ASSOCIATIONS"; case Status.MaxNodesCreated: return "MAX_NODES_CREATED"; case Status.IpFqdnCannotBeSetForSameEndpoint: return "IP_FQDN_CANNOT_BE_SET_FOR_SAME_ENDPOINT"; case Status.GossipEndpointCannotHaveFqdn: return "GOSSIP_ENDPOINT_CANNOT_HAVE_FQDN"; case Status.FqdnSizeTooLarge: return "FQDN_SIZE_TOO_LARGE"; case Status.InvalidEndpoint: return "INVALID_ENDPOINT"; case Status.GossipEndpointsExceededLimit: return "GOSSIP_ENDPOINTS_EXCEEDED_LIMIT"; case Status.ServiceEndpointsExceededLimit: return "SERVICE_ENDPOINTS_EXCEEDED_LIMIT"; case Status.InvalidIpv4Address: return "INVALID_IPV4_ADDRESS"; case Status.TokenReferenceRepeated: return "TOKEN_REFERENCE_REPEATED"; case Status.InvalidOwnerId: return "INVALID_OWNER_ID"; case Status.TokenReferenceListSizeLimitExceeded: return "TOKEN_REFERENCE_LIST_SIZE_LIMIT_EXCEEDED"; case Status.EmptyTokenReferenceList: return "EMPTY_TOKEN_REFERENCE_LIST"; case Status.UpdateNodeAccountNotAllowed: return "UPDATE_NODE_ACCOUNT_NOT_ALLOWED"; case Status.TokenHasNoMetadataOrSupplyKey: return "TOKEN_HAS_NO_METADATA_OR_SUPPLY_KEY"; case Status.EmptyPendingAirdropIdList: return "EMPTY_PENDING_AIRDROP_ID_LIST"; case Status.PendingAirdropIdRepeated: return "PENDING_AIRDROP_ID_REPEATED"; case Status.MaxPendingAirdropIdExceeded: return "PENDING_AIRDROP_ID_LIST_TOO_LONG"; case Status.PendingNftAirdropAlreadyExists: return "PENDING_NFT_AIRDROP_ALREADY_EXISTS"; case Status.AccountHasPendingAirdrops: return "ACCOUNT_HAS_PENDING_AIRDROPS"; case Status.ThrottledAtConsensus: return "THROTTLED_AT_CONSENSUS"; case Status.InvalidPendingAirdropId: return "INVALID_PENDING_AIRDROP_ID"; case Status.TokenAirdropWithFallbackRoyalty: return "TOKEN_AIRDROP_WITH_FALLBACK_ROYALTY"; case Status.InvalidTokenInPendingAirdrop: return "INVALID_TOKEN_IN_PENDING_AIRDROP"; case Status.ScheduleExpiryIsBusy: return "SCHEDULE_EXPIRY_IS_BUSY"; case Status.InvalidGrpcCertificateHash: return "INVALID_GRPC_CERTIFICATE_HASH"; case Status.MissingExpiryTime: return "MISSING_EXPIRY_TIME"; case Status.NoSchedulingAllowedAfterScheduledRecursion: return "NO_SCHEDULING_ALLOWED_AFTER_SCHEDULED_RECURSION"; case Status.RecursiveSchedulingLimitReached: return "RECURSIVE_SCHEDULING_LIMIT_REACHED"; case Status.WaitingForLedgerId: return "WAITING_FOR_LEDGER_ID"; case Status.MaxEntriesForFeeExemptKeyListExceeded: return "MAX_ENTRIES_FOR_FEE_EXEMPT_KEY_LIST_EXCEEDED"; case Status.FeeExemptKeyListContainsDuplicatedKeys: return "FEE_EXEMPT_KEY_LIST_CONTAINS_DUPLICATED_KEYS"; case Status.InvalidKeyInFeeExemptKeyList: return "INVALID_KEY_IN_FEE_EXEMPT_KEY_LIST"; case Status.InvalidFeeScheduleKey: return "INVALID_FEE_SCHEDULE_KEY"; case Status.FeeScheduleKeyCannotBeUpdated: return "FEE_SCHEDULE_KEY_CANNOT_BE_UPDATED"; case Status.FeeScheduleKeyNotSet: return "FEE_SCHEDULE_KEY_NOT_SET"; case Status.MaxCustomFeeLimitExceeded: return "MAX_CUSTOM_FEE_LIMIT_EXCEEDED"; case Status.NoValidMaxCustomFee: return "NO_VALID_MAX_CUSTOM_FEE"; case Status.InvalidMaxCustomFees: return "INVALID_MAX_CUSTOM_FEES"; case Status.DuplicateDenominationInMaxCustomFeeList: return "DUPLICATE_DENOMINATION_IN_MAX_CUSTOM_FEE_LIST"; case Status.DuplicateAccountIdInMaxCustomFeeList: return "DUPLICATE_ACCOUNT_ID_IN_MAX_CUSTOM_FEE_LIST"; case Status.MaxCustomFeesIsNotSupported: return "MAX_CUSTOM_FEES_IS_NOT_SUPPORTED"; case Status.BatchListEmpty: return "BATCH_LIST_EMPTY"; case Status.BatchListContainsDuplicates: return "BATCH_LIST_CONTAINS_DUPLICATES"; case Status.BatchTransactionInBlacklist: return "BATCH_TRANSACTION_IN_BLACKLIST"; case Status.InnerTransactionFailed: return "INNER_TRANSACTION_FAILED"; case Status.MissingBatchKey: return "MISSING_BATCH_KEY"; case Status.BatchKeySetOnNonInnerTransaction: return "BATCH_KEY_SET_ON_NON_INNER_TRANSACTION"; case Status.InvalidBatchKey: return "INVALID_BATCH_KEY"; case Status.ScheduleExpiryNotConfigurable: return "SCHEDULE_EXPIRY_NOT_CONFIGURABLE"; case Status.CreatingSystemEntities: return "CREATING_SYSTEM_ENTITIES"; case Status.ThrottleGroupLcmOverflow: return "THROTTLE_GROUP_LCM_OVERFLOW"; case Status.AirdropContainsMultipleSendersForAToken: return "AIRDROP_CONTAINS_MULTIPLE_SENDERS_FOR_A_TOKEN"; case Status.GrpcWebProxyNotSupported: return "GRPC_WEB_PROXY_NOT_SUPPORTED"; case Status.NftTransfersOnlyAllowedForNonFungibleUnique: return "NFT_TRANSFERS_ONLY_ALLOWED_FOR_NON_FUNGIBLE_UNIQUE"; default: return `UNKNOWN (${this._code})`; } } /** * @internal * @param {number} code * @returns {Status} */ static _fromCode(code) { switch (code) { case 0: return Status.Ok; case 1: return Status.InvalidTransaction; case 2: return Status.PayerAccountNotFound; case 3: return Status.InvalidNodeAccount; case 4: return Status.TransactionExpired; case 5: return Status.InvalidTransactionStart; case 6: return Status.InvalidTransactionDuration; case 7: return Status.InvalidSignature; case 8: return Status.MemoTooLong; case 9: return Status.InsufficientTxFee; case 10: return Status.InsufficientPayerBalance; case 11: return Status.DuplicateTransaction; case 12: return Status.Busy; case 13: return Status.NotSupported; case 14: return Status.InvalidFileId; case 15: return Status.InvalidAccountId; case 16: return Status.InvalidContractId; case 17: return Status.InvalidTransactionId; case 18: return Status.ReceiptNotFound; case 19: return Status.RecordNotFound; case 20: return Status.InvalidSolidityId; case 21: return Status.Unknown; case 22: return Status.Success; case 23: return Status.FailInvalid; case 24: return Status.FailFee; case 25: return Status.FailBalance; case 26: return Status.KeyRequired; case 27: return Status.BadEncoding; case 28: return Status.InsufficientAccountBalance; case 29: return Status.InvalidSolidityAddress; case 30: return Status.InsufficientGas; case 31: return Status.ContractSizeLimitExceeded; case 32: return Status.LocalCallModificationException; case 33: return Status.ContractRevertExecuted; case 34: return Status.ContractExecutionException; case 35: return Status.InvalidReceivingNodeAccount; case 36: return Status.MissingQueryHeader; case 37: return Status.AccountUpdateFailed; case 38: return Status.InvalidKeyEncoding; case 39: return Status.NullSolidityAddress; case 40: return Status.ContractUpdateFailed; case 41: return Status.InvalidQueryHeader; case 42: return Status.InvalidFeeSubmitted; case 43: return Status.InvalidPayerSignature; case 44: return Status.KeyNotProvided; case 45: return Status.InvalidExpirationTime; case 46: return Status.NoWaclKey; case 47: return Status.FileContentEmpty; case 48: return Status.InvalidAccountAmounts; case 49: return Status.EmptyTransactionBody; case 50: return Status.InvalidTransactionBody; case 51: return Status.InvalidSignatureTypeMismatchingKey; case 52: return Status.InvalidSignatureCountMismatchingKey; case 53: return Status.EmptyLiveHashBody; case 54: return Status.EmptyLiveHash; case 55: return Status.EmptyLiveHashKeys; case 56: return Status.InvalidLiveHashSize; case 57: return Status.EmptyQueryBody; case 58: return Status.EmptyLiveHashQuery; case 59: return Status.LiveHashNotFound; case 60: return Status.AccountIdDoesNotExist; case 61: return Status.LiveHashAlreadyExists; case 62: return Status.InvalidFileWacl; case 63: return Status.SerializationFailed; case 64: return Status.TransactionOversize; case 65: return Status.TransactionTooManyLayers; case 66: return Status.ContractDeleted; case 67: return Status.PlatformNotActive; case 68: return Status.KeyPrefixMismatch; case 69: return Status.PlatformTransactionNotCreated; case 70: return Status.InvalidRenewalPeriod; case 71: return Status.InvalidPayerAccountId; case 72: return Status.AccountDeleted; case 73: return Status.FileDeleted; case 74: return Status.AccountRepeatedInAccountAmounts; case 75: return Status.SettingNegativeAccountBalance; case 76: return Status.ObtainerRequired; case 77: return Status.ObtainerSameContractId; case 78: return Status.ObtainerDoesNotExist; case 79: return Status.ModifyingImmutableContract; case 80: return Status.FileSystemException; case 81: return Status.AutorenewDurationNotInRange; case 82: return Status.ErrorDecodingBytestring; case 83: return Status.ContractFileEmpty; case 84: return Status.ContractBytecodeEmpty; case 85: return Status.InvalidInitialBalance; case 86: return Status.InvalidReceiveRecordThreshold; case 87: return Status.InvalidSendRecordThreshold; case 88: return Status.AccountIsNotGenesisAccount; case 89: return Status.PayerAccountUnauthorized; case 90: return Status.InvalidFreezeTransactionBody; case 91: return Status.FreezeTransactionBodyNotFound; case 92: return Status.TransferListSizeLimitExceeded; case 93: return Status.ResultSizeLimitExceeded; case 94: return Status.NotSpecialAccount; case 95: return Status.ContractNegativeGas; case 96: return Status.ContractNegativeValue; case 97: return Status.InvalidFeeFile; case 98: return Status.InvalidExchangeRateFile; case 99: return Status.InsufficientLocalCallGas; case 100: return Status.EntityNotAllowedToDelete; case 101: return Status.AuthorizationFailed; case 102: return Status.FileUploadedProtoInvalid; case 103: return Status.FileUploadedProtoNotSavedToDisk; case 104: return Status.FeeScheduleFilePartUploaded; case 105: return Status.ExchangeRateChangeLimitExceeded; case 106: return Status.MaxContractStorageExceeded; case 107: return Status.TransferAccountSameAsDeleteAccount; case 108: return Status.TotalLedgerBalanceInvalid; case 110: return Status.ExpirationReductionNotAllowed; case 111: return Status.MaxGasLimitExceeded; case 112: return Status.MaxFileSizeExceeded; case 113: return Status.ReceiverSigRequired; case 150: return Status.InvalidTopicId; case 155: return Status.InvalidAdminKey; case 156: return Status.InvalidSubmitKey; case 157: return Status.Unauthorized; case 158: return Status.InvalidTopicMessage; case 159: return Status.InvalidAutorenewAccount; case 160: return Status.AutorenewAccountNotAllowed; case 162: return Status.TopicExpired; case 163: return Status.InvalidChunkNumber; case 164: return Status.InvalidChunkTransactionId; case 165: return Status.AccountFrozenForToken; case 166: return Status.TokensPerAccountLimitExceeded; case 167: return Status.InvalidTokenId; case 168: return Status.InvalidTokenDecimals; case 169: return Status.InvalidTokenInitialSupply; case 170: return Status.InvalidTreasuryAccountForToken; case 171: return Status.InvalidTokenSymbol; case 172: return Status.TokenHasNoFreezeKey; case 173: return Status.TransfersNotZeroSumForToken; case 174: return Status.MissingTokenSymbol; case 175: return Status.TokenSymbolTooLong; case 176: return Status.AccountKycNotGrantedForToken; case 177: return Status.TokenHasNoKycKey; case 178: return Status.InsufficientTokenBalance; case 179: return Status.TokenWasDeleted; case 180: return Status.TokenHasNoSupplyKey; case 181: return Status.TokenHasNoWipeKey; case 182: return Status.InvalidTokenMintAmount; case 183: return Status.InvalidTokenBurnAmount; case 184: return Status.TokenNotAssociatedToAccount; case 185: return Status.CannotWipeTokenTreasuryAccount; case 186: return Status.InvalidKycKey; case 187: return Status.InvalidWipeKey; case 188: return Status.InvalidFreezeKey; case 189: return Status.InvalidSupplyKey; case 190: return Status.MissingTokenName; case 191: return Status.TokenNameTooLong; case 192: return Status.InvalidWipingAmount; case 193: return Status.TokenIsImmutable; case 194: return Status.TokenAlreadyAssociatedToAccount; case 195: return Status.TransactionRequiresZeroTokenBalances; case 196: return Status.AccountIsTreasury; case 197: return Status.TokenIdRepeatedInTokenList; case 198: return Status.TokenTransferListSizeLimitExceeded; case 199: return Status.EmptyTokenTransferBody; case 200: return Status.EmptyTokenTransferAccountAmounts; case 201: return Status.InvalidScheduleId; case 202: return Status.ScheduleIsImmutable; case 203: return Status.InvalidSchedulePayerId; case 204: return Status.InvalidScheduleAccountId; case 205: return Status.NoNewValidSignatures; case 206: return Status.UnresolvableRequiredSigners; case 207: