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 response types from the common/schema.graphql to be used in the query GraphQL.
Resolve Address
Type to resolve address to domain record.
Resolve Domain
Type is to resolve a valid domain name.
Mutations
Import Plugins
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.
Fragments (Reusable Types)
Commit Params
Buy Params
Send Params
Mutation
Commit
Buy
Creating a Web3 client with Tezos Domains plugin support
A function to resolve a Tezos Domain via Polywrap + GraphQL
Wrapper Example
The Tezos Domains plugin can be found in the ./tezos/tezos-domains folder.
Remove these lines of code from the package.json file:
Now, link the wrapper to Tezos-plugin-js and tezos-test-env:
Install the node packages and build plugin-js
Running Tests
The e2e tests can be found in the src/tests/e2e folder. Run the e2e tests as follows:
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.
Queries
Queries are implemented in the ./src/query folder.
Tests
To test the query and mutation functions, e2e tests are available.