JSPM

@coolwallets/errors

0.0.8
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • Downloads 187
    • Score
      100M100P100Q75086F
    • License ISC

    Error objects for CoolWalletS SDK

    Package Exports

    • @coolwallets/errors

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@coolwallets/errors) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    Errors

    version

    You can import our custom errors from this npm package.

    Install

    npm install coolwallets@errors

    Usage

    import { NotRegistered } from '@coolwallets/errors'
    try {
      await wallet.createWallet(12)
    } catch (error) {
      if  (error instanceof NotRegistered) {
        // popup Not Register Notification
      } else {
        throw error
      }
    }