![]() |
VOOZH | about |
dotnet add package ADRaffy.ENSNormalize --version 0.3.1
NuGet\Install-Package ADRaffy.ENSNormalize -Version 0.3.1
<PackageReference Include="ADRaffy.ENSNormalize" Version="0.3.1" />
<PackageVersion Include="ADRaffy.ENSNormalize" Version="0.3.1" />Directory.Packages.props
<PackageReference Include="ADRaffy.ENSNormalize" />Project file
paket add ADRaffy.ENSNormalize --version 0.3.1
#r "nuget: ADRaffy.ENSNormalize, 0.3.1"
#:package ADRaffy.ENSNormalize@0.3.1
#addin nuget:?package=ADRaffy.ENSNormalize&version=0.3.1Install as a Cake Addin
#tool nuget:?package=ADRaffy.ENSNormalize&version=0.3.1Install as a Cake Tool
0-dependency ENSIP-15 in C#
17.0.04febc8f5d285cbf80d2320fb0c1777ac25e378eb72910c34ec963d0a4e319c84~58KB .dll using via netstandard1.1, net35, netcoreapp3.1using ADRaffy.ENSNormalize;
ENSNormalize.ENSIP15 // Main Library (global instance)
// string -> string
// throws on invalid names
ENSNormalize.ENSIP15.Normalize("RaFFY🚴♂️.eTh"); // "raffy🚴♂.eth"
// works like Normalize()
ENSNormalize.ENSIP15.Beautify("1⃣2⃣.eth"); // "1️⃣2️⃣.eth"
// works like Normalize(), throws on invalid names
// string -> NormDetails
NormDetails details = ENSNormalize.ENSIP15.NormalizeDetails("💩ì.a");
string Name; // normalized name
bool PossiblyConfusing; // if name should be carefully reviewed
HashSet<Group> Groups; // unique groups in name
HashSet<EmojiSequence> Emojis; // unique emoji in name
string GroupDescription = "Emoji+Latin"; // group summary for name
bool HasZWJEmoji; // if any emoji contain 200D
// string -> Label[]
// never throws
Label[] labels = ENSNormalize.ENSIP15.Split("💩Raffy.eth_");
// [
// Label {
// Input: [ 128169, 82, 97, 102, 102, 121 ],
// Tokens: [
// OutputToken { Codepoints: [ 128169 ], IsEmoji: true }
// OutputToken { Codepoints: [ 114, 97, 102, 102, 121 ] }
// ],
// Normalized: [ 128169, 114, 97, 102, 102, 121 ],
// Group: Group { Name: "Latin", ... }
// },
// Label {
// Input: [ 101, 116, 104, 95 ],
// Tokens: [
// OutputToken { Codepoints: [ 101, 116, 104, 95 ] }
// ],
// Error: NormException { Kind: "underscore allowed only at start" }
// }
// ]
ENSIP15.Groups: IList<Group>ENSIP15.Emojis: IList<EmojiSequence>ENSIP15.Wholes: IList<Whole>All errors are safe to print. { Kind: string, Reason: string? } is the base exception. Functions that accept names as input wrap their exceptions in { Label: string, Error: NormException } for additional context.
"disallowed character" — { Codepoint }"illegal mixture" — { Codepoint, Group, OtherGroup? }"whole-script confusable" — { Group, OtherGroup }"empty label""duplicate non-spacing marks""excessive non-spacing marks""leading fenced""adjacent fenced""trailing fenced""leading combining mark""emoji + combining mark""invalid label extension""underscore allowed only at start"Normalize name fragments for substring search:
// string -> string
// only throws InvalidLabelException w/DisallowedCharacterException
ENSNormalize.ENSIP15.NormalizeFragment("AB--");
ENSNormalize.ENSIP15.NormalizeFragment("..\u0300");
ENSNormalize.ENSIP15.NormalizeFragment("\u03BF\u043E");
// note: Normalize() throws on these
Construct safe strings:
// int -> string
ENSNormalize.ENSIP15.SafeCodepoint(0x303); // "◌̃"
ENSNormalize.ENSIP15.SafeCodepoint(0xFE0F); // "{FE0F}"
// IList<int> -> string
ENSNormalize.ENSIP15.SafeImplode(new int[]{ 0x303, 0xFE0F }); // "◌̃{FE0F}"
Determine if a character shouldn't be printed directly:
// ReadOnlyIntSet (like IReadOnlySet<int>)
ENSNormalize.ENSIP15.ShouldEscape.Contains(0x202E); // RIGHT-TO-LEFT OVERRIDE => true
Determine if a character is a combining mark:
// ReadOnlyIntSet
ENSNormalize.ENSIP15.CombiningMarks.Contains(0x20E3); // COMBINING ENCLOSING KEYCAP => true
using ADRaffy.ENSNormalize;
// string -> string
ENSNormalize.NF.NFC("\x65\u0300"); // "\xE8"
ENSNormalize.NF.NFD("\xE8"); // "\x65\u0300"
// IEnumerable<int> -> List<int>
ENSNormalize.NF.NFC(new int[]{ 0x65, 0x300 }); // [0xE8]
ENSNormalize.NF.NFD(new int[]{ 0xE8 }); // [0x65, 0x300]
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 net5.0 is compatible. net5.0-windows net5.0-windows was computed. net6.0 net6.0 was computed. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 was computed. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 was computed. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
| .NET Core | netcoreapp1.0 netcoreapp1.0 was computed. netcoreapp1.1 netcoreapp1.1 was computed. netcoreapp2.0 netcoreapp2.0 was computed. netcoreapp2.1 netcoreapp2.1 was computed. netcoreapp2.2 netcoreapp2.2 was computed. netcoreapp3.0 netcoreapp3.0 was computed. netcoreapp3.1 netcoreapp3.1 is compatible. |
| .NET Standard | netstandard1.1 netstandard1.1 is compatible. netstandard1.2 netstandard1.2 was computed. netstandard1.3 netstandard1.3 was computed. netstandard1.4 netstandard1.4 was computed. netstandard1.5 netstandard1.5 was computed. netstandard1.6 netstandard1.6 was computed. netstandard2.0 netstandard2.0 is compatible. netstandard2.1 netstandard2.1 was computed. |
| .NET Framework | net35 net35 is compatible. net40 net40 was computed. net403 net403 was computed. net45 net45 was computed. net451 net451 is compatible. net452 net452 was computed. net46 net46 was computed. net461 net461 is compatible. net462 net462 was computed. net463 net463 was computed. net47 net47 was computed. net471 net471 was computed. net472 net472 was computed. net48 net48 was computed. net481 net481 was computed. |
| MonoAndroid | monoandroid monoandroid was computed. |
| MonoMac | monomac monomac was computed. |
| MonoTouch | monotouch monotouch was computed. |
| Tizen | tizen30 tizen30 was computed. tizen40 tizen40 was computed. tizen60 tizen60 was computed. |
| Universal Windows Platform | uap uap was computed. uap10.0 uap10.0 was computed. |
| Windows Phone | wpa81 wpa81 was computed. |
| Windows Store | netcore netcore was computed. netcore45 netcore45 was computed. netcore451 netcore451 was computed. |
| Xamarin.iOS | xamarinios xamarinios was computed. |
| Xamarin.Mac | xamarinmac xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos xamarinwatchos was computed. |
Showing the top 5 NuGet packages that depend on ADRaffy.ENSNormalize:
| Package | Downloads |
|---|---|
|
Nethereum.Contracts
Nethereum Contracts is the core library to interact via RPC with Smart contracts in Ethereum |
|
|
Nethereum.Fx
Nethereum Fx, a single package combining most of the main Nethereum libraries (Web3, ABI, Contracts, Accounts, Signers, RPC, WebSockets, IPC, RLP, HdWallet, Geth, Parity, Besu, Quorum, KeyStore, etc) and targetting: net5.0,netcoreapp3.1,netstandard2.0 and netstandard2.1 |
|
|
Nethereum.LiteFx
Nethereum Fx Lite, a single package that combining a small set of Nethereum libraries (for simple portability) not including crypto dependencies to be used with external signers (Web3, ABI, Contracts, RPC, RLP, ENS, ERC20, ERC721) and targetting: net5.0,netcoreapp3.1,netstandard2.0 and netstandard2.1 |
|
|
NethereumQuantum.Contracts
Nethereum Contracts is the core library to interact via RPC with Smart contracts in Ethereum |
|
|
Neth.TMP
Nethereum unofficial fork that has the following features: * Single nuget package targetting only .NetStandard2.0. * Stable version from upstream's 3.0 (following SemVer). * CancellationToken support (via JsonRpcSharp dependency). |
Showing the top 1 popular GitHub repositories that depend on ADRaffy.ENSNormalize:
| Repository | Stars |
|---|---|
|
Nethereum/Nethereum
Ethereum .Net cross platform integration library
|