UNPKG

@standard-crypto/farcaster-js-hub-rest

Version:

A tool for interacting with the REST API of any Farcaster hub.

199 lines (198 loc) 10 kB
/** * Farcaster Hub REST API * Perform basic queries of Farcaster state via the REST API of a Farcaster hub. See the [Farcaster docs](https://www.thehubble.xyz/docs/httpapi/httpapi.html) for more details. Some client libraries: - [TypeScript](https://www.npmjs.com/package/@standard-crypto/farcaster-js-hub-rest) * * The version of the OpenAPI document: 1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import type { Configuration } from '../configuration.js'; import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; import { RequestArgs, BaseAPI } from '../base.js'; import { ListOnChainEventsByFid200Response } from '../models/index.js'; import { ListOnChainSignersByFid200Response } from '../models/index.js'; import { OnChainEventIdRegister } from '../models/index.js'; import { OnChainEventType } from '../models/index.js'; /** * OnChainEventsApi - axios parameter creator * @export */ export declare const OnChainEventsApiAxiosParamCreator: (configuration?: Configuration) => { /** * * @summary Get an on chain ID Registry Event for a given Address * @param {string} address The ETH address being requested * @param {*} [options] Override http request option. * @throws {RequiredError} */ getOnChainIdRegistrationByAddress: (address: string, options?: AxiosRequestConfig) => Promise<RequestArgs>; /** * * @summary Get a list of on-chain events provided by an FID * @param {number} fid The FID being requested * @param {OnChainEventType} eventType The numeric of string value of the event type being requested. * @param {*} [options] Override http request option. * @throws {RequiredError} */ listOnChainEventsByFid: (fid: number, eventType: OnChainEventType, options?: AxiosRequestConfig) => Promise<RequestArgs>; /** * **Note:** one of two different response schemas is returned based on whether the caller provides the `signer` parameter. If included, a single `OnChainEventSigner` message is returned (or a `not_found` error). If omitted, a non-paginated list of `OnChainEventSigner` messages is returned instead * @summary Get a list of signers provided by an FID * @param {number} fid The FID being requested * @param {string} [signer] The optional key of signer * @param {*} [options] Override http request option. * @throws {RequiredError} */ listOnChainSignersByFid: (fid: number, signer?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>; }; /** * OnChainEventsApi - functional programming interface * @export */ export declare const OnChainEventsApiFp: (configuration?: Configuration) => { /** * * @summary Get an on chain ID Registry Event for a given Address * @param {string} address The ETH address being requested * @param {*} [options] Override http request option. * @throws {RequiredError} */ getOnChainIdRegistrationByAddress(address: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OnChainEventIdRegister>>; /** * * @summary Get a list of on-chain events provided by an FID * @param {number} fid The FID being requested * @param {OnChainEventType} eventType The numeric of string value of the event type being requested. * @param {*} [options] Override http request option. * @throws {RequiredError} */ listOnChainEventsByFid(fid: number, eventType: OnChainEventType, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListOnChainEventsByFid200Response>>; /** * **Note:** one of two different response schemas is returned based on whether the caller provides the `signer` parameter. If included, a single `OnChainEventSigner` message is returned (or a `not_found` error). If omitted, a non-paginated list of `OnChainEventSigner` messages is returned instead * @summary Get a list of signers provided by an FID * @param {number} fid The FID being requested * @param {string} [signer] The optional key of signer * @param {*} [options] Override http request option. * @throws {RequiredError} */ listOnChainSignersByFid(fid: number, signer?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListOnChainSignersByFid200Response>>; }; /** * OnChainEventsApi - factory interface * @export */ export declare const OnChainEventsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => { /** * * @summary Get an on chain ID Registry Event for a given Address * @param {OnChainEventsApiGetOnChainIdRegistrationByAddressRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getOnChainIdRegistrationByAddress(requestParameters: OnChainEventsApiGetOnChainIdRegistrationByAddressRequest, options?: AxiosRequestConfig): AxiosPromise<OnChainEventIdRegister>; /** * * @summary Get a list of on-chain events provided by an FID * @param {OnChainEventsApiListOnChainEventsByFidRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ listOnChainEventsByFid(requestParameters: OnChainEventsApiListOnChainEventsByFidRequest, options?: AxiosRequestConfig): AxiosPromise<ListOnChainEventsByFid200Response>; /** * **Note:** one of two different response schemas is returned based on whether the caller provides the `signer` parameter. If included, a single `OnChainEventSigner` message is returned (or a `not_found` error). If omitted, a non-paginated list of `OnChainEventSigner` messages is returned instead * @summary Get a list of signers provided by an FID * @param {OnChainEventsApiListOnChainSignersByFidRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ listOnChainSignersByFid(requestParameters: OnChainEventsApiListOnChainSignersByFidRequest, options?: AxiosRequestConfig): AxiosPromise<ListOnChainSignersByFid200Response>; }; /** * Request parameters for getOnChainIdRegistrationByAddress operation in OnChainEventsApi. * @export * @interface OnChainEventsApiGetOnChainIdRegistrationByAddressRequest */ export interface OnChainEventsApiGetOnChainIdRegistrationByAddressRequest { /** * The ETH address being requested * @type {string} * @memberof OnChainEventsApiGetOnChainIdRegistrationByAddress */ readonly address: string; } /** * Request parameters for listOnChainEventsByFid operation in OnChainEventsApi. * @export * @interface OnChainEventsApiListOnChainEventsByFidRequest */ export interface OnChainEventsApiListOnChainEventsByFidRequest { /** * The FID being requested * @type {number} * @memberof OnChainEventsApiListOnChainEventsByFid */ readonly fid: number; /** * The numeric of string value of the event type being requested. * @type {OnChainEventType} * @memberof OnChainEventsApiListOnChainEventsByFid */ readonly eventType: OnChainEventType; } /** * Request parameters for listOnChainSignersByFid operation in OnChainEventsApi. * @export * @interface OnChainEventsApiListOnChainSignersByFidRequest */ export interface OnChainEventsApiListOnChainSignersByFidRequest { /** * The FID being requested * @type {number} * @memberof OnChainEventsApiListOnChainSignersByFid */ readonly fid: number; /** * The optional key of signer * @type {string} * @memberof OnChainEventsApiListOnChainSignersByFid */ readonly signer?: string; } /** * OnChainEventsApi - object-oriented interface * @export * @class OnChainEventsApi * @extends {BaseAPI} */ export declare class OnChainEventsApi extends BaseAPI { /** * * @summary Get an on chain ID Registry Event for a given Address * @param {OnChainEventsApiGetOnChainIdRegistrationByAddressRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof OnChainEventsApi */ getOnChainIdRegistrationByAddress(requestParameters: OnChainEventsApiGetOnChainIdRegistrationByAddressRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<OnChainEventIdRegister, any>>; /** * * @summary Get a list of on-chain events provided by an FID * @param {OnChainEventsApiListOnChainEventsByFidRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof OnChainEventsApi */ listOnChainEventsByFid(requestParameters: OnChainEventsApiListOnChainEventsByFidRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListOnChainEventsByFid200Response, any>>; /** * **Note:** one of two different response schemas is returned based on whether the caller provides the `signer` parameter. If included, a single `OnChainEventSigner` message is returned (or a `not_found` error). If omitted, a non-paginated list of `OnChainEventSigner` messages is returned instead * @summary Get a list of signers provided by an FID * @param {OnChainEventsApiListOnChainSignersByFidRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof OnChainEventsApi */ listOnChainSignersByFid(requestParameters: OnChainEventsApiListOnChainSignersByFidRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListOnChainSignersByFid200Response, any>>; }