simple-nano-wallet
Version:
Benskalz' simple-nano-wallet rewritten in TypeScript with some additional features.
51 lines (50 loc) • 1.78 kB
TypeScript
export declare class WalletError extends Error {
readonly code: string;
readonly originalError?: Error;
constructor(message: string, code: string, originalError?: Error);
}
export declare class ConfigurationError extends WalletError {
constructor(message: string, code?: string);
}
export declare class AccountError extends WalletError {
constructor(message: string, code?: string);
}
export declare class TransactionError extends WalletError {
constructor(message: string, code?: string);
}
export declare class NetworkError extends WalletError {
constructor(message: string, code?: string, originalError?: Error);
}
export declare class ValidationError extends WalletError {
constructor(message: string, code?: string);
}
export declare class WebSocketError extends WalletError {
constructor(message: string, code?: string);
}
export declare class CryptographicError extends WalletError {
constructor(message: string, code?: string);
}
export declare class InvalidSeedError extends ConfigurationError {
constructor();
}
export declare class MissingConfigurationError extends ConfigurationError {
constructor(missingField: string);
}
export declare class AccountNotFoundError extends AccountError {
constructor(address: string);
}
export declare class InvalidAddressError extends ValidationError {
constructor(address: string);
}
export declare class InvalidAmountError extends ValidationError {
constructor(amount: string);
}
export declare class TransactionFailedError extends TransactionError {
constructor(details: string);
}
export declare class WebSocketMessageError extends WebSocketError {
constructor();
}
export declare class WorkGenerationError extends NetworkError {
constructor(details: string);
}