import { IPayment } from '@ulixee/specification'; import IDataboxApiContext from '../interfaces/IDataboxApiContext'; import { IDataboxRecord } from './DataboxesTable'; /** * 50 microgons for 1KB means: * 1 microgons per 20.5 bytes * 1MB is $0.05 * 1GB is $52.43 * * Luminati is 1.2c per mb base price (but that's for all page contents) * ie, 12k microgons, ie, 12 microgons per kb * */ export default class PaymentProcessor { private payment; readonly context: Pick; static giftCardIssuersById: { [giftCardId: string]: string[]; }; private microgonsToHold; private holdId; private holdAuthorizationCode?; private fundingBalance; private sidechain; private sidechainSettings; private readonly functionHolds; private readonly payouts; constructor(payment: IPayment, context: Pick); createHold(databox: IDataboxRecord, functionCalls: { id: number; functionName: string; }[], pricingPreferences?: { maxComputePricePerQuery?: number; }): Promise; releaseLocalFunctionHold(functionId: number, resultBytes: number): number; settle(finalResultBytes: number): Promise; private canUseGiftCard; private holdGiftCardMinimum; private canUseMicronote; private holdMicronoteMinimum; private loadSidechain; static getOfficialBytes(output: any): number; private static getGiftCardIssuers; }