Tezos Domains is a distributed, open and extensible naming system using the Tezos blockchain.
The Tezos Domains Polywrapper allows you to search for registered Tezos domain names across Tezos testnets and mainnet. The network to search on is detected from the TLD you add, i.e. .tez for mainnet and e.g. .gra or .han for testnets.
Import methods and types from w3://ens/tezos.web3api.eth, w3://ens/tezosDomainsPlugin.web3api.eth and common/schema.graphql to be used in the mutation schemas.
#import { Connection, Mutation, Query, SendParams } into Tezos from "w3://ens/tezos.web3api.eth"#import { Query } into TezosDomainsPlugin from "w3://ens/tezosDomainsPlugin.web3api.eth"#import { Network, CustomConnection } from "../common/schema.graphql"
Fragments (Reusable Types)
Commit Params
typeCommitParams { # domain name label: String! # address of owner owner: String! # Random number nonce: UInt32!}
Buy Params
typeBuyParams { # domain name label: String! # address of owner owner: String! # address of domain address: String! # Random number nonce: UInt32! # Duration of domain duration: UInt32! # metadata of domain # Stringified JSON data: String!}
The e2e tests can be found in the src/tests/e2e folder. Run the e2e tests as follows:
yarntest
Project Structure
Mutations
Can be found in the ./src/mutation folder containing the index.ts file which is the AssemblyScript mutation logic and schema.graphql file which contains the graphql schemas for the functions in the mutation's index file.