diff --git a/src/coinbase/types.ts b/src/coinbase/types.ts index f8d53d82..59f641d0 100644 --- a/src/coinbase/types.ts +++ b/src/coinbase/types.ts @@ -5,6 +5,7 @@ import { User as UserModel, Wallet as WalletModel, } from "./../client/api"; +import { APIError } from "./api_error"; /** * WalletAPI client type definition. @@ -16,7 +17,7 @@ export type WalletAPIClient = { * @class * @param {CreateWalletRequest} [createWalletRequest] - The wallet creation request. * @param {RawAxiosRequestConfig} [options] - Axios request options. - * @throws {RequiredError} + * @throws {APIError} If the request fails. */ createWallet: ( createWalletRequest?: CreateWalletRequest, @@ -34,7 +35,7 @@ export type AddressAPIClient = { * @param {string} walletId - The wallet ID. * @param {string} addressId - The address ID. * @returns {Promise<{ data: { transaction_hash: string } }>} - The transaction hash - * @throws {Error} If the request fails. + * @throws {APIError} If the request fails. */ requestFaucetFunds( walletId: string, @@ -48,7 +49,7 @@ export type AddressAPIClient = { * @param {string} walletId - The ID of the wallet the address belongs to. * @param {string} addressId - The onchain address of the address that is being fetched. * @param {AxiosRequestConfig} [options] - Axios request options. - * @throws {RequiredError} + * @throws {APIError} If the request fails. */ getAddress( walletId: string, @@ -65,8 +66,8 @@ export type UserAPIClient = { * Retrieves the current user. * * @param {AxiosRequestConfig} [options] - Axios request options. - * @returns {AxiosPromise} - A promise resolving to the User model. - * @throws {AxiosError} If the request fails. + * @returns {AxiosPromise} - A promise resolvindg to the User model. + * @throws {APIError} If the request fails. */ getCurrentUser(options?: AxiosRequestConfig): AxiosPromise; };