# @terra-money/use-wallet

> Core interface of [`@terra-money/wallet-provider`](https://www.npmjs.com/package/@terra-money/wallet-provider).

Latest version **4.0.1** (published 2023-08-25) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @terra-money/use-wallet
pnpm add @terra-money/use-wallet
yarn add @terra-money/use-wallet
bun add @terra-money/use-wallet
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 4.0.1 |
| Published | 2023-08-25 |
| First published | 2021-11-17 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=16 |
| Dependencies | 2 |
| Unpacked size | 59.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Terraform Labs PTE.LTD |
| Maintainers | simke9445, alecande, mwmerz, terra-devops |

## Links

- npm: https://www.npmjs.com/package/@terra-money/use-wallet
- Repository: https://github:terra-money/wallet-provider
- Homepage: https://github.com/terra-money/wallet-provider/tree/main/packages/src/@terra-money/use-wallet
- Issues: https://github.com/terra-money/wallet-provider/issues
- npm.io page: https://npm.io/package/@terra-money/use-wallet

## Dependencies (2)

- [@terra-money/feather.js](https://npm.io/package/@terra-money/feather.js.md) ^1.0.0-beta.4
- [@terra-money/wallet-types](https://npm.io/package/@terra-money/wallet-types.md) ^4.0.1

## Recent versions

- 4.0.1 (latest) — 2023-08-25
- 4.0.0-beta.4 (beta) — 2023-03-08
- 3.11.2 (legacy) — 2022-10-28
- 3.10.0-alpha.1 (alpha) — 2022-08-10
- 4.0.0 — 2023-03-09
- 4.0.0-beta.3 — 2022-12-14
- 4.0.0-beta.2 — 2022-12-09
- 4.0.0-beta.1 — 2022-12-09
- 4.0.0-beta.0 — 2022-12-07
- 3.11.1 — 2022-08-25
- 3.11.0 — 2022-08-18
- 3.9.4 — 2022-05-30
- 3.9.3 — 2022-05-29
- 3.9.2 — 2022-05-26
- 3.9.1 — 2022-05-24
- … 30 more at https://npm.io/package/@terra-money/use-wallet/versions

## README

# `@terra-money/use-wallet`

Core interface of [`@terra-money/wallet-provider`](https://www.npmjs.com/package/@terra-money/wallet-provider).

If you want to create a library using the `useWallet()` of `@terra-money/wallet-provider`, you can use
this `@terra-money/use-wallet` instead of `@terra-money/wallet-provider` for its internal dependence.

Because `@terra-money/wallet-provider` contains multiple implementations, if your library is built
on `@terra-money/wallet-provider`, problems can arise in exceptional situations (e.g. when users implement and use
Context themselves).

Using `@terra-money/use-wallet` instead of `@terra-money/wallet-provider` can make your library work reliably in a more
diverse set of implementations.

You don't have to use this library if you're just creating a WebApp. Use `@terra-money/wallet-provider`.

# APIs

- React context and hooks
  - `const WalletContext = React.createContext()`
  - `useWallet(): Wallet`
  - `useConnectedWallet(): ConnectedWallet`
- Types
  - `enum WalletStatus`
  - `enum ConnectType`
  - `type WalletInfo`
  - `type WalletStates`
  - `type NetworkInfo`
  - `type TxResult extends CreateTxOptions`
  - `type SignResult extends CreateTxOptions`
  - `type SignBytesResult`
- Error types
  - `class UserDenied extends Error`
  - `class CreateTxFailed extends Error`
  - `class TxFailed extends Error`
  - `class Timeout extends Error`
  - `class TxUnspecifiedError extends Error`

---
_Source: https://npm.io/package/@terra-money/use-wallet · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
