For the complete documentation index, see llms.txt. This page is also available as Markdown.

(EVM) Proxy Doma Record API

User-facing facet for the Proxy DOMA record contract on tokenization chains.

This facet handles user interactions including tokenization requests, ownership claims, cross-chain bridging, and domain record management. It validates vouchers, manages fees, and integrates with EIP-712 for signature verification. Supports both ownership tokens and capability tokens with appropriate access controls.

Structs

TokenizationVoucher

Tokenization voucher, obtained from a Registrar.

Parameters

Name
Type
Description

names

struct IDomaRecord.NameInfo[]

List of names to tokenize.

nonce

uint256

Unique nonce to prevent replay attacks.

expiresAt

uint256

Expiration timestamp (UNIX seconds)

ownerAddress

address

Address to receive the minted ownership token.

struct TokenizationVoucher {
  struct IDomaRecord.NameInfo[] names;
  uint256 nonce;
  uint256 expiresAt;
  address ownerAddress;
}

ProofOfContactsVoucher

Proof of Contacts voucher, obtained from a Registrar or Doma-provided storage.

Parameters

Name
Type
Description

registrantHandle

uint256

The registrant's handle identifier.

proofSource

enum IDomaRecord.ProofOfContactsSource

Source of the proof (REGISTRAR or DOMA)

nonce

uint256

Unique nonce to prevent replay attacks.

expiresAt

uint256

Expiration timestamp (UNIX seconds)

HostDNSInput

A host with its associated DNS record sets, used for batch DNS operations.

Parameters

Name

Type

Description

host

string

The hostname relative to the token (eg. "www" or "" for apex). Must be lowercase.

recordSets

struct IDomaRecord.DNSRecordSet[]

Array of DNS record sets for this host.

DNSRecordSet

A single DNS record set containing a record type, TTL and values.

Parameters

Name

Type

Description

recordType

string

DNS record type (eg "A", "AAAA", "CNAME").

ttl

uint32

Time to live in seconds.

records

string[]

Array of record values. Empty array deletes the RRSet.

Errors

InsufficientCapabilities

Thrown when a token lacks the required capabilities for an operation.

Parameters

Name
Type
Description

tokenId

uint256

The ID of the token being checked

requiredCapability

uint256

The capability bitmask that was required

NameAlreadyTokenized

Thrown when attempting to tokenize a name that is already tokenized.

Parameters

Name
Type
Description

sld

string

The second-level domain of the name

tld

string

The top-level domain of the name

InvalidRegistrar

Thrown when a registrar ID doesn't match the expected registrar for an operation.

Parameters

Name
Type
Description

ianaId

uint256

The provided registrar IANA ID

expectedIanaId

uint256

The expected registrar IANA ID

UnsupportedTargetChain

Thrown when attempting to bridge to an unsupported target chain.

Parameters

Name
Type
Description

chainId

string

The unsupported chain ID in CAIP-2 format

TransferLocked

Thrown when attempting to transfer a token that is locked for transfers.

Parameters

Name
Type
Description

tokenId

uint256

The ID of the locked token

NameTokenHasExpired

Thrown when attempting to operate on an expired name token.

Parameters

Name
Type
Description

tokenId

uint256

The ID of the expired token

expiresAt

uint256

The expiration timestamp of the token

InvalidSigner

Thrown when a voucher signature is invalid or from an unauthorized signer.

Parameters

Name
Type
Description

signer

address

The address that was recovered from the signature

VoucherExpired

Thrown when a voucher has expired and cannot be used.

Parameters

Name
Type
Description

expiresAt

uint256

The expiration timestamp of the voucher

currentTime

uint256

The current block timestamp

PriceFeedStalePrice

Thrown when the price feed data is stale and cannot be trusted.

Parameters

Name
Type
Description

roundId

uint80

The round ID from the price feed

updatedAt

uint256

The timestamp when the price was last updated

InvalidPrice

Thrown when the price feed returns an invalid price value.

Parameters

Name
Type
Description

price

int256

The invalid price value returned

TransferFailed

Thrown when a native currency transfer fails.

InvalidFee

Thrown when the provided fee doesn't match the expected fee for an operation.

Parameters

Name
Type
Description

expectedFee

uint256

The expected fee amount in wei

providedFee

uint256

The fee amount actually provided

FeeNotRequired

Thrown when a fee is provided for an operation that doesn't require payment.

Parameters

Name
Type
Description

operation

bytes32

The operation identifier

nameCount

uint256

The number of names being processed

NonceAlreadyUsed

Thrown when attempting to reuse a nonce that has already been consumed.

Parameters

Name
Type
Description

nonce

uint256

The nonce that was already used

FeeCollected

Emitted when a fee is collected for an operation.

Parameters

Name
Type
Description

feeWei

uint256

The fee amount collected in wei

feeUsdCents

uint256

The equivalent fee amount in USD cents

correlationId

string

The correlation ID for tracking the operation

SubdomainHostInUse

