Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "swaps/errors"

Index

Variables

Object literals

Variables

Const codesPrefix

codesPrefix: string = errorCodesPrefix.SWAPS

Object literals

Const errorCodes

errorCodes: object

FINAL_PAYMENT_ERROR

FINAL_PAYMENT_ERROR: string = codesPrefix.concat('.4')

INSUFFICIENT_BALANCE

INSUFFICIENT_BALANCE: string = codesPrefix.concat('.12')

INSUFFICIENT_INBOUND_CAPACITY

INSUFFICIENT_INBOUND_CAPACITY: string = codesPrefix.concat('.14')

INSUFFICIENT_OUTBOUND_CAPACITY

INSUFFICIENT_OUTBOUND_CAPACITY: string = codesPrefix.concat('.13')

INVALID_RESOLVE_REQUEST

INVALID_RESOLVE_REQUEST: string = codesPrefix.concat('.6')

PAYMENT_HASH_NOT_FOUND

PAYMENT_HASH_NOT_FOUND: string = codesPrefix.concat('.3')

PAYMENT_PENDING

PAYMENT_PENDING: string = codesPrefix.concat('.10')

PAYMENT_REJECTED

PAYMENT_REJECTED: string = codesPrefix.concat('.5')

REMOTE_IDENTIFIER_MISSING

REMOTE_IDENTIFIER_MISSING: string = codesPrefix.concat('.11')

SWAP_CLIENT_MISCONFIGURED

SWAP_CLIENT_MISCONFIGURED: string = codesPrefix.concat('.8')

SWAP_CLIENT_NOT_CONFIGURED

SWAP_CLIENT_NOT_CONFIGURED: string = codesPrefix.concat('.2')

SWAP_CLIENT_NOT_FOUND

SWAP_CLIENT_NOT_FOUND: string = codesPrefix.concat('.1')

SWAP_CLIENT_WALLET_NOT_CREATED

SWAP_CLIENT_WALLET_NOT_CREATED: string = codesPrefix.concat('.7')

UNKNOWN_PAYMENT_ERROR

UNKNOWN_PAYMENT_ERROR: string = codesPrefix.concat('.9')

Const errors

errors: object

FINAL_PAYMENT_ERROR

  • FINAL_PAYMENT_ERROR(message: string): { code: string; message: string }
  • A payment error that indicates the payment has permanently failed.

    Parameters

    • message: string

    Returns { code: string; message: string }

    • code: string
    • message: string

INSUFFICIENT_INBOUND_CAPACITY

  • INSUFFICIENT_INBOUND_CAPACITY(currency: string, amount: number, capacity: number): { code: string; message: string }
  • Parameters

    • currency: string
    • amount: number
    • capacity: number

    Returns { code: string; message: string }

    • code: string
    • message: string

INSUFFICIENT_OUTBOUND_CAPACITY

  • INSUFFICIENT_OUTBOUND_CAPACITY(currency: string, amount: number, capacity: number): { code: string; message: string }
  • Parameters

    • currency: string
    • amount: number
    • capacity: number

    Returns { code: string; message: string }

    • code: string
    • message: string

INVALID_RESOLVE_REQUEST

  • INVALID_RESOLVE_REQUEST(rHash: string, errorMessage: string): { code: string; message: string }
  • Parameters

    • rHash: string
    • errorMessage: string

    Returns { code: string; message: string }

    • code: string
    • message: string

PAYMENT_HASH_NOT_FOUND

  • PAYMENT_HASH_NOT_FOUND(rHash: string): { code: string; message: string }
  • Parameters

    • rHash: string

    Returns { code: string; message: string }

    • code: string
    • message: string

PAYMENT_PENDING

  • PAYMENT_PENDING(rHash: string): { code: string; message: string }
  • Parameters

    • rHash: string

    Returns { code: string; message: string }

    • code: string
    • message: string

SWAP_CLIENT_MISCONFIGURED

  • SWAP_CLIENT_MISCONFIGURED(clientLabels: string[]): { code: string; message: string }
  • Parameters

    • clientLabels: string[]

    Returns { code: string; message: string }

    • code: string
    • message: string

SWAP_CLIENT_NOT_CONFIGURED

  • SWAP_CLIENT_NOT_CONFIGURED(currencyOrClientType: string): { code: string; message: string }
  • Parameters

    • currencyOrClientType: string

    Returns { code: string; message: string }

    • code: string
    • message: string

SWAP_CLIENT_NOT_FOUND

  • SWAP_CLIENT_NOT_FOUND(currency: string): { code: string; message: string }
  • Parameters

    • currency: string

    Returns { code: string; message: string }

    • code: string
    • message: string

SWAP_CLIENT_WALLET_NOT_CREATED

  • SWAP_CLIENT_WALLET_NOT_CREATED(message: string): { code: string; message: string }
  • Parameters

    • message: string

    Returns { code: string; message: string }

    • code: string
    • message: string

UNKNOWN_PAYMENT_ERROR

  • UNKNOWN_PAYMENT_ERROR(message: string): { code: string; message: 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.

    Parameters

    • message: string

    Returns { code: string; message: string }

    • code: string
    • message: string

INSUFFICIENT_BALANCE

INSUFFICIENT_BALANCE: object

code

code: string = errorCodes.INSUFFICIENT_BALANCE

message

message: string = "swap failed due to insufficient channel balance"

PAYMENT_REJECTED

PAYMENT_REJECTED: object

code

code: string = errorCodes.PAYMENT_REJECTED

message

message: string = "the recipient rejected our payment for the swap"

REMOTE_IDENTIFIER_MISSING

REMOTE_IDENTIFIER_MISSING: object

code

code: string = errorCodes.REMOTE_IDENTIFIER_MISSING

message

message: string = "operation failed due to a missing remote identifier"

Generated using TypeDoc