Skip to content

adraffy/ENSNormalize.swift

Repository files navigation

ENSNormalize.swift

0-dependency ENSIP-15 in Swift

import ENSNormalize
ENSIP15.shared // Main Library (global instance)

Primary API ENSIP15

// String -> String
// throws on invalid names
try "RaFFY🚴‍♂️.eTh".ensNormalized() // "raffy🚴‍♂.eth"

// works like ensNormalized()
try "1⃣2⃣.eth".ensBeautified() // "1️⃣2️⃣.eth"

Normalization Properties

Error Handling

All errors are safe to print. NormError is the error enum.

import ENSNormalize

// [Cp] -> [Cp]
ENSIP15.shared.nf.C([0x65, 0x300]) // [0xE8]
ENSIP15.shared.nf.D([0xE8])        // [0x65, 0x300]

Publish Instructions

About

ENSIP-15 in Swift

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors