import _m0 from "protobufjs/minimal"; import { AccountID, Fraction, TokenID } from "./basic_types"; export declare const protobufPackage = "proto"; /** * A fraction of the transferred units of a token to assess as a fee. The amount assessed will never * be less than the given minimum_amount, and never greater than the given maximum_amount. The * denomination is always units of the token to which this fractional fee is attached. */ export interface FractionalFee { /** The fraction of the transferred units to assess as a fee */ fractionalAmount: Fraction | undefined; /** The minimum amount to assess */ minimumAmount: number; /** The maximum amount to assess (zero implies no maximum) */ maximumAmount: number; /** * If true, assesses the fee to the sender, so the receiver gets the full amount from the token * transfer list, and the sender is charged an additional fee; if false, the receiver does NOT get * the full amount, but only what is left over after paying the fractional fee */ netOfTransfers: boolean; } /** * A fixed number of units (hbar or token) to assess as a fee during a CryptoTransfer that transfers * units of the token to which this fixed fee is attached. */ export interface FixedFee { /** The number of units to assess as a fee */ amount: number; /** * The denomination of the fee; taken as hbar if left unset and, in a TokenCreate, taken as the id * of the newly created token if set to the sentinel value of 0.0.0 */ denominatingTokenId: TokenID | undefined; } /** * A fee to assess during a CryptoTransfer that changes ownership of an NFT. Defines the fraction of * the fungible value exchanged for an NFT that the ledger should collect as a royalty. ("Fungible * value" includes both ℏ 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 tokens of type type NON_FUNGIBLE_UNIQUE. * * **IMPORTANT:** Users must understand that native royalty fees are _strictly_ a convenience feature, * and that the network cannot enforce inescapable royalties on the exchange of a non-fractional NFT. * For example, if the counterparties agree to split their value transfer and NFT exchange into separate * transactions, the network cannot possibly intervene. (And note the counterparties could use a smart * contract to make this split transaction atomic if they do not trust each other.) * * Counterparties that _do_ wish to respect creator royalties should follow the pattern the network * recognizes: The NFT sender and receiver should both sign a single `CryptoTransfer` that credits * the sender with all the fungible value the receiver is exchanging for the NFT. * * Similarly, a marketplace using an approved spender account for an escrow transaction should credit * the account selling the NFT in the same `CryptoTransfer` that deducts fungible value from the buying * account. * * There is an [open HIP discussion](https://github.com/hashgraph/hedera-improvement-proposal/discussions/578) * that proposes to broaden the class of transactions for which the network automatically collects * royalties. If this interests or concerns you, please add your voice to that discussion. */ export interface RoyaltyFee { /** The fraction of fungible value exchanged for an NFT to collect as royalty */ exchangeValueFraction: Fraction | undefined; /** * If present, the fixed fee to assess to the NFT receiver when no fungible value is exchanged * with the sender */ fallbackFee: FixedFee | undefined; } /** * A transfer fee to assess during a CryptoTransfer that transfers units of the token to which the * fee is attached. A custom fee may be either fixed or fractional, and must specify a fee collector * account to receive the assessed fees. Only positive fees may be assessed. */ export interface CustomFee { fee?: { $case: "fixedFee"; fixedFee: FixedFee; } | { $case: "fractionalFee"; fractionalFee: FractionalFee; } | { $case: "royaltyFee"; royaltyFee: RoyaltyFee; } | undefined; /** The account to receive the custom fee */ feeCollectorAccountId: AccountID | undefined; /** * If true, exempts all the token's fee collection accounts from this fee. * (The token's treasury and the above fee_collector_account_id will always * be exempt. Please see HIP-573 * for details.) */ allCollectorsAreExempt: boolean; } /** A custom transfer fee that was assessed during handling of a CryptoTransfer. */ export interface AssessedCustomFee { /** The number of units assessed for the fee */ amount: number; /** The denomination of the fee; taken as hbar if left unset */ tokenId: TokenID | undefined; /** The account to receive the assessed fee */ feeCollectorAccountId: AccountID | undefined; /** The account(s) whose final balances would have been higher in the absence of this assessed fee */ effectivePayerAccountId: AccountID[]; } export declare const FractionalFee: { encode(message: FractionalFee, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): FractionalFee; fromJSON(object: any): FractionalFee; toJSON(message: FractionalFee): unknown; create(base?: DeepPartial): FractionalFee; fromPartial(object: DeepPartial): FractionalFee; }; export declare const FixedFee: { encode(message: FixedFee, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): FixedFee; fromJSON(object: any): FixedFee; toJSON(message: FixedFee): unknown; create(base?: DeepPartial): FixedFee; fromPartial(object: DeepPartial): FixedFee; }; export declare const RoyaltyFee: { encode(message: RoyaltyFee, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): RoyaltyFee; fromJSON(object: any): RoyaltyFee; toJSON(message: RoyaltyFee): unknown; create(base?: DeepPartial): RoyaltyFee; fromPartial(object: DeepPartial): RoyaltyFee; }; export declare const CustomFee: { encode(message: CustomFee, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): CustomFee; fromJSON(object: any): CustomFee; toJSON(message: CustomFee): unknown; create(base?: DeepPartial): CustomFee; fromPartial(object: DeepPartial): CustomFee; }; export declare const AssessedCustomFee: { encode(message: AssessedCustomFee, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): AssessedCustomFee; fromJSON(object: any): AssessedCustomFee; toJSON(message: AssessedCustomFee): unknown; create(base?: DeepPartial): AssessedCustomFee; fromPartial(object: DeepPartial): AssessedCustomFee; }; type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends { $case: string; } ? { [K in keyof Omit]?: DeepPartial; } & { $case: T["$case"]; } : T extends {} ? { [K in keyof T]?: DeepPartial; } : Partial; export {}; //# sourceMappingURL=custom_fees.d.ts.map