New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@xlabs-libs/wallet-aggregator-injective

Package Overview
Dependencies
Maintainers
4
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@xlabs-libs/wallet-aggregator-injective

Implements the base abstractions for the Injective blockchain.

  • 0.0.1-alpha.17
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
32
decreased by-49.21%
Maintainers
4
Weekly downloads
 
Created
Source

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.

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,
});

FAQs

Package last updated on 01 Apr 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc