xud
Version:
Exchange Union Daemon
82 lines (81 loc) • 2.39 kB
TypeScript
declare const errorCodes: {
SWAP_CLIENT_NOT_FOUND: string;
SWAP_CLIENT_NOT_CONFIGURED: string;
PAYMENT_HASH_NOT_FOUND: string;
FINAL_PAYMENT_ERROR: string;
PAYMENT_REJECTED: string;
INVALID_RESOLVE_REQUEST: string;
SWAP_CLIENT_WALLET_NOT_CREATED: string;
SWAP_CLIENT_MISCONFIGURED: string;
UNKNOWN_PAYMENT_ERROR: string;
PAYMENT_PENDING: string;
REMOTE_IDENTIFIER_MISSING: string;
INSUFFICIENT_BALANCE: string;
INSUFFICIENT_OUTBOUND_CAPACITY: string;
INSUFFICIENT_INBOUND_CAPACITY: string;
};
declare const errors: {
SWAP_CLIENT_NOT_FOUND: (currency: string) => {
message: string;
code: string;
};
SWAP_CLIENT_NOT_CONFIGURED: (currencyOrClientType: string) => {
message: string;
code: string;
};
PAYMENT_HASH_NOT_FOUND: (rHash: string) => {
message: string;
code: string;
};
/** A payment error that indicates the payment has permanently failed. */
FINAL_PAYMENT_ERROR: (message: string) => {
message: string;
code: string;
};
PAYMENT_REJECTED: {
message: string;
code: string;
};
INVALID_RESOLVE_REQUEST: (rHash: string, errorMessage: string) => {
message: string;
code: string;
};
SWAP_CLIENT_WALLET_NOT_CREATED: (message: string) => {
message: string;
code: string;
};
SWAP_CLIENT_MISCONFIGURED: (clientLabels: string[]) => {
message: string;
code: string;
};
/**
* A payment error that indicates we are unsure of the current state of the
* payment and it may have succeeded or may eventually succeed.
*/
UNKNOWN_PAYMENT_ERROR: (message: string) => {
message: string;
code: string;
};
PAYMENT_PENDING: (rHash: string) => {
message: string;
code: string;
};
REMOTE_IDENTIFIER_MISSING: {
message: string;
code: string;
};
INSUFFICIENT_BALANCE: {
message: string;
code: string;
};
INSUFFICIENT_OUTBOUND_CAPACITY: (currency: string, amount: number, capacity: number) => {
message: string;
code: string;
};
INSUFFICIENT_INBOUND_CAPACITY: (currency: string, amount: number, capacity: number) => {
message: string;
code: string;
};
};
export { errorCodes };
export default errors;