2.0.45 • Published 8 months ago

hoshistech-lib v2.0.45

Weekly downloads
-
License
ISC
Repository
github
Last release
8 months ago

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.45

8 months ago

2.0.44

9 months ago

2.0.43

10 months ago

2.0.42

12 months ago

2.0.40

1 year ago

2.0.41

1 year ago

2.0.39

1 year ago

2.0.38

1 year ago

2.0.37

1 year ago

2.0.36

1 year ago

2.0.35

2 years ago

2.0.29

2 years ago

2.0.33

2 years ago

2.0.34

2 years ago

2.0.31

2 years ago

2.0.32

2 years ago

2.0.30

2 years ago

2.0.28

2 years ago

2.0.15

2 years ago

2.0.16

2 years ago

2.0.13

2 years ago

2.0.14

2 years ago

2.0.19

2 years ago

2.0.17

2 years ago

2.0.18

2 years ago

2.0.26

2 years ago

2.0.27

2 years ago

2.0.24

2 years ago

2.0.25

2 years ago

2.0.22

2 years ago

2.0.23

2 years ago

2.0.20

2 years ago

2.0.21

2 years ago

2.0.11

2 years ago

2.0.12

2 years ago

2.0.10

2 years ago

2.0.8

2 years ago

2.0.7

2 years ago

2.0.6

2 years ago

2.0.5

2 years ago

2.0.4

2 years ago

2.0.3

2 years ago

2.0.2

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago