ao-js-sdk - v0.0.9
    Preparing search index...

    Class NftClient

    Hierarchy (View Summary)

    Implements

    Index

    Constructors

    Properties

    baseConfig: BaseClientConfig

    Methods

    • Parameters

      • data: any = ''
      • tags: Tags = []
      • Optionalanchor: string
      • Optionalid: string
      • Optionalowner: string

      Returns Promise<DryRunResult>

    • Gets the balance of a specific identifier (address) in the token ledger. This is a read-only operation that queries the current state of the ledger.

      Parameters

      • Optionalidentifier: string

        The address to check the balance for

      Returns Promise<string>

      Promise resolving to the current balance as a string

    • Gets a paginated list of all balances in the token ledger. This is a read-only operation that returns all ledger/account balances.

      Parameters

      • limit: number = 1000

        Optional maximum number of balances to return per page

      • Optionalcursor: string

        Optional pagination cursor for fetching subsequent pages

      Returns Promise<DryRunResult>

      Promise resolving to the dry run result containing the balances

      If ever used should refactor to return the balances in a list format

    • Protected

      Parameters

      • data: any = ''
      • tags: Tags = []
      • Optionalanchor: string
      • Optionalid: string
      • Optionalowner: string

      Returns Promise<DryRunResult>

    • Retrieves the transaction that created this process. This transaction contains the initial state and configuration of the process in its tags.

      Returns Promise<Partial<FullArweaveTransaction>>

      Promise resolving to the transaction data containing process creation details

      ArweaveGraphQLError if there is an error retrieving the transaction

    • Grants tokens to a recipient address

      Parameters

      • quantity: string

        The amount of tokens to grant

      • Optionalrecipient: string

        The recipient address, defaults to the calling wallet address

      Returns Promise<boolean>

      Promise resolving to boolean indicating success

    • A Readonly Client can only perform dry run and result operations, however does not require a wallet to be used. If a wallet is specified on instantiation the client will additionally be able to use write operations (messages).

      Returns boolean

      Boolean indicating whether or not the client is for read operations only.

    • Protected

      Parameters

      • data: string = ''
      • tags: Tags = []
      • Optionalanchor: string

      Returns Promise<string>

    • Parameters

      • data: string = ''
      • tags: Tags = []
      • Optionalanchor: string

      Returns Promise<MessageResult>

    • Mints new tokens, increasing the total supply. This operation can only be performed on the root token process.

      Parameters

      • quantity: string

        The amount of new tokens to create

      Returns Promise<boolean>

      Promise resolving to true if minting was successful

    • Protected

      Parameters

      • Optionalfrom: string
      • Optionalto: string
      • limit: number = 25
      • sort: SortOrder = SortOrder.ASCENDING

      Returns Promise<ResultsResponse>

    • Controls whether dryrun executes as a message or simulation.

      Parameters

      • enabled: boolean

        When true, dryrun will execute as a real message. When false (default), executes as a simulation.

      Returns void

    • Sets the wallet being used for this client. If the client is readonly it will now have write abilities.

      Parameters

      • wallet: any

        the wallet to use with this client.

      Returns void

    • Transfer an NFT to a recipient. If no quantity is specified, defaults to 1.

      Parameters

      • recipient: string

        The recipient's address

      • quantity: string = NFT_QUANTITY

        Optional quantity to transfer (defaults to 1)

      • OptionalforwardedTags: Tags

        Optional tags to forward with the transfer

      Returns Promise<boolean>