You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
567 B
19 lines
567 B
import * as Ens from 'ox/Ens'
|
|
import type { ErrorType } from '../../errors/utils.js'
|
|
|
|
export type NormalizeErrorType = ErrorType
|
|
|
|
/**
|
|
* @description Normalizes ENS name according to ENSIP-15.
|
|
*
|
|
* @example
|
|
* normalize('wevm.eth')
|
|
* 'wevm.eth'
|
|
*
|
|
* @see https://docs.ens.domains/contract-api-reference/name-processing#normalising-names
|
|
* @see https://github.com/ensdomains/docs/blob/9edf9443de4333a0ea7ec658a870672d5d180d53/ens-improvement-proposals/ensip-15-normalization-standard.md
|
|
*/
|
|
export function normalize(name: string) {
|
|
return Ens.normalize(name)
|
|
}
|