/**
 * # Crypto Delete
 * Message to delete an account.
 *
 * ### Keywords
 * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
 * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
 * document are to be interpreted as described in
 * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in
 * [RFC8174](https://www.ietf.org/rfc/rfc8174).
 */
syntax = "proto3";

package proto;

// SPDX-License-Identifier: Apache-2.0
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 "services_basic_types.proto";

/**
 * Delete an account.<br/>
 * This will mark an account deleted, and transfer all tokens to a "sweep"
 * account.
 *
 * A deleted account SHALL NOT hold a balance in any token type.<br/>
 * A deleted account SHALL remain in state until it expires.<br/>
 * Transfers that would increase the balance of a deleted account
 * SHALL fail.<br/>
 * A deleted account MAY be subject of a `cryptoUpdate` transaction to extend
 * its expiration.<br/>
 * When a deleted account expires it SHALL be removed entirely, and SHALL NOT
 * be archived.
 *
 * ### Block Stream Effects
 * None
 */
message CryptoDeleteTransactionBody {
    /**
     * An account identifier.
     * <p>
     * The identified account SHALL receive all tokens, token balances,
     * and non-fungible/unique from the deleted account.<br/>
     * The identified account MUST sign this transaction.<br/>
     * If not set, the account to be deleted MUST NOT have a balance in any
     * token, a balance in HBAR, or hold any NFT.
     */
    AccountID transferAccountID = 1;

    /**
     * An account identifier.
     * <p>
     * This account SHALL be deleted if this transaction succeeds.<br/>
     * This account SHOULD NOT hold any balance other than HBAR.<br/>
     * If this account _does_ hold balances, the `transferAccountID` value
     * MUST be set to a valid transfer account.<br/>
     * This account MUST sign this transaction.<br/>
     * This field MUST be set to a valid account identifier.
     */
    AccountID deleteAccountID = 2;
}
