@cowprotocol/widget-lib 0.11.0 → 0.13.1

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.
@@ -1,4 +1,5 @@
1
- import { CowEventListeners } from '@cowprotocol/events';
1
+ import { CowEventListeners } from '../../events/src/index.ts';
2
+
2
3
  export declare class IframeCowEventEmitter {
3
4
  private contentWindow;
4
5
  private eventEmitter;
@@ -1,4 +1,5 @@
1
1
  import { EthereumProvider, JsonRpcRequestMessage } from './types';
2
+
2
3
  /**
3
4
  * Handles JSON-RPC request comming from an iFrame by delegating to a given Ethereum provider.
4
5
  * The result will be passed back to the iFrame.
@@ -1,5 +1,6 @@
1
- import { CowEventListeners } from '@cowprotocol/events';
2
1
  import { CowSwapWidgetParams, CowSwapWidgetProps, EthereumProvider } from './types';
2
+ import { CowEventListeners } from '../../events/src/index.ts';
3
+
3
4
  /**
4
5
  * Callback function signature for updating the CoW Swap Widget.
5
6
  */
@@ -0,0 +1,6 @@
1
+ import { FlexibleConfig, PerNetworkConfig, PerTradeTypeConfig, TradeType } from './types';
2
+ import { SupportedChainId } from '@cowprotocol/cow-sdk';
3
+
4
+ export declare function resolveFlexibleConfig<T extends string | number>(config: FlexibleConfig<T>, chainId: SupportedChainId, tradeType: TradeType): T | undefined;
5
+ export declare function isPerTradeTypeConfig<T>(config: FlexibleConfig<T>): config is PerTradeTypeConfig<T>;
6
+ export declare function isPerNetworkConfig<T>(config: FlexibleConfig<T>): config is PerNetworkConfig<T>;
package/index.d.ts CHANGED
@@ -3,3 +3,4 @@ export type { CowSwapWidgetHandler } from './cowSwapWidget';
3
3
  export * from './types';
4
4
  export * from './messages';
5
5
  export * from './themeUtils';
6
+ export * from './flexibleConfig';