0.0.1-alpha.7 • Published 2 years ago
@xlabs-libs/wallet-aggregator-xpla v0.0.1-alpha.7
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();0.0.1-alpha.6
2 years ago
0.0.1-alpha.7
2 years ago
0.0.1-alpha.4
3 years ago
0.0.1-alpha.5
3 years ago
0.0.1-alpha.3
3 years ago
0.0.1-alpha.2
3 years ago
0.0.1-alpha.1
3 years ago