UNPKG

@unilogin/sdk

Version:

SDK is a JS library, that communicates with relayer. SDK allows managing contract, by creating basic contract-calling messages.

88 lines 3.33 kB
declare type ErrorType = 'InsufficientGas' | 'WalletNotFound' | 'ConcurrentAuthorisation' | 'ConcurrentDeployment' | 'UnsupportedBytecode' | 'InvalidAddressOrEnsName' | 'InvalidAmount' | 'InvalidAmountAndRecipient' | 'TransactionHashNotFound' | 'TokenNotFound' | 'MissingMessageHash' | 'MissingParameter' | 'InvalidPassphrase' | 'InvalidWalletState' | 'TimeoutError' | 'InvalidEvent' | 'Overridden' | 'WalletOverridden' | 'InvalidContract' | 'InvalidENSRecord' | 'NoSet' | 'UnexpectedError' | 'InvalidGasLimit' | 'InvalidObserverState' | 'SavingFutureWalletFailed'; export declare class SDKError extends Error { errorType: ErrorType; constructor(message: string, errorType: ErrorType); } export declare class UnexpectedError extends SDKError { constructor(message: string); } export declare class Conflict extends SDKError { constructor(message: string, errorType: ErrorType); } export declare class ConcurrentDeployment extends Conflict { constructor(); } export declare class ConcurrentAuthorisation extends Conflict { constructor(); } export declare class ValidationFailed extends SDKError { constructor(message: string, errorType: ErrorType); } export declare class InvalidAddressOrEnsName extends ValidationFailed { constructor(addressOrEnsName: string); } export declare class InvalidENSRecord extends ValidationFailed { constructor(ensName: string); } export declare class InvalidAmount extends ValidationFailed { constructor(amount: string); } export declare class InvalidAmountAndRecipient extends ValidationFailed { constructor(amount: string, recipient: string); } export declare class InvalidContract extends ValidationFailed { constructor(); } export declare class UnsupportedBytecode extends ValidationFailed { constructor(); } export declare class InvalidEvent extends ValidationFailed { constructor(eventType: string); } export declare class InvalidPassphrase extends ValidationFailed { constructor(); } export declare class InvalidWalletState extends ValidationFailed { constructor(expectedState: string, currentState: string); } export declare class InsufficientGas extends ValidationFailed { constructor(message: string); } export declare class InvalidGasLimit extends ValidationFailed { constructor(message: string); } export declare class NotFound extends SDKError { constructor(message: string, errorType: ErrorType); } export declare class MissingParameter extends NotFound { constructor(parameterName: string); } export declare class TransactionHashNotFound extends NotFound { constructor(); } export declare class MissingMessageHash extends NotFound { constructor(); } export declare class WalletNotFound extends NotFound { constructor(); } export declare class TokenNotFound extends NotFound { constructor(tokenAddress: string); } export declare class TimeoutError extends SDKError { constructor(); } export declare class Overridden extends SDKError { constructor(message: string, errorType: ErrorType); } export declare class WalletOverridden extends Overridden { constructor(); } export declare class InvalidObserverState extends Overridden { constructor(); } export declare class SavingFutureWalletFailed extends SDKError { constructor(); } export {}; //# sourceMappingURL=errors.d.ts.map