@talismn/balances-react 0.0.0-pr593-20230303151944 → 0.0.0-pr595-20230305120713

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/CHANGELOG.md CHANGED
@@ -1,15 +1,16 @@
1
1
  # @talismn/balances-react
2
2
 
3
- ## 0.0.0-pr593-20230303151944
3
+ ## 0.0.0-pr595-20230305120713
4
4
 
5
5
  ### Patch Changes
6
6
 
7
- - 6643a4e: fix: tokenRates in @talismn/balances-react
8
- - 6643a4e: fix: ported useDbCache related perf fixes to @talismn/balances-react
9
- - Updated dependencies [6643a4e]
10
- - Updated dependencies [6643a4e]
11
- - @talismn/token-rates@0.0.0-pr593-20230303151944
12
- - @talismn/balances@0.0.0-pr593-20230303151944
7
+ - Updated dependencies [87a1348]
8
+ - @talismn/chaindata-provider-extension@0.0.0-pr595-20230305120713
9
+ - @talismn/chaindata-provider@0.0.0-pr595-20230305120713
10
+ - @talismn/balances@0.0.0-pr595-20230305120713
11
+ - @talismn/chain-connector@0.0.0-pr595-20230305120713
12
+ - @talismn/chain-connector-evm@0.0.0-pr595-20230305120713
13
+ - @talismn/token-rates@0.0.0-pr595-20230305120713
13
14
 
14
15
  ## 0.3.3
15
16
 
@@ -1,21 +1,3 @@
1
- export * from "./useAllAddresses";
2
- export * from "./useBalanceModules";
3
1
  export * from "./useBalances";
4
- export * from "./useBalancesHydrate";
5
- export * from "./useChainConnectors";
6
2
  export * from "./useChaindata";
7
- export * from "./useChains";
8
- export * from "./useDbCache";
9
- export * from "./useDbCacheSubscription";
10
- export * from "./useEvmNetworks";
11
3
  export * from "./useTokenRates";
12
- export * from "./useTokens";
13
- import { BalanceModule } from "@talismn/balances";
14
- import { ReactNode } from "react";
15
- export type BalancesProviderProps = {
16
- balanceModules: Array<BalanceModule<any, any, any, any, any>>;
17
- onfinalityApiKey?: string;
18
- useTestnets?: boolean;
19
- children?: ReactNode;
20
- };
21
- export declare const BalancesProvider: ({ balanceModules, onfinalityApiKey, useTestnets, children, }: BalancesProviderProps) => JSX.Element;
@@ -1,3 +1,6 @@
1
- import { AddressesByToken, Balances } from "@talismn/balances";
2
- import { Token } from "@talismn/chaindata-provider";
3
- export declare function useBalances(addressesByToken: AddressesByToken<Token> | null): Balances;
1
+ import { AddressesByToken, BalanceModule, Balances } from "@talismn/balances";
2
+ import { ChaindataProvider, Token } from "@talismn/chaindata-provider";
3
+ export type Options = {
4
+ onfinalityApiKey?: string;
5
+ };
6
+ export declare function useBalances(balanceModules: Array<BalanceModule<any, any, any, any>>, chaindataProvider: ChaindataProvider | null, addressesByToken: AddressesByToken<Token> | null, options?: Options): Balances | undefined;
@@ -1,8 +1,25 @@
1
- /// <reference types="react" />
2
- import { ChaindataProvider as Chaindata } from "@talismn/chaindata-provider";
3
- export type ChaindataProviderOptions = {
1
+ import { Chain, ChainId, ChainList, ChaindataProvider, EvmNetwork, EvmNetworkId, EvmNetworkList, Token, TokenId, TokenList } from "@talismn/chaindata-provider";
2
+ export type Options = {
4
3
  onfinalityApiKey?: string;
5
4
  };
6
- export declare const ChaindataProvider: import("react").FC<ChaindataProviderOptions & {
7
- children?: import("react").ReactNode;
8
- }>, useChaindata: () => Chaindata | undefined;
5
+ export declare function useChaindata(options?: Options): (ChaindataProvider & {
6
+ generation?: number | undefined;
7
+ }) | null;
8
+ export declare function useChains(chaindata: (ChaindataProvider & {
9
+ generation?: number;
10
+ }) | null): ChainList;
11
+ export declare function useChain(chaindata: (ChaindataProvider & {
12
+ generation?: number;
13
+ }) | null, chainId?: ChainId): Chain | null | undefined;
14
+ export declare function useEvmNetworks(chaindata: (ChaindataProvider & {
15
+ generation?: number;
16
+ }) | null): EvmNetworkList;
17
+ export declare function useEvmNetwork(chaindata: (ChaindataProvider & {
18
+ generation?: number;
19
+ }) | null, evmNetworkId?: EvmNetworkId): EvmNetwork | null | undefined;
20
+ export declare function useTokens(chaindata: (ChaindataProvider & {
21
+ generation?: number;
22
+ }) | null): TokenList;
23
+ export declare function useToken(chaindata: (ChaindataProvider & {
24
+ generation?: number;
25
+ }) | null, tokenId?: TokenId): Token | null | undefined;
@@ -1,3 +1,3 @@
1
- import { TokenId } from "@talismn/chaindata-provider";
2
- export declare function useTokenRates(): Record<string, import("@talismn/token-rates").TokenRates>;
3
- export declare function useTokenRate(tokenId?: TokenId): import("@talismn/token-rates").TokenRates | undefined;
1
+ import { IToken, TokenId } from "@talismn/chaindata-provider";
2
+ import { TokenRatesList } from "@talismn/token-rates";
3
+ export declare function useTokenRates(tokens?: Record<TokenId, IToken>): TokenRatesList;
@@ -1,2 +1 @@
1
1
  export * from "./hooks";
2
- export * from "./util";