/* 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 { Body20 } from '../models'; import { InlineResponse2004 } from '../models'; import { InlineResponse2009 } from '../models'; import { InlineResponse4036 } from '../models'; import { NoSuchWallet } from '../models'; import { NotAcceptable } from '../models'; import { NothingToMigrate } from '../models'; import { UnsupportedMediaType } from '../models'; /** * ByronMigrationsApi - axios parameter creator * @export */ export const ByronMigrationsApiAxiosParamCreator = function (configuration?: Configuration) { return { /** *

status: disabled

⚠️IMPORTANT⚠️ This endpoint has been temporarily disabled with the introduction of multi-assets UTxO. It will be enabled again soon.
Calculate the exact cost of sending all funds from particular Byron wallet to a set of addresses. * @summary Calculate Cost * @param {string} walletId * @param {*} [options] Override http request option. * @throws {RequiredError} */ getByronWalletMigrationInfo: async (walletId: string, options: any = {}): Promise => { // verify required parameter 'walletId' is not null or undefined if (walletId === null || walletId === undefined) { throw new RequiredError('walletId','Required parameter walletId was null or undefined when calling getByronWalletMigrationInfo.'); } const localVarPath = `/byron-wallets/{walletId}/migrations` .replace(`{${"walletId"}}`, encodeURIComponent(String(walletId))); // 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: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; 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}; return { url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, options: localVarRequestOptions, }; }, /** *

status: disabled

⚠️IMPORTANT⚠️ This endpoint has been temporarily disabled with the introduction of multi-assets UTxO. It will be enabled again soon.
Submit one or more transactions which transfers all funds from a Byron wallet to a set of addresses. This operation attempts to preserve the UTxO \"shape\" of a wallet as far as possible. That is, coins will not be agglomerated. Therefore, if the wallet has a large UTxO set, several transactions may be needed. A typical usage would be when one wants to move all funds from an old wallet to another (Shelley or Byron) by providing addresses coming from the new wallet. * @summary Migrate * @param {Body20} body * @param {string} walletId * @param {*} [options] Override http request option. * @throws {RequiredError} */ migrateByronWallet: async (body: Body20, walletId: string, options: any = {}): Promise => { // verify required parameter 'body' is not null or undefined if (body === null || body === undefined) { throw new RequiredError('body','Required parameter body was null or undefined when calling migrateByronWallet.'); } // verify required parameter 'walletId' is not null or undefined if (walletId === null || walletId === undefined) { throw new RequiredError('walletId','Required parameter walletId was null or undefined when calling migrateByronWallet.'); } const localVarPath = `/byron-wallets/{walletId}/migrations` .replace(`{${"walletId"}}`, encodeURIComponent(String(walletId))); // 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/json'; 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}; const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); return { url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, options: localVarRequestOptions, }; }, } }; /** * ByronMigrationsApi - functional programming interface * @export */ export const ByronMigrationsApiFp = function(configuration?: Configuration) { return { /** *

status: disabled

⚠️IMPORTANT⚠️ This endpoint has been temporarily disabled with the introduction of multi-assets UTxO. It will be enabled again soon.
Calculate the exact cost of sending all funds from particular Byron wallet to a set of addresses. * @summary Calculate Cost * @param {string} walletId * @param {*} [options] Override http request option. * @throws {RequiredError} */ async getByronWalletMigrationInfo(walletId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await ByronMigrationsApiAxiosParamCreator(configuration).getByronWalletMigrationInfo(walletId, options); return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; return axios.request(axiosRequestArgs); }; }, /** *

status: disabled

⚠️IMPORTANT⚠️ This endpoint has been temporarily disabled with the introduction of multi-assets UTxO. It will be enabled again soon.
Submit one or more transactions which transfers all funds from a Byron wallet to a set of addresses. This operation attempts to preserve the UTxO \"shape\" of a wallet as far as possible. That is, coins will not be agglomerated. Therefore, if the wallet has a large UTxO set, several transactions may be needed. A typical usage would be when one wants to move all funds from an old wallet to another (Shelley or Byron) by providing addresses coming from the new wallet. * @summary Migrate * @param {Body20} body * @param {string} walletId * @param {*} [options] Override http request option. * @throws {RequiredError} */ async migrateByronWallet(body: Body20, walletId: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await ByronMigrationsApiAxiosParamCreator(configuration).migrateByronWallet(body, walletId, options); return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { const axiosRequestArgs = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; return axios.request(axiosRequestArgs); }; }, } }; /** * ByronMigrationsApi - factory interface * @export */ export const ByronMigrationsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { return { /** *

status: disabled

⚠️IMPORTANT⚠️ This endpoint has been temporarily disabled with the introduction of multi-assets UTxO. It will be enabled again soon.
Calculate the exact cost of sending all funds from particular Byron wallet to a set of addresses. * @summary Calculate Cost * @param {string} walletId * @param {*} [options] Override http request option. * @throws {RequiredError} */ getByronWalletMigrationInfo(walletId: string, options?: any): AxiosPromise { return ByronMigrationsApiFp(configuration).getByronWalletMigrationInfo(walletId, options).then((request) => request(axios, basePath)); }, /** *

status: disabled

⚠️IMPORTANT⚠️ This endpoint has been temporarily disabled with the introduction of multi-assets UTxO. It will be enabled again soon.
Submit one or more transactions which transfers all funds from a Byron wallet to a set of addresses. This operation attempts to preserve the UTxO \"shape\" of a wallet as far as possible. That is, coins will not be agglomerated. Therefore, if the wallet has a large UTxO set, several transactions may be needed. A typical usage would be when one wants to move all funds from an old wallet to another (Shelley or Byron) by providing addresses coming from the new wallet. * @summary Migrate * @param {Body20} body * @param {string} walletId * @param {*} [options] Override http request option. * @throws {RequiredError} */ migrateByronWallet(body: Body20, walletId: string, options?: any): AxiosPromise> { return ByronMigrationsApiFp(configuration).migrateByronWallet(body, walletId, options).then((request) => request(axios, basePath)); }, }; }; /** * ByronMigrationsApi - object-oriented interface * @export * @class ByronMigrationsApi * @extends {BaseAPI} */ export class ByronMigrationsApi extends BaseAPI { /** *

status: disabled

⚠️IMPORTANT⚠️ This endpoint has been temporarily disabled with the introduction of multi-assets UTxO. It will be enabled again soon.
Calculate the exact cost of sending all funds from particular Byron wallet to a set of addresses. * @summary Calculate Cost * @param {string} walletId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ByronMigrationsApi */ public getByronWalletMigrationInfo(walletId: string, options?: any) { return ByronMigrationsApiFp(this.configuration).getByronWalletMigrationInfo(walletId, options).then((request) => request(this.axios, this.basePath)); } /** *

status: disabled

⚠️IMPORTANT⚠️ This endpoint has been temporarily disabled with the introduction of multi-assets UTxO. It will be enabled again soon.
Submit one or more transactions which transfers all funds from a Byron wallet to a set of addresses. This operation attempts to preserve the UTxO \"shape\" of a wallet as far as possible. That is, coins will not be agglomerated. Therefore, if the wallet has a large UTxO set, several transactions may be needed. A typical usage would be when one wants to move all funds from an old wallet to another (Shelley or Byron) by providing addresses coming from the new wallet. * @summary Migrate * @param {Body20} body * @param {string} walletId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ByronMigrationsApi */ public migrateByronWallet(body: Body20, walletId: string, options?: any) { return ByronMigrationsApiFp(this.configuration).migrateByronWallet(body, walletId, options).then((request) => request(this.axios, this.basePath)); } }