UNPKG

@xmobitea/gn-server

Version:

GearN Server by XmobiTea (Pro)

39 lines (38 loc) 1.07 kB
import { IAppleService } from "./IAppleService"; export declare class AppleService implements IAppleService { private static readonly MAIN_iss; private static readonly MAIN_iss_auth_keys; private client; private appleClientId; private sandboxEnable; private issuerId; private keyId; private p8Content; constructor(); init(request: { appleClientId: string; sandboxEnable: boolean; issuerId: string; keyId: string; p8Content: string; }): void; private getSigningKey; private verifyToken; verifyAppleToken(token: string): Promise<{ [k: string]: any; }>; validateReceipt(payload: string, transactionId: string): Promise<{ success: boolean; productId?: string; }>; getTransactionInfoAsync(transactionId: string, isSandbox: boolean): Promise<{ responesCode: number; data: any; error?: undefined; } | { responesCode: number; error: any; data?: undefined; }>; private getToken; }