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

Accessors

  • get id(): `nm_${string}`

    Name ID encoded as nm_-prefixed string

    Returns `nm_${string}`

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 auction info from the node and return the object with info

    Parameters

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

      Options

    Returns Promise<AuctionEntry & { highestBidder: `ak_${string}`; id: `nm_${string}` }>

    const auctionEntry = await name.getAuctionState()
    console.log(auctionEntry.highestBidder)
  • Query the AENS name info from the node and return the object with info

    Parameters

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

      Options

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

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