@standard-crypto/farcaster-js-hub-rest
Version:
A tool for interacting with the REST API of any Farcaster hub.
136 lines (135 loc) • 5.45 kB
TypeScript
/**
* 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 globalAxios from 'axios';
import { RequestArgs, BaseAPI } from '../base.js';
import { UserNameProof } from '../models/index.js';
import { UsernameProofsResponse } from '../models/index.js';
/**
* UsernamesApi - axios parameter creator
* @export
*/
export declare const UsernamesApiAxiosParamCreator: (configuration?: Configuration) => {
/**
*
* @summary Get an proof for a username by the Farcaster username
* @param {string} name The Farcaster username or ENS address
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getUsernameProof: (name: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
/**
*
* @summary Get a list of proofs provided by an FID
* @param {number} fid The FID being requested
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listUsernameProofsByFid: (fid: number, options?: AxiosRequestConfig) => Promise<RequestArgs>;
};
/**
* UsernamesApi - functional programming interface
* @export
*/
export declare const UsernamesApiFp: (configuration?: Configuration) => {
/**
*
* @summary Get an proof for a username by the Farcaster username
* @param {string} name The Farcaster username or ENS address
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getUsernameProof(name: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UserNameProof>>;
/**
*
* @summary Get a list of proofs provided by an FID
* @param {number} fid The FID being requested
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listUsernameProofsByFid(fid: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UsernameProofsResponse>>;
};
/**
* UsernamesApi - factory interface
* @export
*/
export declare const UsernamesApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
/**
*
* @summary Get an proof for a username by the Farcaster username
* @param {UsernamesApiGetUsernameProofRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getUsernameProof(requestParameters: UsernamesApiGetUsernameProofRequest, options?: AxiosRequestConfig): AxiosPromise<UserNameProof>;
/**
*
* @summary Get a list of proofs provided by an FID
* @param {UsernamesApiListUsernameProofsByFidRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listUsernameProofsByFid(requestParameters: UsernamesApiListUsernameProofsByFidRequest, options?: AxiosRequestConfig): AxiosPromise<UsernameProofsResponse>;
};
/**
* Request parameters for getUsernameProof operation in UsernamesApi.
* @export
* @interface UsernamesApiGetUsernameProofRequest
*/
export interface UsernamesApiGetUsernameProofRequest {
/**
* The Farcaster username or ENS address
* @type {string}
* @memberof UsernamesApiGetUsernameProof
*/
readonly name: string;
}
/**
* Request parameters for listUsernameProofsByFid operation in UsernamesApi.
* @export
* @interface UsernamesApiListUsernameProofsByFidRequest
*/
export interface UsernamesApiListUsernameProofsByFidRequest {
/**
* The FID being requested
* @type {number}
* @memberof UsernamesApiListUsernameProofsByFid
*/
readonly fid: number;
}
/**
* UsernamesApi - object-oriented interface
* @export
* @class UsernamesApi
* @extends {BaseAPI}
*/
export declare class UsernamesApi extends BaseAPI {
/**
*
* @summary Get an proof for a username by the Farcaster username
* @param {UsernamesApiGetUsernameProofRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof UsernamesApi
*/
getUsernameProof(requestParameters: UsernamesApiGetUsernameProofRequest, options?: AxiosRequestConfig): Promise<globalAxios.AxiosResponse<UserNameProof, any>>;
/**
*
* @summary Get a list of proofs provided by an FID
* @param {UsernamesApiListUsernameProofsByFidRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof UsernamesApi
*/
listUsernameProofsByFid(requestParameters: UsernamesApiListUsernameProofsByFidRequest, options?: AxiosRequestConfig): Promise<globalAxios.AxiosResponse<UsernameProofsResponse, any>>;
}