0.4.5 • Published 6 months ago

@types/bitauth v0.4.5

Weekly downloads
8
License
MIT
Repository
github
Last release
6 months ago

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

// Type definitions for bitauth 0.4
// Project: https://github.com/bitpay/bitauth#readme
// Definitions by: Justin Langston <https://github.com/nitsujlangston>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

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,
): boolean | void;
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: Mon, 06 Sep 2021 23:01:21 GMT
  • Dependencies: @types/express
  • Global values: bitauth

Credits

These definitions were written by Justin Langston.

0.4.5

6 months ago

0.4.4

6 months ago

0.4.3

7 months ago

0.4.2

8 months ago

0.4.1

3 years ago

0.4.0

4 years ago