Thrown when attempting to set DNS records on a host that has an operational subdomain token.

Parameters

Name
Type
Description

host

string

The host lable that conflicts with an existing subdomain.

EmptyArray

Thrown when an empty array is passed to a batch operation.

Methods

requestTokenization

Request tokenization of domain names using a signed voucher from a registrar.

Validates the voucher signature, collects fees, and initiates cross-chain tokenization. The voucher must be signed by an authorized registrar and not expired. Names are validated for proper format and checked for existing tokenization on this chain.

Parameters

Name
Type
Description

voucher

struct ProxyDomaRecordUserFacet.TokenizationVoucher

The tokenization voucher containing names and authorization details

signature

bytes

The registrar's signature over the voucher data

claimOwnership

Claim ownership of a domain name using proof of contacts voucher.

Allows token owners to establish claim over their domain by providing signed proof from either the registrar or DOMA system. Validates voucher signature, collects fees, and initiates cross-chain ownership claim process.

Parameters

Name
Type
Description

tokenId

uint256

The ID of the ownership token being claimed

proofOfContactsVoucher

struct ProxyDomaRecordUserFacet.ProofOfContactsVoucher

The voucher containing proof of contact information

signature

bytes

The signature over the voucher (from registrar or DOMA)

bridge

Bridge a domain token to another supported chain.

Burns the token on this chain and initiates minting on the target chain. Validates target chain support, transfer lock status, and token expiration. Collects fees and relays the bridge request to the DOMA chain.

Parameters

Name
Type
Description

tokenId

uint256

The ID of the ownership token to bridge

targetChainId

string

The CAIP-2 chain ID of the destination chain

targetOwnerAddress

string

The owner address on the target chain

requestDetokenization

Request detokenization of a domain name by the owner.

Initiates the detokenization process on the DOMA chain, which will remove the domain from the protocol and return it to traditional DNS management. Only the token owner can request detokenization.

Parameters

Name
Type
Description

tokenId

uint256

The ID of the ownership token to detokenize

setNameservers

Update nameservers for a domain.

Requires CAPABILITY_REGISTRY_RECORDS_MANAGEMENT. Relays change to Doma Chain.

Parameters

Name
Type
Description

tokenId

uint256

The ownership token ID.

nameservers

string[]

List of nameserver hostnames.

setDSKeys

Update DNSSEC DS keys for a domain.

Requires CAPABILITY_REGISTRY_RECORDS_MANAGEMENT. Relays change to Doma Chain.

Parameters

Name
Type
Description

tokenId

uint256

The ownership token ID.

dsKeys

struct IDomaRecord.DSKey[]

Array of DS key records.

setDNSRRSet

Set DNS resource record set for a domain. Works for ownership tokens, synthetic root tokens and synthetic subdomain tokens. For subdomain tokens, the host is relative to the subdomain (use empty string for apex).

Requires CAPABILITY_DNS_RECORDS_MANAGEMENT. Relays change to Doma Chain.

Parameters

Name
Type
Description

tokenId

uint256

The ownership token ID.

host

string

The hostname (e.g., "www" or "@" for apex).

recordType

string

DNS record type (e.g., "A", "AAAA", "CNAME").

ttl

uint32

Time-to-live in seconds.

records

string[]

Array of record values. Empty array deletes the RRSet.

setDNSRRSetBatch

Sets multiple DNS record sets across multiple hosts in a single transaction. Works for ownership tokens, synthetic root tokens and synthetic subdomain tokens. For subdomain tokens, hosts are relative to the subdomain (use empty string for apex). Each host entry must have at least one record set. Empty records array within a record set deletes that RRSet.

Requires CAPABILITY_DNS_RECORDS_MANAGEMENT. Relays change to Doma Chain.

Parameters

Name
Type
Description

tokenId

uint256

The ownership token ID.

host

string

The hostname (e.g., "www" or "@" for apex).

recordType

string

DNS record type (e.g., "A", "AAAA", "CNAME").

ttl

uint32

Time-to-live in seconds.

records

string[]

Array of record values. Empty array deletes the RRSet.

feesUSDCents

Get the fee in USD cents for a specific operation.

Parameters

Name
Type
Description

operation

bytes32

The operation identifier to query

Return Values

Name
Type
Description

[0]

uint256

The fee amount in USD cents

isTargetChainSupported

Check if a target chain is supported for bridging operations.

Parameters

Name
Type
Description

targetChainId

string

The CAIP-2 chain identifier to check

Return Values

Name
Type
Description

[0]

bool

Whether the target chain is supported

getNativePrice

Convert a USD cent amount to the equivalent native token amount.

Uses Chainlink price feed to get current exchange rate. Validates price feed data.

Parameters

Name
Type
Description

feeUSDCents

uint256

The fee amount in USD cents

Return Values

Name
Type
Description

nativeFee

uint256

The equivalent fee in native token wei

getBridgeFeeInNative

Get the bridge fee in native tokens for a target chain.

