@cryptorubic/web3 1.1.0-alpha-stellar.27 → 1.1.0-alpha-stellar.29

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cryptorubic/web3",
3
- "version": "1.1.0-alpha-stellar.27",
3
+ "version": "1.1.0-alpha-stellar.29",
4
4
  "dependencies": {
5
5
  "@ethersproject/bignumber": "^5.8.0",
6
6
  "@mysten/sui": "^1.24.0",
@@ -32,7 +32,7 @@ class BlockchainAdapterFactoryService {
32
32
  // @TODO Add default logger
33
33
  const loggerFn = params.createLogger || undefined;
34
34
  const resolvedHttpClient = params.httpClient ?? (await Promise.resolve().then(() => require('axios')));
35
- return new this(params.rpcList, resolvedHttpClient, params.createLogger, params.tonParams, params.clientParams);
35
+ return new this(params.rpcList, resolvedHttpClient, params.createLogger, params.tonParams, params.clientParams, params.stellarParams);
36
36
  }
37
37
  getAdapter(blockchain) {
38
38
  const adapter = this.adapterStore?.[blockchain];
@@ -82,9 +82,6 @@ class BlockchainAdapterFactoryService {
82
82
  if (blockchainType === core_1.CHAIN_TYPE.SOLANA) {
83
83
  return new solana_adapter_1.SolanaAdapter(rpcs, this.httpClient, this.createLogger?.(`SOLANA_ADAPTER`), this.clientParams);
84
84
  }
85
- if (blockchain === core_1.BLOCKCHAIN_NAME.STELLAR && this.stellarParams) {
86
- return new stellar_adapter_1.StellarAdapter(this.stellarParams, this.httpClient, this.logger, this.clientParams);
87
- }
88
85
  }
89
86
  if (blockchain === core_1.BLOCKCHAIN_NAME.TON && this.tonParams?.tonApiConfig && this.tonParams?.tonClientConfig) {
90
87
  return new ton_adapter_1.TonAdapter(this.httpClient, this.tonParams, this.createLogger?.(`TON_ADAPTER`), this.clientParams);
@@ -92,6 +89,9 @@ class BlockchainAdapterFactoryService {
92
89
  if (blockchain === core_1.BLOCKCHAIN_NAME.BITCOIN && this.httpClient) {
93
90
  return new bitcoin_adapter_1.BitcoinAdapter(this.httpClient, this.createLogger?.(`BTC_ADAPTER`), this.clientParams);
94
91
  }
92
+ if (blockchain === core_1.BLOCKCHAIN_NAME.STELLAR && this.stellarParams) {
93
+ return new stellar_adapter_1.StellarAdapter(this.stellarParams, this.httpClient, this.logger, this.clientParams);
94
+ }
95
95
  return null;
96
96
  }
97
97
  connectWallet(blockchain, wallet) {
@@ -3,6 +3,7 @@ import { EnvType } from '../constants/models/env-type';
3
3
  import { TronWebProvider } from '../adapters/adapter-tron/models/tron-web-provider';
4
4
  import { TonAdapterConfig } from '../adapters/models/ton-adapter-config';
5
5
  import { FallbackTransportConfig, HttpTransportConfig } from 'viem';
6
+ import { StellarProviderUrl } from '../adapters/adapter-stellar/models/stellar-provider-url';
6
7
  export type RpcListType = Record<EvmBlockchainName, string[]> & Record<TronBlockchainName, TronWebProvider[]> & Record<SolanaBlockchainName, string[]> & Record<SuiBlockchainName, string[]>;
7
8
  export interface AdapterFactoryParams {
8
9
  rpcList: RpcListType;
@@ -10,6 +11,7 @@ export interface AdapterFactoryParams {
10
11
  tonParams?: TonAdapterConfig;
11
12
  createLogger?: (label: string) => ICustomLogger;
12
13
  clientParams?: ClientAdaptersFactoryParams;
14
+ stellarParams: StellarProviderUrl;
13
15
  }
14
16
  export interface ClientAdaptersFactoryParams {
15
17
  envType: EnvType;