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

    Interface IArweaveDataService

    interface IArweaveDataService {
        getTransactionById(id: string): Promise<Partial<FullArweaveTransaction>>;
        getTransactionData<T>(id: string): Promise<T>;
        getWalletBalance(address: string): Promise<number>;
        graphQuery<T = any>(query: string): Promise<T>;
        query(builder: ArweaveGQLBuilder): Promise<ArweaveGQLResponse>;
    }

    Implemented by

    Index

    Methods

    • Retrieves a transaction by its ID

      Parameters

      • id: string

        The transaction ID to retrieve

      Returns Promise<Partial<FullArweaveTransaction>>

      Promise resolving to the transaction

      ArweaveGraphQLError if the query fails or transaction not found

    • Retrieves data for a transaction by its ID

      Type Parameters

      • T

      Parameters

      • id: string

        The transaction ID to retrieve

      Returns Promise<T>

      Promise resolving to the transaction data

    • Gets the balance of an Arweave wallet address in Winston

      Parameters

      • address: string

        The Arweave wallet address

      Returns Promise<number>

      Promise resolving to the wallet balance in Winston (divide by 1000000000000 to get AR)

      Error if the address is invalid or request fails

    • Executes a raw GraphQL query

      Type Parameters

      • T = any

      Parameters

      • query: string

        The GraphQL query string

      Returns Promise<T>

      Promise resolving to the query response

      ArweaveGraphQLError if the query fails