pix-utils
Version:
Set of tools to parse, generate and validate payments of Brazil Instant Payment System (Pix)
20 lines (19 loc) • 660 B
TypeScript
import { PIXFetchResults } from '../dynamicPayload';
import { PixDynamicObject, PixStaticObject } from './pixElements';
import { PixError } from './pixError';
export interface PixFnDefault {
readonly toBRCode: () => string;
readonly toImage: () => Promise<string>;
}
export interface PixStaticFn extends PixFnDefault {
readonly throwIfError: () => PixStaticObject;
}
type FetchPayloadParams = {
DPP: string;
codMun: number;
};
export interface PixDynamicFn extends PixFnDefault {
readonly fetchPayload: (params: FetchPayloadParams) => Promise<PIXFetchResults | PixError>;
readonly throwIfError: () => PixDynamicObject;
}
export {};