Socket
Book a DemoInstallSign in
Socket

@xlabs-libs/wallet-aggregator-xpla

Package Overview
Dependencies
Maintainers
2
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@xlabs-libs/wallet-aggregator-xpla

Implements the base abstractions for the [Xpla](https://xpla.io) blockchain.

latest
Source
npmnpm
Version
0.0.1-alpha.7
Version published
Maintainers
2
Created
Source

Wallet Aggregator - Xpla

Implements the base abstractions for the Xpla blockchain.

Usage

Under the hood, the XplaWallet class uses the WalletController class provider through @xpla/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.

import { ConnectType } from "@xpla-money/wallet-provider";
import {
  getWallets as getXplaWallets,
  XplaWallet,
} from "@xlabs-libs/wallet-aggregator-xpla";

const ignoredTypes = [ConnectType.READONLY];
const wallets: XplaWallet[] = await getXplaWallets(ignoredTypes);

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

FAQs

Package last updated on 18 Jul 2023

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