# @xlabs-libs/wallet-aggregator-injective

> Implements the base abstractions for the Injective blockchain.

Latest version **0.0.1-alpha.17** (published 2024-04-01) · MIT license · 0 weekly downloads

## Install

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

## 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.17 |
| Published | 2024-04-01 |
| First published | 2023-01-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 6 |
| Unpacked size | 87.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 13 |
| Maintainers | sebastianscatularo, yuliferna, mpicco, mpicco-randlabs |

## Links

- npm: https://www.npmjs.com/package/@xlabs-libs/wallet-aggregator-injective
- 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-injective

## Dependencies (6)

- [@injectivelabs/sdk-ts](https://npm.io/package/@injectivelabs/sdk-ts.md) 1.14.7
- [@injectivelabs/networks](https://npm.io/package/@injectivelabs/networks.md) 1.14.6
- [@injectivelabs/ts-types](https://npm.io/package/@injectivelabs/ts-types.md) 1.14.4
- [@injectivelabs/chain-api](https://npm.io/package/@injectivelabs/chain-api.md) 1.9.24
- [@injectivelabs/wallet-ts](https://npm.io/package/@injectivelabs/wallet-ts.md) 1.14.4
- [@xlabs-libs/wallet-aggregator-core](https://npm.io/package/@xlabs-libs/wallet-aggregator-core.md) ^0.0.1-alpha.18

## Recent versions

- 0.0.1-alpha.17 (latest) — 2024-04-01
- 0.0.1-alpha.16 — 2024-01-04
- 0.0.1-alpha.15 — 2023-12-11
- 0.0.1-alpha.14 — 2023-07-18
- 0.0.1-alpha.13 — 2023-07-10
- 0.0.1-alpha.12 — 2023-05-01
- 0.0.1-alpha.11 — 2023-04-20
- 0.0.1-alpha.10 — 2023-03-07
- 0.0.1-alpha.9 — 2023-02-13
- 0.0.1-alpha.8 — 2023-02-10
- 0.0.1-alpha.7 — 2023-02-10
- 0.0.1-alpha.6 — 2023-02-02
- 0.0.1-alpha.5 — 2023-01-30
- 0.0.1-alpha.4 — 2023-01-26

## README

## Wallet Aggregator - Injective

Implements the base abstractions for the Injective blockchain.

### Usage

Under the hood the wallet relies on the `WalletSelector` class provided by the `@injectivelabs/wallet-ts` package, which acts as a façade with multiple strategies behind it, one for each method of connecting. So, while the generic class is `InjectiveWallet`, we inject the type of wallet we want to connect to through a constructor parameter.

For now, the only supported types are Keplr and Cosmostation.

```ts
import { ChainId as InjectiveChainId } from "@injectivelabs/ts-types";
import { getNetworkInfo, Network } from "@injectivelabs/networks";
import { InjectiveWallet } from "@xlabs-libs/wallet-aggregator-injective";

const network = InjectiveChainId.Mainnet;
const networkInfo = getNetworkInfo(Network.MainnetK8s);

const opts = {
  networkChainId: network,
  broadcasterOptions: {
    network,
    endpoints: {
      indexerApi: networkInfo.indexerApi,
      sentryGrpcApi: networkInfo.sentryGrpcApi,
      sentryHttpApi: networkInfo.sentryHttpApi,
    },
  },
};

const keplr = new InjectiveWallet({
  ...opts,
  type: InjectiveWalletType.Keplr,
});
const cosmostation = new InjectiveWallet({
  ...opts,
  type: InjectiveWalletType.Cosmostation,
});
```

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