MarketplaceRules¶
Namespace Nfty.Core.Publish in assembly Nfty.Core.
The rules for the marketplace fields of ExportOptions, stated once.
Remarks¶
Every method returns the sentence to show (or null when the value is fine) instead of throwing, so the export dialog can put the reason beside the field as the user types, the CLI can refuse with it, and SetExporter can refuse the same value with the same words. Nothing here guesses: a base URI missing its trailing slash is an error, not a slash added for the author.
Methods¶
BaseUriProblem(string?, string)¶
Why a base URI is unusable, or null when it is fine (or empty, meaning "none").
Parameters
value(string?) - The text.what(string) - What the address is, for the message (for exampleImage base URI).
Returns. The reason, naming the rule.
BasisPoints(double)¶
The royalty as OpenSea's whole basis points: 2.5% is 250.
Parameters
percent(double) - A percentage already accepted byMarketplaceRules.RoyaltyProblem().
Returns. Basis points.
FeeRecipientProblem(string?)¶
Why a fee recipient is unusable, or null.
Parameters
value(string?) - The text.
Returns. The reason, naming the rule.
ImageUriProblem(string?)¶
Why a collection image link is unusable, or null.
Parameters
value(string?) - The text.
Returns. The reason, naming the rule.
RoyaltyProblem(double?)¶
Why a royalty percentage is unusable, or null.
Parameters
percent(double?) - The percentage, or null for none.
Returns. The reason, naming the rule.
TokenStartProblem(int)¶
Why a token start is unusable, or null.
Parameters
start(int) - The first token id.
Returns. The reason.
TryParseRoyalty(string?, double?)¶
Reads a royalty typed as text, always with . as the decimal point.
Parameters
text(string?) - The text; empty means none.percent(double?) - The value, or null for none.
Returns. Null when it parsed (or was empty); otherwise the reason it did not.
WebUrlProblem(string?, string)¶
Why a web address is unusable, or null.
Parameters
value(string?) - The text.what(string) - What the address is, for the message.
Returns. The reason, naming the rule.