java.lang.Object
com.hedera.hashgraph.sdk.Executable<TokenRejectTransaction,Transaction,TransactionResponse,TransactionResponse>
com.hedera.hashgraph.sdk.Transaction<TokenRejectTransaction>
com.hedera.hashgraph.sdk.TokenRejectTransaction
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. A single `tokenReject` transaction SHALL support a maximum of 10 transfers.
A token that is `pause`d MUST NOT be rejected.
If the `owner` account is `frozen` with respect to the identified token(s) the token(s) MUST NOT be rejected.
The `payer` for this transaction, and `owner` if set, SHALL NOT be charged any custom fees or other fees beyond the `tokenReject` transaction fee. ### Block Stream Effects - Each successful transfer from `payer` to `treasury` SHALL be recorded in the `token_transfer_list` for the transaction record.
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. A single `tokenReject` transaction SHALL support a maximum of 10 transfers.
A token that is `pause`d MUST NOT be rejected.
If the `owner` account is `frozen` with respect to the identified token(s) the token(s) MUST NOT be rejected.
The `payer` for this transaction, and `owner` if set, SHALL NOT be charged any custom fees or other fees beyond the `tokenReject` transaction fee. ### Block Stream Effects - Each successful transfer from `payer` to `treasury` SHALL be recorded in the `token_transfer_list` for the transaction record.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.hedera.hashgraph.sdk.Transaction
Transaction.SignableNodeTransactionBodyBytesNested classes/interfaces inherited from class com.hedera.hashgraph.sdk.Executable
Executable.GrpcRequest -
Field Summary
Fields inherited from class com.hedera.hashgraph.sdk.Transaction
customFeeLimits, DEFAULT_AUTO_RENEW_PERIOD, defaultMaxTransactionFee, DUMMY_ACCOUNT_ID, DUMMY_TRANSACTION_ID, frozenBodyBuilder, innerSignedTransactions, outerTransactions, publicKeys, regenerateTransactionId, signers, sigPairLists, sourceTransactionBody, transactionIdsFields inherited from class com.hedera.hashgraph.sdk.Executable
attemptedAllNodes, blockingUnaryCall, grpcDeadline, logger, maxAttempts, maxBackoff, minBackoff, nodeAccountIds, nodes, random, RST_STREAM -
Constructor Summary
ConstructorsConstructorDescriptionConstructorConstructor.Constructor. -
Method Summary
Modifier and TypeMethodDescriptionAdd a nft to the list of nfts.addTokenId(TokenId tokenId) Add a token to the list of tokens.(package private) TokenRejectTransactionBody.Builderbuild()Build the transaction body.(package private) io.grpc.MethodDescriptor<Transaction, TransactionResponse> Called to direct the invocation of the query to the appropriate gRPC service.Extract the list of nftIds.Extract the Account ID of the Owner.Extract the list of tokenIds.(package private) voidInitialize from the transaction body.(package private) voidonFreeze(TransactionBody.Builder bodyBuilder) Called inTransaction.freezeWith(Client)just before the transaction body is built.(package private) voidonScheduled(SchedulableTransactionBody.Builder scheduled) Called inTransaction.schedule()when converting transaction into a scheduled version.A list of one or more token rejections (a single specific serialized non-fungible/unique token).setOwnerId(AccountId ownerId) An account identifier.
This OPTIONAL field identifies the account holding the tokens to be rejected.setTokenIds(List<TokenId> tokenIds) A list of one or more token rejections (a fungible/common token type).(package private) voidvalidateChecksums(Client client) Methods inherited from class com.hedera.hashgraph.sdk.Transaction
addSignature, addSignature, batchify, buildAllTransactions, buildTransaction, doSchedule, estimateFee, freeze, freezeWith, fromBytes, fromScheduledTransaction, generateTransactionIds, getBatchKey, getDefaultMaxTransactionFee, getExecutionState, getHighVolume, getMaxTransactionFee, getRegenerateTransactionId, getRequiredChunks, getSignableNodeBodyBytesList, getSignatures, getSignaturesAtOffset, getTransactionBodySize, getTransactionHash, getTransactionHashPerNode, getTransactionId, getTransactionIdInternal, getTransactionMemo, getTransactionSize, getTransactionValidDuration, hash, isBatchedAndNotBatchTransaction, isFrozen, keyAlreadySigned, makeRequest, mapResponse, mapResponseStatus, onExecute, onExecuteAsync, regenerateTransactionId, requireNotFrozen, requireOneNodeAccountId, schedule, setBatchKey, setHighVolume, setMaxTransactionFee, setNodeAccountIds, setRegenerateTransactionId, setTransactionId, setTransactionMemo, setTransactionValidDuration, sign, signTransaction, signWith, signWithOperator, spawnBodyBuilder, toBytes, toString, wipeTransactionListsMethods inherited from class com.hedera.hashgraph.sdk.Executable
advanceRequest, checkNodeAccountIds, execute, execute, executeAsync, executeAsync, executeAsync, executeAsync, executeAsync, executeAsync, getGrpcRequest, getMaxAttempts, getMaxBackoff, getMaxRetry, getMinBackoff, getNodeAccountIds, getNodeForExecute, grpcDeadline, logTransaction, mergeFromClient, setGrpcDeadline, setLogger, setMaxAttempts, setMaxBackoff, setMaxRetry, setMinBackoff, setNodesFromNodeAccountIds, setRequestListener, setResponseListener, shouldRetryExceptionally
-
Constructor Details
-
TokenRejectTransaction
public TokenRejectTransaction()Constructor -
TokenRejectTransaction
TokenRejectTransaction(LinkedHashMap<TransactionId, LinkedHashMap<AccountId, throws com.google.protobuf.InvalidProtocolBufferExceptionTransaction>> txs) Constructor.- Parameters:
txs- Compound list of transaction id's list of (AccountId, Transaction) records- Throws:
com.google.protobuf.InvalidProtocolBufferException- when there is an issue with the protobuf
-
TokenRejectTransaction
TokenRejectTransaction(TransactionBody txBody) Constructor.- Parameters:
txBody- protobuf TransactionBody
-
-
Method Details
-
getOwnerId
Extract the Account ID of the Owner.- Returns:
- the Account ID of the Owner.
-
setOwnerId
An account identifier.
This OPTIONAL field identifies the 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 effective `owner` for this transaction.
- Parameters:
ownerId- the Account ID of the Owner.- Returns:
this
-
getTokenIds
Extract the list of tokenIds.- Returns:
- the list of tokenIds.
-
setTokenIds
A list of one or more token rejections (a fungible/common token type).- Parameters:
tokenIds- the list of tokenIds.- Returns:
this
-
addTokenId
Add a token to the list of tokens.- Parameters:
tokenId- token to add.- Returns:
this
-
getNftIds
Extract the list of nftIds.- Returns:
- the list of nftIds.
-
setNftIds
A list of one or more token rejections (a single specific serialized non-fungible/unique token).- Parameters:
nftIds- the list of nftIds.- Returns:
this
-
addNftId
Add a nft to the list of nfts.- Parameters:
nftId- nft to add.- Returns:
this
-
build
Build the transaction body.- Returns:
TokenRejectTransactionBody
-
initFromTransactionBody
void initFromTransactionBody()Initialize from the transaction body. -
validateChecksums
- Specified by:
validateChecksumsin classTransaction<TokenRejectTransaction>- Throws:
BadEntityIdException
-
getMethodDescriptor
io.grpc.MethodDescriptor<Transaction,TransactionResponse> getMethodDescriptor()Description copied from class:ExecutableCalled to direct the invocation of the query to the appropriate gRPC service.- Specified by:
getMethodDescriptorin classExecutable<TokenRejectTransaction,Transaction, TransactionResponse, TransactionResponse>
-
onFreeze
Description copied from class:TransactionCalled inTransaction.freezeWith(Client)just before the transaction body is built. The intent is for the derived class to assign their data variant to the transaction body.- Specified by:
onFreezein classTransaction<TokenRejectTransaction>
-
onScheduled
Description copied from class:TransactionCalled inTransaction.schedule()when converting transaction into a scheduled version.- Specified by:
onScheduledin classTransaction<TokenRejectTransaction>
-