UNPKG

@airgap/coinlib-core

Version:

The @airgap/coinlib-core is a protocol agnostic library to prepare, sign and broadcast cryptocurrency transactions.

25 lines (24 loc) 1.68 kB
import { IAirGapSignedTransaction } from '../interfaces/IAirGapSignedTransaction'; import { ICoinBaseProtocol } from './ICoinBaseProtocol'; export interface ICoinOfflineProtocol extends ICoinBaseProtocol { getPublicKeyFromMnemonic(mnemonic: string, derivationPath: string, password?: string): Promise<string>; getPrivateKeyFromMnemonic(mnemonic: string, derivationPath: string, password?: string): Promise<string>; getExtendedPublicKeyFromMnemonic(mnemonic: string, derivationPath: string, password?: string): Promise<string>; getExtendedPublicKeyFromHexSecret(secret: string, derivationPath: string): Promise<string>; getExtendedPrivateKeyFromMnemonic(mnemonic: string, derivationPath: string, password?: string): Promise<string>; getExtendedPrivateKeyFromHexSecret(secret: string, derivationPath: string): Promise<string>; getPublicKeyFromHexSecret(secret: string, derivationPath: string): Promise<string>; getPrivateKeyFromHexSecret(secret: string, derivationPath: string): Promise<string>; signWithExtendedPrivateKey(extendedPrivateKey: string, transaction: any, childDerivationPath?: string): Promise<IAirGapSignedTransaction>; signWithPrivateKey(privateKey: string, transaction: any): Promise<IAirGapSignedTransaction>; signMessage(message: string, keypair: { publicKey?: string; privateKey: string; }): Promise<string>; decryptAsymmetric(encryptedPayload: string, keypair: { publicKey?: string; privateKey: string; }): Promise<string>; encryptAES(payload: string, privateKey: string): Promise<string>; decryptAES(encryptedPayload: string, privateKey: string): Promise<string>; }