java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder<RoyaltyFee,RoyaltyFee.Builder>
com.google.protobuf.GeneratedMessageLite.Builder<RoyaltyFee,RoyaltyFee.Builder>
com.hedera.hashgraph.sdk.proto.RoyaltyFee.Builder
- All Implemented Interfaces:
com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,RoyaltyFeeOrBuilder,Cloneable
- Enclosing class:
RoyaltyFee
public static final class RoyaltyFee.Builder
extends com.google.protobuf.GeneratedMessageLite.Builder<RoyaltyFee,RoyaltyFee.Builder>
implements RoyaltyFeeOrBuilder
* A fee to assess during a CryptoTransfer that changes ownership of a non-fungible/unique (NFT) token.<br/> This message defines the fraction of the fungible value exchanged for an NFT that the ledger should collect as a royalty. "Fungible value" includes both HBAR (ℏ) and units of fungible HTS tokens. When the NFT sender does not receive any fungible value, the ledger will assess the fallback fee, if present, to the new NFT owner. Royalty fees can only be added to non-fungible/unique tokens. #### Important Note > Users should be aware that native royalty fees are _strictly_ a > convenience feature, SHALL NOT be guaranteed, and the network SHALL NOT > enforce _inescapable_ royalties on the exchange of a unique NFT.<br/> > For _one_ example, if the counterparties agree to split their value > transfer and NFT exchange into separate transactions, the network cannot > possibly determine the value exchanged. Even trustless transactions, > using a smart contract or other form of escrow, can arrange such split > transactions as a single _logical_ transfer. Counterparties that wish to _respect_ creator royalties MUST follow the pattern the network recognizes. <div style="margin-left: 2em; margin-top: -0.8em"> A single transaction MUST contain all three elements, transfer of the NFT, debit of fungible value from the receiver, and credit of fungible value to the sender, in order for the network to accurately assess royalty fees. </div> <div style="margin-left: 1em; margin-top: -0.8em"> Two examples are presented here. <div style="margin-left: 1em"> The NFT sender and receiver MUST both sign a single `cryptoTransfer` that transfers the NFT from sender to receiver, debits the fungible value from the receiver, and credits the sender with the fungible value the receiver is exchanging for the NFT.<br/> A marketplace using an approved spender account for an escrow transaction MUST credit the account selling the NFT in the same `cryptoTransfer` transaction that transfers the NFT to, and deducts fungible value from, the buying account. </div></div> This type of fee MAY NOT produce accurate results if multiple transfers are executed in a single transaction. It is RECOMMENDED that each NFT subject to royalty fees be transferred separately and without unrelated fungible token transfers. The network SHALL NOT consider third-party transfers, including "approved spender" accounts, in collecting royalty fees. An honest broker MUST ensure that transfer of an NFT and payment delivered to the sender are present in the same transaction. There is an [open suggestion](https://github.com/hashgraph/hedera-improvement-proposal/discussions/578) that proposes to broaden the scope of transfers from which the network automatically collects royalties to cover related third parties. If this interests or concerns you, please add your voice to that discussion.Protobuf type
proto.RoyaltyFee-
Field Summary
Fields inherited from class com.google.protobuf.GeneratedMessageLite.Builder
instance -
Method Summary
Modifier and TypeMethodDescription* The fraction of fungible value exchanged for an NFT to collect as royalty.* A fixed fee to assess if no fungible value is known to be traded for the NFT.* The fraction of fungible value exchanged for an NFT to collect as royalty.* A fixed fee to assess if no fungible value is known to be traded for the NFT.boolean* The fraction of fungible value exchanged for an NFT to collect as royalty.boolean* A fixed fee to assess if no fungible value is known to be traded for the NFT.* The fraction of fungible value exchanged for an NFT to collect as royalty.mergeFallbackFee(FixedFee value) * A fixed fee to assess if no fungible value is known to be traded for the NFT.setExchangeValueFraction(Fraction value) * The fraction of fungible value exchanged for an NFT to collect as royalty.setExchangeValueFraction(Fraction.Builder builderForValue) * The fraction of fungible value exchanged for an NFT to collect as royalty.setFallbackFee(FixedFee value) * A fixed fee to assess if no fungible value is known to be traded for the NFT.setFallbackFee(FixedFee.Builder builderForValue) * A fixed fee to assess if no fungible value is known to be traded for the NFT.Methods inherited from class com.google.protobuf.GeneratedMessageLite.Builder
build, buildPartial, clear, clone, copyOnWrite, copyOnWriteInternal, getDefaultInstanceForType, internalMergeFrom, isInitialized, mergeFrom, mergeFrom, mergeFrom, mergeFromMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType, isInitialized
-
Method Details
-
hasExchangeValueFraction
public boolean hasExchangeValueFraction()* The fraction of fungible value exchanged for an NFT to collect as royalty. <p> This SHALL be applied once to the total fungible value transferred for the transaction.<br/> There SHALL NOT be any adjustment based on multiple transfers involving the NFT sender as part of a single transaction.
.proto.Fraction exchange_value_fraction = 1;- Specified by:
hasExchangeValueFractionin interfaceRoyaltyFeeOrBuilder- Returns:
- Whether the exchangeValueFraction field is set.
-
getExchangeValueFraction
* The fraction of fungible value exchanged for an NFT to collect as royalty. <p> This SHALL be applied once to the total fungible value transferred for the transaction.<br/> There SHALL NOT be any adjustment based on multiple transfers involving the NFT sender as part of a single transaction.
.proto.Fraction exchange_value_fraction = 1;- Specified by:
getExchangeValueFractionin interfaceRoyaltyFeeOrBuilder- Returns:
- The exchangeValueFraction.
-
setExchangeValueFraction
* The fraction of fungible value exchanged for an NFT to collect as royalty. <p> This SHALL be applied once to the total fungible value transferred for the transaction.<br/> There SHALL NOT be any adjustment based on multiple transfers involving the NFT sender as part of a single transaction.
.proto.Fraction exchange_value_fraction = 1; -
setExchangeValueFraction
* The fraction of fungible value exchanged for an NFT to collect as royalty. <p> This SHALL be applied once to the total fungible value transferred for the transaction.<br/> There SHALL NOT be any adjustment based on multiple transfers involving the NFT sender as part of a single transaction.
.proto.Fraction exchange_value_fraction = 1; -
mergeExchangeValueFraction
* The fraction of fungible value exchanged for an NFT to collect as royalty. <p> This SHALL be applied once to the total fungible value transferred for the transaction.<br/> There SHALL NOT be any adjustment based on multiple transfers involving the NFT sender as part of a single transaction.
.proto.Fraction exchange_value_fraction = 1; -
clearExchangeValueFraction
* The fraction of fungible value exchanged for an NFT to collect as royalty. <p> This SHALL be applied once to the total fungible value transferred for the transaction.<br/> There SHALL NOT be any adjustment based on multiple transfers involving the NFT sender as part of a single transaction.
.proto.Fraction exchange_value_fraction = 1; -
hasFallbackFee
public boolean hasFallbackFee()* A fixed fee to assess if no fungible value is known to be traded for the NFT. <p> If an NFT is transferred without a corresponding transfer of _fungible_ value returned in the same transaction, the network SHALL charge this fee as a fallback.<br/> Fallback fees MAY have unexpected effects when interacting with escrow, market transfers, and smart contracts. It is RECOMMENDED that developers carefully consider possible effects from fallback fees when designing systems that facilitate the transfer of NFTs.
.proto.FixedFee fallback_fee = 2;- Specified by:
hasFallbackFeein interfaceRoyaltyFeeOrBuilder- Returns:
- Whether the fallbackFee field is set.
-
getFallbackFee
* A fixed fee to assess if no fungible value is known to be traded for the NFT. <p> If an NFT is transferred without a corresponding transfer of _fungible_ value returned in the same transaction, the network SHALL charge this fee as a fallback.<br/> Fallback fees MAY have unexpected effects when interacting with escrow, market transfers, and smart contracts. It is RECOMMENDED that developers carefully consider possible effects from fallback fees when designing systems that facilitate the transfer of NFTs.
.proto.FixedFee fallback_fee = 2;- Specified by:
getFallbackFeein interfaceRoyaltyFeeOrBuilder- Returns:
- The fallbackFee.
-
setFallbackFee
* A fixed fee to assess if no fungible value is known to be traded for the NFT. <p> If an NFT is transferred without a corresponding transfer of _fungible_ value returned in the same transaction, the network SHALL charge this fee as a fallback.<br/> Fallback fees MAY have unexpected effects when interacting with escrow, market transfers, and smart contracts. It is RECOMMENDED that developers carefully consider possible effects from fallback fees when designing systems that facilitate the transfer of NFTs.
.proto.FixedFee fallback_fee = 2; -
setFallbackFee
* A fixed fee to assess if no fungible value is known to be traded for the NFT. <p> If an NFT is transferred without a corresponding transfer of _fungible_ value returned in the same transaction, the network SHALL charge this fee as a fallback.<br/> Fallback fees MAY have unexpected effects when interacting with escrow, market transfers, and smart contracts. It is RECOMMENDED that developers carefully consider possible effects from fallback fees when designing systems that facilitate the transfer of NFTs.
.proto.FixedFee fallback_fee = 2; -
mergeFallbackFee
* A fixed fee to assess if no fungible value is known to be traded for the NFT. <p> If an NFT is transferred without a corresponding transfer of _fungible_ value returned in the same transaction, the network SHALL charge this fee as a fallback.<br/> Fallback fees MAY have unexpected effects when interacting with escrow, market transfers, and smart contracts. It is RECOMMENDED that developers carefully consider possible effects from fallback fees when designing systems that facilitate the transfer of NFTs.
.proto.FixedFee fallback_fee = 2; -
clearFallbackFee
* A fixed fee to assess if no fungible value is known to be traded for the NFT. <p> If an NFT is transferred without a corresponding transfer of _fungible_ value returned in the same transaction, the network SHALL charge this fee as a fallback.<br/> Fallback fees MAY have unexpected effects when interacting with escrow, market transfers, and smart contracts. It is RECOMMENDED that developers carefully consider possible effects from fallback fees when designing systems that facilitate the transfer of NFTs.
.proto.FixedFee fallback_fee = 2;
-