<src>dnsEncode(name: string)⇒ string Returns the DNS encoded name.
This is used for various parts of ENS name resolution, such as the wildcard resolution.
<src>ensNormalize(name: string)⇒ string Returns the ENS name normalized.
<src>hashMessage(message: Uint8Array | string)⇒ string Computes the EIP-191 personal-sign message digest to sign.
This prefixes the message with MessagePrefix and the decimal length of message and computes the keccak256 digest.
If message is a string, it is converted to its UTF-8 bytes first. To compute the digest of a DataHexString, it must be converted to bytes.
hashMessage("Hello World")
// '0xa1de988600a42c4b4ab089b619297c17d53cffae5d5120d82d8a92d0bb3b78f2'
hashMessage("0x4243")
// '0x6d91b221f765224b256762dcba32d62209cf78e9bebb0a1b758ca26c76db3af4'
hashMessage(getBytes("0x4243"))
// '0x0d3abc18ec299cf9b42ba439ac6f7e3e6ec9f5c048943704e30fc2d9c7981438'
hashMessage(new Uint8Array([ 0x42, 0x43 ]))
// '0x0d3abc18ec299cf9b42ba439ac6f7e3e6ec9f5c048943704e30fc2d9c7981438'
<src>id(value: string)⇒ string A simple hashing function which operates on UTF-8 strings to compute an 32-byte irentifier.
This simply computes the UTF-8 bytes and computes the keccak256.
id("hello world")
// '0x47173285a8d7341e5e972fc677286384f802f8ef42a5ec5f03bbfa254cb01fad'
<src>isValidName(name: string)⇒ boolean Returns true if name is a valid ENS name.
<src>namehash(name: string)⇒ string <src>solidityPacked(types: ReadonlyArray< string >, values: ReadonlyArray< any >)⇒ string addr = "0x8ba1f109551bd432803012645ac136ddd64dba72"
solidityPacked([ "address", "uint" ], [ addr, 45 ]);
// '0x8ba1f109551bd432803012645ac136ddd64dba72000000000000000000000000000000000000000000000000000000000000002d'
<src>solidityPackedKeccak256(types: ReadonlyArray< string >, values: ReadonlyArray< any >)⇒ string addr = "0x8ba1f109551bd432803012645ac136ddd64dba72"
solidityPackedKeccak256([ "address", "uint" ], [ addr, 45 ]);
// '0x9465ddbc845149cfc7046bee85c30fd1b52b4f87d9c03ca8a0bd046868763030'
<src>solidityPackedSha256(types: ReadonlyArray< string >, values: ReadonlyArray< any >)⇒ string addr = "0x8ba1f109551bd432803012645ac136ddd64dba72"
solidityPackedSha256([ "address", "uint" ], [ addr, 45 ]);
// '0xb9d5d16842f6832018ea7bd1aa6aef22049eb966a5fb915470e22dfc3e2f828f'
<src>interface TypedDataDomain <src>typedDataDomain.name⇒ string <src>typedDataDomain.verifyingContract⇒ string <src>typedDataDomain.version⇒ string <src>class TypedDataEncoder <src>typedDataEncoder.primaryType⇒ stringread-only <src>typedDataEncoder._visit(type: string, value: any, callback: (type: string, data: any) => any)⇒ any <src>typedDataEncoder.encode(value: Record< string, any >)⇒ string <src>typedDataEncoder.encodeData(type: string, value: any)⇒ string <src>typedDataEncoder.encodeType(name: string)⇒ string <src>typedDataEncoder.getEncoder(type: string)⇒ (value: any) => string <src>typedDataEncoder.hash(value: Record< string, any >)⇒ string <src>typedDataEncoder.hashStruct(name: string, value: Record< string, any >)⇒ string <src>typedDataEncoder.visit(value: Record< string, any >, callback: (type: string, data: any) => any)⇒ any <src>TypedDataEncoder.hashStruct(name: string, types: Record< string, Array< TypedDataField > >, value: Record< string, any >)⇒ string <src>interface TypedDataField <src>typedDataField.name⇒ string <src>typedDataField.type⇒ string