# @xlabs-libs/wallet-aggregator-terra

> Implements the base abstractions for the [Terra](https://terra.money) blockchain.

Latest version **0.0.1-alpha.7** (published 2023-07-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install @xlabs-libs/wallet-aggregator-terra
pnpm add @xlabs-libs/wallet-aggregator-terra
yarn add @xlabs-libs/wallet-aggregator-terra
bun add @xlabs-libs/wallet-aggregator-terra
```

## Health

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

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1-alpha.7 |
| Published | 2023-07-18 |
| First published | 2023-02-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 4 |
| Unpacked size | 37.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | mpicco, mpicco-randlabs |

## Links

- npm: https://www.npmjs.com/package/@xlabs-libs/wallet-aggregator-terra
- Repository: https://github.com/XLabs/wallet-aggregator-sdk.git#master
- Homepage: https://github.com/XLabs/wallet-aggregator-sdk/tree/master#readme
- Issues: https://github.com/XLabs/wallet-aggregator-sdk/issues
- npm.io page: https://npm.io/package/@xlabs-libs/wallet-aggregator-terra

## Dependencies (4)

- [rxjs](https://npm.io/package/rxjs.md) ^7.5.7
- [@terra-money/terra.js](https://npm.io/package/@terra-money/terra.js.md) ^3.1.7
- [@terra-money/wallet-provider](https://npm.io/package/@terra-money/wallet-provider.md) ^3.11.2
- [@xlabs-libs/wallet-aggregator-core](https://npm.io/package/@xlabs-libs/wallet-aggregator-core.md) ^0.0.1-alpha.17

## Recent versions

- 0.0.1-alpha.7 (latest) — 2023-07-18
- 0.0.1-alpha.6 — 2023-07-10
- 0.0.1-alpha.5 — 2023-04-20
- 0.0.1-alpha.4 — 2023-03-20
- 0.0.1-alpha.3 — 2023-03-15
- 0.0.1-alpha.2 — 2023-02-24
- 0.0.1-alpha.1 — 2023-02-21

## README

## Wallet Aggregator - Terra

Implements the base abstractions for the [Terra](https://terra.money) blockchain.

### Usage

Under the hood, the TerraWallet class uses the `WalletController` class provider through `@terra-money/wallet-provider`, which itself is a façade over the different types of wallets. Wallet detection might prove tricky, since the model adopted by the library is reactive (through `rxjs`), so in order to build the wallets a `getWallets` utility function is provided. The process it detects wallets through is by hooking into an observable provided by the library, and waiting a brief time until it stops emitting the available wallets; after timing out, it returns whatever wallets were detected.

```ts
import { ConnectType } from "@terra-money/wallet-provider";
import {
  getWallets as getTerraWallets,
  TerraWallet,
} from "@xlabs-libs/wallet-aggregator-terra";

const ignoredTypes = [ConnectType.READONLY];
const wallets: TerraWallet[] = await getTerraWallets(ignoredTypes);

const wallet = wallets[0];
await wallet.connect();
```

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