@merkl/api 0.10.291 → 0.10.293

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.
@@ -1802,10 +1802,12 @@ declare const eden: {
1802
1802
  fetch?: RequestInit | undefined;
1803
1803
  } | undefined) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
1804
1804
  200: {
1805
- live: string;
1806
- tree: string;
1807
- lastTree: string;
1808
- }[];
1805
+ [x: number]: {
1806
+ live: string;
1807
+ tree: string;
1808
+ lastTree: string;
1809
+ };
1810
+ };
1809
1811
  }>>;
1810
1812
  };
1811
1813
  engine: {
@@ -5031,10 +5033,12 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
5031
5033
  headers: unknown;
5032
5034
  response: {
5033
5035
  200: {
5034
- live: string;
5035
- tree: string;
5036
- lastTree: string;
5037
- }[];
5036
+ [x: number]: {
5037
+ live: string;
5038
+ tree: string;
5039
+ lastTree: string;
5040
+ };
5041
+ };
5038
5042
  };
5039
5043
  };
5040
5044
  };
@@ -8162,10 +8166,12 @@ export declare const MerklApi: (domain: string | import("elysia").default<"", fa
8162
8166
  fetch?: RequestInit | undefined;
8163
8167
  } | undefined) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
8164
8168
  200: {
8165
- live: string;
8166
- tree: string;
8167
- lastTree: string;
8168
- }[];
8169
+ [x: number]: {
8170
+ live: string;
8171
+ tree: string;
8172
+ lastTree: string;
8173
+ };
8174
+ };
8169
8175
  }>>;
8170
8176
  };
8171
8177
  engine: {
@@ -2214,10 +2214,12 @@ declare const app: Elysia<"", false, {
2214
2214
  headers: unknown;
2215
2215
  response: {
2216
2216
  200: {
2217
- live: string;
2218
- tree: string;
2219
- lastTree: string;
2220
- }[];
2217
+ [x: number]: {
2218
+ live: string;
2219
+ tree: string;
2220
+ lastTree: string;
2221
+ };
2222
+ };
2221
2223
  };
2222
2224
  };
2223
2225
  };
@@ -44,10 +44,12 @@ export declare const MerklRootController: Elysia<"/roots", false, {
44
44
  headers: unknown;
45
45
  response: {
46
46
  200: {
47
- live: string;
48
- tree: string;
49
- lastTree: string;
50
- }[];
47
+ [x: number]: {
48
+ live: string;
49
+ tree: string;
50
+ lastTree: string;
51
+ };
52
+ };
51
53
  };
52
54
  };
53
55
  };
@@ -25,11 +25,11 @@ export declare class MerklRootService {
25
25
  * @param chainIds to fetch roots for
26
26
  * @returns record of chains to object with live and last tree roots
27
27
  */
28
- static fetchAll(chainIds?: ChainId[]): Promise<{
28
+ static fetchAll(chainIds?: ChainId[]): Promise<Record<number, {
29
29
  live: string;
30
30
  tree: string;
31
31
  lastTree: string;
32
- }[]>;
32
+ }>>;
33
33
  static create(x: CreateRootModel): Promise<{
34
34
  timestamp: bigint;
35
35
  chainId: number;
@@ -31,7 +31,10 @@ export class MerklRootService {
31
31
  ids = ids.filter((_, index) => merkleRootsPromises[index].status === "fulfilled");
32
32
  const roots = merkleRootsPromises
33
33
  .filter(({ status }) => status === "fulfilled")
34
- .map(x => x.value);
34
+ .reduce((acc, promise, index) => {
35
+ acc[ids[index]] = promise.value;
36
+ return acc;
37
+ }, {});
35
38
  return roots;
36
39
  });
37
40
  }
@@ -2092,10 +2092,12 @@ export declare const v4: Elysia<"/v4", false, {
2092
2092
  headers: unknown;
2093
2093
  response: {
2094
2094
  200: {
2095
- live: string;
2096
- tree: string;
2097
- lastTree: string;
2098
- }[];
2095
+ [x: number]: {
2096
+ live: string;
2097
+ tree: string;
2098
+ lastTree: string;
2099
+ };
2100
+ };
2099
2101
  };
2100
2102
  };
2101
2103
  };