Optional
cause?: anyOptional
stackStatic
Optional
prepareStatic
stackStatic
captureGenerated using TypeDoc
Optional
cause?: anyOptional
cause?: anyOptional
stackStatic
Optional
prepareOptional override for formatting stack traces
-Static
stackStatic
captureGenerated using TypeDoc
Optional
cause?: anyContracts IDs & Addresses
-Generated using TypeDoc
Contracts IDs & Addresses
+Generated using TypeDoc
Supported Chains
+Generated using TypeDoc
Determines contract details based on chain & identifier, then returns a ContractPromise
instance.
Optional
customContractAddresses: ContractAddressesGenerated using TypeDoc
Determines contract details based on chain & identifier, then returns a ContractPromise
instance.
Optional
customContractAddresses: ContractAddressesImports & returns metadata.json (abi) for a given contract.
-Generated using TypeDoc
Imports & returns metadata.json (abi) for a given contract.
+Returns contract address for a given chain & contract. +
Returns contract address for a given chain & contract.
If customContractAddresses
are provided, they will overwrite of the default ones.
NOTE: To use the local development
network, customContractAddresses
must be provided.
Optional
customContractAddresses: ContractAddressesGenerated using TypeDoc
Optional
customContractAddresses: ContractAddressesReturns supported TLDs for a given chain.
-Generated using TypeDoc
Returns supported TLDs for a given chain.
+Resolves a given address to the assigned primary domain(s).
-NOTE: When an address holds primary domains within multiple TLDs,
- all primary domains will be returned. This case is currently not possible,
- so allPrimaryDomains
will always return an array with 0 or 1 primary domain.
Address to resolve (e.g. 5EFJEY4DG2FnzcuCZpnRjjzT4x7heeEXuoYy1yAoUmshEhAP
)
Optional
options: Partial<ResolveAddressOptions>Options (see ResolveOptions
definition)
Primary domain(s) as string (null, if no primary domain found) or error
- -Generated using TypeDoc
Resolves a given address to the assigned primary domain(s).
+NOTE: When an address holds primary domains within multiple registries (TLDs),
+all primary domains will be returned. This case is currently not possible,
+so allPrimaryDomains
will always return an array with 0 or 1 primary domain.
Address to resolve (e.g. 5EFJEY4DG2FnzcuCZpnRjjzT4x7heeEXuoYy1yAoUmshEhAP
)
Optional
options: Partial<ResolveAddressOptions>Options (see ResolveOptions
definition)
Primary domain(s) as string (null, if no primary domain found) or error
+Resolves a given domain to the assigned address.
-Domain to resolve (e.g. domains.azero
)
Optional
options: Partial<ResolveDomainOptions>Options (see ResolveDomainOptions
definition)
Address as string (null, if domain not found) or error
- -Generated using TypeDoc
Resolves a given domain to the assigned address.
+Domain to resolve (e.g. domains.azero
)
Optional
options: Partial<ResolveDomainOptions>Options (see ResolveDomainOptions
definition)
Address as string (null, if domain not found) or error
+Optional
value: stringOptional
options: SanitizeDomainOptionsGenerated using TypeDoc
Optional
value: stringOptional
options: SanitizeDomainOptionsResolves a given address to the assigned primary domain(s). +
Resolves a given address to the assigned primary domain(s).
See resolveAddressToDomain
from @azns/resolver-core
for more details.
Optional
options: Partial<ResolveAddressOptions>Generated using TypeDoc
Optional
options: Partial<ResolveAddressOptions>Resolves a given domain to the assigned address. +
Resolves a given domain to the assigned address.
See resolveDomainToAddress
from @azns/resolver-core
for more details.
Optional
options: Partial<ResolveDomainOptions>Generated using TypeDoc
Optional
options: Partial<ResolveDomainOptions>This repository contains JS/TS libraries to resolve domains & addresses registered with AZERO.ID.
-It's built as a monorepo and contains the following packages:
+It's built as a monorepo and contains the following packages:
@azns/resolver-core
– Vanilla JS/TS Library@azns/resolver-react
– React-Hooks Library (depends on @azns/resolver-core
)Additionally, multiple working examples are provided for both packages.
-📃 Integration Guide: https://docs.azero.id/integration
-👩💻 Interface Documentation: https://azero-id.github.io/resolver/
-Currently, this package is not production-ready and only works on the Aleph Zero Testnet. Aleph Zero Mainnet contract addresses are provided as soon as our contracts are deployed there.
-Install the package from the npm registry:
-npm install @azns/resolver-core
# or
pnpm add @azns/resolver-core
# or
yarn add @azns/resolver-core
-
-Resolve domain → address via resolveDomainToAddress
:
import { SupportedChainId, resolveDomainToAddress } from '@azns/resolver-core'
const { address, error } = await resolveDomainToAddress('domains.tzero', {
chainId: SupportedChainId.AlephZeroTestnet,
})
// Print result
if (error) console.log(error.message)
else console.log(address)
-
-Resolve address → primary domain(s) via resolveAddressToDomain
:
import { SupportedChainId, resolveAddressToDomain } from '@azns/resolver-core'
const { primaryDomain, error } = await resolveAddressToDomain(
'5EeBxqQ7Kz6hcchEgkBn9ybBS4UaqGggi2Rq5weNyEZ9DjAK',
{
chainId: SupportedChainId.AlephZeroTestnet,
},
)
// Print result
if (error) console.log(error.message)
else console.log(primaryDomain)
-
-Install the packages from the npm registry:
-npm install @azns/resolver-core @azns/resolver-react
# or
pnpm add @azns/resolver-core @azns/resolver-react
# or
yarn add @azns/resolver-core @azns/resolver-react
-
-Resolve domain → address via useResolveDomainToAddress
:
import { SupportedChainId } from '@azns/resolver-core'
import { useResolveDomainToAddress } from '@azns/resolver-react'
const { address, error } = useResolveDomainToAddress('domains.tzero', {
chainId: SupportedChainId.AlephZeroTestnet,
})
-
-Resolve address → primary domain(s) via useResolveAddressToDomain
:
import { SupportedChainId } from '@azns/resolver-core'
import { useResolveAddressToDomain } from '@azns/resolver-react'
const { primaryDomain, error } = useResolveAddressToDomain(
'5EeBxqQ7Kz6hcchEgkBn9ybBS4UaqGggi2Rq5weNyEZ9DjAK',
{
chainId: SupportedChainId.AlephZeroTestnet,
},
)
-
-# Setup Node.js (recommended via nvm)
# Install pnpm: https://pnpm.io/installation (recommended via node corepack)
# Clone this repository
# Install dependencies
pnpm i
# Build packages & Run examples:
# - Vanilla Example starts on http://localhost:4000
# - Next.js Example starts on http://localhost:3000
pnpm run dev:examples
-
+Additionally, multiple working examples are provided for both packages.
+Get started by checking out our detailed integration guide:
+https://docs.azero.id/integration
+View the full interface documentation & types here:
+https://azero-id.github.io/resolver
+# Setup Node.js (recommended via nvm)
# Install pnpm: https://pnpm.io/installation (recommended via node corepack)
# Clone this repository
# Install dependencies
pnpm i
# Build packages & Run examples:
# - Vanilla Example starts on http://localhost:4000
# - Next.js Example starts on http://localhost:3000
pnpm run dev:examples
+
+
- -
Generated using TypeDoc
Sanitizes a given domain string (e.g. Name.azero
→ name.azero
).
+
Sanitizes a given domain string (e.g. Name.azero
→ name.azero
).
By default, the domain will be trimmed and converted to lowercase.
Optional
lowercaseOptional
removeOptional
removeOptional
replaceOptional
trimGenerated using TypeDoc
@azns/resolver-core
@azns/resolver-core
This repository contains JS/TS libraries to resolve domains & addresses registered with AZERO.ID.
➡️ Full README: https://github.com/azero-id/resolver
📃 Integration Guide: https://docs.azero.id/integration
👩💻 Interface Documentation: https://azero-id.github.io/resolver/
-Generated using TypeDoc
@azns/resolver-react
@azns/resolver-react
This repository contains JS/TS libraries to resolve domains & addresses registered with AZERO.ID.
➡️ Full README: https://github.com/azero-id/resolver
📃 Integration Guide: https://docs.azero.id/integration
👩💻 Interface Documentation: https://azero-id.github.io/resolver/
-Generated using TypeDoc
Custom options for resolveAddressToDomain
and resolveDomainToAddress
.
Optional
customOptional
customOptional
debug?: booleanChain ID to use (default: alephzero
, available: alephzero
, alephzero-testnet
, development
).
Custom API instance to use instead of creating the default one (faster and more memory efficient, if you already have an API instance)
- -Custom contract addresses to overwrite the default ones. Mandatory for development
network.
Enable debug logging.
-Generated using TypeDoc
Custom options for resolveAddressToDomain
and resolveDomainToAddress
.
Chain ID to use (default: alephzero
, available: alephzero
, alephzero-testnet
, development
).
Custom API instance to use instead of creating the default one (faster and more memory efficient, if you already have an API instance)
+Custom contract addresses to overwrite the default ones. Mandatory for development
network.
Enable debug logging.
+Optional
ss58Optional
testnet?: booleanGenerated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Optional
ignoreIf true, the current chain ss58 prefix will be ignored and the address will be decoded with any prefix
-Generated using TypeDoc
Generated using TypeDoc
Optional
skipUses the exact given domain w/o sanitization like lowercasing (default: false)
-Generated using TypeDoc
Const
Generated using TypeDoc
Const
Generated using TypeDoc
Const
Generated using TypeDoc
Const
Const
Generated using TypeDoc
Const
Const
Generated using TypeDoc
Const
Const
Generated using TypeDoc
Const
Optional override for formatting stack traces
-