/** * # Token Dissociate * Remove association between an account and one or more Hedera Token * Service (HTS) tokens. * * ### 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"; // <<>> This comment is special code for setting PBJ Compiler java package option java_multiple_files = true; import "services/basic_types.proto"; /** * Dissociate an account from one or more HTS tokens. * * If the identified account is not found, * the transaction SHALL return `INVALID_ACCOUNT_ID`.
* If the identified account has been deleted, * the transaction SHALL return `ACCOUNT_DELETED`.
* If any of the identified tokens is not found, * the transaction SHALL return `INVALID_TOKEN_REF`.
* If any of the identified tokens has been deleted, * the transaction SHALL return `TOKEN_WAS_DELETED`.
* If an association does not exist for any of the identified tokens, * the transaction SHALL return `TOKEN_NOT_ASSOCIATED_TO_ACCOUNT`.
* If the identified account has a nonzero balance for any of the identified * tokens, and that token is neither deleted nor expired, the * transaction SHALL return `TRANSACTION_REQUIRES_ZERO_TOKEN_BALANCES`.
* If one of the identified tokens is a fungible/common token that is expired, * the account MAY disassociate from that token, even if that token balance is * not zero for that account.
* If one of the identified tokens is a non-fungible/unique token that is * expired, the account MUST NOT disassociate if that account holds any * individual NFT of that token. In this situation the transaction SHALL * return `TRANSACTION_REQUIRED_ZERO_TOKEN_BALANCES`.
* The identified account MUST sign this transaction. * * ### Block Stream Effects * None */ message TokenDissociateTransactionBody { /** * An account identifier. *

* The identified account SHALL be dissociated from each of the * tokens identified in the `tokens` field. * This field is REQUIRED and MUST be a valid account identifier.
* The identified account MUST exist in state.
* The identified account MUST NOT be deleted.
* The identified account MUST NOT be expired. */ AccountID account = 1; /** * A list of token identifiers. *

* Each token identified in this list SHALL be dissociated from * the account identified in the `account` field.
* This list MUST NOT be empty. * Each entry in this list MUST be a valid token identifier.
* Each entry in this list MUST be currently associated to the * account identified in `account`.
* Entries in this list MAY be expired, if the token type is * fungible/common.
* Each entry in this list MUST NOT be deleted. */ repeated TokenID tokens = 2; }