shgraph.hapi.0.54.1.source-code.token_reject.proto Maven / Gradle / Ivy
/**
* # Token Reject
* Messages used to implement a transaction to reject a token type from 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).
*/
syntax = "proto3";
package proto;
/*-
*
* Hedera Network Services Protobuf
*
* Copyright (C) 2024 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 "basic_types.proto";
/**
* Reject undesired token(s).
* Transfer one or more token balances held by the requesting account to the treasury for each
* token type.
* Each transfer SHALL be one of the following
* - A single non-fungible/unique token.
* - The full balance held for a fungible/common token type.
*
* A single tokenReject transaction SHALL support a maximum of 10 transfers.
*
* ### Transaction Record Effects
* - Each successful transfer from `payer` to `treasury` SHALL be recorded in `token_transfer_list` for the transaction record.
*/
message TokenRejectTransactionBody {
/**
* An account holding the tokens to be rejected.
* If set, this account MUST sign this transaction.
* If not set, the payer for this transaction SHALL be the account rejecting tokens.
*/
AccountID owner = 1;
/**
* A list of one or more token rejections.
* On success each rejected token serial number or balance SHALL be transferred from
* the requesting account to the treasury account for that token type.
* After rejection the requesting account SHALL continue to be associated with the token.
* if dissociation is desired then a separate TokenDissociate transaction MUST be submitted to remove the association.
*/
repeated TokenReference rejections = 2;
}
/**
* A union token identifier.
*
* Identify a fungible/common token type, or a single non-fungible/unique token serial.
*/
message TokenReference {
oneof token_identifier {
/**
* A fungible/common token type.
*/
TokenID fungible_token = 1;
/**
* A single specific serialized non-fungible/unique token.
*/
NftID nft = 2;
}
}