3.0.4 • Published 6 months ago

@types/eth-lightwallet v3.0.4

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

Installation

npm install --save @types/eth-lightwallet

Summary

This package contains type definitions for eth-lightwallet (https://github.com/ConsenSys/eth-lightwallet#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/eth-lightwallet.

index.d.ts

// Type definitions for eth-lightwallet 3.0
// Project: https://github.com/ConsenSys/eth-lightwallet#readme
// Definitions by: Leonid Logvinov <https://github.com/LogvinovLeon>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.4

/// <reference types="node" />

export interface ECSignatureBuffer {
    v: number;
    r: Buffer;
    s: Buffer;
}
export namespace signing {
    function signTx(
        keystore: keystore,
        pwDerivedKey: Uint8Array,
        rawTx: string,
        signingAddress: string
    ): string;
    function signMsg(
        keystore: keystore,
        pwDerivedKey: Uint8Array,
        rawMsg: string,
        signingAddress: string
    ): ECSignatureBuffer;
    function signMsgHash(
        keystore: keystore,
        pwDerivedKey: Uint8Array,
        msgHash: string,
        signingAddress: string
    ): ECSignatureBuffer;
    function concatSig(signature: any): string;
}

export class keystore {
    static createVault(
        options: any,
        callback?: (error: Error, keystore: keystore) => void
    ): keystore;
    static generateRandomSeed(): string;
    static isSeedValid(seed: string): boolean;
    static deserialize(keystore: string): keystore;
    serialize(): string;
    keyFromPassword(
        password: string,
        callback?: (error: Error, pwDerivedKey: Uint8Array) => void
    ): Uint8Array;
    isDerivedKeyCorrect(pwDerivedKey: Uint8Array): boolean;
    generateNewAddress(
        pwDerivedKey: Uint8Array,
        numberOfAddresses: number
    ): void;
    getSeed(pwDerivedKey: Uint8Array): string;
    exportPrivateKey(address: string, pwDerivedKey: Uint8Array): string;
    getAddresses(): string[];
}

export interface VaultOptions {
    password: string;
    seedPhrase: string;
    salt?: string | undefined;
    hdPathString: string;
}

Additional Details

  • Last updated: Thu, 08 Jul 2021 12:01:12 GMT
  • Dependencies: @types/node
  • Global values: none

Credits

These definitions were written by Leonid Logvinov.