Managing names
Transferring names
You can call transfer
on any domain including TLDs to transfer ownership to another address
import { Id } from '@imperviousinc/id';
import { BrowserProvider, Contract, parseEther } from 'ethers';
const provider = new BrowserProvider(); // get a provider
const network = await provider.getNetwork() ;
const id = new Id({network, provider});
// transfer bob.forever
const tx = await id.transfer('bob.forever', {to:'0x1234...'});
// transfer a TLD
const tx = await id.transfer('www', {to:'0x1234...'});
// transfer a .eth domain
const tx = await id.transfer('vitalik.eth', {to:'0x1234...'});