diff --git a/src.ts/providers/ens-resolver.ts b/src.ts/providers/ens-resolver.ts index b8ba972a5..b8af29359 100644 --- a/src.ts/providers/ens-resolver.ts +++ b/src.ts/providers/ens-resolver.ts @@ -188,6 +188,7 @@ export class EnsResolver { "function addr(bytes32, uint) view returns (bytes)", "function text(bytes32, string) view returns (string)", "function contenthash(bytes32) view returns (bytes)", + "function name(bytes32) view returns (string)", ], provider); } @@ -313,6 +314,14 @@ export class EnsResolver { }); } + /** + * Resolves to the ENSIP-3 name record for %%key%%, or ``null`` + * if unconfigured. + */ + async getName(): Promise { + return this.#fetch("name(bytes32)"); + } + /** * Resolves to the EIP-634 text record for %%key%%, or ``null`` * if unconfigured.