@talismn/balances-react 0.6.1 → 0.7.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.
Files changed (37) hide show
  1. package/dist/declarations/src/atoms/allAddresses.d.ts +4 -0
  2. package/dist/declarations/src/atoms/balanceModules.d.ts +2 -0
  3. package/dist/declarations/src/atoms/balances.d.ts +6 -0
  4. package/dist/declarations/src/atoms/chainConnectors.d.ts +2 -0
  5. package/dist/declarations/src/atoms/chaindata.d.ts +34 -0
  6. package/dist/declarations/src/atoms/chaindataProvider.d.ts +5 -0
  7. package/dist/declarations/src/atoms/config.d.ts +18 -0
  8. package/dist/declarations/src/atoms/cryptoWaitReady.d.ts +1 -0
  9. package/dist/declarations/src/atoms/tokenRates.d.ts +3 -0
  10. package/dist/declarations/src/hooks/useBalances.d.ts +27 -3
  11. package/dist/declarations/src/hooks/useChainConnectors.d.ts +1 -12
  12. package/dist/declarations/src/hooks/useChaindata.d.ts +23 -7
  13. package/dist/declarations/src/hooks/useTokenRates.d.ts +4 -2
  14. package/dist/declarations/src/index.d.ts +80 -2
  15. package/dist/declarations/src/util/balancesPersist.d.ts +10 -0
  16. package/dist/declarations/src/util/dexieToRxjs.d.ts +6 -0
  17. package/dist/talismn-balances-react.cjs.dev.js +603 -631
  18. package/dist/talismn-balances-react.cjs.prod.js +603 -631
  19. package/dist/talismn-balances-react.esm.js +547 -611
  20. package/package.json +30 -24
  21. package/CHANGELOG.md +0 -477
  22. package/dist/declarations/src/hooks/index.d.ts +0 -49
  23. package/dist/declarations/src/hooks/useAllAddresses.d.ts +0 -4
  24. package/dist/declarations/src/hooks/useBalanceModules.d.ts +0 -8
  25. package/dist/declarations/src/hooks/useBalancesHydrate.d.ts +0 -1
  26. package/dist/declarations/src/hooks/useBalancesStatus.d.ts +0 -17
  27. package/dist/declarations/src/hooks/useChains.d.ts +0 -3
  28. package/dist/declarations/src/hooks/useDbCache.d.ts +0 -24
  29. package/dist/declarations/src/hooks/useDbCacheSubscription.d.ts +0 -13
  30. package/dist/declarations/src/hooks/useEnabledChains.d.ts +0 -8
  31. package/dist/declarations/src/hooks/useEvmNetworks.d.ts +0 -3
  32. package/dist/declarations/src/hooks/useTokens.d.ts +0 -3
  33. package/dist/declarations/src/hooks/useWithTestnets.d.ts +0 -8
  34. package/dist/declarations/src/util/index.d.ts +0 -2
  35. package/dist/declarations/src/util/provideContext.d.ts +0 -9
  36. package/dist/declarations/src/util/useMulticastSubscription.d.ts +0 -16
  37. package/dist/declarations/src/util/useSharedSubscription.d.ts +0 -9
@@ -1,3 +0,0 @@
1
- import { EvmNetworkId } from "@talismn/chaindata-provider";
2
- export declare function useEvmNetworks(withTestnets?: boolean): Record<string, import("@talismn/chaindata-provider").EvmNetwork | import("@talismn/chaindata-provider").CustomEvmNetwork>;
3
- export declare function useEvmNetwork(evmNetworkId?: EvmNetworkId, withTestnets?: boolean): import("@talismn/chaindata-provider").EvmNetwork | undefined;
@@ -1,3 +0,0 @@
1
- import { TokenId } from "@talismn/chaindata-provider";
2
- export declare function useTokens(withTestnets?: boolean): Record<string, import("@talismn/chaindata-provider").IToken>;
3
- export declare function useToken(tokenId?: TokenId, withTestnets?: boolean): import("@talismn/chaindata-provider").IToken | undefined;
@@ -1,8 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const WithTestnetsProvider: import("react").FC<{
3
- withTestnets?: boolean | undefined;
4
- } & {
5
- children?: import("react").ReactNode;
6
- }>, useWithTestnets: () => {
7
- withTestnets: boolean | undefined;
8
- };
@@ -1,2 +0,0 @@
1
- export * from "./provideContext";
2
- export * from "./useMulticastSubscription";
@@ -1,9 +0,0 @@
1
- import { FC, ReactNode } from "react";
2
- /**
3
- * This utility generates a context provider from a react hook passed as argument
4
- *
5
- * @returns an array containing the provider and the consumer hook
6
- */
7
- export declare const provideContext: <P, T>(useProviderContext: (props: P) => T) => [FC<P & {
8
- children?: ReactNode;
9
- }>, () => T];
@@ -1,16 +0,0 @@
1
- export type Unsubscribe = () => void;
2
- /**
3
- * Creates a subscription function that can be used to subscribe to a multicast observable created from an upstream source.
4
- *
5
- * An example of when this is useful is when we want to subscribe to some data from multiple components, but we only want
6
- * to actively keep that data hydrated when at least one component is subscribed to it.
7
- *
8
- * When the first component subscribes, the `upstream` function will be called. It should then set up a subscription and return a teardown function.
9
- * When subsequent components subscribe, they will be added to the existing subscription.
10
- * When the last component unsubscribes, the teardown function returned from the `upstream` function will be called.
11
- *
12
- * @param upstream A function that takes a "next" callback function as an argument, and returns either an unsubscribe function or void.
13
- * @returns A subscription function that can be used to subscribe to the multicast observable.
14
- */
15
- export declare const useMulticastSubscription: <T>(upstream: (next: (val: T) => void) => Unsubscribe | void) => (callback?: ((val: T) => void) | undefined) => Unsubscribe;
16
- export declare const createMulticastSubscription: <T>(upstream: (next: (val: T) => void) => Unsubscribe | void) => (callback?: ((val: T) => void) | undefined) => Unsubscribe;
@@ -1,9 +0,0 @@
1
- type UnsubscribeFn = () => void;
2
- type InitSubscriptionCallback = () => UnsubscribeFn;
3
- /**
4
- * This hook ensures a subscription is created only once, and unsubscribe automatically as soon as there is no consumer to the hook
5
- * @param key key that is unique to the subscription's parameters
6
- * @param subscribe // subscribe function that will be shared by all consumers of the key
7
- */
8
- export declare const useSharedSubscription: (key: string, subscribe: InitSubscriptionCallback) => void;
9
- export {};