node-easywechat
Version:
EasyWechat SDK for Node.js (NOT OFFICIAL)
26 lines (25 loc) • 1.15 kB
TypeScript
import { PrivateKey } from "../Core/Support/PrivateKey";
import { PublicKey } from "../Core/Support/PublicKey";
import MerchantInterface from "./Contracts/MerchantInterface";
declare class Merchant implements MerchantInterface {
protected mchId: string;
protected secretKey: string;
protected v2SecretKey: string;
protected platformCerts: Record<string, PublicKey>;
protected privateKey: PrivateKey;
protected certificate: PublicKey;
constructor(mchId: string, privateKey: string | PrivateKey, certificate: string | PublicKey, secretKey: string, v2SecretKey?: string, platformCerts?: Record<string, string | PublicKey> | string[] | PublicKey[]);
/**
* 统一规范化平台证书
* @param platformCerts 平台证书列表
* @returns
*/
protected normalizePlatformCerts(platformCerts: Record<string, string | PublicKey> | string[] | PublicKey[]): Record<string, PublicKey>;
getMerchantId(): string;
getPrivateKey(): PrivateKey;
getSecretKey(): string;
getV2SecretKey(): string;
getCertificate(): PublicKey;
getPlatformCert(serial: string): PublicKey;
}
export = Merchant;