///
import { CryptoClient } from '..';
import { IAirGapSignedTransaction } from '../interfaces/IAirGapSignedTransaction';
import { AirGapTransactionStatus, IAirGapTransaction, IAirGapTransactionResult } from '../interfaces/IAirGapTransaction';
import { SignedTransaction } from '../serializer/schemas/definitions/signed-transaction';
import { UnsignedTransaction } from '../serializer/schemas/definitions/unsigned-transaction';
import { ProtocolOptions } from '../utils/ProtocolOptions';
import { ProtocolSymbols } from '../utils/ProtocolSymbols';
import { IProtocolTransactionCursor } from './../interfaces/IAirGapTransaction';
import { ICoinSubProtocol } from './ICoinSubProtocol';
export interface FeeDefaults {
low: string;
medium: string;
high: string;
}
export interface CurrencyUnit {
unitSymbol: string;
factor: string;
}
export interface CoinAddress {
getValue(): string;
}
export interface ICoinProtocol {
symbol: string;
name: string;
marketSymbol: string;
feeSymbol: string;
feeDefaults: FeeDefaults;
decimals: number;
feeDecimals: number;
identifier: ProtocolSymbols;
units: {
unitSymbol: string;
factor: string;
}[];
supportsHD: boolean;
standardDerivationPath: string;
addressIsCaseSensitive: boolean;
addressValidationPattern: string;
addressPlaceholder: string;
subProtocols?: ICoinSubProtocol[];
options: ProtocolOptions;
cryptoClient: CryptoClient;
getBlockExplorerLinkForAddress(address: string): Promise;
getBlockExplorerLinkForTxId(txId: string): Promise;
getPublicKeyFromMnemonic(mnemonic: string, derivationPath: string, password?: string): Promise;
getPrivateKeyFromMnemonic(mnemonic: string, derivationPath: string, password?: string): Promise;
getExtendedPrivateKeyFromMnemonic(mnemonic: string, derivationPath: string, password?: string): Promise;
getPublicKeyFromHexSecret(secret: string, derivationPath: string): Promise;
getPrivateKeyFromHexSecret(secret: string, derivationPath: string): Promise;
getExtendedPrivateKeyFromHexSecret(secret: string, derivationPath: string): Promise;
getAddressFromPublicKey(publicKey: string): Promise;
getAddressesFromPublicKey(publicKey: string): Promise;
getAddressFromExtendedPublicKey(extendedPublicKey: string, visibilityDerivationIndex: number, addressDerivationIndex: number): Promise;
getAddressesFromExtendedPublicKey(extendedPublicKey: string, visibilityDerivationIndex: number, addressCount: number, offset: number): Promise;
getNextAddressFromPublicKey(publicKey: string, current: CoinAddress): Promise;
getTransactionsFromPublicKey(publicKey: string, limit: number, cursor?: IProtocolTransactionCursor): Promise;
getTransactionsFromExtendedPublicKey(extendedPublicKey: string, limit: number, cursor?: IProtocolTransactionCursor): Promise;
getTransactionsFromAddresses(addresses: string[], limit: number, cursor?: IProtocolTransactionCursor): Promise;
signWithExtendedPrivateKey(extendedPrivateKey: string, transaction: any): Promise;
signWithPrivateKey(privateKey: Buffer, transaction: any): Promise;
getTransactionDetails(transaction: UnsignedTransaction, data?: {
[key: string]: unknown;
}): Promise;
getTransactionDetailsFromSigned(transaction: SignedTransaction, data?: {
[key: string]: unknown;
}): Promise;
getBalanceOfAddresses(addresses: string[], data?: {
[key: string]: unknown;
}): Promise;
getBalanceOfPublicKey(publicKey: string, data?: {
addressIndex?: number;
[key: string]: unknown;
}): Promise;
getBalanceOfExtendedPublicKey(extendedPublicKey: string, offset: number, data?: {
[key: string]: unknown;
}): Promise;
getAvailableBalanceOfAddresses(addresses: string[], data?: {
[key: string]: unknown;
}): Promise;
getTransactionStatuses(transactionHash: string[]): Promise;
getBalanceOfPublicKeyForSubProtocols(publicKey: string, subProtocols: ICoinSubProtocol[]): Promise;
estimateMaxTransactionValueFromExtendedPublicKey(extendedPublicKey: string, recipients: string[], fee?: string, data?: {
[key: string]: unknown;
}): Promise;
estimateMaxTransactionValueFromPublicKey(publicKey: string, recipients: string[], fee?: string, data?: {
addressIndex?: number;
[key: string]: unknown;
}): Promise;
estimateFeeDefaultsFromExtendedPublicKey(publicKey: string, recipients: string[], values: string[], data?: {
[key: string]: unknown;
}): Promise;
estimateFeeDefaultsFromPublicKey(publicKey: string, recipients: string[], values: string[], data?: {
[key: string]: unknown;
}): Promise;
prepareTransactionFromExtendedPublicKey(extendedPublicKey: string, offset: number, recipients: string[], values: string[], fee: string, extras?: {
[key: string]: unknown;
}): Promise;
prepareTransactionFromPublicKey(publicKey: string, recipients: string[], values: string[], fee: string, extras?: {
[key: string]: unknown;
}): Promise;
broadcastTransaction(rawTransaction: any): Promise;
signMessage(message: string, keypair: {
publicKey?: string;
privateKey: Buffer;
}): Promise;
verifyMessage(message: string, signature: string, publicKey: string): Promise;
encryptAsymmetric(payload: string, publicKey: string): Promise;
decryptAsymmetric(encryptedPayload: string, keypair: {
publicKey?: string;
privateKey: Buffer;
}): Promise;
encryptAES(payload: string, privateKey: Buffer): Promise;
decryptAES(encryptedPayload: string, privateKey: Buffer): Promise;
}