# @hub3js/core

Core package for handling web3 wallets supported by Rango

## Errors

Every error the hub throws is a `Hub3Error` with one of these `type`s:

- `PROVIDER_USER_REJECTED_REQUEST`: the user rejected the request.
- `PROVIDER_LOCKED`: the wallet must be unlocked first.
- `PROVIDER_UNEXPECTED`: any other failure.

`standardizeAndThrowHub3Error(error)` rethrows a `Hub3Error` untouched, turns
EIP-1193 code `4001` into `PROVIDER_USER_REJECTED_REQUEST` and anything else
into `PROVIDER_UNEXPECTED`. A value without a message gives an empty message.
It never produces `PROVIDER_LOCKED`: a wallet throws that type itself.
