@chainlink/cre-sdk 1.0.7 → 1.0.9
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/README.md +7 -9
- package/dist/generated/capabilities/blockchain/evm/v1alpha/client_pb.js +1 -1
- package/dist/generated/capabilities/networking/confidentialhttp/v1alpha/client_pb.d.ts +201 -98
- package/dist/generated/capabilities/networking/confidentialhttp/v1alpha/client_pb.js +18 -18
- package/dist/generated-sdk/capabilities/blockchain/evm/v1alpha/client_sdk_gen.d.ts +3 -4
- package/dist/generated-sdk/capabilities/blockchain/evm/v1alpha/client_sdk_gen.js +3 -4
- package/dist/generated-sdk/capabilities/networking/confidentialhttp/v1alpha/client_sdk_gen.d.ts +9 -9
- package/dist/generated-sdk/capabilities/networking/confidentialhttp/v1alpha/client_sdk_gen.js +15 -15
- package/dist/sdk/cre/index.d.ts +1 -1
- package/dist/sdk/utils/capabilities/http/http-helpers.d.ts +7 -7
- package/package.json +2 -2
- package/scripts/src/cre-setup.ts +1 -1
package/README.md
CHANGED
|
@@ -60,7 +60,7 @@ Then run `cre init`, name your project and choose TypeScript as the language to
|
|
|
60
60
|
|
|
61
61
|
This TypeScript CRE SDK also includes some reference examples - [cre-sdk-examples](https://github.com/smartcontractkit/cre-sdk-typescript/tree/main/packages/cre-sdk-examples). These can be copied and pasted into your project as needed.
|
|
62
62
|
|
|
63
|
-
⚠️ Note however that these are refence TypeScript workflows and may require some additional steps (having the CRE CLI installed, running `
|
|
63
|
+
⚠️ Note however that these are refence TypeScript workflows and may require some additional steps (having the CRE CLI installed, running `bun x cre-setup` from inside a workflow example directory, etc) to get them to work within this repo.
|
|
64
64
|
|
|
65
65
|
**We recommend you setup your project using the CRE CLI and then copy and paste these examples into your project**
|
|
66
66
|
|
|
@@ -149,11 +149,9 @@ const fetchData = (sendRequester: HTTPSendRequester, config: Config) => {
|
|
|
149
149
|
const onCronTrigger = (runtime: Runtime<Config>) => {
|
|
150
150
|
const httpCapability = new cre.capabilities.HTTPClient();
|
|
151
151
|
return httpCapability
|
|
152
|
-
.sendRequest(
|
|
153
|
-
runtime,
|
|
154
|
-
|
|
155
|
-
consensusMedianAggregation()
|
|
156
|
-
)(runtime.config)
|
|
152
|
+
.sendRequest(runtime, fetchData, consensusMedianAggregation())(
|
|
153
|
+
runtime.config,
|
|
154
|
+
)
|
|
157
155
|
.result();
|
|
158
156
|
};
|
|
159
157
|
```
|
|
@@ -190,7 +188,7 @@ const onCronTrigger = (runtime: Runtime<Config>) => {
|
|
|
190
188
|
if (!network) throw new Error("Network not found");
|
|
191
189
|
|
|
192
190
|
const evmClient = new cre.capabilities.EVMClient(
|
|
193
|
-
network.chainSelector.selector
|
|
191
|
+
network.chainSelector.selector,
|
|
194
192
|
);
|
|
195
193
|
|
|
196
194
|
// Read from blockchain
|
|
@@ -239,7 +237,7 @@ const configSchema = z.object({
|
|
|
239
237
|
z.object({
|
|
240
238
|
chainSelectorName: z.string(),
|
|
241
239
|
contractAddress: z.string(),
|
|
242
|
-
})
|
|
240
|
+
}),
|
|
243
241
|
),
|
|
244
242
|
});
|
|
245
243
|
|
|
@@ -267,7 +265,7 @@ const fetchDataFunction = async (nodeRuntime: NodeRuntime<Config>) => 42;
|
|
|
267
265
|
// Execute function across multiple nodes and aggregate results
|
|
268
266
|
const aggregatedValue = await runtime.runInNodeMode(
|
|
269
267
|
fetchDataFunction,
|
|
270
|
-
consensusMedianAggregation()
|
|
268
|
+
consensusMedianAggregation(),
|
|
271
269
|
)();
|
|
272
270
|
```
|
|
273
271
|
|
|
@@ -10,7 +10,7 @@ import { file_values_v1_values } from '../../../../values/v1/values_pb';
|
|
|
10
10
|
*/
|
|
11
11
|
export const file_capabilities_blockchain_evm_v1alpha_client =
|
|
12
12
|
/*@__PURE__*/
|
|
13
|
-
fileDesc('
|
|
13
|
+
fileDesc('CjBjYXBhYmlsaXRpZXMvYmxvY2tjaGFpbi9ldm0vdjFhbHBoYS9jbGllbnQucHJvdG8SI2Nh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cQmxvY2tjaGFpblxFdm1cVjFhbHBoYeICL0NhcGFiaWxpdGllc1xCbG9ja2NoYWluXEV2bVxWMWFscGhhXEdQQk1ldGFkYXRh6gImQ2FwYWJpbGl0aWVzOjpCbG9ja2NoYWluOjpFdm06OlYxYWxwaGFiBnByb3RvMw', [file_sdk_v1alpha_sdk, file_tools_generator_v1alpha_cre_metadata, file_values_v1_values]);
|
|
14
14
|
/**
|
|
15
15
|
* Describes the message capabilities.blockchain.evm.v1alpha.TopicValues.
|
|
16
16
|
* Use `create(TopicValuesSchema)` to create a new message.
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Message } from '@bufbuild/protobuf';
|
|
2
2
|
import type { GenFile, GenMessage, GenService } from '@bufbuild/protobuf/codegenv2';
|
|
3
|
+
import type { Duration, DurationJson } from '@bufbuild/protobuf/wkt';
|
|
3
4
|
/**
|
|
4
5
|
* Describes the file capabilities/networking/confidentialhttp/v1alpha/client.proto.
|
|
5
6
|
*/
|
|
@@ -46,200 +47,302 @@ export declare const SecretIdentifierSchema: GenMessage<SecretIdentifier, {
|
|
|
46
47
|
jsonType: SecretIdentifierJson;
|
|
47
48
|
}>;
|
|
48
49
|
/**
|
|
49
|
-
*
|
|
50
|
+
* HeaderValues represents multiple values for a single header key.
|
|
51
|
+
*
|
|
52
|
+
* @generated from message capabilities.networking.confidentialhttp.v1alpha.HeaderValues
|
|
50
53
|
*/
|
|
51
|
-
export type
|
|
54
|
+
export type HeaderValues = Message<'capabilities.networking.confidentialhttp.v1alpha.HeaderValues'> & {
|
|
52
55
|
/**
|
|
56
|
+
* @generated from field: repeated string values = 1;
|
|
57
|
+
*/
|
|
58
|
+
values: string[];
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* HeaderValues represents multiple values for a single header key.
|
|
62
|
+
*
|
|
63
|
+
* @generated from message capabilities.networking.confidentialhttp.v1alpha.HeaderValues
|
|
64
|
+
*/
|
|
65
|
+
export type HeaderValuesJson = {
|
|
66
|
+
/**
|
|
67
|
+
* @generated from field: repeated string values = 1;
|
|
68
|
+
*/
|
|
69
|
+
values?: string[];
|
|
70
|
+
};
|
|
71
|
+
/**
|
|
72
|
+
* Describes the message capabilities.networking.confidentialhttp.v1alpha.HeaderValues.
|
|
73
|
+
* Use `create(HeaderValuesSchema)` to create a new message.
|
|
74
|
+
*/
|
|
75
|
+
export declare const HeaderValuesSchema: GenMessage<HeaderValues, {
|
|
76
|
+
jsonType: HeaderValuesJson;
|
|
77
|
+
}>;
|
|
78
|
+
/**
|
|
79
|
+
* HTTPRequest contains the HTTP fields used to make a request from the enclave.
|
|
80
|
+
*
|
|
81
|
+
* @generated from message capabilities.networking.confidentialhttp.v1alpha.HTTPRequest
|
|
82
|
+
*/
|
|
83
|
+
export type HTTPRequest = Message<'capabilities.networking.confidentialhttp.v1alpha.HTTPRequest'> & {
|
|
84
|
+
/**
|
|
85
|
+
* url is the endpoint to which the request is sent.
|
|
86
|
+
*
|
|
53
87
|
* @generated from field: string url = 1;
|
|
54
88
|
*/
|
|
55
89
|
url: string;
|
|
56
90
|
/**
|
|
91
|
+
* method is the HTTP method (GET, POST, PUT, DELETE, etc.).
|
|
92
|
+
*
|
|
57
93
|
* @generated from field: string method = 2;
|
|
58
94
|
*/
|
|
59
95
|
method: string;
|
|
60
96
|
/**
|
|
61
|
-
*
|
|
97
|
+
* body is the request body - either a string template or raw bytes.
|
|
98
|
+
*
|
|
99
|
+
* @generated from oneof capabilities.networking.confidentialhttp.v1alpha.HTTPRequest.body
|
|
62
100
|
*/
|
|
63
|
-
body:
|
|
101
|
+
body: {
|
|
102
|
+
/**
|
|
103
|
+
* @generated from field: string body_string = 3;
|
|
104
|
+
*/
|
|
105
|
+
value: string;
|
|
106
|
+
case: 'bodyString';
|
|
107
|
+
} | {
|
|
108
|
+
/**
|
|
109
|
+
* @generated from field: bytes body_bytes = 8;
|
|
110
|
+
*/
|
|
111
|
+
value: Uint8Array;
|
|
112
|
+
case: 'bodyBytes';
|
|
113
|
+
} | {
|
|
114
|
+
case: undefined;
|
|
115
|
+
value?: undefined;
|
|
116
|
+
};
|
|
64
117
|
/**
|
|
65
|
-
*
|
|
118
|
+
* multi_headers are the request headers as name-value pairs.
|
|
119
|
+
* Supports multiple values per header key.
|
|
120
|
+
*
|
|
121
|
+
* @generated from field: map<string, capabilities.networking.confidentialhttp.v1alpha.HeaderValues> multi_headers = 4;
|
|
66
122
|
*/
|
|
67
|
-
|
|
123
|
+
multiHeaders: {
|
|
124
|
+
[key: string]: HeaderValues;
|
|
125
|
+
};
|
|
68
126
|
/**
|
|
69
|
-
*
|
|
127
|
+
* template_public_values are public values used to fill in request body and header templates.
|
|
128
|
+
*
|
|
129
|
+
* @generated from field: map<string, string> template_public_values = 5;
|
|
70
130
|
*/
|
|
71
|
-
|
|
131
|
+
templatePublicValues: {
|
|
72
132
|
[key: string]: string;
|
|
73
133
|
};
|
|
74
134
|
/**
|
|
75
|
-
*
|
|
135
|
+
* custom_root_ca_cert_pem is an optional custom root CA certificate (PEM format)
|
|
136
|
+
* for verifying the external server's TLS certificate.
|
|
137
|
+
*
|
|
138
|
+
* @generated from field: bytes custom_root_ca_cert_pem = 6;
|
|
139
|
+
*/
|
|
140
|
+
customRootCaCertPem: Uint8Array;
|
|
141
|
+
/**
|
|
142
|
+
* timeout is the request timeout duration.
|
|
143
|
+
*
|
|
144
|
+
* @generated from field: google.protobuf.Duration timeout = 7;
|
|
76
145
|
*/
|
|
77
|
-
|
|
146
|
+
timeout?: Duration;
|
|
78
147
|
};
|
|
79
148
|
/**
|
|
80
|
-
*
|
|
149
|
+
* HTTPRequest contains the HTTP fields used to make a request from the enclave.
|
|
150
|
+
*
|
|
151
|
+
* @generated from message capabilities.networking.confidentialhttp.v1alpha.HTTPRequest
|
|
81
152
|
*/
|
|
82
|
-
export type
|
|
153
|
+
export type HTTPRequestJson = {
|
|
83
154
|
/**
|
|
155
|
+
* url is the endpoint to which the request is sent.
|
|
156
|
+
*
|
|
84
157
|
* @generated from field: string url = 1;
|
|
85
158
|
*/
|
|
86
159
|
url?: string;
|
|
87
160
|
/**
|
|
161
|
+
* method is the HTTP method (GET, POST, PUT, DELETE, etc.).
|
|
162
|
+
*
|
|
88
163
|
* @generated from field: string method = 2;
|
|
89
164
|
*/
|
|
90
165
|
method?: string;
|
|
91
166
|
/**
|
|
92
|
-
* @generated from field: string
|
|
167
|
+
* @generated from field: string body_string = 3;
|
|
93
168
|
*/
|
|
94
|
-
|
|
169
|
+
bodyString?: string;
|
|
95
170
|
/**
|
|
96
|
-
* @generated from field:
|
|
171
|
+
* @generated from field: bytes body_bytes = 8;
|
|
97
172
|
*/
|
|
98
|
-
|
|
173
|
+
bodyBytes?: string;
|
|
99
174
|
/**
|
|
100
|
-
*
|
|
175
|
+
* multi_headers are the request headers as name-value pairs.
|
|
176
|
+
* Supports multiple values per header key.
|
|
177
|
+
*
|
|
178
|
+
* @generated from field: map<string, capabilities.networking.confidentialhttp.v1alpha.HeaderValues> multi_headers = 4;
|
|
101
179
|
*/
|
|
102
|
-
|
|
180
|
+
multiHeaders?: {
|
|
181
|
+
[key: string]: HeaderValuesJson;
|
|
182
|
+
};
|
|
183
|
+
/**
|
|
184
|
+
* template_public_values are public values used to fill in request body and header templates.
|
|
185
|
+
*
|
|
186
|
+
* @generated from field: map<string, string> template_public_values = 5;
|
|
187
|
+
*/
|
|
188
|
+
templatePublicValues?: {
|
|
103
189
|
[key: string]: string;
|
|
104
190
|
};
|
|
105
191
|
/**
|
|
106
|
-
*
|
|
192
|
+
* custom_root_ca_cert_pem is an optional custom root CA certificate (PEM format)
|
|
193
|
+
* for verifying the external server's TLS certificate.
|
|
194
|
+
*
|
|
195
|
+
* @generated from field: bytes custom_root_ca_cert_pem = 6;
|
|
196
|
+
*/
|
|
197
|
+
customRootCaCertPem?: string;
|
|
198
|
+
/**
|
|
199
|
+
* timeout is the request timeout duration.
|
|
200
|
+
*
|
|
201
|
+
* @generated from field: google.protobuf.Duration timeout = 7;
|
|
107
202
|
*/
|
|
108
|
-
|
|
203
|
+
timeout?: DurationJson;
|
|
109
204
|
};
|
|
110
205
|
/**
|
|
111
|
-
* Describes the message capabilities.networking.confidentialhttp.v1alpha.
|
|
112
|
-
* Use `create(
|
|
206
|
+
* Describes the message capabilities.networking.confidentialhttp.v1alpha.HTTPRequest.
|
|
207
|
+
* Use `create(HTTPRequestSchema)` to create a new message.
|
|
113
208
|
*/
|
|
114
|
-
export declare const
|
|
115
|
-
jsonType:
|
|
209
|
+
export declare const HTTPRequestSchema: GenMessage<HTTPRequest, {
|
|
210
|
+
jsonType: HTTPRequestJson;
|
|
116
211
|
}>;
|
|
117
212
|
/**
|
|
118
|
-
*
|
|
213
|
+
* HTTPResponse contains the HTTP response from the enclave.
|
|
214
|
+
*
|
|
215
|
+
* @generated from message capabilities.networking.confidentialhttp.v1alpha.HTTPResponse
|
|
119
216
|
*/
|
|
120
|
-
export type
|
|
217
|
+
export type HTTPResponse = Message<'capabilities.networking.confidentialhttp.v1alpha.HTTPResponse'> & {
|
|
121
218
|
/**
|
|
122
|
-
*
|
|
219
|
+
* status_code is the HTTP status code.
|
|
220
|
+
*
|
|
221
|
+
* @generated from field: uint32 status_code = 1;
|
|
123
222
|
*/
|
|
124
|
-
statusCode:
|
|
223
|
+
statusCode: number;
|
|
125
224
|
/**
|
|
225
|
+
* body is the response body.
|
|
226
|
+
*
|
|
126
227
|
* @generated from field: bytes body = 2;
|
|
127
228
|
*/
|
|
128
229
|
body: Uint8Array;
|
|
230
|
+
/**
|
|
231
|
+
* multi_headers are the response headers.
|
|
232
|
+
* Supports multiple values per header key.
|
|
233
|
+
*
|
|
234
|
+
* @generated from field: map<string, capabilities.networking.confidentialhttp.v1alpha.HeaderValues> multi_headers = 3;
|
|
235
|
+
*/
|
|
236
|
+
multiHeaders: {
|
|
237
|
+
[key: string]: HeaderValues;
|
|
238
|
+
};
|
|
129
239
|
};
|
|
130
240
|
/**
|
|
131
|
-
*
|
|
241
|
+
* HTTPResponse contains the HTTP response from the enclave.
|
|
242
|
+
*
|
|
243
|
+
* @generated from message capabilities.networking.confidentialhttp.v1alpha.HTTPResponse
|
|
132
244
|
*/
|
|
133
|
-
export type
|
|
245
|
+
export type HTTPResponseJson = {
|
|
134
246
|
/**
|
|
135
|
-
*
|
|
247
|
+
* status_code is the HTTP status code.
|
|
248
|
+
*
|
|
249
|
+
* @generated from field: uint32 status_code = 1;
|
|
136
250
|
*/
|
|
137
|
-
statusCode?:
|
|
251
|
+
statusCode?: number;
|
|
138
252
|
/**
|
|
253
|
+
* body is the response body.
|
|
254
|
+
*
|
|
139
255
|
* @generated from field: bytes body = 2;
|
|
140
256
|
*/
|
|
141
257
|
body?: string;
|
|
142
|
-
};
|
|
143
|
-
/**
|
|
144
|
-
* Describes the message capabilities.networking.confidentialhttp.v1alpha.ResponseTemplate.
|
|
145
|
-
* Use `create(ResponseTemplateSchema)` to create a new message.
|
|
146
|
-
*/
|
|
147
|
-
export declare const ResponseTemplateSchema: GenMessage<ResponseTemplate, {
|
|
148
|
-
jsonType: ResponseTemplateJson;
|
|
149
|
-
}>;
|
|
150
|
-
/**
|
|
151
|
-
* @generated from message capabilities.networking.confidentialhttp.v1alpha.HTTPEnclaveRequestData
|
|
152
|
-
*/
|
|
153
|
-
export type HTTPEnclaveRequestData = Message<'capabilities.networking.confidentialhttp.v1alpha.HTTPEnclaveRequestData'> & {
|
|
154
258
|
/**
|
|
155
|
-
*
|
|
259
|
+
* multi_headers are the response headers.
|
|
260
|
+
* Supports multiple values per header key.
|
|
261
|
+
*
|
|
262
|
+
* @generated from field: map<string, capabilities.networking.confidentialhttp.v1alpha.HeaderValues> multi_headers = 3;
|
|
156
263
|
*/
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
* @generated from message capabilities.networking.confidentialhttp.v1alpha.HTTPEnclaveRequestData
|
|
161
|
-
*/
|
|
162
|
-
export type HTTPEnclaveRequestDataJson = {
|
|
163
|
-
/**
|
|
164
|
-
* @generated from field: repeated capabilities.networking.confidentialhttp.v1alpha.Request requests = 1;
|
|
165
|
-
*/
|
|
166
|
-
requests?: RequestJson[];
|
|
264
|
+
multiHeaders?: {
|
|
265
|
+
[key: string]: HeaderValuesJson;
|
|
266
|
+
};
|
|
167
267
|
};
|
|
168
268
|
/**
|
|
169
|
-
* Describes the message capabilities.networking.confidentialhttp.v1alpha.
|
|
170
|
-
* Use `create(
|
|
269
|
+
* Describes the message capabilities.networking.confidentialhttp.v1alpha.HTTPResponse.
|
|
270
|
+
* Use `create(HTTPResponseSchema)` to create a new message.
|
|
171
271
|
*/
|
|
172
|
-
export declare const
|
|
173
|
-
jsonType:
|
|
272
|
+
export declare const HTTPResponseSchema: GenMessage<HTTPResponse, {
|
|
273
|
+
jsonType: HTTPResponseJson;
|
|
174
274
|
}>;
|
|
175
275
|
/**
|
|
176
|
-
*
|
|
276
|
+
* ConfidentialHTTPRequest is the input provided to the confidential HTTP capability.
|
|
277
|
+
* It combines an HTTPRequest with secrets from VaultDON.
|
|
278
|
+
*
|
|
279
|
+
* @generated from message capabilities.networking.confidentialhttp.v1alpha.ConfidentialHTTPRequest
|
|
177
280
|
*/
|
|
178
|
-
export type
|
|
281
|
+
export type ConfidentialHTTPRequest = Message<'capabilities.networking.confidentialhttp.v1alpha.ConfidentialHTTPRequest'> & {
|
|
179
282
|
/**
|
|
180
283
|
* @generated from field: repeated capabilities.networking.confidentialhttp.v1alpha.SecretIdentifier vault_don_secrets = 1;
|
|
181
284
|
*/
|
|
182
285
|
vaultDonSecrets: SecretIdentifier[];
|
|
183
286
|
/**
|
|
184
|
-
* @generated from field: capabilities.networking.confidentialhttp.v1alpha.
|
|
287
|
+
* @generated from field: capabilities.networking.confidentialhttp.v1alpha.HTTPRequest request = 2;
|
|
185
288
|
*/
|
|
186
|
-
|
|
289
|
+
request?: HTTPRequest;
|
|
290
|
+
/**
|
|
291
|
+
* encrypt_output controls whether the enclave response should be encrypted.
|
|
292
|
+
* If true and a secret named "san_marino_aes_gcm_encryption_key" is provided,
|
|
293
|
+
* the response will be AES-GCM encrypted using that key.
|
|
294
|
+
* If true and no such key is provided, the response will be TDH2 encrypted
|
|
295
|
+
* using the VaultDON master public key.
|
|
296
|
+
* Default is false (response returned unencrypted).
|
|
297
|
+
*
|
|
298
|
+
* @generated from field: bool encrypt_output = 3;
|
|
299
|
+
*/
|
|
300
|
+
encryptOutput: boolean;
|
|
187
301
|
};
|
|
188
302
|
/**
|
|
189
|
-
*
|
|
303
|
+
* ConfidentialHTTPRequest is the input provided to the confidential HTTP capability.
|
|
304
|
+
* It combines an HTTPRequest with secrets from VaultDON.
|
|
305
|
+
*
|
|
306
|
+
* @generated from message capabilities.networking.confidentialhttp.v1alpha.ConfidentialHTTPRequest
|
|
190
307
|
*/
|
|
191
|
-
export type
|
|
308
|
+
export type ConfidentialHTTPRequestJson = {
|
|
192
309
|
/**
|
|
193
310
|
* @generated from field: repeated capabilities.networking.confidentialhttp.v1alpha.SecretIdentifier vault_don_secrets = 1;
|
|
194
311
|
*/
|
|
195
312
|
vaultDonSecrets?: SecretIdentifierJson[];
|
|
196
313
|
/**
|
|
197
|
-
* @generated from field: capabilities.networking.confidentialhttp.v1alpha.
|
|
198
|
-
*/
|
|
199
|
-
input?: HTTPEnclaveRequestDataJson;
|
|
200
|
-
};
|
|
201
|
-
/**
|
|
202
|
-
* Describes the message capabilities.networking.confidentialhttp.v1alpha.EnclaveActionInput.
|
|
203
|
-
* Use `create(EnclaveActionInputSchema)` to create a new message.
|
|
204
|
-
*/
|
|
205
|
-
export declare const EnclaveActionInputSchema: GenMessage<EnclaveActionInput, {
|
|
206
|
-
jsonType: EnclaveActionInputJson;
|
|
207
|
-
}>;
|
|
208
|
-
/**
|
|
209
|
-
* @generated from message capabilities.networking.confidentialhttp.v1alpha.HTTPEnclaveResponseData
|
|
210
|
-
*/
|
|
211
|
-
export type HTTPEnclaveResponseData = Message<'capabilities.networking.confidentialhttp.v1alpha.HTTPEnclaveResponseData'> & {
|
|
212
|
-
/**
|
|
213
|
-
* @generated from field: repeated capabilities.networking.confidentialhttp.v1alpha.ResponseTemplate responses = 1;
|
|
314
|
+
* @generated from field: capabilities.networking.confidentialhttp.v1alpha.HTTPRequest request = 2;
|
|
214
315
|
*/
|
|
215
|
-
|
|
216
|
-
};
|
|
217
|
-
/**
|
|
218
|
-
* @generated from message capabilities.networking.confidentialhttp.v1alpha.HTTPEnclaveResponseData
|
|
219
|
-
*/
|
|
220
|
-
export type HTTPEnclaveResponseDataJson = {
|
|
316
|
+
request?: HTTPRequestJson;
|
|
221
317
|
/**
|
|
222
|
-
*
|
|
318
|
+
* encrypt_output controls whether the enclave response should be encrypted.
|
|
319
|
+
* If true and a secret named "san_marino_aes_gcm_encryption_key" is provided,
|
|
320
|
+
* the response will be AES-GCM encrypted using that key.
|
|
321
|
+
* If true and no such key is provided, the response will be TDH2 encrypted
|
|
322
|
+
* using the VaultDON master public key.
|
|
323
|
+
* Default is false (response returned unencrypted).
|
|
324
|
+
*
|
|
325
|
+
* @generated from field: bool encrypt_output = 3;
|
|
223
326
|
*/
|
|
224
|
-
|
|
327
|
+
encryptOutput?: boolean;
|
|
225
328
|
};
|
|
226
329
|
/**
|
|
227
|
-
* Describes the message capabilities.networking.confidentialhttp.v1alpha.
|
|
228
|
-
* Use `create(
|
|
330
|
+
* Describes the message capabilities.networking.confidentialhttp.v1alpha.ConfidentialHTTPRequest.
|
|
331
|
+
* Use `create(ConfidentialHTTPRequestSchema)` to create a new message.
|
|
229
332
|
*/
|
|
230
|
-
export declare const
|
|
231
|
-
jsonType:
|
|
333
|
+
export declare const ConfidentialHTTPRequestSchema: GenMessage<ConfidentialHTTPRequest, {
|
|
334
|
+
jsonType: ConfidentialHTTPRequestJson;
|
|
232
335
|
}>;
|
|
233
336
|
/**
|
|
234
337
|
* @generated from service capabilities.networking.confidentialhttp.v1alpha.Client
|
|
235
338
|
*/
|
|
236
339
|
export declare const Client: GenService<{
|
|
237
340
|
/**
|
|
238
|
-
* @generated from rpc capabilities.networking.confidentialhttp.v1alpha.Client.
|
|
341
|
+
* @generated from rpc capabilities.networking.confidentialhttp.v1alpha.Client.SendRequest
|
|
239
342
|
*/
|
|
240
|
-
|
|
343
|
+
sendRequest: {
|
|
241
344
|
methodKind: 'unary';
|
|
242
|
-
input: typeof
|
|
243
|
-
output: typeof
|
|
345
|
+
input: typeof ConfidentialHTTPRequestSchema;
|
|
346
|
+
output: typeof HTTPResponseSchema;
|
|
244
347
|
};
|
|
245
348
|
}>;
|
|
@@ -2,45 +2,45 @@
|
|
|
2
2
|
// @generated from file capabilities/networking/confidentialhttp/v1alpha/client.proto (package capabilities.networking.confidentialhttp.v1alpha, syntax proto3)
|
|
3
3
|
/* eslint-disable */
|
|
4
4
|
import { fileDesc, messageDesc, serviceDesc } from '@bufbuild/protobuf/codegenv2';
|
|
5
|
+
import { file_google_protobuf_duration } from '@bufbuild/protobuf/wkt';
|
|
5
6
|
import { file_tools_generator_v1alpha_cre_metadata } from '../../../../tools/generator/v1alpha/cre_metadata_pb';
|
|
6
7
|
/**
|
|
7
8
|
* Describes the file capabilities/networking/confidentialhttp/v1alpha/client.proto.
|
|
8
9
|
*/
|
|
9
10
|
export const file_capabilities_networking_confidentialhttp_v1alpha_client =
|
|
10
11
|
/*@__PURE__*/
|
|
11
|
-
fileDesc('
|
|
12
|
+
fileDesc('Cj1jYXBhYmlsaXRpZXMvbmV0d29ya2luZy9jb25maWRlbnRpYWxodHRwL3YxYWxwaGEvY2xpZW50LnByb3RvEjBjYXBhYmlsaXRpZXMubmV0d29ya2luZy5jb25maWRlbnRpYWxodHRwLnYxYWxwaGEiUAoQU2VjcmV0SWRlbnRpZmllchILCgNrZXkYASABKAkSEQoJbmFtZXNwYWNlGAIgASgJEhIKBW93bmVyGAMgASgJSACIAQFCCAoGX293bmVyIh4KDEhlYWRlclZhbHVlcxIOCgZ2YWx1ZXMYASADKAkivwQKC0hUVFBSZXF1ZXN0EgsKA3VybBgBIAEoCRIOCgZtZXRob2QYAiABKAkSFQoL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AEKF0NvbmZpZGVudGlhbEhUVFBSZXF1ZXN0El0KEXZhdWx0X2Rvbl9zZWNyZXRzGAEgAygLMkIuY2FwYWJpbGl0aWVzLm5ldHdvcmtpbmcuY29uZmlkZW50aWFsaHR0cC52MWFscGhhLlNlY3JldElkZW50aWZpZXISTgoHcmVxdWVzdBgCIAEoCzI9LmNhcGFiaWxpdGllcy5uZXR3b3JraW5nLmNvbmZpZGVudGlhbGh0dHAudjFhbHBoYS5IVFRQUmVxdWVzdBIWCg5lbmNyeXB0X291dHB1dBgDIAEoCDLKAQoGQ2xpZW50EpgBCgtTZW5kUmVxdWVzdBJJLmNhcGFiaWxpdGllcy5uZXR3b3JraW5nLmNvbmZpZGVudGlhbGh0dHAudjFhbHBoYS5Db25maWRlbnRpYWxIVFRQUmVxdWVzdBo+LmNhcGFiaWxpdGllcy5uZXR3b3JraW5nLmNvbmZpZGVudGlhbGh0dHAudjFhbHBoYS5IVFRQUmVzcG9uc2UaJYK1GCEIAhIdY29uZmlkZW50aWFsLWh0dHBAMS4wLjAtYWxwaGFCpgIKNGNvbS5jYXBhYmlsaXRpZXMubmV0d29ya2luZy5jb25maWRlbnRpYWxodHRwLnYxYWxwaGFCC0NsaWVudFByb3RvUAGiAgNDTkOqAjBDYXBhYmlsaXRpZXMuTmV0d29ya2luZy5Db25maWRlbnRpYWxodHRwLlYxYWxwaGHKAjBDYXBhYmlsaXRpZXNcTmV0d29ya2luZ1xDb25maWRlbnRpYWxodHRwXFYxYWxwaGHiAjxDYXBhYmlsaXRpZXNcTmV0d29ya2luZ1xDb25maWRlbnRpYWxodHRwXFYxYWxwaGFcR1BCTWV0YWRhdGHqAjNDYXBhYmlsaXRpZXM6Ok5ldHdvcmtpbmc6OkNvbmZpZGVudGlhbGh0dHA6OlYxYWxwaGFiBnByb3RvMw', [file_google_protobuf_duration, file_tools_generator_v1alpha_cre_metadata]);
|
|
12
13
|
/**
|
|
13
14
|
* Describes the message capabilities.networking.confidentialhttp.v1alpha.SecretIdentifier.
|
|
14
15
|
* Use `create(SecretIdentifierSchema)` to create a new message.
|
|
15
16
|
*/
|
|
16
17
|
export const SecretIdentifierSchema = /*@__PURE__*/ messageDesc(file_capabilities_networking_confidentialhttp_v1alpha_client, 0);
|
|
17
18
|
/**
|
|
18
|
-
* Describes the message capabilities.networking.confidentialhttp.v1alpha.
|
|
19
|
-
* Use `create(
|
|
19
|
+
* Describes the message capabilities.networking.confidentialhttp.v1alpha.HeaderValues.
|
|
20
|
+
* Use `create(HeaderValuesSchema)` to create a new message.
|
|
20
21
|
*/
|
|
21
|
-
export const
|
|
22
|
+
export const HeaderValuesSchema =
|
|
22
23
|
/*@__PURE__*/
|
|
23
24
|
messageDesc(file_capabilities_networking_confidentialhttp_v1alpha_client, 1);
|
|
24
25
|
/**
|
|
25
|
-
* Describes the message capabilities.networking.confidentialhttp.v1alpha.
|
|
26
|
-
* Use `create(
|
|
26
|
+
* Describes the message capabilities.networking.confidentialhttp.v1alpha.HTTPRequest.
|
|
27
|
+
* Use `create(HTTPRequestSchema)` to create a new message.
|
|
27
28
|
*/
|
|
28
|
-
export const
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
* Use `create(HTTPEnclaveRequestDataSchema)` to create a new message.
|
|
32
|
-
*/
|
|
33
|
-
export const HTTPEnclaveRequestDataSchema = /*@__PURE__*/ messageDesc(file_capabilities_networking_confidentialhttp_v1alpha_client, 3);
|
|
29
|
+
export const HTTPRequestSchema =
|
|
30
|
+
/*@__PURE__*/
|
|
31
|
+
messageDesc(file_capabilities_networking_confidentialhttp_v1alpha_client, 2);
|
|
34
32
|
/**
|
|
35
|
-
* Describes the message capabilities.networking.confidentialhttp.v1alpha.
|
|
36
|
-
* Use `create(
|
|
33
|
+
* Describes the message capabilities.networking.confidentialhttp.v1alpha.HTTPResponse.
|
|
34
|
+
* Use `create(HTTPResponseSchema)` to create a new message.
|
|
37
35
|
*/
|
|
38
|
-
export const
|
|
36
|
+
export const HTTPResponseSchema =
|
|
37
|
+
/*@__PURE__*/
|
|
38
|
+
messageDesc(file_capabilities_networking_confidentialhttp_v1alpha_client, 3);
|
|
39
39
|
/**
|
|
40
|
-
* Describes the message capabilities.networking.confidentialhttp.v1alpha.
|
|
41
|
-
* Use `create(
|
|
40
|
+
* Describes the message capabilities.networking.confidentialhttp.v1alpha.ConfidentialHTTPRequest.
|
|
41
|
+
* Use `create(ConfidentialHTTPRequestSchema)` to create a new message.
|
|
42
42
|
*/
|
|
43
|
-
export const
|
|
43
|
+
export const ConfidentialHTTPRequestSchema = /*@__PURE__*/ messageDesc(file_capabilities_networking_confidentialhttp_v1alpha_client, 4);
|
|
44
44
|
/**
|
|
45
45
|
* @generated from service capabilities.networking.confidentialhttp.v1alpha.Client
|
|
46
46
|
*/
|
|
@@ -36,12 +36,13 @@ export declare class ClientCapability {
|
|
|
36
36
|
readonly 'arc-testnet': 3034092155422581607n;
|
|
37
37
|
readonly 'avalanche-mainnet': 6433500567565415381n;
|
|
38
38
|
readonly 'avalanche-testnet-fuji': 14767482510784806043n;
|
|
39
|
-
readonly 'binance_smart_chain-mainnet
|
|
40
|
-
readonly 'binance_smart_chain-testnet
|
|
39
|
+
readonly 'binance_smart_chain-mainnet': 11344663589394136015n;
|
|
40
|
+
readonly 'binance_smart_chain-testnet': 13264668187771770619n;
|
|
41
41
|
readonly 'ethereum-mainnet': 5009297550715157269n;
|
|
42
42
|
readonly 'ethereum-mainnet-arbitrum-1': 4949039107694359620n;
|
|
43
43
|
readonly 'ethereum-mainnet-base-1': 15971525489660198786n;
|
|
44
44
|
readonly 'ethereum-mainnet-optimism-1': 3734403246176062136n;
|
|
45
|
+
readonly 'ethereum-mainnet-worldchain-1': 2049429975587534727n;
|
|
45
46
|
readonly 'ethereum-mainnet-zksync-1': 1562403441176082196n;
|
|
46
47
|
readonly 'ethereum-testnet-sepolia': 16015286601757825753n;
|
|
47
48
|
readonly 'ethereum-testnet-sepolia-arbitrum-1': 3478487238524512106n;
|
|
@@ -50,7 +51,6 @@ export declare class ClientCapability {
|
|
|
50
51
|
readonly 'ethereum-testnet-sepolia-optimism-1': 5224473277236331295n;
|
|
51
52
|
readonly 'ethereum-testnet-sepolia-worldchain-1': 5299555114858065850n;
|
|
52
53
|
readonly 'ethereum-testnet-sepolia-zksync-1': 6898391096552792247n;
|
|
53
|
-
readonly 'etherlink-testnet': 1910019406958449359n;
|
|
54
54
|
readonly 'hyperliquid-testnet': 4286062357653186312n;
|
|
55
55
|
readonly 'ink-testnet-sepolia': 9763904284804119144n;
|
|
56
56
|
readonly 'jovay-testnet': 945045181441419236n;
|
|
@@ -58,7 +58,6 @@ export declare class ClientCapability {
|
|
|
58
58
|
readonly 'polygon-mainnet': 4051577828743386545n;
|
|
59
59
|
readonly 'polygon-testnet-amoy': 16281711391670634445n;
|
|
60
60
|
readonly 'private-testnet-andesite': 6915682381028791124n;
|
|
61
|
-
readonly 'tempo-testnet': 3963528237232804922n;
|
|
62
61
|
};
|
|
63
62
|
constructor(ChainSelector: bigint);
|
|
64
63
|
callContract(runtime: Runtime<unknown>, input: CallContractRequest | CallContractRequestJson): {
|
|
@@ -48,12 +48,13 @@ export class ClientCapability {
|
|
|
48
48
|
'arc-testnet': 3034092155422581607n,
|
|
49
49
|
'avalanche-mainnet': 6433500567565415381n,
|
|
50
50
|
'avalanche-testnet-fuji': 14767482510784806043n,
|
|
51
|
-
'binance_smart_chain-mainnet
|
|
52
|
-
'binance_smart_chain-testnet
|
|
51
|
+
'binance_smart_chain-mainnet': 11344663589394136015n,
|
|
52
|
+
'binance_smart_chain-testnet': 13264668187771770619n,
|
|
53
53
|
'ethereum-mainnet': 5009297550715157269n,
|
|
54
54
|
'ethereum-mainnet-arbitrum-1': 4949039107694359620n,
|
|
55
55
|
'ethereum-mainnet-base-1': 15971525489660198786n,
|
|
56
56
|
'ethereum-mainnet-optimism-1': 3734403246176062136n,
|
|
57
|
+
'ethereum-mainnet-worldchain-1': 2049429975587534727n,
|
|
57
58
|
'ethereum-mainnet-zksync-1': 1562403441176082196n,
|
|
58
59
|
'ethereum-testnet-sepolia': 16015286601757825753n,
|
|
59
60
|
'ethereum-testnet-sepolia-arbitrum-1': 3478487238524512106n,
|
|
@@ -62,7 +63,6 @@ export class ClientCapability {
|
|
|
62
63
|
'ethereum-testnet-sepolia-optimism-1': 5224473277236331295n,
|
|
63
64
|
'ethereum-testnet-sepolia-worldchain-1': 5299555114858065850n,
|
|
64
65
|
'ethereum-testnet-sepolia-zksync-1': 6898391096552792247n,
|
|
65
|
-
'etherlink-testnet': 1910019406958449359n,
|
|
66
66
|
'hyperliquid-testnet': 4286062357653186312n,
|
|
67
67
|
'ink-testnet-sepolia': 9763904284804119144n,
|
|
68
68
|
'jovay-testnet': 945045181441419236n,
|
|
@@ -70,7 +70,6 @@ export class ClientCapability {
|
|
|
70
70
|
'polygon-mainnet': 4051577828743386545n,
|
|
71
71
|
'polygon-testnet-amoy': 16281711391670634445n,
|
|
72
72
|
'private-testnet-andesite': 6915682381028791124n,
|
|
73
|
-
'tempo-testnet': 3963528237232804922n,
|
|
74
73
|
};
|
|
75
74
|
constructor(ChainSelector) {
|
|
76
75
|
this.ChainSelector = ChainSelector;
|
package/dist/generated-sdk/capabilities/networking/confidentialhttp/v1alpha/client_sdk_gen.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type ConfidentialHTTPRequest, type ConfidentialHTTPRequestJson, type HTTPResponse } from '../../../../../generated/capabilities/networking/confidentialhttp/v1alpha/client_pb';
|
|
2
2
|
import { type NodeRuntime, type Runtime } from '../../../../../sdk';
|
|
3
3
|
import type { ConsensusAggregation, PrimitiveTypes, UnwrapOptions } from '../../../../../sdk/utils';
|
|
4
|
-
export declare class
|
|
4
|
+
export declare class SendRequester {
|
|
5
5
|
private readonly runtime;
|
|
6
6
|
private readonly client;
|
|
7
7
|
constructor(runtime: NodeRuntime<unknown>, client: ClientCapability);
|
|
8
|
-
|
|
9
|
-
result: () =>
|
|
8
|
+
sendRequest(input: ConfidentialHTTPRequest | ConfidentialHTTPRequestJson): {
|
|
9
|
+
result: () => HTTPResponse;
|
|
10
10
|
};
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
@@ -21,12 +21,12 @@ export declare class ClientCapability {
|
|
|
21
21
|
static readonly CAPABILITY_ID = "confidential-http@1.0.0-alpha";
|
|
22
22
|
static readonly CAPABILITY_NAME = "confidential-http";
|
|
23
23
|
static readonly CAPABILITY_VERSION = "1.0.0-alpha";
|
|
24
|
-
|
|
25
|
-
result: () =>
|
|
24
|
+
sendRequest(runtime: NodeRuntime<unknown>, input: ConfidentialHTTPRequest | ConfidentialHTTPRequestJson): {
|
|
25
|
+
result: () => HTTPResponse;
|
|
26
26
|
};
|
|
27
|
-
|
|
27
|
+
sendRequest<TArgs extends unknown[], TOutput>(runtime: Runtime<unknown>, fn: (sendRequester: SendRequester, ...args: TArgs) => TOutput, consensusAggregation: ConsensusAggregation<TOutput, true>, unwrapOptions?: TOutput extends PrimitiveTypes ? never : UnwrapOptions<TOutput>): (...args: TArgs) => {
|
|
28
28
|
result: () => TOutput;
|
|
29
29
|
};
|
|
30
|
-
private
|
|
31
|
-
private
|
|
30
|
+
private sendRequestCallHelper;
|
|
31
|
+
private sendRequestSugarHelper;
|
|
32
32
|
}
|
package/dist/generated-sdk/capabilities/networking/confidentialhttp/v1alpha/client_sdk_gen.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { fromJson } from '@bufbuild/protobuf';
|
|
2
|
-
import {
|
|
2
|
+
import { ConfidentialHTTPRequestSchema, HTTPResponseSchema, } from '../../../../../generated/capabilities/networking/confidentialhttp/v1alpha/client_pb';
|
|
3
3
|
import {} from '../../../../../sdk';
|
|
4
4
|
import { Report } from '../../../../../sdk/report';
|
|
5
|
-
export class
|
|
5
|
+
export class SendRequester {
|
|
6
6
|
runtime;
|
|
7
7
|
client;
|
|
8
8
|
constructor(runtime, client) {
|
|
9
9
|
this.runtime = runtime;
|
|
10
10
|
this.client = client;
|
|
11
11
|
}
|
|
12
|
-
|
|
13
|
-
return this.client.
|
|
12
|
+
sendRequest(input) {
|
|
13
|
+
return this.client.sendRequest(this.runtime, input);
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
/**
|
|
@@ -25,17 +25,17 @@ export class ClientCapability {
|
|
|
25
25
|
static CAPABILITY_ID = 'confidential-http@1.0.0-alpha';
|
|
26
26
|
static CAPABILITY_NAME = 'confidential-http';
|
|
27
27
|
static CAPABILITY_VERSION = '1.0.0-alpha';
|
|
28
|
-
|
|
28
|
+
sendRequest(...args) {
|
|
29
29
|
// Check if this is the sugar syntax overload (has function parameter)
|
|
30
30
|
if (typeof args[1] === 'function') {
|
|
31
31
|
const [runtime, fn, consensusAggregation, unwrapOptions] = args;
|
|
32
|
-
return this.
|
|
32
|
+
return this.sendRequestSugarHelper(runtime, fn, consensusAggregation, unwrapOptions);
|
|
33
33
|
}
|
|
34
34
|
// Otherwise, this is the basic call overload
|
|
35
35
|
const [runtime, input] = args;
|
|
36
|
-
return this.
|
|
36
|
+
return this.sendRequestCallHelper(runtime, input);
|
|
37
37
|
}
|
|
38
|
-
|
|
38
|
+
sendRequestCallHelper(runtime, input) {
|
|
39
39
|
// Handle input conversion - unwrap if it's a wrapped type, convert from JSON if needed
|
|
40
40
|
let payload;
|
|
41
41
|
if (input.$typeName) {
|
|
@@ -44,15 +44,15 @@ export class ClientCapability {
|
|
|
44
44
|
}
|
|
45
45
|
else {
|
|
46
46
|
// It's regular JSON, convert using fromJson
|
|
47
|
-
payload = fromJson(
|
|
47
|
+
payload = fromJson(ConfidentialHTTPRequestSchema, input);
|
|
48
48
|
}
|
|
49
49
|
const capabilityId = ClientCapability.CAPABILITY_ID;
|
|
50
50
|
const capabilityResponse = runtime.callCapability({
|
|
51
51
|
capabilityId,
|
|
52
|
-
method: '
|
|
52
|
+
method: 'SendRequest',
|
|
53
53
|
payload,
|
|
54
|
-
inputSchema:
|
|
55
|
-
outputSchema:
|
|
54
|
+
inputSchema: ConfidentialHTTPRequestSchema,
|
|
55
|
+
outputSchema: HTTPResponseSchema,
|
|
56
56
|
});
|
|
57
57
|
return {
|
|
58
58
|
result: () => {
|
|
@@ -61,10 +61,10 @@ export class ClientCapability {
|
|
|
61
61
|
},
|
|
62
62
|
};
|
|
63
63
|
}
|
|
64
|
-
|
|
64
|
+
sendRequestSugarHelper(runtime, fn, consensusAggregation, unwrapOptions) {
|
|
65
65
|
const wrappedFn = (runtime, ...args) => {
|
|
66
|
-
const
|
|
67
|
-
return fn(
|
|
66
|
+
const sendRequester = new SendRequester(runtime, this);
|
|
67
|
+
return fn(sendRequester, ...args);
|
|
68
68
|
};
|
|
69
69
|
return runtime.runInNodeMode(wrappedFn, consensusAggregation, unwrapOptions);
|
|
70
70
|
}
|
package/dist/sdk/cre/index.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export { type Log as EVMLog, TxStatus, } from '../../generated/capabilities/bloc
|
|
|
13
13
|
export type { Payload as HTTPPayload } from '../../generated/capabilities/networking/http/v1alpha/trigger_pb';
|
|
14
14
|
export type { Payload as CronPayload } from '../../generated/capabilities/scheduler/cron/v1/trigger_pb';
|
|
15
15
|
export { ClientCapability as EVMClient, type WriteCreReportRequest, type WriteCreReportRequestJson, } from '../../generated-sdk/capabilities/blockchain/evm/v1alpha/client_sdk_gen';
|
|
16
|
-
export { ClientCapability as ConfidentialHTTPClient, type
|
|
16
|
+
export { ClientCapability as ConfidentialHTTPClient, type SendRequester as ConfidentialHTTPSendRequester, } from '../../generated-sdk/capabilities/networking/confidentialhttp/v1alpha/client_sdk_gen';
|
|
17
17
|
export { ClientCapability as HTTPClient, type SendRequester as HTTPSendRequester, } from '../../generated-sdk/capabilities/networking/http/v1alpha/client_sdk_gen';
|
|
18
18
|
export { HTTPCapability } from '../../generated-sdk/capabilities/networking/http/v1alpha/http_sdk_gen';
|
|
19
19
|
export { CronCapability } from '../../generated-sdk/capabilities/scheduler/cron/v1/cron_sdk_gen';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { HTTPResponse as ConfidentialHTTPResponse } from '../../../../generated/capabilities/networking/confidentialhttp/v1alpha/client_pb';
|
|
2
2
|
import type { Request, RequestJson, Response } from '../../../../generated/capabilities/networking/http/v1alpha/client_pb';
|
|
3
3
|
import type { ReportResponse } from '../../../../generated/sdk/v1alpha/sdk_pb';
|
|
4
4
|
import type { NodeRuntime } from '../../..';
|
|
@@ -51,14 +51,14 @@ import type { Report } from '../../../report';
|
|
|
51
51
|
* @param response - The Response object
|
|
52
52
|
* @returns The body as a trimmed string
|
|
53
53
|
*/
|
|
54
|
-
export declare function text(response: Response |
|
|
54
|
+
export declare function text(response: Response | ConfidentialHTTPResponse): string;
|
|
55
55
|
/**
|
|
56
56
|
* Returns the response body as a UTF-8 string, automatically trimmed
|
|
57
57
|
* @param responseFn - Function that returns an object with result function that returns Response
|
|
58
58
|
* @returns Object with result function that returns the body as a trimmed string
|
|
59
59
|
*/
|
|
60
60
|
export declare function text(responseFn: () => {
|
|
61
|
-
result: Response |
|
|
61
|
+
result: Response | ConfidentialHTTPResponse;
|
|
62
62
|
}): {
|
|
63
63
|
result: () => string;
|
|
64
64
|
};
|
|
@@ -68,7 +68,7 @@ export declare function text(responseFn: () => {
|
|
|
68
68
|
* @returns The parsed JSON
|
|
69
69
|
* @throws Error if the body is not valid JSON
|
|
70
70
|
*/
|
|
71
|
-
export declare function json(response: Response |
|
|
71
|
+
export declare function json(response: Response | ConfidentialHTTPResponse): unknown;
|
|
72
72
|
/**
|
|
73
73
|
* Parses the response body as JSON
|
|
74
74
|
* @param responseFn - Function that returns an object with result function that returns Response
|
|
@@ -76,7 +76,7 @@ export declare function json(response: Response | ResponseTemplate): unknown;
|
|
|
76
76
|
* @throws Error if the body is not valid JSON
|
|
77
77
|
*/
|
|
78
78
|
export declare function json(responseFn: () => {
|
|
79
|
-
result: Response |
|
|
79
|
+
result: Response | ConfidentialHTTPResponse;
|
|
80
80
|
}): {
|
|
81
81
|
result: () => unknown;
|
|
82
82
|
};
|
|
@@ -103,14 +103,14 @@ export declare function getHeader(responseFn: () => {
|
|
|
103
103
|
* @param response - The Response object
|
|
104
104
|
* @returns True if the status code is in the 200-299 range
|
|
105
105
|
*/
|
|
106
|
-
export declare function ok(response: Response |
|
|
106
|
+
export declare function ok(response: Response | ConfidentialHTTPResponse): boolean;
|
|
107
107
|
/**
|
|
108
108
|
* Checks if the response status indicates success (200-299)
|
|
109
109
|
* @param responseFn - Function that returns an object with result function that returns Response
|
|
110
110
|
* @returns Object with result function that returns true if the status code is in the 200-299 range
|
|
111
111
|
*/
|
|
112
112
|
export declare function ok(responseFn: () => {
|
|
113
|
-
result: Response |
|
|
113
|
+
result: Response | ConfidentialHTTPResponse;
|
|
114
114
|
}): {
|
|
115
115
|
result: () => boolean;
|
|
116
116
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chainlink/cre-sdk",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.9",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"dependencies": {
|
|
56
56
|
"@bufbuild/protobuf": "2.6.3",
|
|
57
57
|
"@bufbuild/protoc-gen-es": "2.6.3",
|
|
58
|
-
"@chainlink/cre-sdk-javy-plugin": "1.0.
|
|
58
|
+
"@chainlink/cre-sdk-javy-plugin": "1.0.9",
|
|
59
59
|
"@standard-schema/spec": "1.0.0",
|
|
60
60
|
"viem": "2.34.0",
|
|
61
61
|
"zod": "3.25.76"
|