@pythnetwork/hermes-client 1.0.4 → 1.2.0
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/LICENSE +1 -1
- package/README.md +7 -4
- package/lib/HermesClient.d.ts +29 -6
- package/lib/HermesClient.d.ts.map +1 -1
- package/lib/HermesClient.js +31 -7
- package/lib/examples/HermesClient.js +1 -1
- package/lib/zodSchemas.d.ts +511 -5
- package/lib/zodSchemas.d.ts.map +1 -1
- package/lib/zodSchemas.js +61 -4
- package/package.json +9 -11
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -69,12 +69,15 @@ By default, these updates are returned as binary data and is serialized as eithe
|
|
|
69
69
|
|
|
70
70
|
### Examples
|
|
71
71
|
|
|
72
|
-
The [HermesClient](./src/examples/HermesClient.ts) example demonstrates both the
|
|
73
|
-
|
|
74
|
-
|
|
72
|
+
The [HermesClient](./src/examples/HermesClient.ts) example demonstrates both the
|
|
73
|
+
examples above. To run the example:
|
|
74
|
+
|
|
75
|
+
1. Clone [the Pyth monorepo](https://github.com/pyth-network/pyth-crosschain)
|
|
76
|
+
2. In the root of the monorepo, run `pnpm example:hermes-client -- <args>`. For
|
|
77
|
+
example, to print BTC and ETH price feeds in the testnet network, run:
|
|
75
78
|
|
|
76
79
|
```bash
|
|
77
|
-
|
|
80
|
+
pnpm example:hermes-client -- \
|
|
78
81
|
--endpoint https://hermes.pyth.network \
|
|
79
82
|
--price-ids \
|
|
80
83
|
0xe62df6c8b4a85fe1a67db44dc12de5db330f7ac66b72dc658afedf0f4a415b43 \
|
package/lib/HermesClient.d.ts
CHANGED
|
@@ -2,11 +2,12 @@ import EventSource from "eventsource";
|
|
|
2
2
|
import { schemas } from "./zodSchemas";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
export type AssetType = z.infer<typeof schemas.AssetType>;
|
|
5
|
-
export type BinaryPriceUpdate = z.infer<typeof schemas.
|
|
5
|
+
export type BinaryPriceUpdate = z.infer<typeof schemas.BinaryUpdate>;
|
|
6
6
|
export type EncodingType = z.infer<typeof schemas.EncodingType>;
|
|
7
7
|
export type PriceFeedMetadata = z.infer<typeof schemas.PriceFeedMetadata>;
|
|
8
8
|
export type PriceIdInput = z.infer<typeof schemas.PriceIdInput>;
|
|
9
9
|
export type PriceUpdate = z.infer<typeof schemas.PriceUpdate>;
|
|
10
|
+
export type PublisherCaps = z.infer<typeof schemas.LatestPublisherStakeCapsUpdateDataResponse>;
|
|
10
11
|
export type UnixTimestamp = number;
|
|
11
12
|
export type DurationInSeconds = number;
|
|
12
13
|
export type HexString = string;
|
|
@@ -53,6 +54,21 @@ export declare class HermesClient {
|
|
|
53
54
|
query?: string;
|
|
54
55
|
filter?: string;
|
|
55
56
|
}): Promise<PriceFeedMetadata[]>;
|
|
57
|
+
/**
|
|
58
|
+
* Fetch the latest publisher stake caps.
|
|
59
|
+
* This endpoint can be customized by specifying the encoding type and whether the results should also return the parsed publisher caps.
|
|
60
|
+
* This will throw an error if there is a network problem or the price service returns a non-ok response.
|
|
61
|
+
*
|
|
62
|
+
* @param options Optional parameters:
|
|
63
|
+
* - encoding: Encoding type. If specified, return the publisher caps in the encoding specified by the encoding parameter. Default is hex.
|
|
64
|
+
* - parsed: Boolean to specify if the parsed publisher caps should be included in the response. Default is false.
|
|
65
|
+
*
|
|
66
|
+
* @returns PublisherCaps object containing the latest publisher stake caps.
|
|
67
|
+
*/
|
|
68
|
+
getLatestPublisherCaps(options?: {
|
|
69
|
+
encoding?: EncodingType;
|
|
70
|
+
parsed?: boolean;
|
|
71
|
+
}): Promise<PublisherCaps>;
|
|
56
72
|
/**
|
|
57
73
|
* Fetch the latest price updates for a set of price feed IDs.
|
|
58
74
|
* This endpoint can be customized by specifying the encoding type and whether the results should also return the parsed price update using the options object.
|
|
@@ -62,12 +78,14 @@ export declare class HermesClient {
|
|
|
62
78
|
* @param options Optional parameters:
|
|
63
79
|
* - encoding: Encoding type. If specified, return the price update in the encoding specified by the encoding parameter. Default is hex.
|
|
64
80
|
* - parsed: Boolean to specify if the parsed price update should be included in the response. Default is false.
|
|
81
|
+
* - ignoreInvalidPriceIds: Boolean to specify if invalid price IDs should be ignored instead of returning an error. Default is false.
|
|
65
82
|
*
|
|
66
83
|
* @returns PriceUpdate object containing the latest updates.
|
|
67
84
|
*/
|
|
68
85
|
getLatestPriceUpdates(ids: HexString[], options?: {
|
|
69
86
|
encoding?: EncodingType;
|
|
70
87
|
parsed?: boolean;
|
|
88
|
+
ignoreInvalidPriceIds?: boolean;
|
|
71
89
|
}): Promise<PriceUpdate>;
|
|
72
90
|
/**
|
|
73
91
|
* Fetch the price updates for a set of price feed IDs at a given timestamp.
|
|
@@ -79,12 +97,14 @@ export declare class HermesClient {
|
|
|
79
97
|
* @param options Optional parameters:
|
|
80
98
|
* - encoding: Encoding type. If specified, return the price update in the encoding specified by the encoding parameter. Default is hex.
|
|
81
99
|
* - parsed: Boolean to specify if the parsed price update should be included in the response. Default is false.
|
|
100
|
+
* - ignoreInvalidPriceIds: Boolean to specify if invalid price IDs should be ignored instead of returning an error. Default is false.
|
|
82
101
|
*
|
|
83
102
|
* @returns PriceUpdate object containing the updates at the specified timestamp.
|
|
84
103
|
*/
|
|
85
104
|
getPriceUpdatesAtTimestamp(publishTime: UnixTimestamp, ids: HexString[], options?: {
|
|
86
105
|
encoding?: EncodingType;
|
|
87
106
|
parsed?: boolean;
|
|
107
|
+
ignoreInvalidPriceIds?: boolean;
|
|
88
108
|
}): Promise<PriceUpdate>;
|
|
89
109
|
/**
|
|
90
110
|
* Fetch streaming price updates for a set of price feed IDs.
|
|
@@ -93,12 +113,14 @@ export declare class HermesClient {
|
|
|
93
113
|
* This will return an EventSource that can be used to listen to streaming updates.
|
|
94
114
|
* If an invalid hex-encoded ID is passed, it will throw an error.
|
|
95
115
|
*
|
|
96
|
-
*
|
|
97
116
|
* @param ids Array of hex-encoded price feed IDs for which streaming updates are requested.
|
|
98
|
-
* @param
|
|
99
|
-
*
|
|
100
|
-
*
|
|
101
|
-
*
|
|
117
|
+
* @param options Optional parameters:
|
|
118
|
+
* - encoding: Encoding type. If specified, updates are returned in the specified encoding. Default is hex.
|
|
119
|
+
* - parsed: Boolean to specify if the parsed price update should be included in the response. Default is false.
|
|
120
|
+
* - allowUnordered: Boolean to specify if unordered updates are allowed to be included in the stream. Default is false.
|
|
121
|
+
* - benchmarksOnly: Boolean to specify if only benchmark prices should be returned. Default is false.
|
|
122
|
+
* - ignoreInvalidPriceIds: Boolean to specify if invalid price IDs should be ignored instead of returning an error. Default is false.
|
|
123
|
+
*
|
|
102
124
|
* @returns An EventSource instance for receiving streaming updates.
|
|
103
125
|
*/
|
|
104
126
|
getPriceUpdatesStream(ids: HexString[], options?: {
|
|
@@ -106,6 +128,7 @@ export declare class HermesClient {
|
|
|
106
128
|
parsed?: boolean;
|
|
107
129
|
allowUnordered?: boolean;
|
|
108
130
|
benchmarksOnly?: boolean;
|
|
131
|
+
ignoreInvalidPriceIds?: boolean;
|
|
109
132
|
}): Promise<EventSource>;
|
|
110
133
|
private appendUrlSearchParams;
|
|
111
134
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HermesClient.d.ts","sourceRoot":"","sources":["../src/HermesClient.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,OAAO,CAAC,SAAS,CAAC,CAAC;AAC1D,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"HermesClient.d.ts","sourceRoot":"","sources":["../src/HermesClient.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,M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AAC;IAcvB,OAAO,CAAC,qBAAqB;CAU9B"}
|
package/lib/HermesClient.js
CHANGED
|
@@ -75,6 +75,24 @@ class HermesClient {
|
|
|
75
75
|
}
|
|
76
76
|
return await this.httpRequest(url.toString(), zodSchemas_1.schemas.PriceFeedMetadata.array());
|
|
77
77
|
}
|
|
78
|
+
/**
|
|
79
|
+
* Fetch the latest publisher stake caps.
|
|
80
|
+
* This endpoint can be customized by specifying the encoding type and whether the results should also return the parsed publisher caps.
|
|
81
|
+
* This will throw an error if there is a network problem or the price service returns a non-ok response.
|
|
82
|
+
*
|
|
83
|
+
* @param options Optional parameters:
|
|
84
|
+
* - encoding: Encoding type. If specified, return the publisher caps in the encoding specified by the encoding parameter. Default is hex.
|
|
85
|
+
* - parsed: Boolean to specify if the parsed publisher caps should be included in the response. Default is false.
|
|
86
|
+
*
|
|
87
|
+
* @returns PublisherCaps object containing the latest publisher stake caps.
|
|
88
|
+
*/
|
|
89
|
+
async getLatestPublisherCaps(options) {
|
|
90
|
+
const url = new URL("v2/updates/publisher_stake_caps/latest", this.baseURL);
|
|
91
|
+
if (options) {
|
|
92
|
+
this.appendUrlSearchParams(url, options);
|
|
93
|
+
}
|
|
94
|
+
return await this.httpRequest(url.toString(), zodSchemas_1.schemas.LatestPublisherStakeCapsUpdateDataResponse);
|
|
95
|
+
}
|
|
78
96
|
/**
|
|
79
97
|
* Fetch the latest price updates for a set of price feed IDs.
|
|
80
98
|
* This endpoint can be customized by specifying the encoding type and whether the results should also return the parsed price update using the options object.
|
|
@@ -84,6 +102,7 @@ class HermesClient {
|
|
|
84
102
|
* @param options Optional parameters:
|
|
85
103
|
* - encoding: Encoding type. If specified, return the price update in the encoding specified by the encoding parameter. Default is hex.
|
|
86
104
|
* - parsed: Boolean to specify if the parsed price update should be included in the response. Default is false.
|
|
105
|
+
* - ignoreInvalidPriceIds: Boolean to specify if invalid price IDs should be ignored instead of returning an error. Default is false.
|
|
87
106
|
*
|
|
88
107
|
* @returns PriceUpdate object containing the latest updates.
|
|
89
108
|
*/
|
|
@@ -93,7 +112,8 @@ class HermesClient {
|
|
|
93
112
|
url.searchParams.append("ids[]", id);
|
|
94
113
|
}
|
|
95
114
|
if (options) {
|
|
96
|
-
|
|
115
|
+
const transformedOptions = (0, utils_1.camelToSnakeCaseObject)(options);
|
|
116
|
+
this.appendUrlSearchParams(url, transformedOptions);
|
|
97
117
|
}
|
|
98
118
|
return this.httpRequest(url.toString(), zodSchemas_1.schemas.PriceUpdate);
|
|
99
119
|
}
|
|
@@ -107,6 +127,7 @@ class HermesClient {
|
|
|
107
127
|
* @param options Optional parameters:
|
|
108
128
|
* - encoding: Encoding type. If specified, return the price update in the encoding specified by the encoding parameter. Default is hex.
|
|
109
129
|
* - parsed: Boolean to specify if the parsed price update should be included in the response. Default is false.
|
|
130
|
+
* - ignoreInvalidPriceIds: Boolean to specify if invalid price IDs should be ignored instead of returning an error. Default is false.
|
|
110
131
|
*
|
|
111
132
|
* @returns PriceUpdate object containing the updates at the specified timestamp.
|
|
112
133
|
*/
|
|
@@ -116,7 +137,8 @@ class HermesClient {
|
|
|
116
137
|
url.searchParams.append("ids[]", id);
|
|
117
138
|
}
|
|
118
139
|
if (options) {
|
|
119
|
-
|
|
140
|
+
const transformedOptions = (0, utils_1.camelToSnakeCaseObject)(options);
|
|
141
|
+
this.appendUrlSearchParams(url, transformedOptions);
|
|
120
142
|
}
|
|
121
143
|
return this.httpRequest(url.toString(), zodSchemas_1.schemas.PriceUpdate);
|
|
122
144
|
}
|
|
@@ -127,12 +149,14 @@ class HermesClient {
|
|
|
127
149
|
* This will return an EventSource that can be used to listen to streaming updates.
|
|
128
150
|
* If an invalid hex-encoded ID is passed, it will throw an error.
|
|
129
151
|
*
|
|
130
|
-
*
|
|
131
152
|
* @param ids Array of hex-encoded price feed IDs for which streaming updates are requested.
|
|
132
|
-
* @param
|
|
133
|
-
*
|
|
134
|
-
*
|
|
135
|
-
*
|
|
153
|
+
* @param options Optional parameters:
|
|
154
|
+
* - encoding: Encoding type. If specified, updates are returned in the specified encoding. Default is hex.
|
|
155
|
+
* - parsed: Boolean to specify if the parsed price update should be included in the response. Default is false.
|
|
156
|
+
* - allowUnordered: Boolean to specify if unordered updates are allowed to be included in the stream. Default is false.
|
|
157
|
+
* - benchmarksOnly: Boolean to specify if only benchmark prices should be returned. Default is false.
|
|
158
|
+
* - ignoreInvalidPriceIds: Boolean to specify if invalid price IDs should be ignored instead of returning an error. Default is false.
|
|
159
|
+
*
|
|
136
160
|
* @returns An EventSource instance for receiving streaming updates.
|
|
137
161
|
*/
|
|
138
162
|
async getPriceUpdatesStream(ids, options) {
|
package/lib/zodSchemas.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type ZodiosOptions } from "@zodios/core";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
export declare const schemas: {
|
|
4
|
-
AssetType: z.ZodEnum<["crypto", "fx", "equity", "
|
|
5
|
-
asset_type: z.ZodOptional<z.ZodNullable<z.ZodEnum<["crypto", "fx", "equity", "
|
|
4
|
+
AssetType: z.ZodEnum<["crypto", "fx", "equity", "metal", "rates", "crypto_redemption_rate"]>;
|
|
5
|
+
asset_type: z.ZodOptional<z.ZodNullable<z.ZodEnum<["crypto", "fx", "equity", "metal", "rates", "crypto_redemption_rate"]>>>;
|
|
6
6
|
RpcPriceIdentifier: z.ZodString;
|
|
7
7
|
PriceFeedMetadata: z.ZodObject<{
|
|
8
8
|
attributes: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
@@ -16,7 +16,7 @@ export declare const schemas: {
|
|
|
16
16
|
}, z.ZodTypeAny, "passthrough">>;
|
|
17
17
|
PriceIdInput: z.ZodString;
|
|
18
18
|
EncodingType: z.ZodEnum<["hex", "base64"]>;
|
|
19
|
-
|
|
19
|
+
BinaryUpdate: z.ZodObject<{
|
|
20
20
|
data: z.ZodArray<z.ZodString, "many">;
|
|
21
21
|
encoding: z.ZodEnum<["hex", "base64"]>;
|
|
22
22
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
@@ -657,6 +657,186 @@ export declare const schemas: {
|
|
|
657
657
|
}, z.ZodTypeAny, "passthrough">>;
|
|
658
658
|
}, z.ZodTypeAny, "passthrough">>, "many">>>;
|
|
659
659
|
}, z.ZodTypeAny, "passthrough">>;
|
|
660
|
+
ParsedPublisherStakeCap: z.ZodObject<{
|
|
661
|
+
cap: z.ZodNumber;
|
|
662
|
+
publisher: z.ZodString;
|
|
663
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
664
|
+
cap: z.ZodNumber;
|
|
665
|
+
publisher: z.ZodString;
|
|
666
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
667
|
+
cap: z.ZodNumber;
|
|
668
|
+
publisher: z.ZodString;
|
|
669
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
670
|
+
ParsedPublisherStakeCapsUpdate: z.ZodObject<{
|
|
671
|
+
publisher_stake_caps: z.ZodArray<z.ZodObject<{
|
|
672
|
+
cap: z.ZodNumber;
|
|
673
|
+
publisher: z.ZodString;
|
|
674
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
675
|
+
cap: z.ZodNumber;
|
|
676
|
+
publisher: z.ZodString;
|
|
677
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
678
|
+
cap: z.ZodNumber;
|
|
679
|
+
publisher: z.ZodString;
|
|
680
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
681
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
682
|
+
publisher_stake_caps: z.ZodArray<z.ZodObject<{
|
|
683
|
+
cap: z.ZodNumber;
|
|
684
|
+
publisher: z.ZodString;
|
|
685
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
686
|
+
cap: z.ZodNumber;
|
|
687
|
+
publisher: z.ZodString;
|
|
688
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
689
|
+
cap: z.ZodNumber;
|
|
690
|
+
publisher: z.ZodString;
|
|
691
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
692
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
693
|
+
publisher_stake_caps: z.ZodArray<z.ZodObject<{
|
|
694
|
+
cap: z.ZodNumber;
|
|
695
|
+
publisher: z.ZodString;
|
|
696
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
697
|
+
cap: z.ZodNumber;
|
|
698
|
+
publisher: z.ZodString;
|
|
699
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
700
|
+
cap: z.ZodNumber;
|
|
701
|
+
publisher: z.ZodString;
|
|
702
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
703
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
704
|
+
LatestPublisherStakeCapsUpdateDataResponse: z.ZodObject<{
|
|
705
|
+
binary: z.ZodObject<{
|
|
706
|
+
data: z.ZodArray<z.ZodString, "many">;
|
|
707
|
+
encoding: z.ZodEnum<["hex", "base64"]>;
|
|
708
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
709
|
+
data: z.ZodArray<z.ZodString, "many">;
|
|
710
|
+
encoding: z.ZodEnum<["hex", "base64"]>;
|
|
711
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
712
|
+
data: z.ZodArray<z.ZodString, "many">;
|
|
713
|
+
encoding: z.ZodEnum<["hex", "base64"]>;
|
|
714
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
715
|
+
parsed: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
716
|
+
publisher_stake_caps: z.ZodArray<z.ZodObject<{
|
|
717
|
+
cap: z.ZodNumber;
|
|
718
|
+
publisher: z.ZodString;
|
|
719
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
720
|
+
cap: z.ZodNumber;
|
|
721
|
+
publisher: z.ZodString;
|
|
722
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
723
|
+
cap: z.ZodNumber;
|
|
724
|
+
publisher: z.ZodString;
|
|
725
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
726
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
727
|
+
publisher_stake_caps: z.ZodArray<z.ZodObject<{
|
|
728
|
+
cap: z.ZodNumber;
|
|
729
|
+
publisher: z.ZodString;
|
|
730
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
731
|
+
cap: z.ZodNumber;
|
|
732
|
+
publisher: z.ZodString;
|
|
733
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
734
|
+
cap: z.ZodNumber;
|
|
735
|
+
publisher: z.ZodString;
|
|
736
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
737
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
738
|
+
publisher_stake_caps: z.ZodArray<z.ZodObject<{
|
|
739
|
+
cap: z.ZodNumber;
|
|
740
|
+
publisher: z.ZodString;
|
|
741
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
742
|
+
cap: z.ZodNumber;
|
|
743
|
+
publisher: z.ZodString;
|
|
744
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
745
|
+
cap: z.ZodNumber;
|
|
746
|
+
publisher: z.ZodString;
|
|
747
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
748
|
+
}, z.ZodTypeAny, "passthrough">>, "many">>>;
|
|
749
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
750
|
+
binary: z.ZodObject<{
|
|
751
|
+
data: z.ZodArray<z.ZodString, "many">;
|
|
752
|
+
encoding: z.ZodEnum<["hex", "base64"]>;
|
|
753
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
754
|
+
data: z.ZodArray<z.ZodString, "many">;
|
|
755
|
+
encoding: z.ZodEnum<["hex", "base64"]>;
|
|
756
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
757
|
+
data: z.ZodArray<z.ZodString, "many">;
|
|
758
|
+
encoding: z.ZodEnum<["hex", "base64"]>;
|
|
759
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
760
|
+
parsed: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
761
|
+
publisher_stake_caps: z.ZodArray<z.ZodObject<{
|
|
762
|
+
cap: z.ZodNumber;
|
|
763
|
+
publisher: z.ZodString;
|
|
764
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
765
|
+
cap: z.ZodNumber;
|
|
766
|
+
publisher: z.ZodString;
|
|
767
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
768
|
+
cap: z.ZodNumber;
|
|
769
|
+
publisher: z.ZodString;
|
|
770
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
771
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
772
|
+
publisher_stake_caps: z.ZodArray<z.ZodObject<{
|
|
773
|
+
cap: z.ZodNumber;
|
|
774
|
+
publisher: z.ZodString;
|
|
775
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
776
|
+
cap: z.ZodNumber;
|
|
777
|
+
publisher: z.ZodString;
|
|
778
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
779
|
+
cap: z.ZodNumber;
|
|
780
|
+
publisher: z.ZodString;
|
|
781
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
782
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
783
|
+
publisher_stake_caps: z.ZodArray<z.ZodObject<{
|
|
784
|
+
cap: z.ZodNumber;
|
|
785
|
+
publisher: z.ZodString;
|
|
786
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
787
|
+
cap: z.ZodNumber;
|
|
788
|
+
publisher: z.ZodString;
|
|
789
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
790
|
+
cap: z.ZodNumber;
|
|
791
|
+
publisher: z.ZodString;
|
|
792
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
793
|
+
}, z.ZodTypeAny, "passthrough">>, "many">>>;
|
|
794
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
795
|
+
binary: z.ZodObject<{
|
|
796
|
+
data: z.ZodArray<z.ZodString, "many">;
|
|
797
|
+
encoding: z.ZodEnum<["hex", "base64"]>;
|
|
798
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
799
|
+
data: z.ZodArray<z.ZodString, "many">;
|
|
800
|
+
encoding: z.ZodEnum<["hex", "base64"]>;
|
|
801
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
802
|
+
data: z.ZodArray<z.ZodString, "many">;
|
|
803
|
+
encoding: z.ZodEnum<["hex", "base64"]>;
|
|
804
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
805
|
+
parsed: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
806
|
+
publisher_stake_caps: z.ZodArray<z.ZodObject<{
|
|
807
|
+
cap: z.ZodNumber;
|
|
808
|
+
publisher: z.ZodString;
|
|
809
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
810
|
+
cap: z.ZodNumber;
|
|
811
|
+
publisher: z.ZodString;
|
|
812
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
813
|
+
cap: z.ZodNumber;
|
|
814
|
+
publisher: z.ZodString;
|
|
815
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
816
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
817
|
+
publisher_stake_caps: z.ZodArray<z.ZodObject<{
|
|
818
|
+
cap: z.ZodNumber;
|
|
819
|
+
publisher: z.ZodString;
|
|
820
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
821
|
+
cap: z.ZodNumber;
|
|
822
|
+
publisher: z.ZodString;
|
|
823
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
824
|
+
cap: z.ZodNumber;
|
|
825
|
+
publisher: z.ZodString;
|
|
826
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
827
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
828
|
+
publisher_stake_caps: z.ZodArray<z.ZodObject<{
|
|
829
|
+
cap: z.ZodNumber;
|
|
830
|
+
publisher: z.ZodString;
|
|
831
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
832
|
+
cap: z.ZodNumber;
|
|
833
|
+
publisher: z.ZodString;
|
|
834
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
835
|
+
cap: z.ZodNumber;
|
|
836
|
+
publisher: z.ZodString;
|
|
837
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
838
|
+
}, z.ZodTypeAny, "passthrough">>, "many">>>;
|
|
839
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
660
840
|
};
|
|
661
841
|
export declare const api: import("@zodios/core").ZodiosInstance<[{
|
|
662
842
|
method: "get";
|
|
@@ -671,7 +851,7 @@ export declare const api: import("@zodios/core").ZodiosInstance<[{
|
|
|
671
851
|
}, {
|
|
672
852
|
name: "asset_type";
|
|
673
853
|
type: "Query";
|
|
674
|
-
schema: z.ZodOptional<z.ZodNullable<z.ZodEnum<["crypto", "fx", "equity", "
|
|
854
|
+
schema: z.ZodOptional<z.ZodNullable<z.ZodEnum<["crypto", "fx", "equity", "metal", "rates", "crypto_redemption_rate"]>>>;
|
|
675
855
|
}];
|
|
676
856
|
response: z.ZodArray<z.ZodObject<{
|
|
677
857
|
attributes: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
@@ -705,6 +885,10 @@ export declare const api: import("@zodios/core").ZodiosInstance<[{
|
|
|
705
885
|
name: "parsed";
|
|
706
886
|
type: "Query";
|
|
707
887
|
schema: z.ZodOptional<z.ZodBoolean>;
|
|
888
|
+
}, {
|
|
889
|
+
name: "ignore_invalid_price_ids";
|
|
890
|
+
type: "Query";
|
|
891
|
+
schema: z.ZodOptional<z.ZodBoolean>;
|
|
708
892
|
}];
|
|
709
893
|
response: z.ZodObject<{
|
|
710
894
|
binary: z.ZodObject<{
|
|
@@ -1189,6 +1373,10 @@ export declare const api: import("@zodios/core").ZodiosInstance<[{
|
|
|
1189
1373
|
name: "parsed";
|
|
1190
1374
|
type: "Query";
|
|
1191
1375
|
schema: z.ZodOptional<z.ZodBoolean>;
|
|
1376
|
+
}, {
|
|
1377
|
+
name: "ignore_invalid_price_ids";
|
|
1378
|
+
type: "Query";
|
|
1379
|
+
schema: z.ZodOptional<z.ZodBoolean>;
|
|
1192
1380
|
}];
|
|
1193
1381
|
response: z.ZodObject<{
|
|
1194
1382
|
binary: z.ZodObject<{
|
|
@@ -1681,6 +1869,10 @@ export declare const api: import("@zodios/core").ZodiosInstance<[{
|
|
|
1681
1869
|
name: "benchmarks_only";
|
|
1682
1870
|
type: "Query";
|
|
1683
1871
|
schema: z.ZodOptional<z.ZodBoolean>;
|
|
1872
|
+
}, {
|
|
1873
|
+
name: "ignore_invalid_price_ids";
|
|
1874
|
+
type: "Query";
|
|
1875
|
+
schema: z.ZodOptional<z.ZodBoolean>;
|
|
1684
1876
|
}];
|
|
1685
1877
|
response: z.ZodObject<{
|
|
1686
1878
|
binary: z.ZodObject<{
|
|
@@ -2147,6 +2339,157 @@ export declare const api: import("@zodios/core").ZodiosInstance<[{
|
|
|
2147
2339
|
description: string;
|
|
2148
2340
|
schema: z.ZodVoid;
|
|
2149
2341
|
}];
|
|
2342
|
+
}, {
|
|
2343
|
+
method: "get";
|
|
2344
|
+
path: "/v2/updates/publisher_stake_caps/latest";
|
|
2345
|
+
alias: "latest_publisher_stake_caps";
|
|
2346
|
+
description: "Get the most recent publisher stake caps update data.";
|
|
2347
|
+
requestFormat: "json";
|
|
2348
|
+
parameters: [{
|
|
2349
|
+
name: "encoding";
|
|
2350
|
+
type: "Query";
|
|
2351
|
+
schema: z.ZodOptional<z.ZodEnum<["hex", "base64"]>>;
|
|
2352
|
+
}, {
|
|
2353
|
+
name: "parsed";
|
|
2354
|
+
type: "Query";
|
|
2355
|
+
schema: z.ZodOptional<z.ZodBoolean>;
|
|
2356
|
+
}];
|
|
2357
|
+
response: z.ZodObject<{
|
|
2358
|
+
binary: z.ZodObject<{
|
|
2359
|
+
data: z.ZodArray<z.ZodString, "many">;
|
|
2360
|
+
encoding: z.ZodEnum<["hex", "base64"]>;
|
|
2361
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
2362
|
+
data: z.ZodArray<z.ZodString, "many">;
|
|
2363
|
+
encoding: z.ZodEnum<["hex", "base64"]>;
|
|
2364
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
2365
|
+
data: z.ZodArray<z.ZodString, "many">;
|
|
2366
|
+
encoding: z.ZodEnum<["hex", "base64"]>;
|
|
2367
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
2368
|
+
parsed: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
2369
|
+
publisher_stake_caps: z.ZodArray<z.ZodObject<{
|
|
2370
|
+
cap: z.ZodNumber;
|
|
2371
|
+
publisher: z.ZodString;
|
|
2372
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
2373
|
+
cap: z.ZodNumber;
|
|
2374
|
+
publisher: z.ZodString;
|
|
2375
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
2376
|
+
cap: z.ZodNumber;
|
|
2377
|
+
publisher: z.ZodString;
|
|
2378
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
2379
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
2380
|
+
publisher_stake_caps: z.ZodArray<z.ZodObject<{
|
|
2381
|
+
cap: z.ZodNumber;
|
|
2382
|
+
publisher: z.ZodString;
|
|
2383
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
2384
|
+
cap: z.ZodNumber;
|
|
2385
|
+
publisher: z.ZodString;
|
|
2386
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
2387
|
+
cap: z.ZodNumber;
|
|
2388
|
+
publisher: z.ZodString;
|
|
2389
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
2390
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
2391
|
+
publisher_stake_caps: z.ZodArray<z.ZodObject<{
|
|
2392
|
+
cap: z.ZodNumber;
|
|
2393
|
+
publisher: z.ZodString;
|
|
2394
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
2395
|
+
cap: z.ZodNumber;
|
|
2396
|
+
publisher: z.ZodString;
|
|
2397
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
2398
|
+
cap: z.ZodNumber;
|
|
2399
|
+
publisher: z.ZodString;
|
|
2400
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
2401
|
+
}, z.ZodTypeAny, "passthrough">>, "many">>>;
|
|
2402
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
2403
|
+
binary: z.ZodObject<{
|
|
2404
|
+
data: z.ZodArray<z.ZodString, "many">;
|
|
2405
|
+
encoding: z.ZodEnum<["hex", "base64"]>;
|
|
2406
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
2407
|
+
data: z.ZodArray<z.ZodString, "many">;
|
|
2408
|
+
encoding: z.ZodEnum<["hex", "base64"]>;
|
|
2409
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
2410
|
+
data: z.ZodArray<z.ZodString, "many">;
|
|
2411
|
+
encoding: z.ZodEnum<["hex", "base64"]>;
|
|
2412
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
2413
|
+
parsed: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
2414
|
+
publisher_stake_caps: z.ZodArray<z.ZodObject<{
|
|
2415
|
+
cap: z.ZodNumber;
|
|
2416
|
+
publisher: z.ZodString;
|
|
2417
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
2418
|
+
cap: z.ZodNumber;
|
|
2419
|
+
publisher: z.ZodString;
|
|
2420
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
2421
|
+
cap: z.ZodNumber;
|
|
2422
|
+
publisher: z.ZodString;
|
|
2423
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
2424
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
2425
|
+
publisher_stake_caps: z.ZodArray<z.ZodObject<{
|
|
2426
|
+
cap: z.ZodNumber;
|
|
2427
|
+
publisher: z.ZodString;
|
|
2428
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
2429
|
+
cap: z.ZodNumber;
|
|
2430
|
+
publisher: z.ZodString;
|
|
2431
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
2432
|
+
cap: z.ZodNumber;
|
|
2433
|
+
publisher: z.ZodString;
|
|
2434
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
2435
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
2436
|
+
publisher_stake_caps: z.ZodArray<z.ZodObject<{
|
|
2437
|
+
cap: z.ZodNumber;
|
|
2438
|
+
publisher: z.ZodString;
|
|
2439
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
2440
|
+
cap: z.ZodNumber;
|
|
2441
|
+
publisher: z.ZodString;
|
|
2442
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
2443
|
+
cap: z.ZodNumber;
|
|
2444
|
+
publisher: z.ZodString;
|
|
2445
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
2446
|
+
}, z.ZodTypeAny, "passthrough">>, "many">>>;
|
|
2447
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
2448
|
+
binary: z.ZodObject<{
|
|
2449
|
+
data: z.ZodArray<z.ZodString, "many">;
|
|
2450
|
+
encoding: z.ZodEnum<["hex", "base64"]>;
|
|
2451
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
2452
|
+
data: z.ZodArray<z.ZodString, "many">;
|
|
2453
|
+
encoding: z.ZodEnum<["hex", "base64"]>;
|
|
2454
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
2455
|
+
data: z.ZodArray<z.ZodString, "many">;
|
|
2456
|
+
encoding: z.ZodEnum<["hex", "base64"]>;
|
|
2457
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
2458
|
+
parsed: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
2459
|
+
publisher_stake_caps: z.ZodArray<z.ZodObject<{
|
|
2460
|
+
cap: z.ZodNumber;
|
|
2461
|
+
publisher: z.ZodString;
|
|
2462
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
2463
|
+
cap: z.ZodNumber;
|
|
2464
|
+
publisher: z.ZodString;
|
|
2465
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
2466
|
+
cap: z.ZodNumber;
|
|
2467
|
+
publisher: z.ZodString;
|
|
2468
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
2469
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
2470
|
+
publisher_stake_caps: z.ZodArray<z.ZodObject<{
|
|
2471
|
+
cap: z.ZodNumber;
|
|
2472
|
+
publisher: z.ZodString;
|
|
2473
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
2474
|
+
cap: z.ZodNumber;
|
|
2475
|
+
publisher: z.ZodString;
|
|
2476
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
2477
|
+
cap: z.ZodNumber;
|
|
2478
|
+
publisher: z.ZodString;
|
|
2479
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
2480
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
2481
|
+
publisher_stake_caps: z.ZodArray<z.ZodObject<{
|
|
2482
|
+
cap: z.ZodNumber;
|
|
2483
|
+
publisher: z.ZodString;
|
|
2484
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
2485
|
+
cap: z.ZodNumber;
|
|
2486
|
+
publisher: z.ZodString;
|
|
2487
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
2488
|
+
cap: z.ZodNumber;
|
|
2489
|
+
publisher: z.ZodString;
|
|
2490
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
2491
|
+
}, z.ZodTypeAny, "passthrough">>, "many">>>;
|
|
2492
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
2150
2493
|
}]>;
|
|
2151
2494
|
export declare function createApiClient(baseUrl: string, options?: ZodiosOptions): import("@zodios/core").ZodiosInstance<[{
|
|
2152
2495
|
method: "get";
|
|
@@ -2161,7 +2504,7 @@ export declare function createApiClient(baseUrl: string, options?: ZodiosOptions
|
|
|
2161
2504
|
}, {
|
|
2162
2505
|
name: "asset_type";
|
|
2163
2506
|
type: "Query";
|
|
2164
|
-
schema: z.ZodOptional<z.ZodNullable<z.ZodEnum<["crypto", "fx", "equity", "
|
|
2507
|
+
schema: z.ZodOptional<z.ZodNullable<z.ZodEnum<["crypto", "fx", "equity", "metal", "rates", "crypto_redemption_rate"]>>>;
|
|
2165
2508
|
}];
|
|
2166
2509
|
response: z.ZodArray<z.ZodObject<{
|
|
2167
2510
|
attributes: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
@@ -2195,6 +2538,10 @@ export declare function createApiClient(baseUrl: string, options?: ZodiosOptions
|
|
|
2195
2538
|
name: "parsed";
|
|
2196
2539
|
type: "Query";
|
|
2197
2540
|
schema: z.ZodOptional<z.ZodBoolean>;
|
|
2541
|
+
}, {
|
|
2542
|
+
name: "ignore_invalid_price_ids";
|
|
2543
|
+
type: "Query";
|
|
2544
|
+
schema: z.ZodOptional<z.ZodBoolean>;
|
|
2198
2545
|
}];
|
|
2199
2546
|
response: z.ZodObject<{
|
|
2200
2547
|
binary: z.ZodObject<{
|
|
@@ -2679,6 +3026,10 @@ export declare function createApiClient(baseUrl: string, options?: ZodiosOptions
|
|
|
2679
3026
|
name: "parsed";
|
|
2680
3027
|
type: "Query";
|
|
2681
3028
|
schema: z.ZodOptional<z.ZodBoolean>;
|
|
3029
|
+
}, {
|
|
3030
|
+
name: "ignore_invalid_price_ids";
|
|
3031
|
+
type: "Query";
|
|
3032
|
+
schema: z.ZodOptional<z.ZodBoolean>;
|
|
2682
3033
|
}];
|
|
2683
3034
|
response: z.ZodObject<{
|
|
2684
3035
|
binary: z.ZodObject<{
|
|
@@ -3171,6 +3522,10 @@ export declare function createApiClient(baseUrl: string, options?: ZodiosOptions
|
|
|
3171
3522
|
name: "benchmarks_only";
|
|
3172
3523
|
type: "Query";
|
|
3173
3524
|
schema: z.ZodOptional<z.ZodBoolean>;
|
|
3525
|
+
}, {
|
|
3526
|
+
name: "ignore_invalid_price_ids";
|
|
3527
|
+
type: "Query";
|
|
3528
|
+
schema: z.ZodOptional<z.ZodBoolean>;
|
|
3174
3529
|
}];
|
|
3175
3530
|
response: z.ZodObject<{
|
|
3176
3531
|
binary: z.ZodObject<{
|
|
@@ -3637,5 +3992,156 @@ export declare function createApiClient(baseUrl: string, options?: ZodiosOptions
|
|
|
3637
3992
|
description: string;
|
|
3638
3993
|
schema: z.ZodVoid;
|
|
3639
3994
|
}];
|
|
3995
|
+
}, {
|
|
3996
|
+
method: "get";
|
|
3997
|
+
path: "/v2/updates/publisher_stake_caps/latest";
|
|
3998
|
+
alias: "latest_publisher_stake_caps";
|
|
3999
|
+
description: "Get the most recent publisher stake caps update data.";
|
|
4000
|
+
requestFormat: "json";
|
|
4001
|
+
parameters: [{
|
|
4002
|
+
name: "encoding";
|
|
4003
|
+
type: "Query";
|
|
4004
|
+
schema: z.ZodOptional<z.ZodEnum<["hex", "base64"]>>;
|
|
4005
|
+
}, {
|
|
4006
|
+
name: "parsed";
|
|
4007
|
+
type: "Query";
|
|
4008
|
+
schema: z.ZodOptional<z.ZodBoolean>;
|
|
4009
|
+
}];
|
|
4010
|
+
response: z.ZodObject<{
|
|
4011
|
+
binary: z.ZodObject<{
|
|
4012
|
+
data: z.ZodArray<z.ZodString, "many">;
|
|
4013
|
+
encoding: z.ZodEnum<["hex", "base64"]>;
|
|
4014
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
4015
|
+
data: z.ZodArray<z.ZodString, "many">;
|
|
4016
|
+
encoding: z.ZodEnum<["hex", "base64"]>;
|
|
4017
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
4018
|
+
data: z.ZodArray<z.ZodString, "many">;
|
|
4019
|
+
encoding: z.ZodEnum<["hex", "base64"]>;
|
|
4020
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
4021
|
+
parsed: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
4022
|
+
publisher_stake_caps: z.ZodArray<z.ZodObject<{
|
|
4023
|
+
cap: z.ZodNumber;
|
|
4024
|
+
publisher: z.ZodString;
|
|
4025
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
4026
|
+
cap: z.ZodNumber;
|
|
4027
|
+
publisher: z.ZodString;
|
|
4028
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
4029
|
+
cap: z.ZodNumber;
|
|
4030
|
+
publisher: z.ZodString;
|
|
4031
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
4032
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
4033
|
+
publisher_stake_caps: z.ZodArray<z.ZodObject<{
|
|
4034
|
+
cap: z.ZodNumber;
|
|
4035
|
+
publisher: z.ZodString;
|
|
4036
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
4037
|
+
cap: z.ZodNumber;
|
|
4038
|
+
publisher: z.ZodString;
|
|
4039
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
4040
|
+
cap: z.ZodNumber;
|
|
4041
|
+
publisher: z.ZodString;
|
|
4042
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
4043
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
4044
|
+
publisher_stake_caps: z.ZodArray<z.ZodObject<{
|
|
4045
|
+
cap: z.ZodNumber;
|
|
4046
|
+
publisher: z.ZodString;
|
|
4047
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
4048
|
+
cap: z.ZodNumber;
|
|
4049
|
+
publisher: z.ZodString;
|
|
4050
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
4051
|
+
cap: z.ZodNumber;
|
|
4052
|
+
publisher: z.ZodString;
|
|
4053
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
4054
|
+
}, z.ZodTypeAny, "passthrough">>, "many">>>;
|
|
4055
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
4056
|
+
binary: z.ZodObject<{
|
|
4057
|
+
data: z.ZodArray<z.ZodString, "many">;
|
|
4058
|
+
encoding: z.ZodEnum<["hex", "base64"]>;
|
|
4059
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
4060
|
+
data: z.ZodArray<z.ZodString, "many">;
|
|
4061
|
+
encoding: z.ZodEnum<["hex", "base64"]>;
|
|
4062
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
4063
|
+
data: z.ZodArray<z.ZodString, "many">;
|
|
4064
|
+
encoding: z.ZodEnum<["hex", "base64"]>;
|
|
4065
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
4066
|
+
parsed: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
4067
|
+
publisher_stake_caps: z.ZodArray<z.ZodObject<{
|
|
4068
|
+
cap: z.ZodNumber;
|
|
4069
|
+
publisher: z.ZodString;
|
|
4070
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
4071
|
+
cap: z.ZodNumber;
|
|
4072
|
+
publisher: z.ZodString;
|
|
4073
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
4074
|
+
cap: z.ZodNumber;
|
|
4075
|
+
publisher: z.ZodString;
|
|
4076
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
4077
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
4078
|
+
publisher_stake_caps: z.ZodArray<z.ZodObject<{
|
|
4079
|
+
cap: z.ZodNumber;
|
|
4080
|
+
publisher: z.ZodString;
|
|
4081
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
4082
|
+
cap: z.ZodNumber;
|
|
4083
|
+
publisher: z.ZodString;
|
|
4084
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
4085
|
+
cap: z.ZodNumber;
|
|
4086
|
+
publisher: z.ZodString;
|
|
4087
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
4088
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
4089
|
+
publisher_stake_caps: z.ZodArray<z.ZodObject<{
|
|
4090
|
+
cap: z.ZodNumber;
|
|
4091
|
+
publisher: z.ZodString;
|
|
4092
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
4093
|
+
cap: z.ZodNumber;
|
|
4094
|
+
publisher: z.ZodString;
|
|
4095
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
4096
|
+
cap: z.ZodNumber;
|
|
4097
|
+
publisher: z.ZodString;
|
|
4098
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
4099
|
+
}, z.ZodTypeAny, "passthrough">>, "many">>>;
|
|
4100
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
4101
|
+
binary: z.ZodObject<{
|
|
4102
|
+
data: z.ZodArray<z.ZodString, "many">;
|
|
4103
|
+
encoding: z.ZodEnum<["hex", "base64"]>;
|
|
4104
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
4105
|
+
data: z.ZodArray<z.ZodString, "many">;
|
|
4106
|
+
encoding: z.ZodEnum<["hex", "base64"]>;
|
|
4107
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
4108
|
+
data: z.ZodArray<z.ZodString, "many">;
|
|
4109
|
+
encoding: z.ZodEnum<["hex", "base64"]>;
|
|
4110
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
4111
|
+
parsed: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
4112
|
+
publisher_stake_caps: z.ZodArray<z.ZodObject<{
|
|
4113
|
+
cap: z.ZodNumber;
|
|
4114
|
+
publisher: z.ZodString;
|
|
4115
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
4116
|
+
cap: z.ZodNumber;
|
|
4117
|
+
publisher: z.ZodString;
|
|
4118
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
4119
|
+
cap: z.ZodNumber;
|
|
4120
|
+
publisher: z.ZodString;
|
|
4121
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
4122
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
4123
|
+
publisher_stake_caps: z.ZodArray<z.ZodObject<{
|
|
4124
|
+
cap: z.ZodNumber;
|
|
4125
|
+
publisher: z.ZodString;
|
|
4126
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
4127
|
+
cap: z.ZodNumber;
|
|
4128
|
+
publisher: z.ZodString;
|
|
4129
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
4130
|
+
cap: z.ZodNumber;
|
|
4131
|
+
publisher: z.ZodString;
|
|
4132
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
4133
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
4134
|
+
publisher_stake_caps: z.ZodArray<z.ZodObject<{
|
|
4135
|
+
cap: z.ZodNumber;
|
|
4136
|
+
publisher: z.ZodString;
|
|
4137
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
4138
|
+
cap: z.ZodNumber;
|
|
4139
|
+
publisher: z.ZodString;
|
|
4140
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
4141
|
+
cap: z.ZodNumber;
|
|
4142
|
+
publisher: z.ZodString;
|
|
4143
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
4144
|
+
}, z.ZodTypeAny, "passthrough">>, "many">>>;
|
|
4145
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
3640
4146
|
}]>;
|
|
3641
4147
|
//# sourceMappingURL=zodSchemas.d.ts.map
|
package/lib/zodSchemas.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zodSchemas.d.ts","sourceRoot":"","sources":["../src/zodSchemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,KAAK,aAAa,EAAE,MAAM,cAAc,CAAC;AACnE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"zodSchemas.d.ts","sourceRoot":"","sources":["../src/zodSchemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,KAAK,aAAa,EAAE,MAAM,cAAc,CAAC;AACnE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA+DxB,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAEvE"}
|
package/lib/zodSchemas.js
CHANGED
|
@@ -3,7 +3,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.createApiClient = exports.api = exports.schemas = void 0;
|
|
4
4
|
const core_1 = require("@zodios/core");
|
|
5
5
|
const zod_1 = require("zod");
|
|
6
|
-
const AssetType = zod_1.z.enum([
|
|
6
|
+
const AssetType = zod_1.z.enum([
|
|
7
|
+
"crypto",
|
|
8
|
+
"fx",
|
|
9
|
+
"equity",
|
|
10
|
+
"metal",
|
|
11
|
+
"rates",
|
|
12
|
+
"crypto_redemption_rate",
|
|
13
|
+
]);
|
|
7
14
|
const asset_type = AssetType.nullish();
|
|
8
15
|
const RpcPriceIdentifier = zod_1.z.string();
|
|
9
16
|
const PriceFeedMetadata = zod_1.z
|
|
@@ -11,7 +18,7 @@ const PriceFeedMetadata = zod_1.z
|
|
|
11
18
|
.passthrough();
|
|
12
19
|
const PriceIdInput = zod_1.z.string();
|
|
13
20
|
const EncodingType = zod_1.z.enum(["hex", "base64"]);
|
|
14
|
-
const
|
|
21
|
+
const BinaryUpdate = zod_1.z
|
|
15
22
|
.object({ data: zod_1.z.array(zod_1.z.string()), encoding: EncodingType })
|
|
16
23
|
.passthrough();
|
|
17
24
|
const RpcPrice = zod_1.z
|
|
@@ -40,10 +47,22 @@ const ParsedPriceUpdate = zod_1.z
|
|
|
40
47
|
.passthrough();
|
|
41
48
|
const PriceUpdate = zod_1.z
|
|
42
49
|
.object({
|
|
43
|
-
binary:
|
|
50
|
+
binary: BinaryUpdate,
|
|
44
51
|
parsed: zod_1.z.array(ParsedPriceUpdate).nullish(),
|
|
45
52
|
})
|
|
46
53
|
.passthrough();
|
|
54
|
+
const ParsedPublisherStakeCap = zod_1.z
|
|
55
|
+
.object({ cap: zod_1.z.number().int().gte(0), publisher: zod_1.z.string() })
|
|
56
|
+
.passthrough();
|
|
57
|
+
const ParsedPublisherStakeCapsUpdate = zod_1.z
|
|
58
|
+
.object({ publisher_stake_caps: zod_1.z.array(ParsedPublisherStakeCap) })
|
|
59
|
+
.passthrough();
|
|
60
|
+
const LatestPublisherStakeCapsUpdateDataResponse = zod_1.z
|
|
61
|
+
.object({
|
|
62
|
+
binary: BinaryUpdate,
|
|
63
|
+
parsed: zod_1.z.array(ParsedPublisherStakeCapsUpdate).nullish(),
|
|
64
|
+
})
|
|
65
|
+
.passthrough();
|
|
47
66
|
exports.schemas = {
|
|
48
67
|
AssetType,
|
|
49
68
|
asset_type,
|
|
@@ -51,11 +70,14 @@ exports.schemas = {
|
|
|
51
70
|
PriceFeedMetadata,
|
|
52
71
|
PriceIdInput,
|
|
53
72
|
EncodingType,
|
|
54
|
-
|
|
73
|
+
BinaryUpdate,
|
|
55
74
|
RpcPrice,
|
|
56
75
|
RpcPriceFeedMetadataV2,
|
|
57
76
|
ParsedPriceUpdate,
|
|
58
77
|
PriceUpdate,
|
|
78
|
+
ParsedPublisherStakeCap,
|
|
79
|
+
ParsedPublisherStakeCapsUpdate,
|
|
80
|
+
LatestPublisherStakeCapsUpdateDataResponse,
|
|
59
81
|
};
|
|
60
82
|
const endpoints = (0, core_1.makeApi)([
|
|
61
83
|
{
|
|
@@ -110,6 +132,11 @@ Given a collection of price feed ids, retrieve the latest Pyth price for each pr
|
|
|
110
132
|
type: "Query",
|
|
111
133
|
schema: zod_1.z.boolean().optional(),
|
|
112
134
|
},
|
|
135
|
+
{
|
|
136
|
+
name: "ignore_invalid_price_ids",
|
|
137
|
+
type: "Query",
|
|
138
|
+
schema: zod_1.z.boolean().optional(),
|
|
139
|
+
},
|
|
113
140
|
],
|
|
114
141
|
response: PriceUpdate,
|
|
115
142
|
errors: [
|
|
@@ -144,6 +171,11 @@ Given a collection of price feed ids, retrieve the latest Pyth price for each pr
|
|
|
144
171
|
type: "Query",
|
|
145
172
|
schema: zod_1.z.boolean().optional(),
|
|
146
173
|
},
|
|
174
|
+
{
|
|
175
|
+
name: "ignore_invalid_price_ids",
|
|
176
|
+
type: "Query",
|
|
177
|
+
schema: zod_1.z.boolean().optional(),
|
|
178
|
+
},
|
|
147
179
|
],
|
|
148
180
|
response: PriceUpdate,
|
|
149
181
|
errors: [
|
|
@@ -186,6 +218,11 @@ Given a collection of price feed ids, retrieve the latest Pyth price for each pr
|
|
|
186
218
|
type: "Query",
|
|
187
219
|
schema: zod_1.z.boolean().optional(),
|
|
188
220
|
},
|
|
221
|
+
{
|
|
222
|
+
name: "ignore_invalid_price_ids",
|
|
223
|
+
type: "Query",
|
|
224
|
+
schema: zod_1.z.boolean().optional(),
|
|
225
|
+
},
|
|
189
226
|
],
|
|
190
227
|
response: PriceUpdate,
|
|
191
228
|
errors: [
|
|
@@ -196,6 +233,26 @@ Given a collection of price feed ids, retrieve the latest Pyth price for each pr
|
|
|
196
233
|
},
|
|
197
234
|
],
|
|
198
235
|
},
|
|
236
|
+
{
|
|
237
|
+
method: "get",
|
|
238
|
+
path: "/v2/updates/publisher_stake_caps/latest",
|
|
239
|
+
alias: "latest_publisher_stake_caps",
|
|
240
|
+
description: `Get the most recent publisher stake caps update data.`,
|
|
241
|
+
requestFormat: "json",
|
|
242
|
+
parameters: [
|
|
243
|
+
{
|
|
244
|
+
name: "encoding",
|
|
245
|
+
type: "Query",
|
|
246
|
+
schema: zod_1.z.enum(["hex", "base64"]).optional(),
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
name: "parsed",
|
|
250
|
+
type: "Query",
|
|
251
|
+
schema: zod_1.z.boolean().optional(),
|
|
252
|
+
},
|
|
253
|
+
],
|
|
254
|
+
response: LatestPublisherStakeCapsUpdateDataResponse,
|
|
255
|
+
},
|
|
199
256
|
]);
|
|
200
257
|
exports.api = new core_1.Zodios(endpoints);
|
|
201
258
|
function createApiClient(baseUrl, options) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pythnetwork/hermes-client",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Pyth Hermes Client",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Pyth Data Association"
|
|
@@ -20,16 +20,14 @@
|
|
|
20
20
|
"access": "public"
|
|
21
21
|
},
|
|
22
22
|
"scripts": {
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"check-hermes-api-types": "git diff --exit-code src/zodSchemas.ts",
|
|
28
|
-
"example": "pnpm run build && node lib/examples/HermesClient.js",
|
|
23
|
+
"build:typescript": "tsc",
|
|
24
|
+
"build:schemas": "openapi-zod-client ./schema.json --output src/zodSchemas.ts",
|
|
25
|
+
"pull:schema": "curl -o schema.json -z schema.json https://hermes.pyth.network/docs/openapi.json",
|
|
26
|
+
"example": "node lib/examples/HermesClient.js",
|
|
29
27
|
"format": "prettier --write \"src/**/*.ts\"",
|
|
30
|
-
"lint": "eslint src/",
|
|
31
|
-
"prepublishOnly": "pnpm run build && pnpm
|
|
32
|
-
"preversion": "pnpm run lint",
|
|
28
|
+
"test:lint": "eslint src/",
|
|
29
|
+
"prepublishOnly": "pnpm run build:typescript && pnpm run test:lint",
|
|
30
|
+
"preversion": "pnpm run test:lint",
|
|
33
31
|
"version": "pnpm run format && git add -A src"
|
|
34
32
|
},
|
|
35
33
|
"keywords": [
|
|
@@ -57,5 +55,5 @@
|
|
|
57
55
|
"eventsource": "^2.0.2",
|
|
58
56
|
"zod": "^3.23.8"
|
|
59
57
|
},
|
|
60
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "733971809a4415c420922477a162aff3789a7774"
|
|
61
59
|
}
|