import _m0 from "protobufjs/minimal";
import { AccountID, Key, TokenID, TokenRelationship } from "./basic_types";
import { Duration } from "./duration";
import { QueryHeader } from "./query_header";
import { ResponseHeader } from "./response_header";
import { Timestamp } from "./timestamp";
export declare const protobufPackage = "proto";
/**
* Gets all the information about an account, including balance and allowances. This does not get the list of
* account records.
*/
export interface 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).
*/
header: QueryHeader | undefined;
/** The account ID for which information is requested */
accountId: AccountID | undefined;
}
/** Response when the client sends the node GetAccountDetailsQuery */
export interface GetAccountDetailsResponse {
/**
* Standard response from node to client, including the requested fields: cost, or state proof,
* or both, or neither
*/
header: ResponseHeader | undefined;
/** Details of the account (a state proof can be generated for this) */
accountDetails: GetAccountDetailsResponse_AccountDetails | undefined;
}
export interface GetAccountDetailsResponse_AccountDetails {
/** The account ID for which this information applies */
accountId: AccountID | undefined;
/**
* 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
*/
contractAccountId: string;
/**
* 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
*/
deleted: boolean;
/**
* [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.
*
* @deprecated
*/
proxyAccountId: AccountID | undefined;
/** The total number of tinybars proxy staked to this account */
proxyReceived: number;
/**
* 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 | undefined;
/** The current balance of account in tinybars */
balance: number;
/** If true, no transaction can transfer to this account unless signed by this account's key */
receiverSigRequired: boolean;
/** The TimeStamp time at which this account is set to expire */
expirationTime: Timestamp | undefined;
/**
* 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.
*/
autoRenewPeriod: Duration | undefined;
/** All tokens related to this account */
tokenRelationships: TokenRelationship[];
/** The memo associated with the account */
memo: string;
/** The number of NFTs owned by this account */
ownedNfts: number;
/** The maximum number of tokens that an Account can be implicitly associated with. */
maxAutomaticTokenAssociations: number;
/** The alias of this account */
alias: Uint8Array;
/** The ledger ID the response was returned from; please see HIP-198 for the network-specific IDs. */
ledgerId: Uint8Array;
/** All of the hbar allowances approved by the account owner. */
grantedCryptoAllowances: GrantedCryptoAllowance[];
/** All of the non-fungible token allowances approved by the account owner. */
grantedNftAllowances: GrantedNftAllowance[];
/** All of the fungible token allowances approved by the account owner. */
grantedTokenAllowances: GrantedTokenAllowance[];
}
/** A granted allowance of hbar transfers for a spender relative to the owner account. */
export interface GrantedCryptoAllowance {
/** The account ID of the spender of the hbar allowance. */
spender: AccountID | undefined;
/** The amount of the spender's allowance in tinybars. */
amount: number;
}
/** A granted allowance for all the NFTs of a token for a spender relative to the owner account. */
export interface GrantedNftAllowance {
/** The token that the allowance pertains to. */
tokenId: TokenID | undefined;
/** The account ID of the spender that has been granted access to all NFTs of the owner */
spender: AccountID | undefined;
}
/** A granted allowance of fungible token transfers for a spender relative to the owner account. */
export interface GrantedTokenAllowance {
/** The token that the allowance pertains to. */
tokenId: TokenID | undefined;
/** The account ID of the token allowance spender. */
spender: AccountID | undefined;
/** The amount of the spender's token allowance. */
amount: number;
}
export declare const GetAccountDetailsQuery: {
encode(message: GetAccountDetailsQuery, writer?: _m0.Writer): _m0.Writer;
decode(input: _m0.Reader | Uint8Array, length?: number): GetAccountDetailsQuery;
fromJSON(object: any): GetAccountDetailsQuery;
toJSON(message: GetAccountDetailsQuery): unknown;
create(base?: DeepPartial): GetAccountDetailsQuery;
fromPartial(object: DeepPartial): GetAccountDetailsQuery;
};
export declare const GetAccountDetailsResponse: {
encode(message: GetAccountDetailsResponse, writer?: _m0.Writer): _m0.Writer;
decode(input: _m0.Reader | Uint8Array, length?: number): GetAccountDetailsResponse;
fromJSON(object: any): GetAccountDetailsResponse;
toJSON(message: GetAccountDetailsResponse): unknown;
create(base?: DeepPartial): GetAccountDetailsResponse;
fromPartial(object: DeepPartial): GetAccountDetailsResponse;
};
export declare const GetAccountDetailsResponse_AccountDetails: {
encode(message: GetAccountDetailsResponse_AccountDetails, writer?: _m0.Writer): _m0.Writer;
decode(input: _m0.Reader | Uint8Array, length?: number): GetAccountDetailsResponse_AccountDetails;
fromJSON(object: any): GetAccountDetailsResponse_AccountDetails;
toJSON(message: GetAccountDetailsResponse_AccountDetails): unknown;
create(base?: DeepPartial): GetAccountDetailsResponse_AccountDetails;
fromPartial(object: DeepPartial): GetAccountDetailsResponse_AccountDetails;
};
export declare const GrantedCryptoAllowance: {
encode(message: GrantedCryptoAllowance, writer?: _m0.Writer): _m0.Writer;
decode(input: _m0.Reader | Uint8Array, length?: number): GrantedCryptoAllowance;
fromJSON(object: any): GrantedCryptoAllowance;
toJSON(message: GrantedCryptoAllowance): unknown;
create(base?: DeepPartial): GrantedCryptoAllowance;
fromPartial(object: DeepPartial): GrantedCryptoAllowance;
};
export declare const GrantedNftAllowance: {
encode(message: GrantedNftAllowance, writer?: _m0.Writer): _m0.Writer;
decode(input: _m0.Reader | Uint8Array, length?: number): GrantedNftAllowance;
fromJSON(object: any): GrantedNftAllowance;
toJSON(message: GrantedNftAllowance): unknown;
create(base?: DeepPartial): GrantedNftAllowance;
fromPartial(object: DeepPartial): GrantedNftAllowance;
};
export declare const GrantedTokenAllowance: {
encode(message: GrantedTokenAllowance, writer?: _m0.Writer): _m0.Writer;
decode(input: _m0.Reader | Uint8Array, length?: number): GrantedTokenAllowance;
fromJSON(object: any): GrantedTokenAllowance;
toJSON(message: GrantedTokenAllowance): unknown;
create(base?: DeepPartial): GrantedTokenAllowance;
fromPartial(object: DeepPartial): GrantedTokenAllowance;
};
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {
$case: string;
} ? {
[K in keyof Omit]?: DeepPartial;
} & {
$case: T["$case"];
} : T extends {} ? {
[K in keyof T]?: DeepPartial;
} : Partial;
export {};
//# sourceMappingURL=get_account_details.d.ts.map