0.0.1-alpha.17 • Published 9 months ago
@xlabs-libs/wallet-aggregator-injective v0.0.1-alpha.17
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,
});
0.0.1-alpha.17
9 months ago
0.0.1-alpha.16
12 months ago
0.0.1-alpha.15
1 year ago
0.0.1-alpha.14
1 year ago
0.0.1-alpha.13
1 year ago
0.0.1-alpha.12
2 years ago
0.0.1-alpha.11
2 years ago
0.0.1-alpha.10
2 years ago
0.0.1-alpha.9
2 years ago
0.0.1-alpha.8
2 years ago
0.0.1-alpha.7
2 years ago
0.0.1-alpha.6
2 years ago
0.0.1-alpha.5
2 years ago
0.0.1-alpha.4
2 years ago