UNPKG

@circle-fin/circle-sdk

Version:
247 lines (246 loc) 23.1 kB
/** * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import { AxiosPromise, AxiosInstance, AxiosRequestConfig } from "axios"; import { Configuration } from "../configuration"; import { RequestArgs, BaseAPI } from "../base"; import { CreateWalletResponse } from "../models"; import { GenerateAddressRequest } from "../models"; import { GenerateAddressResponse } from "../models"; import { GetWalletResponse } from "../models"; import { ListAddressesResponse } from "../models"; import { ListWalletsResponse } from "../models"; import { WalletCreationRequest } from "../models"; /** * WalletsApi - axios parameter creator * @export */ export declare const WalletsApiAxiosParamCreator: (configuration?: Configuration) => { /** * Creates an end user wallet. * @summary Create a wallet * @param {WalletCreationRequest} [walletCreationRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} */ createWallet: (walletCreationRequest?: WalletCreationRequest, options?: AxiosRequestConfig) => Promise<RequestArgs>; /** * Generates a new blockchain address for a wallet for a given currency/chain pair. Circle may reuse addresses on blockchains that support reuse. For example, if you\'re requesting two addresses for depositing USD and ETH, both on Ethereum, you may see the same Ethereum address returned. Depositing cryptocurrency to a generated address will credit the associated wallet with the value of the deposit. * @summary Create a blockchain address * @param {string} walletId Identifier for the wallet. * @param {GenerateAddressRequest} [generateAddressRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} */ generateAddress: (walletId: string, generateAddressRequest?: GenerateAddressRequest, options?: AxiosRequestConfig) => Promise<RequestArgs>; /** * * @summary Get a wallet * @param {string} walletId Identifier for the wallet. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getWallet: (walletId: string, options?: AxiosRequestConfig) => Promise<RequestArgs>; /** * Retrieves a list of addresses associated with a wallet. * @summary List all addresses * @param {string} walletId Identifier for the wallet. * @param {string} [from] Queries items created since the specified date-time (inclusive). * @param {string} [to] Queries items created before the specified date-time (inclusive). * @param {string} [pageBefore] A collection ID value used for pagination. It marks the exclusive end of a page. When provided, the collection resource will return the next &#x60;n&#x60; items before the id, with &#x60;n&#x60; being specified by &#x60;pageSize&#x60;. The items will be returned in the natural order of the collection. The resource will return the first page if neither &#x60;pageAfter&#x60; nor &#x60;pageBefore&#x60; are specified. SHOULD NOT be used in conjuction with pageAfter. * @param {string} [pageAfter] A collection ID value used for pagination. It marks the exclusive begin of a page. When provided, the collection resource will return the next &#x60;n&#x60; items after the id, with &#x60;n&#x60; being specified by &#x60;pageSize&#x60;. The items will be returned in the natural order of the collection. The resource will return the first page if neither &#x60;pageAfter&#x60; nor &#x60;pageBefore&#x60; are specified. SHOULD NOT be used in conjuction with pageBefore. * @param {number} [pageSize] Limits the number of items to be returned. Some collections have a strict upper bound that will disregard this value. In case the specified value is higher than the allowed limit, the collection limit will be used. If avoided, the collection will determine the page size itself. * @param {*} [options] Override http request option. * @throws {RequiredError} */ listAddresses: (walletId: string, from?: string, to?: string, pageBefore?: string, pageAfter?: string, pageSize?: number, options?: AxiosRequestConfig) => Promise<RequestArgs>; /** * Retrieves a list of a user\'s wallets. * @summary List all wallets * @param {string} [from] Queries items created since the specified date-time (inclusive). * @param {string} [to] Queries items created before the specified date-time (inclusive). * @param {string} [pageBefore] A collection ID value used for pagination. It marks the exclusive end of a page. When provided, the collection resource will return the next &#x60;n&#x60; items before the id, with &#x60;n&#x60; being specified by &#x60;pageSize&#x60;. The items will be returned in the natural order of the collection. The resource will return the first page if neither &#x60;pageAfter&#x60; nor &#x60;pageBefore&#x60; are specified. SHOULD NOT be used in conjuction with pageAfter. * @param {string} [pageAfter] A collection ID value used for pagination. It marks the exclusive begin of a page. When provided, the collection resource will return the next &#x60;n&#x60; items after the id, with &#x60;n&#x60; being specified by &#x60;pageSize&#x60;. The items will be returned in the natural order of the collection. The resource will return the first page if neither &#x60;pageAfter&#x60; nor &#x60;pageBefore&#x60; are specified. SHOULD NOT be used in conjuction with pageBefore. * @param {number} [pageSize] Limits the number of items to be returned. Some collections have a strict upper bound that will disregard this value. In case the specified value is higher than the allowed limit, the collection limit will be used. If avoided, the collection will determine the page size itself. * @param {*} [options] Override http request option. * @throws {RequiredError} */ listWallets: (from?: string, to?: string, pageBefore?: string, pageAfter?: string, pageSize?: number, options?: AxiosRequestConfig) => Promise<RequestArgs>; }; /** * WalletsApi - functional programming interface * @export */ export declare const WalletsApiFp: (configuration?: Configuration) => { /** * Creates an end user wallet. * @summary Create a wallet * @param {WalletCreationRequest} [walletCreationRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} */ createWallet(walletCreationRequest?: WalletCreationRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateWalletResponse>>; /** * Generates a new blockchain address for a wallet for a given currency/chain pair. Circle may reuse addresses on blockchains that support reuse. For example, if you\'re requesting two addresses for depositing USD and ETH, both on Ethereum, you may see the same Ethereum address returned. Depositing cryptocurrency to a generated address will credit the associated wallet with the value of the deposit. * @summary Create a blockchain address * @param {string} walletId Identifier for the wallet. * @param {GenerateAddressRequest} [generateAddressRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} */ generateAddress(walletId: string, generateAddressRequest?: GenerateAddressRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GenerateAddressResponse>>; /** * * @summary Get a wallet * @param {string} walletId Identifier for the wallet. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getWallet(walletId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetWalletResponse>>; /** * Retrieves a list of addresses associated with a wallet. * @summary List all addresses * @param {string} walletId Identifier for the wallet. * @param {string} [from] Queries items created since the specified date-time (inclusive). * @param {string} [to] Queries items created before the specified date-time (inclusive). * @param {string} [pageBefore] A collection ID value used for pagination. It marks the exclusive end of a page. When provided, the collection resource will return the next &#x60;n&#x60; items before the id, with &#x60;n&#x60; being specified by &#x60;pageSize&#x60;. The items will be returned in the natural order of the collection. The resource will return the first page if neither &#x60;pageAfter&#x60; nor &#x60;pageBefore&#x60; are specified. SHOULD NOT be used in conjuction with pageAfter. * @param {string} [pageAfter] A collection ID value used for pagination. It marks the exclusive begin of a page. When provided, the collection resource will return the next &#x60;n&#x60; items after the id, with &#x60;n&#x60; being specified by &#x60;pageSize&#x60;. The items will be returned in the natural order of the collection. The resource will return the first page if neither &#x60;pageAfter&#x60; nor &#x60;pageBefore&#x60; are specified. SHOULD NOT be used in conjuction with pageBefore. * @param {number} [pageSize] Limits the number of items to be returned. Some collections have a strict upper bound that will disregard this value. In case the specified value is higher than the allowed limit, the collection limit will be used. If avoided, the collection will determine the page size itself. * @param {*} [options] Override http request option. * @throws {RequiredError} */ listAddresses(walletId: string, from?: string, to?: string, pageBefore?: string, pageAfter?: string, pageSize?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListAddressesResponse>>; /** * Retrieves a list of a user\'s wallets. * @summary List all wallets * @param {string} [from] Queries items created since the specified date-time (inclusive). * @param {string} [to] Queries items created before the specified date-time (inclusive). * @param {string} [pageBefore] A collection ID value used for pagination. It marks the exclusive end of a page. When provided, the collection resource will return the next &#x60;n&#x60; items before the id, with &#x60;n&#x60; being specified by &#x60;pageSize&#x60;. The items will be returned in the natural order of the collection. The resource will return the first page if neither &#x60;pageAfter&#x60; nor &#x60;pageBefore&#x60; are specified. SHOULD NOT be used in conjuction with pageAfter. * @param {string} [pageAfter] A collection ID value used for pagination. It marks the exclusive begin of a page. When provided, the collection resource will return the next &#x60;n&#x60; items after the id, with &#x60;n&#x60; being specified by &#x60;pageSize&#x60;. The items will be returned in the natural order of the collection. The resource will return the first page if neither &#x60;pageAfter&#x60; nor &#x60;pageBefore&#x60; are specified. SHOULD NOT be used in conjuction with pageBefore. * @param {number} [pageSize] Limits the number of items to be returned. Some collections have a strict upper bound that will disregard this value. In case the specified value is higher than the allowed limit, the collection limit will be used. If avoided, the collection will determine the page size itself. * @param {*} [options] Override http request option. * @throws {RequiredError} */ listWallets(from?: string, to?: string, pageBefore?: string, pageAfter?: string, pageSize?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListWalletsResponse>>; }; /** * WalletsApi - factory interface * @export */ export declare const WalletsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => { /** * Creates an end user wallet. * @summary Create a wallet * @param {WalletCreationRequest} [walletCreationRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} */ createWallet(walletCreationRequest?: WalletCreationRequest, options?: any): AxiosPromise<CreateWalletResponse>; /** * Generates a new blockchain address for a wallet for a given currency/chain pair. Circle may reuse addresses on blockchains that support reuse. For example, if you\'re requesting two addresses for depositing USD and ETH, both on Ethereum, you may see the same Ethereum address returned. Depositing cryptocurrency to a generated address will credit the associated wallet with the value of the deposit. * @summary Create a blockchain address * @param {string} walletId Identifier for the wallet. * @param {GenerateAddressRequest} [generateAddressRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} */ generateAddress(walletId: string, generateAddressRequest?: GenerateAddressRequest, options?: any): AxiosPromise<GenerateAddressResponse>; /** * * @summary Get a wallet * @param {string} walletId Identifier for the wallet. * @param {*} [options] Override http request option. * @throws {RequiredError} */ getWallet(walletId: string, options?: any): AxiosPromise<GetWalletResponse>; /** * Retrieves a list of addresses associated with a wallet. * @summary List all addresses * @param {string} walletId Identifier for the wallet. * @param {string} [from] Queries items created since the specified date-time (inclusive). * @param {string} [to] Queries items created before the specified date-time (inclusive). * @param {string} [pageBefore] A collection ID value used for pagination. It marks the exclusive end of a page. When provided, the collection resource will return the next &#x60;n&#x60; items before the id, with &#x60;n&#x60; being specified by &#x60;pageSize&#x60;. The items will be returned in the natural order of the collection. The resource will return the first page if neither &#x60;pageAfter&#x60; nor &#x60;pageBefore&#x60; are specified. SHOULD NOT be used in conjuction with pageAfter. * @param {string} [pageAfter] A collection ID value used for pagination. It marks the exclusive begin of a page. When provided, the collection resource will return the next &#x60;n&#x60; items after the id, with &#x60;n&#x60; being specified by &#x60;pageSize&#x60;. The items will be returned in the natural order of the collection. The resource will return the first page if neither &#x60;pageAfter&#x60; nor &#x60;pageBefore&#x60; are specified. SHOULD NOT be used in conjuction with pageBefore. * @param {number} [pageSize] Limits the number of items to be returned. Some collections have a strict upper bound that will disregard this value. In case the specified value is higher than the allowed limit, the collection limit will be used. If avoided, the collection will determine the page size itself. * @param {*} [options] Override http request option. * @throws {RequiredError} */ listAddresses(walletId: string, from?: string, to?: string, pageBefore?: string, pageAfter?: string, pageSize?: number, options?: any): AxiosPromise<ListAddressesResponse>; /** * Retrieves a list of a user\'s wallets. * @summary List all wallets * @param {string} [from] Queries items created since the specified date-time (inclusive). * @param {string} [to] Queries items created before the specified date-time (inclusive). * @param {string} [pageBefore] A collection ID value used for pagination. It marks the exclusive end of a page. When provided, the collection resource will return the next &#x60;n&#x60; items before the id, with &#x60;n&#x60; being specified by &#x60;pageSize&#x60;. The items will be returned in the natural order of the collection. The resource will return the first page if neither &#x60;pageAfter&#x60; nor &#x60;pageBefore&#x60; are specified. SHOULD NOT be used in conjuction with pageAfter. * @param {string} [pageAfter] A collection ID value used for pagination. It marks the exclusive begin of a page. When provided, the collection resource will return the next &#x60;n&#x60; items after the id, with &#x60;n&#x60; being specified by &#x60;pageSize&#x60;. The items will be returned in the natural order of the collection. The resource will return the first page if neither &#x60;pageAfter&#x60; nor &#x60;pageBefore&#x60; are specified. SHOULD NOT be used in conjuction with pageBefore. * @param {number} [pageSize] Limits the number of items to be returned. Some collections have a strict upper bound that will disregard this value. In case the specified value is higher than the allowed limit, the collection limit will be used. If avoided, the collection will determine the page size itself. * @param {*} [options] Override http request option. * @throws {RequiredError} */ listWallets(from?: string, to?: string, pageBefore?: string, pageAfter?: string, pageSize?: number, options?: any): AxiosPromise<ListWalletsResponse>; }; /** * WalletsApi - object-oriented interface * @export * @class WalletsApi * @extends {BaseAPI} */ export declare class WalletsApi extends BaseAPI { /** * Creates an end user wallet. * @summary Create a wallet * @param {WalletCreationRequest} [walletCreationRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof WalletsApi */ createWallet(walletCreationRequest?: WalletCreationRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateWalletResponse, any>>; /** * Generates a new blockchain address for a wallet for a given currency/chain pair. Circle may reuse addresses on blockchains that support reuse. For example, if you\'re requesting two addresses for depositing USD and ETH, both on Ethereum, you may see the same Ethereum address returned. Depositing cryptocurrency to a generated address will credit the associated wallet with the value of the deposit. * @summary Create a blockchain address * @param {string} walletId Identifier for the wallet. * @param {GenerateAddressRequest} [generateAddressRequest] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof WalletsApi */ generateAddress(walletId: string, generateAddressRequest?: GenerateAddressRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GenerateAddressResponse, any>>; /** * * @summary Get a wallet * @param {string} walletId Identifier for the wallet. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof WalletsApi */ getWallet(walletId: string, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetWalletResponse, any>>; /** * Retrieves a list of addresses associated with a wallet. * @summary List all addresses * @param {string} walletId Identifier for the wallet. * @param {string} [from] Queries items created since the specified date-time (inclusive). * @param {string} [to] Queries items created before the specified date-time (inclusive). * @param {string} [pageBefore] A collection ID value used for pagination. It marks the exclusive end of a page. When provided, the collection resource will return the next &#x60;n&#x60; items before the id, with &#x60;n&#x60; being specified by &#x60;pageSize&#x60;. The items will be returned in the natural order of the collection. The resource will return the first page if neither &#x60;pageAfter&#x60; nor &#x60;pageBefore&#x60; are specified. SHOULD NOT be used in conjuction with pageAfter. * @param {string} [pageAfter] A collection ID value used for pagination. It marks the exclusive begin of a page. When provided, the collection resource will return the next &#x60;n&#x60; items after the id, with &#x60;n&#x60; being specified by &#x60;pageSize&#x60;. The items will be returned in the natural order of the collection. The resource will return the first page if neither &#x60;pageAfter&#x60; nor &#x60;pageBefore&#x60; are specified. SHOULD NOT be used in conjuction with pageBefore. * @param {number} [pageSize] Limits the number of items to be returned. Some collections have a strict upper bound that will disregard this value. In case the specified value is higher than the allowed limit, the collection limit will be used. If avoided, the collection will determine the page size itself. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof WalletsApi */ listAddresses(walletId: string, from?: string, to?: string, pageBefore?: string, pageAfter?: string, pageSize?: number, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListAddressesResponse, any>>; /** * Retrieves a list of a user\'s wallets. * @summary List all wallets * @param {string} [from] Queries items created since the specified date-time (inclusive). * @param {string} [to] Queries items created before the specified date-time (inclusive). * @param {string} [pageBefore] A collection ID value used for pagination. It marks the exclusive end of a page. When provided, the collection resource will return the next &#x60;n&#x60; items before the id, with &#x60;n&#x60; being specified by &#x60;pageSize&#x60;. The items will be returned in the natural order of the collection. The resource will return the first page if neither &#x60;pageAfter&#x60; nor &#x60;pageBefore&#x60; are specified. SHOULD NOT be used in conjuction with pageAfter. * @param {string} [pageAfter] A collection ID value used for pagination. It marks the exclusive begin of a page. When provided, the collection resource will return the next &#x60;n&#x60; items after the id, with &#x60;n&#x60; being specified by &#x60;pageSize&#x60;. The items will be returned in the natural order of the collection. The resource will return the first page if neither &#x60;pageAfter&#x60; nor &#x60;pageBefore&#x60; are specified. SHOULD NOT be used in conjuction with pageBefore. * @param {number} [pageSize] Limits the number of items to be returned. Some collections have a strict upper bound that will disregard this value. In case the specified value is higher than the allowed limit, the collection limit will be used. If avoided, the collection will determine the page size itself. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof WalletsApi */ listWallets(from?: string, to?: string, pageBefore?: string, pageAfter?: string, pageSize?: number, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListWalletsResponse, any>>; }