Uses per-chain bridge config when present, otherwise falls back to the default BRIDGE_OPERATION fee

Parameters

Name
Type
Description

targetChainId

string

The CAIP-2 target chain identifier.

Return Values

Name
Type
Description

[0]

uint256

The fee amount in native token wei.

getOperationFeeInNative

Get the fee in native tokens for a specific operation.

Combines USD cent fee lookup with current price conversion.

Parameters

Name
Type
Description

operation

bytes32

The operation identifier to query

Return Values

Name
Type
Description

[0]

uint256

The fee amount in native token wei (0 if operation has no fee)

convertToSynthetic

Convert an ownership token to a synthetic ownership token. Burns the ownership token and initiates minting of a synthetic token on the same chain via Doma Chain.

The synthetic token maintains the same tokenId, expiration and capabilities as the original.

Parameters

Name
Type
Description

tokenId

uint256

The ID of the ownership token to convert.

convertToOwnership

Convert a synthetic ownership token back to a regular ownership token. Burns the synthetic token and initiates minting of an ownership token on the same chain via Doma Chain

Requires that the synthetic token has no active subdomains.

Parameters

Name
Type
Description

tokenId

uint256

The ID of the synthetic token to convert.

mintSyntheticSubdomain

Mint a synthetic subdomain token under a synthetic root token. The subdomain token grants DNS management rights over a specific subdomain. Can only be called by the parent token owner.

Parameters

Name
Type
Description

parentTokenId

uint256

The ID of the parent synthetic token.

host

string

The subdomain host label (eg "sam", "dev", "app").

capabilities

uint256

Capability flags (must include CAPABILITY_DNS_RECORDS_MANAGEMENT).

expiresAt

uint256

Expiration timestamp for the subdomain token (0 to inherit from parent).

revocable

bool

Whether the parent token owner can revoke this subdomain.

groupId

uint256

Group identifier for batch operations (batch revoke).

receiver

address

The address to receive the minted subdomain token.

Return Values

Name
Type
Description

[0]

uint256

The newly minted synthetic subdomain token ID

renewSubdomain

Renew a synthetic subdomain token. Can only be called by the parent token owner. New expiration must extend the current expiration and must not exceed the parent token's expiration.

Parameters

Name
Type
Description

tokenId

uint256

The ID of the subdomain token to renew.

expiresAt

uint256

The new expiration timestamp.

renounceSynthetic

Renounce ownership of a synthetic subdomain token. Burns the subdomain token and makes it available for re-minting. Can only be called by the subdomain token owner. The subdomain must not be in a locked group.

Parameters

Name
Type
Description

tokenId

uint256

The ID of the subdomain token to renounce.

revokeSynthetic

Revoke a specific synthetic subdomain token. Burns the subdomain token and makes it available for re-minting. Can only be called by the parent token owner. The subdomain must be revocable and not in a locked group.

Parameters

Name
Type
Description

tokenId

uint256

The ID of the subdomain token to revoke.

revokeGroup

Revoke a group of subdomains, preventing transfers and marking them for bulk operations. Can only be called by the parent token owner. Reduces the parent's subdomain count by the number of tokens in the group.

Parameters

Name
Type
Description

parentTokenId

uint256

The ID of the parent synthetic token.

groupId

uint256

The group identifier to revoke.

version

Get the contract version.

Return Values

Name
Type
Description

[0]

string

The version string of this contract

REQUEST_TOKENIZATION_OPERATION

Get the REQUEST_TOKENIZATION_OPERATION constant

Return Values

Name
Type
Description

[0]

bytes32

The operation hash for request tokenization

CLAIM_OWNERSHIP_OPERATION

Get the CLAIM_OWNERSHIP_OPERATION constant

Return Values

Name
Type
Description

[0]

bytes32

The operation hash for claim ownership

BRIDGE_OPERATION

Get the BRIDGE_OPERATION constant

Return Values

Name
Type
Description

[0]

bytes32

The operation hash for bridge

SET_NAMESERVERS_OPERATION

Get the SET_NAMESERVERS_OPERATION constant

Return Values

Name
Type
Description

[0]

bytes32

The operation hash for set nameservers

SET_DS_KEYS_OPERATION

Get the SET_DS_KEYS_OPERATION constant

Return Values

Name
Type
Description

[0]

bytes32

The operation hash for set DS keys

SET_DNS_RRSET_OPERATION

Get the SET_DNS_RRSET_OPERATION constant

Return Values

Name
Type
Description

[0]

bytes32

The operation hash for set DNS RRSet

CONVERT_TO_SYNTHETIC_OPERATION

Get the CONVERT_TO_SYNTHETIC_OPERATION constant

Return Values

Name
Type
Description

[0]

bytes32

The operation hash for convert to synthetic.

CONVERT_TO_OWNERSHIP_OPERATION

Get the CONVERT_TO_OWNERSHIP constant

Return Values

Name
Type
Description

[0]

bytes32

The operation hash for convert to ownership.

Last updated