All Downloads are FREE. Search and download functionalities are using the official Maven repository.

shgraph.hapi.0.54.1.source-code.get_account_details.proto Maven / Gradle / Ivy

There is a newer version: 0.54.0
Show newest version
syntax = "proto3";

package proto;

/*-
 * ‌
 * Hedera Network Services Protobuf
 * ​
 * Copyright (C) 2018 - 2022 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";
// <<>> This comment is special code for setting PBJ Compiler java package
option java_multiple_files = true;

import "timestamp.proto";
import "duration.proto";
import "basic_types.proto";
import "query_header.proto";
import "response_header.proto";
import "crypto_add_live_hash.proto";
import "google/protobuf/wrappers.proto";

/**
 * Gets all the information about an account, including balance and allowances. This does not get the list of
 * account records.
 */
message GetAccountDetailsQuery {
    /**
     * Account details sent from client to node, including the signed payment, and what kind of
     * response is requested (cost, state proof, both, or neither).
     */
    QueryHeader header = 1;

    /**
     * The account ID for which information is requested
     */
    AccountID account_id = 2;
}

/**
 * Response when the client sends the node GetAccountDetailsQuery
 */
message GetAccountDetailsResponse {
    /**
     * Standard response from node to client, including the requested fields: cost, or state proof,
     * or both, or neither
     */
    ResponseHeader header = 1;

    message AccountDetails {
        /**
         * The account ID for which this information applies
         */
        AccountID account_id = 1;

        /**
         * The Contract Account ID comprising of both the contract instance and the cryptocurrency
         * account owned by the contract instance, in the format used by Solidity
         */
        string contract_account_id = 2;

        /**
         * If true, then this account has been deleted, it will disappear when it expires, and all
         * transactions for it will fail except the transaction to extend its expiration date
         */
        bool deleted = 3;

        /**
         * [Deprecated] The Account ID of the account to which this 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 proxy_account_id = 4 [deprecated = true];

        /**
         * The total number of tinybars proxy staked to this account
         */
        int64 proxy_received = 5;

        /**
         * The key for the account, which must sign in order to transfer out, or to modify the
         * account in any way other than extending its expiration date.
         */
        Key key = 6;

        /**
         * The current balance of account in tinybars
         */
        uint64 balance = 7;

        /**
         * If true, no transaction can transfer to this account unless signed by this account's key
         */
        bool receiver_sig_required = 8;

        /**
         * The TimeStamp time at which this account is set to expire
         */
        Timestamp expiration_time = 9;

        /**
         * The duration for expiration time will extend every this many seconds. If there are
         * insufficient funds, then it extends as long as possible. If it is empty when it expires,
         * then it is deleted.
         */
        Duration auto_renew_period = 10;

        /**
         * All tokens related to this account
         */
        repeated TokenRelationship token_relationships = 11;

        /**
         * The memo associated with the account
         */
        string memo = 12;

        /**
         * The number of NFTs owned by this account
         */
        int64 owned_nfts = 13;

        /**
         * The maximum number of tokens that an Account can be implicitly associated with.
         */
        int32 max_automatic_token_associations = 14;

        /**
         * The alias of this account
         */
        bytes alias = 15;

        /**
         * The ledger ID the response was returned from; please see HIP-198 for the network-specific IDs.
         */
        bytes ledger_id = 16;

        /**
         * All of the hbar allowances approved by the account owner.
         */
        repeated GrantedCryptoAllowance granted_crypto_allowances = 17;

        /**
         * All of the non-fungible token allowances approved by the account owner.
         */
        repeated GrantedNftAllowance granted_nft_allowances = 18;

        /**
         * All of the fungible token allowances approved by the account owner.
         */
        repeated GrantedTokenAllowance granted_token_allowances = 19;

    }
    /**
     * Details of the account (a state proof can be generated for this)
     */
    AccountDetails account_details = 2;
}

/**
 * A granted allowance of hbar transfers for a spender relative to the owner account.
 */
message GrantedCryptoAllowance {
    /**
     * The account ID of the spender of the hbar allowance.
     */
    AccountID spender = 1;

    /**
     * The amount of the spender's allowance in tinybars.
     */
    int64 amount = 2;
}

/**
 * A granted allowance for all the NFTs of a token for a spender relative to the owner account.
 */
message GrantedNftAllowance {
    /**
     * The token that the allowance pertains to.
     */
    TokenID token_id = 1;

    /**
     * The account ID of the spender that has been granted access to all NFTs of the owner
     */
    AccountID spender = 2;
}

/**
 * A granted allowance of fungible token transfers for a spender relative to the owner account.
 */
message GrantedTokenAllowance {
    /**
     * The token that the allowance pertains to.
     */
    TokenID token_id = 1;

    /**
     * The account ID of the token allowance spender.
     */
    AccountID spender = 2;

    /**
     * The amount of the spender's token allowance.
     */
    int64 amount = 3;
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy