@sodax/wallet-sdk-react 0.0.1-rc.2 → 0.0.1-rc.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -7,7 +7,8 @@ import { Connector } from 'wagmi';
7
7
  import { IconService } from 'icon-sdk-js';
8
8
  import { IndexerGrpcAccountPortfolioApi, ChainGrpcWasmApi } from '@injectivelabs/sdk-ts';
9
9
  import * as _injectivelabs_wallet_core from '@injectivelabs/wallet-core';
10
- import { BaseWalletStrategy, MsgBroadcaster } from '@injectivelabs/wallet-core';
10
+ import { MsgBroadcaster } from '@injectivelabs/wallet-core';
11
+ import { WalletStrategy } from '@injectivelabs/wallet-strategy';
11
12
  import { Connection } from '@solana/web3.js';
12
13
  import { AnchorProvider } from '@coral-xyz/anchor';
13
14
  import { WalletContextState } from '@solana/wallet-adapter-react';
@@ -1116,7 +1117,7 @@ declare class IconHanaXConnector extends XConnector {
1116
1117
 
1117
1118
  declare class InjectiveXService extends XService {
1118
1119
  private static instance;
1119
- walletStrategy: BaseWalletStrategy;
1120
+ walletStrategy: WalletStrategy;
1120
1121
  indexerGrpcAccountPortfolioApi: IndexerGrpcAccountPortfolioApi;
1121
1122
  chainGrpcWasmApi: ChainGrpcWasmApi;
1122
1123
  msgBroadcaster: MsgBroadcaster;
package/dist/index.d.ts CHANGED
@@ -7,7 +7,8 @@ import { Connector } from 'wagmi';
7
7
  import { IconService } from 'icon-sdk-js';
8
8
  import { IndexerGrpcAccountPortfolioApi, ChainGrpcWasmApi } from '@injectivelabs/sdk-ts';
9
9
  import * as _injectivelabs_wallet_core from '@injectivelabs/wallet-core';
10
- import { BaseWalletStrategy, MsgBroadcaster } from '@injectivelabs/wallet-core';
10
+ import { MsgBroadcaster } from '@injectivelabs/wallet-core';
11
+ import { WalletStrategy } from '@injectivelabs/wallet-strategy';
11
12
  import { Connection } from '@solana/web3.js';
12
13
  import { AnchorProvider } from '@coral-xyz/anchor';
13
14
  import { WalletContextState } from '@solana/wallet-adapter-react';
@@ -1116,7 +1117,7 @@ declare class IconHanaXConnector extends XConnector {
1116
1117
 
1117
1118
  declare class InjectiveXService extends XService {
1118
1119
  private static instance;
1119
- walletStrategy: BaseWalletStrategy;
1120
+ walletStrategy: WalletStrategy;
1120
1121
  indexerGrpcAccountPortfolioApi: IndexerGrpcAccountPortfolioApi;
1121
1122
  chainGrpcWasmApi: ChainGrpcWasmApi;
1122
1123
  msgBroadcaster: MsgBroadcaster;
package/dist/index.mjs CHANGED
@@ -6,9 +6,9 @@ import { LIGHTLINK_MAINNET_CHAIN_ID, HYPEREVM_MAINNET_CHAIN_ID, NIBIRU_MAINNET_C
6
6
  import { IconService, Builder, Converter } from 'icon-sdk-js';
7
7
  import { getNetworkEndpoints, Network } from '@injectivelabs/networks';
8
8
  import { IndexerGrpcAccountPortfolioApi, ChainGrpcWasmApi, getInjectiveAddress } from '@injectivelabs/sdk-ts';
9
- import { ChainId, EvmChainId } from '@injectivelabs/ts-types';
10
- import { EvmWalletStrategy } from '@injectivelabs/wallet-evm';
11
- import { BaseWalletStrategy, MsgBroadcaster } from '@injectivelabs/wallet-core';
9
+ import { ChainId } from '@injectivelabs/ts-types';
10
+ import { MsgBroadcaster } from '@injectivelabs/wallet-core';
11
+ import { WalletStrategy } from '@injectivelabs/wallet-strategy';
12
12
  import { Wallet, isEvmBrowserWallet } from '@injectivelabs/wallet-base';
13
13
  import { isCosmosWalletInstalled } from '@injectivelabs/wallet-cosmos';
14
14
  import { PublicKey } from '@solana/web3.js';
@@ -541,21 +541,12 @@ var InjectiveXService = class _InjectiveXService extends XService {
541
541
  constructor() {
542
542
  super("INJECTIVE");
543
543
  const endpoints = getNetworkEndpoints(Network.Mainnet);
544
- this.walletStrategy = new BaseWalletStrategy({
544
+ this.walletStrategy = new WalletStrategy({
545
545
  chainId: ChainId.Mainnet,
546
- strategies: {
547
- [Wallet.Metamask]: new EvmWalletStrategy({
548
- chainId: ChainId.Mainnet,
549
- wallet: Wallet.Metamask,
550
- evmOptions: {
551
- evmChainId: EvmChainId.Mainnet,
552
- rpcUrl: mainnet.rpcUrls.default.http[0]
553
- }
554
- })
555
- // [Wallet.Keplr]: new CosmosWalletStrategy({
556
- // chainId: InjectiveChainId.Mainnet,
557
- // wallet: Wallet.Keplr,
558
- // }),
546
+ strategies: {},
547
+ evmOptions: {
548
+ evmChainId: mainnet.id,
549
+ rpcUrl: mainnet.rpcUrls.default.http[0]
559
550
  }
560
551
  });
561
552
  this.indexerGrpcAccountPortfolioApi = new IndexerGrpcAccountPortfolioApi(endpoints.indexer);
@@ -979,7 +970,7 @@ var initXServices = (config) => {
979
970
  break;
980
971
  case "INJECTIVE":
981
972
  xServices[xChainType] = InjectiveXService.getInstance();
982
- xServices[xChainType].setXConnectors([new InjectiveMetamaskXConnector()]);
973
+ xServices[xChainType].setXConnectors([new InjectiveMetamaskXConnector(), new InjectiveKelprXConnector()]);
983
974
  break;
984
975
  case "STELLAR":
985
976
  xServices[xChainType] = StellarXService.getInstance();