28 lines
1.4 KiB
TypeScript
28 lines
1.4 KiB
TypeScript
import { EntityDict } from '../../oak-app-domain';
|
|
import PayClazz from "../../types/PayClazz";
|
|
import { BRC } from "../../types/RuntimeCxt";
|
|
export default class Account implements PayClazz {
|
|
getAccountEntity(): [string, string];
|
|
getAccountAmount(context: BRC): Promise<number>;
|
|
calcTransferTax(price: number): [number, string, string];
|
|
calcRefundTax(): [number, string, string];
|
|
calcPayTax(): [number, string, string];
|
|
getRefundableAt(successAt: number): number;
|
|
refund(refund: EntityDict['refund']['Schema']): Promise<undefined>;
|
|
getRefundState(refund: EntityDict['refund']['Schema']): Promise<[EntityDict['refund']['Schema']['iState'], undefined]>;
|
|
decodePayNotification(params: Record<string, any>, body: any): Promise<{
|
|
payId: string;
|
|
iState: EntityDict['pay']['Schema']['iState'];
|
|
extra?: EntityDict['pay']['Update']['data'] | undefined;
|
|
}>;
|
|
decodeRefundNotification(params: Record<string, any>, body: any): Promise<{
|
|
refundId: string;
|
|
iState: EntityDict['refund']['OpSchema']['iState'];
|
|
extra?: EntityDict['refund']['Update']['data'] | undefined;
|
|
price?: number | undefined;
|
|
}>;
|
|
prepay(pay: EntityDict['pay']['Schema'], data: EntityDict['pay']['Update']['data'], context: BRC): Promise<void>;
|
|
getState(pay: EntityDict['pay']['Schema']): Promise<[string, EntityDict['pay']['Update']['data']]>;
|
|
close(pay: EntityDict['pay']['Schema']): Promise<void>;
|
|
}
|