JS Kit SDK API Reference / Domain / safeResolve
Function: safeResolve()
safeResolve(
params):Promise<Address>
Defined in: domain/resolve.ts:74
Resolves a .sns or .sol domain using the same routing as resolve.
When SRS-backed .sol resolution is enabled, both the .sol domain and its
corresponding .sns domain must resolve to the same target; otherwise,
Errors.SnsSolResolutionMismatchError is thrown.
Parameters
params
Resolution parameters
Returns
Promise<Address>
The matching SRS and SNS target when compared; otherwise the target returned by resolve
Throws
- Errors.SnsSolResolutionMismatchError when SRS and SNS resolve a
.soldomain to different addresses. - Any resolution error propagated by resolve,
resolveSol, orresolveSns.
Example
const address = await safeResolve({ rpc, domain: "example.sol" });