/**
 * Cardano Wallet Backend API
 * <p align=\"right\"><img style=\"position: relative; top: -10em; margin-bottom: -12em;\" width=\"20%\" src=\"https://cardanodocs.com/img/cardano.png\"></img></p>
 *
 * 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' ; import { BASE_PATH , COLLECTION_FORMATS , RequestArgs , BaseAPI , RequiredError } from '../base' ; import { BadRequest } from '../models' ; import { Body15 } from '../models' ; import { Body16 } from '../models' ; import { InlineResponse2005 } from '../models' ; import { InlineResponse415 } from '../models' ; import { NoSuchWallet } from '../models' ; import { NotAcceptable } from '../models' ; export export const ByronAddressesApiAxiosParamCreator = function ( configuration ? ) { return { summary param { Body16 } body param { string } walletId param { * } options throws createAddress : async ( body , walletId , options = { } ) : Promise < RequestArgs > => { if ( body === null || body === undefined ) { throw new RequiredError ( 'body' , 'Required parameter body was null or undefined when calling createAddress.' ) ; } if ( walletId === null || walletId === undefined ) { throw new RequiredError ( 'walletId' , 'Required parameter walletId was null or undefined when calling createAddress.' ) ; } const localVarPath = `/byron-wallets/{walletId}/addresses` . replace ( `{${ "walletId" }}` , encodeURIComponent ( String ( walletId ) ) ) ; 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 , } ; } , summary param { string } walletId param { string } addressId param { * } options throws importAddress : async ( walletId , addressId , options = { } ) : Promise < RequestArgs > => { if ( walletId === null || walletId === undefined ) { throw new RequiredError ( 'walletId' , 'Required parameter walletId was null or undefined when calling importAddress.' ) ; } if ( addressId === null || addressId === undefined ) { throw new RequiredError ( 'addressId' , 'Required parameter addressId was null or undefined when calling importAddress.' ) ; } const localVarPath = `/byron-wallets/{walletId}/addresses/{addressId}` . replace ( `{${ "walletId" }}` , encodeURIComponent ( String ( walletId ) ) ) . replace ( `{${ "addressId" }}` , encodeURIComponent ( String ( addressId ) ) ) ; const localVarUrlObj = new URL ( localVarPath , 'https://example.com' ) ; let baseOptions ; if ( configuration ) { baseOptions = configuration . baseOptions ; } const localVarRequestOptions = { method : 'PUT' , ... 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 , } ; } , summary param { Body15 } body param { string } walletId param { * } options throws importAddresses : async ( body , walletId , options = { } ) : Promise < RequestArgs > => { if ( body === null || body === undefined ) { throw new RequiredError ( 'body' , 'Required parameter body was null or undefined when calling importAddresses.' ) ; } if ( walletId === null || walletId === undefined ) { throw new RequiredError ( 'walletId' , 'Required parameter walletId was null or undefined when calling importAddresses.' ) ; } const localVarPath = `/byron-wallets/{walletId}/addresses` . replace ( `{${ "walletId" }}` , encodeURIComponent ( String ( walletId ) ) ) ; const localVarUrlObj = new URL ( localVarPath , 'https://example.com' ) ; let baseOptions ; if ( configuration ) { baseOptions = configuration . baseOptions ; } const localVarRequestOptions = { method : 'PUT' , ... 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 , } ; } , summary param { string } walletId param { string } state param { * } options throws listByronAddresses : async ( walletId , state ? , options = { } ) : Promise < RequestArgs > => { if ( walletId === null || walletId === undefined ) { throw new RequiredError ( 'walletId' , 'Required parameter walletId was null or undefined when calling listByronAddresses.' ) ; } const localVarPath = `/byron-wallets/{walletId}/addresses` . replace ( `{${ "walletId" }}` , encodeURIComponent ( String ( walletId ) ) ) ; 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 ; if ( state !== undefined ) { localVarQueryParameter [ 'state' ] = state ; } 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 , } ; } , } ; } ; export export const ByronAddressesApiFp = function ( configuration ? ) { return { summary param { Body16 } body param { string } walletId param { * } options throws async createAddress ( body , walletId , options ? ) { const localVarAxiosArgs = await ByronAddressesApiAxiosParamCreator ( configuration ) . createAddress ( body , walletId , options ) ; return ( axios = globalAxios , basePath = BASE_PATH ) => { const axiosRequestArgs = { ... localVarAxiosArgs . options , url : basePath + localVarAxiosArgs . url } ; return axios . request ( axiosRequestArgs ) ; } ; } , summary param { string } walletId param { string } addressId param { * } options throws async importAddress ( walletId , addressId , options ? ) { const localVarAxiosArgs = await ByronAddressesApiAxiosParamCreator ( configuration ) . importAddress ( walletId , addressId , options ) ; return ( axios = globalAxios , basePath = BASE_PATH ) => { const axiosRequestArgs = { ... localVarAxiosArgs . options , url : basePath + localVarAxiosArgs . url } ; return axios . request ( axiosRequestArgs ) ; } ; } , summary param { Body15 } body param { string } walletId param { * } options throws async importAddresses ( body , walletId , options ? ) { const localVarAxiosArgs = await ByronAddressesApiAxiosParamCreator ( configuration ) . importAddresses ( body , walletId , options ) ; return ( axios = globalAxios , basePath = BASE_PATH ) => { const axiosRequestArgs = { ... localVarAxiosArgs . options , url : basePath + localVarAxiosArgs . url } ; return axios . request ( axiosRequestArgs ) ; } ; } , summary param { string } walletId param { string } state param { * } options throws async listByronAddresses ( walletId , state ? , options ? ) { const localVarAxiosArgs = await ByronAddressesApiAxiosParamCreator ( configuration ) . listByronAddresses ( walletId , state , options ) ; return ( axios = globalAxios , basePath = BASE_PATH ) => { const axiosRequestArgs = { ... localVarAxiosArgs . options , url : basePath + localVarAxiosArgs . url } ; return axios . request ( axiosRequestArgs ) ; } ; } , } ; } ; export export const ByronAddressesApiFactory = function ( configuration ? , basePath ? , axios ? ) { return { summary param { Body16 } body param { string } walletId param { * } options throws createAddress ( body , walletId , options ? ) { return ByronAddressesApiFp ( configuration ) . createAddress ( body , walletId , options ) . then ( ( request ) => request ( axios , basePath ) ) ; } , summary param { string } walletId param { string } addressId param { * } options throws importAddress ( walletId , addressId , options ? ) { return ByronAddressesApiFp ( configuration ) . importAddress ( walletId , addressId , options ) . then ( ( request ) => request ( axios , basePath ) ) ; } , summary param { Body15 } body param { string } walletId param { * } options throws importAddresses ( body , walletId , options ? ) { return ByronAddressesApiFp ( configuration ) . importAddresses ( body , walletId , options ) . then ( ( request ) => request ( axios , basePath ) ) ; } , summary param { string } walletId param { string } state param { * } options throws listByronAddresses ( walletId , state ? , options ? ) { return ByronAddressesApiFp ( configuration ) . listByronAddresses ( walletId , state , options ) . then ( ( request ) => request ( axios , basePath ) ) ; } , } ; } ; export class extends BaseAPI export class ByronAddressesApi extends BaseAPI { summary param { Body16 } body param { string } walletId param { * } options throws memberof public createAddress ( body , walletId , options ? ) { return ByronAddressesApiFp ( this . configuration ) . createAddress ( body , walletId , options ) . then ( ( request ) => request ( this . axios , this . basePath ) ) ; } summary param { string } walletId param { string } addressId param { * } options throws memberof public importAddress ( walletId , addressId , options ? ) { return ByronAddressesApiFp ( this . configuration ) . importAddress ( walletId , addressId , options ) . then ( ( request ) => request ( this . axios , this . basePath ) ) ; } summary param { Body15 } body param { string } walletId param { * } options throws memberof public importAddresses ( body , walletId , options ? ) { return ByronAddressesApiFp ( this . configuration ) . importAddresses ( body , walletId , options ) . then ( ( request ) => request ( this . axios , this . basePath ) ) ; } summary param { string } walletId param { string } state param { * } options throws memberof public listByronAddresses ( walletId , state ? , options ? ) { return ByronAddressesApiFp ( this . configuration ) . listByronAddresses ( walletId , state , options ) . then ( ( request ) => request ( this . axios , this . basePath ) ) ; } }