cngn-typescript-library
Version:
A lightweight Typescript library to give you the best experience with managing your cNGN merchant account
19 lines (18 loc) • 1.2 kB
TypeScript
import { Balance, ExternalAccounts, IResponse, IVirtualAccount, IWithdraw, RedeemAsset, CreateVirtualAccount, Secrets, IWithdrawResponse, Transactions, IBanks, UpdateExternalAccount, Swap, SwapResponse, ITransactionPagination, ISwapQuote, ISwapQuoteResponse } from "../utils/types";
export declare class cNGNManager {
private readonly secrets;
private readonly axiosInstance;
constructor(secrets: Secrets);
private handleApiError;
private makeCalls;
getBalance(): Promise<IResponse<Balance[]>>;
getTransactionHistory(page?: number, limit?: number): Promise<IResponse<ITransactionPagination>>;
withdraw(data: IWithdraw): Promise<IResponse<IWithdrawResponse>>;
verifyWithdrawal(tnxRef: string): Promise<IResponse<Transactions>>;
redeemAsset(data: RedeemAsset): Promise<IResponse<Transactions>>;
createVirtualAccount(data: CreateVirtualAccount): Promise<IResponse<IVirtualAccount>>;
updateExternalAccounts(data: UpdateExternalAccount): Promise<IResponse<ExternalAccounts>>;
getBanks(): Promise<IResponse<IBanks[]>>;
swapAsset(data: Swap): Promise<IResponse<SwapResponse>>;
getSwapQuote(data: ISwapQuote): Promise<IResponse<ISwapQuoteResponse>>;
}