graz 0.0.42-alpha.1 → 0.0.42-alpha.2

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,7 +1,7 @@
1
1
  {
2
2
  "name": "graz",
3
3
  "description": "React hooks for Cosmos",
4
- "version": "0.0.42-alpha.1",
4
+ "version": "0.0.42-alpha.2",
5
5
  "author": "Griko Nibras <griko@strange.love>",
6
6
  "repository": "https://github.com/strangelove-ventures/graz.git",
7
7
  "homepage": "https://github.com/strangelove-ventures/graz",
@@ -1,14 +1,20 @@
1
1
  /* eslint-disable */
2
- import type { Chain } from "../dist";
2
+ import type { ChainInfo } from "@keplr-wallet/types";
3
+ import type { AssetList, Chain } from "../dist";
3
4
  export type ChainName = "REPLACE_ME_PLS";
4
- type ReturnTupleChainName<T> = T extends readonly [ChainName, ...infer Rest]
5
- ? [Chain, ...ReturnTupleChainName<Rest>]
5
+ export interface ChainData {
6
+ assetlist: AssetList;
7
+ chain: Chain;
8
+ chainInfo: ChainInfo;
9
+ }
10
+ type ReturnTuple<T> = T extends readonly [ChainName, ...infer Rest]
11
+ ? [ChainData, ...ReturnTuple<Rest>]
6
12
  : [];
7
13
  export const mainnetChains: Record<ChainName, Chain>;
8
14
  export const testnetChains: Record<ChainName, Chain>;
9
15
  export const mainnetChainNames: ChainName[];
10
16
  export const testnetChainNames: ChainName[];
11
- export const getChainData: <T extends ChainName>(chainName: T | T[]) => Record<T, Chain>;
17
+ export const getChainData: <T extends ChainName>(chainName: T | T[]) => Record<T, ChainData>;
12
18
  export const getChainDataArray: <T extends ChainName, const U extends T | readonly T[]>(
13
19
  chainName: U,
14
- ) => U extends T ? [Chain] : U extends readonly T[] ? ReturnTupleChainName<U> : never;
20
+ ) => U extends T ? [ChainData] : U extends readonly T[] ? ReturnTuple<U> : never;