const name = new Name('test.chain', aeSdk.getContext())

Constructors

Properties

options: {
    onAccount: AccountBase;
    onNode: Node;
} & Omit<NameRevokeOptions & NameUpdateOptions & NameTransferOptions & NamePreclaimOptions & NameClaimOptions, "version">

Options

value: `${string}.chain`

AENS name

Methods

  • Bid to name auction

    Parameters

    • nameFee: string | number | BigNumber

      Name fee (bid fee)

    • options: Omit<NameClaimOptions, "nameFee"> = {}

      Options

    Returns Promise<SendTransactionReturnType>

    mined transaction details

    const bidFee = computeBidFee(name.value, { startFee, increment: 0.42 })
    await name.bid(213109412839123, { ttl, fee, nonce })
  • Query the AENS name info from the node and return the object with info and predefined functions for manipulating name

    Parameters

    • options: {
          onNode?: Node;
      } = {}

      Options

      • OptionalonNode?: Node

    Returns Promise<NameEntry & {
        id: `nm_${string}`;
        owner: `ak_${string}`;
    }>

    const nameEntry = await name.getState()
    console.log(nameEntry.owner)
  • Update a name

    Parameters

    Returns Promise<SendTransactionReturnType>

    const name = 'test.chain'
    const channel = 'ch_2519mBs...'
    const pointers = {
    account_pubkey: 'ak_asd23dasdas...,',
    contract_pubkey: 'ct_asdf34fasdasd...',
    [getDefaultPointerKey(channel)]: channel,
    }
    await name.update(pointers, { nameTtl, ttl, fee, nonce, clientTtl })