2.0.39 • Published 18 days ago
hoshistech-lib v2.0.39
Hoshistech-lib
Library for common files, interfaces and utils used across all hoshistech services
installation
npm i hoshistech-lib
Usage
Payment Lib
import { Payment } from 'hoshistech-lib';
const clientId = 'DcjminXDRy8CQQy'
const client = new Payment(clientId);
const dto = {
amount: 28,
identifier: '1',
currency: 'USD',
phone_number: '',
email: 'opemipo@test.com',
client_reference: '0992333444455555666666777773000000000',
};
const actual = await client.paymentLink(dto);
KYC Lib
import { KYC } from 'hoshistech-lib';
const baseUrl = 'https://hoshistech-verification.com'
const kyc = new KYC(baseUrl);
const requestPayload = {
first_name: John;
last_name: Doe;
dob: 2023-01-11;
bvn: 267863466778;
account_number: 2278634667;
bank_code: 057;
};
const result = await kyc.VerifyBVN(requestPayload);
JWT Lib
import { JwtUtil } from '../src/util';
const client = new JwtUtil('secret', '500y');
const result = await client.generateToken({ id: '47589q9399', });
console.log("result", result)
const token = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjQ3NTg5cTkzOTkiLCJpYXQiOjE2OTU4MjMwMTksImV4cCI6MTc0NzQ2MjMwMTl9.gUwK3Pu_i17o_EXtyAb_p2pE_CoYudWIfbGGkwdEIIU';
const result = await client.verifyToken(token);
console.log("result", result)
2.0.39
18 days ago
2.0.38
2 months ago
2.0.37
3 months ago
2.0.36
3 months ago
2.0.35
4 months ago
2.0.29
6 months ago
2.0.33
6 months ago
2.0.34
6 months ago
2.0.31
6 months ago
2.0.32
6 months ago
2.0.30
6 months ago
2.0.28
7 months ago
2.0.15
7 months ago
2.0.16
7 months ago
2.0.13
7 months ago
2.0.14
7 months ago
2.0.19
7 months ago
2.0.17
7 months ago
2.0.18
7 months ago
2.0.26
7 months ago
2.0.27
7 months ago
2.0.24
7 months ago
2.0.25
7 months ago
2.0.22
7 months ago
2.0.23
7 months ago
2.0.20
7 months ago
2.0.21
7 months ago
2.0.11
9 months ago
2.0.12
8 months ago
2.0.10
9 months ago
2.0.8
9 months ago
2.0.7
9 months ago
2.0.6
9 months ago
2.0.5
9 months ago
2.0.4
9 months ago
2.0.3
9 months ago
2.0.2
9 months ago
2.0.1
9 months ago
2.0.0
9 months ago