Skip to content

Registrar

View as Markdown
  • CLI setup with keys and RPC endpoint configured
  • Registry payment token mint and treasurer token account ready
  • Fee payer funded for signer costs

Create the .thru registry and price configuration. The CLI derives the config account (seed config) and validates the token mint/treasurer accounts against the provided token program, including requiring the treasurer token account to be active (not frozen).

Terminal window
thru registrar initialize-registry \
$root_registrar_account \
$treasurer_account \
$token_mint_account \
$price_per_year \
[root_domain_name] \
[OPTIONS]

root_registrar_account · string · required

Root registrar address for the base name service program (must not yet exist)

treasurer_account · string · required

Token account that receives payments; must use the registry mint, match the token program, and be active (not frozen)

token_mint_account · string · required

Registry payment token mint address

price_per_year · u64 · required

Price in base units per year of registration as an unsigned 64-bit integer (applied to purchases and renewals)

root_domain_name · string

Optional root name stored in the registry config (default: thru, max 64 characters)

string

Override base name service program address

string

Override token program address

string

Hex state proof for the config account; auto-generated if omitted

string

Hex state proof for the root registrar account; auto-generated if omitted

string

Signer paying transaction costs

string

Override the thru registrar program address

Example:

Terminal window
thru registrar initialize-registry \
ta...[root_registrar_account] \
ta...[treasurer_account] \
ta...[token_mint_account] \
10_000_000 \
--token-program ta...[token_program]

Buy a .thru domain for a number of years. The CLI derives the lease account from the domain name and validates your payer token account before submitting.

Terminal window
thru registrar purchase-domain \
$domain_name \
$years \
$config_account \
$payer_token_account \
[OPTIONS]

domain_name · string · required

Domain segment without .thru (1-64 characters)

years · u8 · required

Lease term in years as an unsigned 8-bit integer (valid range: 1-255)

config_account · string · required

Initialized registry config account address

payer_token_account · string · required

Token account for the registry mint owned by the fee payer

string

Hex state proof for the lease account; auto-generated if omitted

string

Hex state proof for the domain account; auto-generated if omitted

string

Signer for the transaction

string

Override the thru registrar program address

Example:

Terminal window
thru registrar purchase-domain \
example \
2 \
ta...[config_account] \
ta...[payer_token_account]

Extend a domain’s lease using the same registry mint and treasurer validation as purchases.

Terminal window
thru registrar renew-lease \
$lease_account \
$years \
$config_account \
$payer_token_account \
[OPTIONS]

lease_account · string · required

Existing lease account address for the domain

years · u8 · required

Additional years to add as an unsigned 8-bit integer (valid range: 1-255)

config_account · string · required

Registry config account address

payer_token_account · string · required

Registry mint token account owned by the fee payer

string

Signer for the transaction

string

Override the thru registrar program address

Example:

Terminal window
thru registrar renew-lease \
ta...[lease_account] \
1 \
ta...[config_account] \
ta...[payer_token_account]

Reclaim a domain whose lease has expired by paying for a new term.

Terminal window
thru registrar claim-expired-domain \
$lease_account \
$years \
$config_account \
$payer_token_account \
[OPTIONS]

lease_account · string · required

Expired lease account address to reclaim

years · u8 · required

Years to apply to the new lease as an unsigned 8-bit integer (valid range: 1-255)

config_account · string · required

Registry config account address

payer_token_account · string · required

Registry mint token account owned by the fee payer

string

Signer for the transaction

string

Override the thru registrar program address