/* tslint:disable */ /* eslint-disable */ /** * Cardano Wallet Backend API *

* * OpenAPI spec version: 2021.3.4 * * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ import globalAxios, { AxiosPromise, AxiosInstance } from 'axios'; import { Configuration } from '../configuration'; // Some imports not used depending on template conditions // @ts-ignore import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; import { BadRequest } from '../models'; import { InlineResponse2022 } from '../models'; import { NotAcceptable } from '../models'; import { UnsupportedMediaType } from '../models'; /** * ProxyApi - axios parameter creator * @export */ export const ProxyApiAxiosParamCreator = function (configuration?: Configuration) { return { /** *

status: stable

Submits a transaction that was created and signed outside of cardano-wallet. * @summary Submit External Transaction * @param {Object} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ postExternalTransaction: async (body?: Object, options: any = {}): Promise => { const localVarPath = `/proxy/transactions`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, 'https://example.com'); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; localVarHeaderParameter['Content-Type'] = 'application/octet-stream'; const query = new URLSearchParams(localVarUrlObj.search); for (const key in localVarQueryParameter) { query.set(key, localVarQueryParameter[key]); } for (const key in options.query) { query.set(key, options.query[key]); } localVarUrlObj.search = (new URLSearchParams(query)).toString(); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = body; return { url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, options: localVarRequestOptions, }; }, } }; /** * ProxyApi - functional programming interface * @export */ export const ProxyApiFp = function(configuration?: Configuration) { return { /** *

status: stable

Submits a transaction that was created and signed outside of cardano-wallet. * @summary Submit External Transaction * @param {Object} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ async postExternalTransaction(body?: Object, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await ProxyApiAxiosParamCreator(configuration).postExternalTransaction(body, options); return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; return axios.request(axiosRequestArgs); }; }, } }; /** * ProxyApi - factory interface * @export */ export const ProxyApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { return { /** *

status: stable

Submits a transaction that was created and signed outside of cardano-wallet. * @summary Submit External Transaction * @param {Object} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ postExternalTransaction(body?: Object, options?: any): AxiosPromise { return ProxyApiFp(configuration).postExternalTransaction(body, options).then((request) => request(axios, basePath)); }, }; }; /** * ProxyApi - object-oriented interface * @export * @class ProxyApi * @extends {BaseAPI} */ export class ProxyApi extends BaseAPI { /** *

status: stable

Submits a transaction that was created and signed outside of cardano-wallet. * @summary Submit External Transaction * @param {Object} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ProxyApi */ public postExternalTransaction(body?: Object, options?: any) { return ProxyApiFp(this.configuration).postExternalTransaction(body, options).then((request) => request(this.axios, this.basePath)); } }