@types/bitauth
TypeScript icon, indicating that this package has built-in type declarations

0.4.5 • Public • Published

Installation

npm install --save @types/bitauth

Summary

This package contains type definitions for bitauth (https://github.com/bitpay/bitauth#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/bitauth.

index.d.ts

import { BinaryLike } from "crypto";
import { RequestHandler } from "express";

export as namespace bitauth;

interface callback {
    (err?: Error, valid?: boolean): any;
}

export function generateSin(): {
    created: number;
    priv: string;
    pub: string;
    sin: string;
};
export function getPublicKeyFromPrivateKey(privkey: string | Uint8Array): string;
export function getSinFromPublicKey(pubkey: string | Uint8Array): string;
export function sign(data: string | Uint8Array, privkey: string | Uint8Array): Uint8Array;
export function verifySignature(
    data: string | Uint8Array,
    pubkey: string | Uint8Array,
    hexsignature: string | Uint8Array,
    callback?: callback,
    // eslint-disable-next-line @typescript-eslint/no-invalid-void-type
): boolean | void;
// eslint-disable-next-line @typescript-eslint/no-invalid-void-type
export function validateSin(sin: string, callback?: callback): boolean | void;
export function encrypt(password: BinaryLike, str: string): string;
export function decrypt(password: BinaryLike, str: string): string;
export const middleware: RequestHandler;

export {};

Additional Details

  • Last updated: Wed, 22 Nov 2023 00:24:48 GMT
  • Dependencies: @types/express

Credits

These definitions were written by Justin Langston.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/bitauth

Weekly Downloads

10

Version

0.4.5

License

MIT

Unpacked Size

4.87 kB

Total Files

5

Last publish

Collaborators

  • types