SDK_ERRORS constant

Map<String, Map<String, Object>> const SDK_ERRORS

Implementation

static const SDK_ERRORS = {
  /* ----- INVALID (1xxx) ----- */
  INVALID_METHOD: {
    'message': 'Invalid method.',
    'code': 1001,
  },
  INVALID_EVENT: {
    'message': 'Invalid event.',
    'code': 1002,
  },
  INVALID_UPDATE_REQUEST: {
    'message': 'Invalid update request.',
    'code': 1003,
  },
  INVALID_EXTEND_REQUEST: {
    'message': 'Invalid extend request.',
    'code': 1004,
  },
  INVALID_SESSION_SETTLE_REQUEST: {
    'message': 'Invalid session settle request.',
    'code': 1005,
  },
  /* ----- UNAUTHORIZED (3xxx) ----- */
  UNAUTHORIZED_METHOD: {
    'message': 'Unauthorized method.',
    'code': 3001,
  },
  UNAUTHORIZED_EVENT: {
    'message': 'Unauthorized event.',
    'code': 3002,
  },
  UNAUTHORIZED_UPDATE_REQUEST: {
    'message': 'Unauthorized update request.',
    'code': 3003,
  },
  UNAUTHORIZED_EXTEND_REQUEST: {
    'message': 'Unauthorized extend request.',
    'code': 3004,
  },
  /* ----- REJECTED (5xxx) ----- */
  USER_REJECTED_SIGN: {
    'message': 'User rejected.',
    'code': 4001,
  },
  /* ----- REJECTED (5xxx) ----- */
  USER_REJECTED: {
    'message': 'User rejected.',
    'code': 5000,
  },
  USER_REJECTED_CHAINS: {
    'message': 'User rejected chains.',
    'code': 5001,
  },
  USER_REJECTED_METHODS: {
    'message': 'User rejected methods.',
    'code': 5002,
  },
  USER_REJECTED_EVENTS: {
    'message': 'User rejected events.',
    'code': 5003,
  },
  UNSUPPORTED_CHAINS: {
    'message': 'Unsupported chains.',
    'code': 5100,
  },
  UNSUPPORTED_METHODS: {
    'message': 'Unsupported methods.',
    'code': 5101,
  },
  UNSUPPORTED_EVENTS: {
    'message': 'Unsupported events.',
    'code': 5102,
  },
  UNSUPPORTED_ACCOUNTS: {
    'message': 'Unsupported accounts.',
    'code': 5103,
  },
  UNSUPPORTED_NAMESPACE_KEY: {
    'message': 'Unsupported namespace key.',
    'code': 5104,
  },
  /* ----- REASON (6xxx) ----- */
  USER_DISCONNECTED: {
    'message': 'User disconnected.',
    'code': 6000,
  },
  /* ----- FAILURE (7xxx) ----- */
  SESSION_SETTLEMENT_FAILED: {
    'message': 'Session settlement failed.',
    'code': 7000,
  },
  NO_SESSION_FOR_TOPIC: {
    'message': 'No session for topic.',
    'code': 7001,
  },
  /* ----- FAILURE (8xxx) ----- */
  REQUEST_EXPIRED_SESSION: {
    'message': 'Session request expired.',
    'code': 8000,
  },
  /* ----- PAIRING (10xxx) ----- */
  WC_METHOD_UNSUPPORTED: {
    'message': 'Unsupported wc_ method.',
    'code': 10001,
  },
  /* ----- AUTH VALIDATION (11xxx) ----- */
  MALFORMED_RESPONSE_PARAMS: {
    'message': 'Malformed response parameters.',
    'code': 11001,
  },
  MALFORMED_REQUEST_PARAMS: {
    'message': 'Malformed request parameters.',
    'code': 11002,
  },
  MESSAGE_COMPROMISED: {
    'message': 'Message compromised.',
    'code': 11003,
  },
  SIGNATURE_VERIFICATION_FAILED: {
    'message': 'Signature verification failed.',
    'code': 11004,
  },
  REQUEST_EXPIRED_AUTH: {
    'message': 'Auth request expired.',
    'code': 11005,
  },
  MISSING_ISSUER_AUTH: {
    'message': 'Missing Issuer.',
    'code': 11006,
  },
  /* ----- AUTH REJECTED (12xxx) ----- */
  USER_REJECTED_AUTH: {
    'message': 'User rejected auth request.',
    'code': 12001,
  },
  USER_DISCONNECTED_AUTH: {
    'message': 'User disconnect auth.',
    'code': 12002,
  },
};