gamemoney-frorff
Version:
GameMoney API wrapper for Node.js
19 lines (18 loc) • 552 B
TypeScript
/// <reference types="node" />
import { SignPrivateKeyInput } from 'crypto';
export declare type TSignType = 'hmac' | 'rsa';
export interface IResponse {
state: 'success' | 'error';
time: number;
error?: string;
rand: string;
signature: string;
}
export default class GameMoneyRequest {
private static readonly uri;
private request;
private hmacKey;
private privateKey;
constructor(hmacKey: string, privateKey?: SignPrivateKeyInput);
send(url: string, body: any, signType?: TSignType): Promise<IResponse>;
}