/* tslint:disable */ // @ts-nocheck /* eslint-disable */ /** * Audius API * * 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 * as runtime from '../runtime'; import type { UserCoinsResponse, } from '../models'; import { UserCoinsResponseFromJSON, UserCoinsResponseToJSON, } from '../models'; export interface GetWalletCoinsRequest { walletId: string; offset?: number; limit?: number; } /** * */ export class WalletApi extends runtime.BaseAPI { /** * @hidden * Gets a list of the coins held by a wallet address and their balances */ async getWalletCoinsRaw(params: GetWalletCoinsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { if (params.walletId === null || params.walletId === undefined) { throw new runtime.RequiredError('walletId','Required parameter params.walletId was null or undefined when calling getWalletCoins.'); } const queryParameters: any = {}; if (params.offset !== undefined) { queryParameters['offset'] = params.offset; } if (params.limit !== undefined) { queryParameters['limit'] = params.limit; } const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ path: `/wallet/{walletId}/coins`.replace(`{${"walletId"}}`, encodeURIComponent(String(params.walletId))), method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => UserCoinsResponseFromJSON(jsonValue)); } /** * Gets a list of the coins held by a wallet address and their balances */ async getWalletCoins(params: GetWalletCoinsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { const response = await this.getWalletCoinsRaw(params, initOverrides); return await response.value(); } }