@aleph-sdk/monorepo
    Preparing search index...

    Class AlephHttpClient

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    addressClient: AddressClient
    aggregateClient: AggregateMessageClient
    balanceClient: BalanceClient
    forgetClient: ForgetMessageClient
    instanceClient: InstanceMessageClient
    messageClient: BaseMessageClient
    nodeClient: NodeClient
    postClient: PostMessageClient
    priceClient: PriceClient
    programClient: ProgramMessageClient
    storeClient: StoreMessageClient

    Methods

    • Downloads a file from the Aleph network.

      Parameters

      • file_hash: string

        The hash of the STORE message of the file to retrieve.

      Returns Promise<ArrayBuffer>

    • Fetches an aggregate value from the Aleph network. Aggregates are a key-value store on the Aleph network. Aggregates are bound by address and each address can have multiple keys. By default, only the address that signs the aggregate can modify it.

      Type Parameters

      • T

      Parameters

      • address: string

        The address of the aggregate's owner

      • key: string

        The key of the aggregate to fetch

      Returns Promise<T>

    • Fetches multiple aggregates from the Aleph network. Aggregates are a key-value store on the Aleph network. Aggregates are bound by address and each address can have multiple keys. By default, only the address that signs the aggregate can modify it.

      Parameters

      • address: string

        The address of the aggregate's owner

      • Optionalkeys: string[]

        The keys of the aggregates to fetch

      Returns Promise<Record<string, any>>

    • Fetches the raw stored metadata of a file by its hash.

      Parameters

      • fileHash: string

        The hash of the file.

      Returns Promise<Record<string, any>>

    • Fetches the number of pins referencing a given file hash.

      Parameters

      • hash: string

        The hash of the file.

      Returns Promise<number>

    • Fetches only the content of a message, without the surrounding message envelope.

      Type Parameters

      • Content = any

      Parameters

      • itemHash: string

        The hash of the message to query.

      Returns Promise<Content>

    • Fetches the reason why a message has been rejected from the network. If the message has no error, returns null.

      Parameters

      • itemHash: string

        The hash of the message to fetch the error from.

      Returns Promise<null | MessageError>

    • Fetches the processing status of a message (pending, processed, rejected or forgotten), along with its reception time, without fetching the message content.

      Parameters

      • itemHash: string

        The hash of the message to query.

      Returns Promise<MessageStatusInfo>

    • Fetches a POST message on the Aleph network. POST messages are used to store arbitrary JSON data on the Aleph network. They can be queried by type, channel, reference, address, tag, or hash. POSTs can be modified by amend messages. This endpoint returns the latest version of the POST.

      Type Parameters

      • T = any

      Parameters

      Returns Promise<PostResponse<T>>