Class RoyaltyFee

java.lang.Object
com.google.protobuf.AbstractMessageLite<RoyaltyFee,RoyaltyFee.Builder>
com.google.protobuf.GeneratedMessageLite<RoyaltyFee,RoyaltyFee.Builder>
com.hedera.hashgraph.sdk.proto.RoyaltyFee
All Implemented Interfaces:
com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, RoyaltyFeeOrBuilder

@Generated public final class RoyaltyFee extends com.google.protobuf.GeneratedMessageLite<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
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    * 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.

    Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageLite

    com.google.protobuf.GeneratedMessageLite.DefaultInstanceBasedParser<T extends com.google.protobuf.GeneratedMessageLite<T,?>>, com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType,BuilderType>,BuilderType extends com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType,BuilderType>,BuilderType extends com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageLite.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType,BuilderType>,BuilderType extends com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageLite.GeneratedExtension<ContainingType extends com.google.protobuf.MessageLite,Type>, com.google.protobuf.GeneratedMessageLite.MethodToInvoke, com.google.protobuf.GeneratedMessageLite.SerializedForm

    Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite

    com.google.protobuf.AbstractMessageLite.InternalOneOfEnum
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
    static final int
     

    Fields inherited from class com.google.protobuf.GeneratedMessageLite

    unknownFields

    Fields inherited from class com.google.protobuf.AbstractMessageLite

    memoizedHashCode
  • Method Summary

    Modifier and Type
    Method
    Description
    protected final Object
    dynamicMethod(com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, Object arg0, Object arg1)
     
    static RoyaltyFee
     
    * 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.
     
     
    static RoyaltyFee
     
    static RoyaltyFee
    parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static RoyaltyFee
    parseFrom(byte[] data)
     
    static RoyaltyFee
    parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static RoyaltyFee
    parseFrom(com.google.protobuf.ByteString data)
     
    static RoyaltyFee
    parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static RoyaltyFee
    parseFrom(com.google.protobuf.CodedInputStream input)
     
    static RoyaltyFee
    parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static RoyaltyFee
     
    static RoyaltyFee
    parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static RoyaltyFee
     
    static RoyaltyFee
    parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static com.google.protobuf.Parser<RoyaltyFee>
     

    Methods inherited from class com.google.protobuf.GeneratedMessageLite

    createBuilder, createBuilder, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, emptyProtobufList, equals, getDefaultInstanceForType, getParserForType, getSerializedSize, hashCode, isInitialized, makeImmutable, mergeLengthDelimitedField, mergeUnknownFields, mergeVarintField, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBuilderForType, newMessageInfo, newRepeatedGeneratedExtension, newSingularGeneratedExtension, parseDelimitedFrom, parseDelimitedFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parsePartialFrom, parseUnknownField, registerDefaultInstance, toBuilder, toString, writeTo

    Methods inherited from class com.google.protobuf.AbstractMessageLite

    addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.google.protobuf.MessageLiteOrBuilder

    getDefaultInstanceForType, isInitialized
  • Field Details

    • EXCHANGE_VALUE_FRACTION_FIELD_NUMBER

      public static final int EXCHANGE_VALUE_FRACTION_FIELD_NUMBER
      See Also:
    • FALLBACK_FEE_FIELD_NUMBER

      public static final int FALLBACK_FEE_FIELD_NUMBER
      See Also:
  • 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:
      hasExchangeValueFraction in interface RoyaltyFeeOrBuilder
      Returns:
      Whether the exchangeValueFraction field is set.
    • getExchangeValueFraction

      public Fraction 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:
      getExchangeValueFraction in interface RoyaltyFeeOrBuilder
      Returns:
      The exchangeValueFraction.
    • 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:
      hasFallbackFee in interface RoyaltyFeeOrBuilder
      Returns:
      Whether the fallbackFee field is set.
    • getFallbackFee

      public FixedFee 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:
      getFallbackFee in interface RoyaltyFeeOrBuilder
      Returns:
      The fallbackFee.
    • parseFrom

      public static RoyaltyFee parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static RoyaltyFee parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static RoyaltyFee parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static RoyaltyFee parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static RoyaltyFee parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static RoyaltyFee parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static RoyaltyFee parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static RoyaltyFee parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static RoyaltyFee parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static RoyaltyFee parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static RoyaltyFee parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static RoyaltyFee parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilder

      public static RoyaltyFee.Builder newBuilder()
    • newBuilder

      public static RoyaltyFee.Builder newBuilder(RoyaltyFee prototype)
    • dynamicMethod

      protected final Object dynamicMethod(com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, Object arg0, Object arg1)
      Specified by:
      dynamicMethod in class com.google.protobuf.GeneratedMessageLite<RoyaltyFee,RoyaltyFee.Builder>
    • getDefaultInstance

      public static RoyaltyFee getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<RoyaltyFee> parser()