quicknode_sdk 0.8.2 → 0.9.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.
- checksums.yaml +4 -4
- data/README.md +216 -31
- data/sig/quicknode_sdk.rbs +38 -5
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 45c4453f935c90393ad4bc2e82c806445c0f0568d3824a41fc2eefdd2002c474
|
|
4
|
+
data.tar.gz: ffc9912512afc9f9dbf4c723d54bf3894fd2f8db7bdce39cb8fd33bceb5219b9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d18023ccf0c124aaa8349d90ac3a112363a937f7f088d05fb5c8cb171aa3a40e43f24284f0d14b676b014d4bc4d04fa57b9f726943c43409fa7d6687e83501a3
|
|
7
|
+
data.tar.gz: bc12b2ba35d56bb034e280af624e595cefa3890dec71916131bb302b96c9f74ff180a44a69ad282b1ec26ea1b34837db769226ab7a841d925371c1fb1dcc0425
|
data/README.md
CHANGED
|
@@ -43,6 +43,12 @@ This is one of four language bindings published from the same Rust core. See the
|
|
|
43
43
|
- [Bulk Operations](#bulk-operations)
|
|
44
44
|
- [Account Tags](#account-tags)
|
|
45
45
|
- [Tag / delete method parameter quick-reference](#tag--delete-method-parameter-quick-reference)
|
|
46
|
+
- [Additional security operations](#additional-security-operations)
|
|
47
|
+
- [Mutation responses](#mutation-responses)
|
|
48
|
+
- [Usage and metrics summaries](#usage-and-metrics-summaries)
|
|
49
|
+
- [Activity logs](#activity-logs)
|
|
50
|
+
- [Transactions](#transactions)
|
|
51
|
+
- [Admin compatibility notes](#admin-compatibility-notes)
|
|
46
52
|
- [Streams Client](#streams-client)
|
|
47
53
|
- [Datasets, Regions, and Destinations](#datasets-regions-and-destinations)
|
|
48
54
|
- [Streams methods](#streams-methods)
|
|
@@ -171,7 +177,7 @@ Accessed as `qn.admin`. Manages endpoints, tags, teams, billing, usage, metrics,
|
|
|
171
177
|
|
|
172
178
|
##### `get_endpoints` / `getEndpoints`
|
|
173
179
|
|
|
174
|
-
Returns a paginated list of endpoints on the account with optional search, filters (networks, statuses, labels, tags, dedicated, flat-rate), sorting, and pagination.
|
|
180
|
+
Returns a paginated list of endpoints on the account with optional search, filters (networks, statuses, labels, tags, dedicated, flat-rate), sorting, and pagination. The API caps `limit` at 100. Nonempty `tag_ids` and `tag_labels` filters are mutually exclusive.
|
|
175
181
|
|
|
176
182
|
**Parameters** (all optional): `limit` (i32), `offset` (i32), `search` (string), `sort_by` (string), `sort_direction` (`"asc"` | `"desc"`), `networks` (string[]), `statuses` (string[]), `labels` (string[]), `dedicated` (bool), `is_flat_rate` (bool), `tag_ids` (i32[]), `tag_labels` (string[]).
|
|
177
183
|
|
|
@@ -186,7 +192,7 @@ resp = qn.admin.get_endpoints(limit: 20, sort_by: "created_at", sort_direction:
|
|
|
186
192
|
|
|
187
193
|
Creates a new endpoint for the given blockchain and network.
|
|
188
194
|
|
|
189
|
-
**Parameters**: `chain`
|
|
195
|
+
**Parameters**: `chain` and `network` are strings required by the API. The SDK retains its existing optional arguments for compatibility; supply both for a valid request.
|
|
190
196
|
|
|
191
197
|
**Returns**: `CreateEndpointResponse` with `data: SingleEndpoint`.
|
|
192
198
|
|
|
@@ -212,7 +218,7 @@ resp = qn.admin.show_endpoint(id: "ep-123")
|
|
|
212
218
|
|
|
213
219
|
Updates editable fields on an endpoint. Currently supports `label`.
|
|
214
220
|
|
|
215
|
-
**Parameters**: `id` (string, required);
|
|
221
|
+
**Parameters**: `id` (string, required); `label` (string, required by the API). The SDK retains the optional label argument; omitting it produces an API error.
|
|
216
222
|
|
|
217
223
|
**Returns**: nothing.
|
|
218
224
|
|
|
@@ -255,7 +261,7 @@ Per-endpoint tag add/remove. For account-wide tag management see [Account Tags](
|
|
|
255
261
|
|
|
256
262
|
Tags an endpoint with the given label. Creates the tag on the account if it does not exist.
|
|
257
263
|
|
|
258
|
-
**Parameters**: `id` (string, required);
|
|
264
|
+
**Parameters**: `id` (string, required); `label` (string, required by the API). Labels must be nonblank and contain 3 through 25 characters after trimming. The SDK retains its optional argument and does not trim values.
|
|
259
265
|
|
|
260
266
|
**Returns**: nothing.
|
|
261
267
|
|
|
@@ -294,7 +300,7 @@ resp = qn.admin.list_teams
|
|
|
294
300
|
|
|
295
301
|
##### `create_team` / `createTeam`
|
|
296
302
|
|
|
297
|
-
Creates a new team.
|
|
303
|
+
Creates a new team. The name must contain at least four characters.
|
|
298
304
|
|
|
299
305
|
**Parameters**: `name` (string, required).
|
|
300
306
|
|
|
@@ -361,7 +367,7 @@ qn.admin.update_team_endpoints(id: 42, endpoint_ids: ["ep-123", "ep-456"])
|
|
|
361
367
|
|
|
362
368
|
Invites a user to a team. Existing users only need `email`; new users require `full_name` and `role`.
|
|
363
369
|
|
|
364
|
-
**Parameters**: `id` (i64, required); body: `email` (string, required), `full_name` (string, optional), `role` (string, optional
|
|
370
|
+
**Parameters**: `id` (i64, required); body: `email` (string, required), `full_name` (string, optional), `role` (string, optional). Standard roles and account custom-role keys are accepted.
|
|
365
371
|
|
|
366
372
|
**Returns**: `InviteTeamMemberResponse`.
|
|
367
373
|
|
|
@@ -398,7 +404,9 @@ qn.admin.resend_team_invite(id: 42, user_id: 7)
|
|
|
398
404
|
|
|
399
405
|
#### Usage
|
|
400
406
|
|
|
401
|
-
|
|
407
|
+
Endpoint, chain, and tag usage rows include integer `rpc_credits`, `data_credits`, and `bytes`. Shared method rows, including methods nested under endpoints, include integer `bytes`. Existing nullable method metadata and null tag IDs for untagged usage remain nullable.
|
|
408
|
+
|
|
409
|
+
All usage methods accept optional `start_time` and `end_time` Unix timestamps. Omit both to use the current billing-period default.
|
|
402
410
|
|
|
403
411
|
##### `get_usage` / `getUsage`
|
|
404
412
|
|
|
@@ -459,9 +467,9 @@ resp = qn.admin.get_usage_by_tag({})
|
|
|
459
467
|
|
|
460
468
|
##### `get_endpoint_logs` / `getEndpointLogs`
|
|
461
469
|
|
|
462
|
-
Fetches a page of request logs for an endpoint. Set `include_details=true` for full request/response payloads (truncated at 2 KB each).
|
|
470
|
+
Fetches a page of request logs for an endpoint. Use ISO 8601 timestamps for explicit bounds. The limit is 1 through 100 and defaults to 20. Set `include_details=true` for full request/response payloads (truncated at 2 KB each).
|
|
463
471
|
|
|
464
|
-
**Parameters**: `id` (endpoint id, required);
|
|
472
|
+
**Parameters**: `id` (endpoint id, required); query: `from` (string timestamp, required), `to` (string timestamp, required), `include_details` (bool, optional), `limit` (i32, optional), `next_at` (string cursor, optional).
|
|
465
473
|
|
|
466
474
|
**Returns**: `GetEndpointLogsResponse` — `{ data: EndpointLog[], next_at?: string }`.
|
|
467
475
|
|
|
@@ -492,7 +500,7 @@ resp = qn.admin.get_log_details(id: "ep-123", request_id: "req-abc")
|
|
|
492
500
|
|
|
493
501
|
##### `get_endpoint_security` / `getEndpointSecurity`
|
|
494
502
|
|
|
495
|
-
Returns the full security configuration for an endpoint: tokens, JWTs, referrers, domain masks, IPs, request filters, and their per-feature toggles.
|
|
503
|
+
Returns the full security configuration for an endpoint: tokens, JWTs, referrers, domain masks, IPs, blocked IPs (`blocked_ips`), request filters, and their per-feature toggles. Snapshot options include `hsts`, `cors`, and `response_logging` (wire key `responseLogging`). Structured filter matchers and `params` are preserved.
|
|
496
504
|
|
|
497
505
|
**Parameters**: `id` (string, required).
|
|
498
506
|
|
|
@@ -522,13 +530,13 @@ resp = qn.admin.get_security_options(id: "ep-123")
|
|
|
522
530
|
|
|
523
531
|
Enables or disables individual security features. Each field accepts `"enabled"` or `"disabled"`.
|
|
524
532
|
|
|
525
|
-
**Parameters**: `id` (string, required); `options`: `SecurityOptionsUpdate` (`tokens`, `referrers`, `jwts`, `ips`, `domain_masks`, `hsts`, `cors`, `request_filters`, `ip_custom_header`).
|
|
533
|
+
**Parameters**: `id` (string, required); `options`: `SecurityOptionsUpdate` (`tokens`, `referrers`, `jwts`, `ips`, `domain_masks`, `hsts`, `cors`, `request_filters`, `ip_custom_header`, `response_logging`). The `response_logging` option is sent as `responseLogging` and accepts `"enabled"` or `"disabled"`.
|
|
526
534
|
|
|
527
535
|
**Returns**: `UpdateSecurityOptionsResponse` with updated `SecurityOption[]`.
|
|
528
536
|
|
|
529
537
|
```ruby
|
|
530
538
|
# Ruby
|
|
531
|
-
qn.admin.update_security_options(id: "ep-123", tokens: "enabled", jwts: "disabled")
|
|
539
|
+
qn.admin.update_security_options(id: "ep-123", tokens: "enabled", jwts: "disabled", response_logging: "enabled")
|
|
532
540
|
```
|
|
533
541
|
|
|
534
542
|
#### Tokens
|
|
@@ -621,7 +629,7 @@ resp = qn.admin.delete_ip(id: "ep-123", ip_id: "ip-1")
|
|
|
621
629
|
|
|
622
630
|
Adds a custom domain mask to an endpoint.
|
|
623
631
|
|
|
624
|
-
**Parameters**: `id` (endpoint id, required); body: `domain_mask` (string,
|
|
632
|
+
**Parameters**: `id` (endpoint id, required); body: `domain_mask` (string, required by the API). The SDK retains its optional argument, but supplies no default value.
|
|
625
633
|
|
|
626
634
|
**Returns**: nothing.
|
|
627
635
|
|
|
@@ -636,7 +644,7 @@ Removes a domain mask.
|
|
|
636
644
|
|
|
637
645
|
**Parameters**: `id` (endpoint id, required), `domain_mask_id` (string, required).
|
|
638
646
|
|
|
639
|
-
**Returns**:
|
|
647
|
+
**Returns**: `DeleteBoolResponse`.
|
|
640
648
|
|
|
641
649
|
```ruby
|
|
642
650
|
# Ruby
|
|
@@ -698,7 +706,7 @@ resp = qn.admin.create_request_filter(
|
|
|
698
706
|
|
|
699
707
|
**Parameters**: `id` (endpoint id, required), `request_filter_id` (string, required); body: `method` (string[], optional). Ruby's Hash keys are `request_filter_id` and `methods` (plural).
|
|
700
708
|
|
|
701
|
-
**Returns**: nothing.
|
|
709
|
+
**Returns**: nothing. Supply a method list for an update; an empty request produces an API error.
|
|
702
710
|
|
|
703
711
|
```ruby
|
|
704
712
|
# Ruby
|
|
@@ -716,6 +724,25 @@ qn.admin.update_request_filter(id: "ep-123", request_filter_id: "f-1", methods:
|
|
|
716
724
|
qn.admin.delete_request_filter(id: "ep-123", request_filter_id: "f-1")
|
|
717
725
|
```
|
|
718
726
|
|
|
727
|
+
##### Structured patterns and filter listing
|
|
728
|
+
|
|
729
|
+
`get_request_filters` returns list records with `id`, `pattern`, and `method_whitelist`. This differs from endpoint/security snapshots, where each filter has `id`, a `method` matcher array, and `params`. Snapshot `params` holds every top-level pattern key except `method`, not only a nested `params` matcher.
|
|
730
|
+
|
|
731
|
+
Use `create_request_filter_pattern` and `update_request_filter_pattern` for a custom JSON object. The existing whitelist methods keep their current inputs, including Ruby's `methods:` keyword. Do not combine a whitelist and a custom pattern in one request or use an update to switch filter kinds. One whitelist and multiple custom filters can coexist. Updates and deletions continue to accept successful empty HTTP 204 responses.
|
|
732
|
+
|
|
733
|
+
Nested objects, arrays, nulls, and keys such as `anything-but` remain intact. Pass a native object rather than a JSON string. Creation returns `data.id` and, when supplied by the API, `data.pattern`.
|
|
734
|
+
|
|
735
|
+
```ruby
|
|
736
|
+
pattern = {"method" => [{"prefix" => "eth_"}], "jsonrpc" => ["2.0"]}
|
|
737
|
+
created = qn.admin.create_request_filter_pattern(id: "123", pattern: pattern)
|
|
738
|
+
if created[:data]
|
|
739
|
+
qn.admin.update_request_filter_pattern(
|
|
740
|
+
id: "123", request_filter_id: created[:data][:id], pattern: pattern
|
|
741
|
+
)
|
|
742
|
+
end
|
|
743
|
+
filters = qn.admin.get_request_filters(id: "123")
|
|
744
|
+
```
|
|
745
|
+
|
|
719
746
|
#### Multichain
|
|
720
747
|
|
|
721
748
|
##### `enable_multichain` / `enableMultichain`
|
|
@@ -792,9 +819,9 @@ resp = qn.admin.get_method_rate_limits(id: "ep-123")
|
|
|
792
819
|
|
|
793
820
|
##### `create_method_rate_limit` / `createMethodRateLimit`
|
|
794
821
|
|
|
795
|
-
Creates a new method-level rate limiter.
|
|
822
|
+
Creates a new method-level rate limiter. `rate` must be positive; zero produces an API error. Optional `limit_by_ip` applies the limit per client IP and is returned on `MethodRateLimiter`.
|
|
796
823
|
|
|
797
|
-
**Parameters**: `id` (endpoint id, required); body: `interval` (string, e.g. `"second"`), `methods` (string[]), `rate` (i32).
|
|
824
|
+
**Parameters**: `id` (endpoint id, required); body: `interval` (string, e.g. `"second"`), `methods` (string[]), `rate` (i32), `limit_by_ip` (bool, optional).
|
|
798
825
|
|
|
799
826
|
**Returns**: `CreateMethodRateLimitResponse` with `data: MethodRateLimiter`.
|
|
800
827
|
|
|
@@ -804,21 +831,22 @@ resp = qn.admin.create_method_rate_limit(
|
|
|
804
831
|
id: "ep-123",
|
|
805
832
|
interval: "second",
|
|
806
833
|
methods: ["eth_call"],
|
|
807
|
-
rate: 10
|
|
834
|
+
rate: 10,
|
|
835
|
+
limit_by_ip: true
|
|
808
836
|
)
|
|
809
837
|
```
|
|
810
838
|
|
|
811
839
|
##### `update_method_rate_limit` / `updateMethodRateLimit`
|
|
812
840
|
|
|
813
|
-
Updates an existing rate limiter. Only provided fields change.
|
|
841
|
+
Updates an existing rate limiter. Only provided fields change. Supply at least one supported field; an empty PATCH produces an API error. `limit_by_ip=false` is an explicit update, not an omitted value.
|
|
814
842
|
|
|
815
|
-
**Parameters**: `id` (endpoint id, required), `method_rate_limit_id` (string, required); body: `methods` (string[], optional), `status` (`"enabled"` | `"disabled"`, optional), `rate` (i32, optional).
|
|
843
|
+
**Parameters**: `id` (endpoint id, required), `method_rate_limit_id` (string, required); body: `methods` (string[], optional), `status` (`"enabled"` | `"disabled"`, optional), `rate` (i32, optional), `limit_by_ip` (bool, optional).
|
|
816
844
|
|
|
817
845
|
**Returns**: `UpdateMethodRateLimitResponse`.
|
|
818
846
|
|
|
819
847
|
```ruby
|
|
820
848
|
# Ruby
|
|
821
|
-
qn.admin.update_method_rate_limit(id: "ep-123", method_rate_limit_id: "rl-1", rate: 50)
|
|
849
|
+
qn.admin.update_method_rate_limit(id: "ep-123", method_rate_limit_id: "rl-1", rate: 50, limit_by_ip: false)
|
|
822
850
|
```
|
|
823
851
|
|
|
824
852
|
##### `delete_method_rate_limit` / `deleteMethodRateLimit`
|
|
@@ -838,15 +866,16 @@ qn.admin.delete_method_rate_limit(id: "ep-123", method_rate_limit_id: "rl-1")
|
|
|
838
866
|
|
|
839
867
|
##### `update_rate_limits` / `updateRateLimits`
|
|
840
868
|
|
|
841
|
-
Partial update of the endpoint-level RPS / RPM / RPD caps. Only
|
|
869
|
+
Partial update of the endpoint-level RPS / RPM / RPD caps. Only supplied fields change. Values are capped by the account's plan tier. Sends `PATCH`. Set `limit_by_ip` (`limitByIp` in Node) to `true` to apply the caps per client IP or `false` to apply them to the whole endpoint. You can update this flag without sending caps. Supply at least one cap or the flag; an empty update returns an API error. Both update methods accept these options.
|
|
842
870
|
|
|
843
|
-
**Parameters**: `id` (endpoint id, required); `
|
|
871
|
+
**Parameters**: `id` (endpoint id, required); `rps`, `rpm`, `rpd`: optional integers; `limit_by_ip`: optional boolean.
|
|
844
872
|
|
|
845
873
|
**Returns**: nothing.
|
|
846
874
|
|
|
847
875
|
```ruby
|
|
848
876
|
# Ruby
|
|
849
|
-
qn.admin.update_rate_limits(id: "ep-123", rps: 100, rpm: 5000)
|
|
877
|
+
qn.admin.update_rate_limits(id: "ep-123", rps: 100, rpm: 5000, limit_by_ip: true)
|
|
878
|
+
qn.admin.update_rate_limits(id: "ep-123", limit_by_ip: false)
|
|
850
879
|
```
|
|
851
880
|
|
|
852
881
|
##### `get_rate_limits` / `getRateLimits`
|
|
@@ -901,9 +930,9 @@ end
|
|
|
901
930
|
|
|
902
931
|
##### `get_endpoint_metrics` / `getEndpointMetrics`
|
|
903
932
|
|
|
904
|
-
Returns metric series for an endpoint over a time period.
|
|
933
|
+
Returns metric series for an endpoint over a time period. Optional integer `percentile` ranges from 1 through 100 and is required for `response_time_over_time` and `method_response_time_max`. For example, use `95`. Metric and period strings remain open.
|
|
905
934
|
|
|
906
|
-
**Parameters**: `id` (endpoint id, required);
|
|
935
|
+
**Parameters**: `id` (endpoint id, required); query: `period` (`"hour"` | `"day"` | `"week"` | `"month"`), `metric` (e.g. `"method_calls_over_time"`, `"response_status_breakdown"`), `percentile` (integer, optional).
|
|
907
936
|
|
|
908
937
|
**Returns**: `GetEndpointMetricsResponse` (as an `IndifferentHash`) with `data: Array<EndpointMetric>`. Each `EndpointMetric` has `tag: Array<String>` and `data: Array<Array<Integer>>` of `[timestamp, value]` pairs. Single-axis series (e.g. `response_time_over_time` with a percentile) come back as a one-element tag like `["p95"]`; multi-axis series come back as `["network", "arbitrum-mainnet"]`.
|
|
909
938
|
|
|
@@ -912,13 +941,14 @@ Returns metric series for an endpoint over a time period.
|
|
|
912
941
|
resp = qn.admin.get_endpoint_metrics(
|
|
913
942
|
id: "ep-123",
|
|
914
943
|
period: "day",
|
|
915
|
-
metric: "
|
|
944
|
+
metric: "response_time_over_time",
|
|
945
|
+
percentile: 95
|
|
916
946
|
)
|
|
917
947
|
```
|
|
918
948
|
|
|
919
949
|
##### `get_account_metrics` / `getAccountMetrics`
|
|
920
950
|
|
|
921
|
-
Returns account-level metric series.
|
|
951
|
+
Returns account-level metric series. The existing optional `percentile` argument remains for compatibility; the API currently ignores it. Endpoint latency percentile support belongs to `get_endpoint_metrics`.
|
|
922
952
|
|
|
923
953
|
**Parameters**: `period` (required), `metric` (required), `percentile` (string, optional).
|
|
924
954
|
|
|
@@ -1002,6 +1032,8 @@ resp = qn.admin.list_payments
|
|
|
1002
1032
|
|
|
1003
1033
|
#### Bulk Operations
|
|
1004
1034
|
|
|
1035
|
+
Each result can include an `error` string. Check individual results: HTTP 200 can contain both successes and failures. Successful rows can omit `error`.
|
|
1036
|
+
|
|
1005
1037
|
##### `bulk_update_endpoint_status` / `bulkUpdateEndpointStatus`
|
|
1006
1038
|
|
|
1007
1039
|
Activates or pauses many endpoints at once.
|
|
@@ -1058,7 +1090,7 @@ resp = qn.admin.list_tags
|
|
|
1058
1090
|
|
|
1059
1091
|
##### `rename_tag` / `renameTag`
|
|
1060
1092
|
|
|
1061
|
-
Renames an account-level tag.
|
|
1093
|
+
Renames an account-level tag. Labels must be nonblank and contain 3 through 25 characters after trimming. The SDK does not trim values.
|
|
1062
1094
|
|
|
1063
1095
|
**Parameters**: `id` (i32, required — the tag id); body: `label` (string, required).
|
|
1064
1096
|
|
|
@@ -1100,6 +1132,158 @@ The pattern across the Admin client: `id:` always names the **parent** resource.
|
|
|
1100
1132
|
| `delete_request_filter` | `id:`, `request_filter_id:` |
|
|
1101
1133
|
| `delete_rate_limit_override` | `id:`, `override_id:` |
|
|
1102
1134
|
|
|
1135
|
+
#### Additional security operations
|
|
1136
|
+
|
|
1137
|
+
All methods below take the numeric endpoint `id` as a string. Reads do not enable a security feature.
|
|
1138
|
+
|
|
1139
|
+
| Method | Additional input | Returned `data` |
|
|
1140
|
+
| --- | --- | --- |
|
|
1141
|
+
| `get_client_certs` | None | `enabled`, `certs` |
|
|
1142
|
+
| `create_client_cert` | `certificate`, a PEM string | Full certificate state |
|
|
1143
|
+
| `update_client_certs` | `enabled`, a boolean | Full certificate state |
|
|
1144
|
+
| `delete_client_cert` | `fingerprint` | Full state after deletion |
|
|
1145
|
+
| `get_method_blacklist` | None | `methods` |
|
|
1146
|
+
| `update_method_blacklist` | `methods`, a string array | Replaced method list |
|
|
1147
|
+
| `get_range_limits` | None | `limits`, `supported_methods` |
|
|
1148
|
+
| `update_range_limits` | `limits`, a method-to-integer map | Replaced limits and supported methods |
|
|
1149
|
+
| `get_blocked_ips` | None | Array of string `id` and `ip` records |
|
|
1150
|
+
| `create_blocked_ip` | `ip`, an address or CIDR string | Created string `id` and `ip` |
|
|
1151
|
+
| `delete_blocked_ip` | `ip_id` | Boolean confirmation |
|
|
1152
|
+
|
|
1153
|
+
Certificate records contain `fingerprint`, `subject`, `issuer`, and `expires_at`. Deleting the last certificate returns disabled state with an empty list; DELETE still has a response body. Invalid, expired, duplicate, or unknown certificates can return HTTP 422.
|
|
1154
|
+
|
|
1155
|
+
Blacklist and range-limit updates replace the complete configuration. An empty array clears the blacklist; an empty object clears range limits. Range limits must be positive integers. Read `supported_methods` for the endpoint's supported methods instead of assuming one global list. Blocked-IP calls do not toggle IP security; visibility can depend on the endpoint's IP security setting.
|
|
1156
|
+
|
|
1157
|
+
```ruby
|
|
1158
|
+
certificates = qn.admin.get_client_certs(id: "123")
|
|
1159
|
+
ranges = qn.admin.get_range_limits(id: "123")
|
|
1160
|
+
blocked = qn.admin.get_blocked_ips(id: "123")
|
|
1161
|
+
blacklist = qn.admin.update_method_blacklist(id: "123", methods: ["eth_sendRawTransaction"])
|
|
1162
|
+
```
|
|
1163
|
+
|
|
1164
|
+
#### Mutation responses
|
|
1165
|
+
|
|
1166
|
+
Existing mutation methods keep their original return values. Use these response-returning variants when you need the created record or effective limits. Each takes the same arguments as its existing counterpart.
|
|
1167
|
+
|
|
1168
|
+
| Method | Returned `data` |
|
|
1169
|
+
| --- | --- |
|
|
1170
|
+
| `create_token_with_response` | Token `id` and `token` |
|
|
1171
|
+
| `create_referrer_with_response` | Referrer `id` and `url` |
|
|
1172
|
+
| `create_ip_with_response` | IP record `id` and `ip` |
|
|
1173
|
+
| `create_domain_mask_with_response` | Record `id` and `domain_mask` |
|
|
1174
|
+
| `create_jwt_with_response` | JWT `id`, `public_key`, `kid`, and `name` |
|
|
1175
|
+
| `create_tag_with_response` | `tags` containing association `id`, `tag_id`, `account_id`, `endpoint_id`, label, and timestamps |
|
|
1176
|
+
| `update_rate_limits_with_response` | `limits` with nullable `rps`, `rpm`, and `rpd` |
|
|
1177
|
+
|
|
1178
|
+
Creation and snapshot fields differ: a created referrer uses `url`, while endpoint snapshots use `referrer`; a created domain mask uses `domain_mask`, while snapshots use `domain`. Tag association `id` differs from `tag_id`; these IDs are numeric. Rust Debug output redacts token and JWT credential values. Store returned credentials securely and do not log them.
|
|
1179
|
+
|
|
1180
|
+
```ruby
|
|
1181
|
+
created = qn.admin.create_referrer_with_response(id: "123", referrer: "https://example.com")
|
|
1182
|
+
puts created[:data][:id]
|
|
1183
|
+
```
|
|
1184
|
+
|
|
1185
|
+
#### Usage and metrics summaries
|
|
1186
|
+
|
|
1187
|
+
These methods return a resolved time window, typed totals, optional grouped rows, and an optional continuation cursor.
|
|
1188
|
+
|
|
1189
|
+
| Method | Grouping | Additional filters |
|
|
1190
|
+
| --- | --- | --- |
|
|
1191
|
+
| `get_usage_credits_summary` | None | None |
|
|
1192
|
+
| `get_usage_rpc_summary` | `method`, `endpoint`, `chain`, `network` | `endpoint_names`, `chains`, `networks`, `methods`, `tag_ids`, `addon_ids` |
|
|
1193
|
+
| `get_usage_streams_summary` | `stream` | `stream_id` |
|
|
1194
|
+
| `get_usage_webhooks_summary` | `webhook` | `webhook_id` |
|
|
1195
|
+
| `get_traffic_summary` | `method`, `endpoint` | Same filters as the RPC summary |
|
|
1196
|
+
| `get_errors_summary` | `code`, `endpoint`, `network`, `method` | `endpoints`, `networks`, `methods`, `codes`, `status_codes`, `kind` |
|
|
1197
|
+
| `get_endpoint_errors_summary` | `code`, `network`, `method` | Required endpoint `id`; error-summary filters except `endpoints` |
|
|
1198
|
+
|
|
1199
|
+
| Summary | Totals fields |
|
|
1200
|
+
| --- | --- |
|
|
1201
|
+
| Credits | `credits` |
|
|
1202
|
+
| RPC | `requests`, `bytes`, `rpc_credits`, `data_credits`, `credits` |
|
|
1203
|
+
| Streams | `blocks`, `bytes`, `block_credits` |
|
|
1204
|
+
| Webhooks | `deliveries`, `credits` |
|
|
1205
|
+
| Traffic | `successful_requests`, `bytes`, `request_credits`, `bytes_credits`, `credits`, `active_methods` |
|
|
1206
|
+
| Account and endpoint errors | `rpc_errors`, `http_errors` |
|
|
1207
|
+
|
|
1208
|
+
Error breakdown rows contain `kind` and `count`, plus the selected grouping dimensions. Other breakdown rows carry their summary metrics and selected dimensions.
|
|
1209
|
+
|
|
1210
|
+
For the first page, supply `last` as a positive integer duration ending now (`s`, `m`, `h`, or `d`), or both `from_time` and `to_time` as ISO 8601 timestamps with timezones. Bare dates are not summary timestamps. Use `group_by` for grouping. Credits summaries have no grouping parameter. The limit is 1 through 1000 and defaults to 100.
|
|
1211
|
+
|
|
1212
|
+
Pass native arrays for groups and array filters. The SDK encodes repeated bracketed query keys such as `group_by[]=method&group_by[]=endpoint`. Error codes and HTTP status-code filters remain strings. `endpoint_names` contains endpoint subdomains; RPC, traffic, and account-error result `endpoint` values are integer endpoint IDs. Account-error `endpoints` filters accept integer arrays, such as `[123, 456]`. `tag_ids` and `addon_ids` contain numeric IDs represented as strings. Endpoint error-summary `id` uses the numeric endpoint ID represented as a string.
|
|
1213
|
+
|
|
1214
|
+
For error summaries, `kind` is `rpc` or `http`. Method filtering/grouping requires `rpc`; RPC kind rejects `status_codes`, and HTTP kind rejects `codes`. Feature access and retention can produce API errors, including HTTP 403.
|
|
1215
|
+
|
|
1216
|
+
Continue with `cursor` alone. A cursor belongs to the original route, account, and query; any repeated parameters, including `limit`, must match. Keep the returned window values: the server can align summary windows to billing boundaries. Totals cover the full window on every page, not only the current rows. The SDK does not round windows or paginate automatically.
|
|
1217
|
+
|
|
1218
|
+
Summary metrics use floating-point numbers, including count-like fields, and can contain fractions such as `7.5`. They do not promise arbitrary decimal precision. Legacy usage fields remain integers. RPC breakdown `requests` and traffic breakdown `successful_requests` can be null even though totals are non-null. A missing `breakdown` is not an empty grouped result.
|
|
1219
|
+
|
|
1220
|
+
Endpoint grouping values are `Integer` or `nil`. An omitted grouping dimension has no Hash key; an explicit null value is `nil`. Use `row.key?(:method)` to check presence. An omitted breakdown has no key. Response window keys are `:from` and `:to`; request keywords are `from_time:` and `to_time:`.
|
|
1221
|
+
|
|
1222
|
+
```ruby
|
|
1223
|
+
page = qn.admin.get_usage_rpc_summary(last: "1h", group_by: ["method", "endpoint"], limit: 20)
|
|
1224
|
+
puts page[:data][:totals][:credits]
|
|
1225
|
+
if page[:data][:next_cursor]
|
|
1226
|
+
next_page = qn.admin.get_usage_rpc_summary(cursor: page[:data][:next_cursor])
|
|
1227
|
+
end
|
|
1228
|
+
```
|
|
1229
|
+
|
|
1230
|
+
#### Activity logs
|
|
1231
|
+
|
|
1232
|
+
Lists account changes, newest first. `list_activity_log_filters` returns the actor IDs and target types accepted by `list_activity_logs`; `get_activity_log` returns one entry by UUID.
|
|
1233
|
+
|
|
1234
|
+
List filters are `q`, `actor`, `endpoint_id`, `target_type`, `from_time`, `to_time`, `limit`, and `offset`. `endpoint_id` is a numeric endpoint ID represented as a string. `target_type` is sent as `type`. The limit is 0 through 100 and defaults to 20. Offset pagination returns `total`, `limit`, and `offset`; pin `to_time` when exporting because new entries shift offsets. Bare dates are accepted: `from_time` starts at midnight UTC, and `to_time` includes the entire day.
|
|
1235
|
+
|
|
1236
|
+
Responses keep actor and target metadata typed. Actor IDs, names, and emails can be null, including for deleted users. Feature access can return HTTP 403; a missing detail entry returns HTTP 404.
|
|
1237
|
+
|
|
1238
|
+
```ruby
|
|
1239
|
+
filters = qn.admin.list_activity_log_filters
|
|
1240
|
+
page = qn.admin.list_activity_logs(limit: 20)
|
|
1241
|
+
if (entry = page[:data].first)
|
|
1242
|
+
detail = qn.admin.get_activity_log(id: entry[:id])
|
|
1243
|
+
end
|
|
1244
|
+
```
|
|
1245
|
+
|
|
1246
|
+
#### Transactions
|
|
1247
|
+
|
|
1248
|
+
`list_transactions` returns retained transactions and an optional continuation cursor. A first page needs `last` (for example, `1h`), or both `from_time` and `to_time` as ISO 8601 timestamps with timezones. A cursor alone continues the same resolved window.
|
|
1249
|
+
|
|
1250
|
+
Optional filters are `network`, `method`, `state`, `transaction_hash`, and `endpoints`. States are `submitted`, `succeeded`, and `failed`. Endpoint filters accept integer endpoint IDs, such as `[123, 456]`, and use repeated `endpoints[]` query keys. The limit is 1 through 1000 and defaults to 100.
|
|
1251
|
+
|
|
1252
|
+
`get_transaction` takes a network, a transaction hash, and optional `include_payloads`. It returns an outer `data` containing `exists` and a second `data` value. An absent or expired transaction can return `exists: false` and `data: null`. Payloads default to excluded; set `include_payloads` to true to request retained request and response text. The SDK preserves that text without parsing it. Feature access can return HTTP 403.
|
|
1253
|
+
|
|
1254
|
+
Transaction `endpoint_ids` arrays contain integer endpoint IDs or null elements; the detail array itself can be absent or null. Each attempt has a required integer `endpoint_id`. Block heights remain decimal strings, including values such as `9007199254740993`. Other detail metadata can be absent or null. Attempts retain the order returned by the API.
|
|
1255
|
+
|
|
1256
|
+
```ruby
|
|
1257
|
+
page = qn.admin.list_transactions(last: "1h", endpoints: [123, 456], limit: 20)
|
|
1258
|
+
if (transaction = page[:data][:transactions].first)
|
|
1259
|
+
result = qn.admin.get_transaction(
|
|
1260
|
+
network: transaction[:network], hash: transaction[:transaction_hash],
|
|
1261
|
+
include_payloads: false
|
|
1262
|
+
)
|
|
1263
|
+
if result[:data][:exists] && result[:data][:data]
|
|
1264
|
+
puts result[:data][:data][:height] # String or nil
|
|
1265
|
+
end
|
|
1266
|
+
end
|
|
1267
|
+
if page[:data][:next_cursor]
|
|
1268
|
+
next_page = qn.admin.list_transactions(cursor: page[:data][:next_cursor])
|
|
1269
|
+
end
|
|
1270
|
+
```
|
|
1271
|
+
|
|
1272
|
+
#### Admin compatibility notes
|
|
1273
|
+
|
|
1274
|
+
Summary endpoint dimensions and transaction endpoint IDs use `Integer` values. Pass integer arrays to account-error and transaction `endpoints` filters. Transaction endpoint-ID arrays can contain `nil`; attempt `endpoint_id` is required. Update callers that used UUID strings.
|
|
1275
|
+
|
|
1276
|
+
Existing methods retain their return values and optional argument requiredness. Required API inputs are documented above; omitted or invalid values still produce API errors. Use the response-returning methods when you need created records.
|
|
1277
|
+
|
|
1278
|
+
Rust callers must update affected full struct literals for the added fields, even when those fields are optional. This includes security snapshots/options, filter responses, usage rows, bulk results, method-rate-limit requests/responses, and endpoint metric requests. Request structs with `Default` can use `..Default::default()` for omitted fields; builders avoid full-literal updates where available.
|
|
1279
|
+
|
|
1280
|
+
`EndpointRequestFilter.method` changed from `Vec<String>` to `Vec<serde_json::Value>` so it can preserve structured matchers. Convert strings with `.into()` or `serde_json::json!`, and use `as_str()` when reading a string matcher. Match object values as JSON rather than assuming every matcher is a string. Snapshot `params` and custom `pattern` are object maps containing JSON values.
|
|
1281
|
+
|
|
1282
|
+
Python endpoint/security response wrappers keep their public class names, getters, and setters. Filter values are native lists and dictionaries; assign through the setter after editing a returned value. Node uses `unknown[]` for matcher arrays and `Record<string, unknown>` for open pattern objects. Ruby continues to return `IndifferentHash` values. JSON object keys are preserved without recursive case conversion.
|
|
1283
|
+
|
|
1284
|
+
New summary, activity, and transaction window fields use `from_time` and `to_time` in Rust/Python. Node fields and serialized response keys remain `from` and `to`; Python/Ruby client arguments use `from_time` and `to_time`. Existing endpoint-log arguments do not change.
|
|
1285
|
+
|
|
1286
|
+
|
|
1103
1287
|
---
|
|
1104
1288
|
|
|
1105
1289
|
### Streams Client
|
|
@@ -1706,8 +1890,9 @@ mints short-lived session JWTs. `qn.rpc` makes JSON-RPC calls directly against t
|
|
|
1706
1890
|
endpoint, minting and refreshing the JWT automatically — no endpoint URL or token to
|
|
1707
1891
|
manage.
|
|
1708
1892
|
|
|
1709
|
-
Tooling Access must be enabled once (admin role + eligible plan).
|
|
1710
|
-
|
|
1893
|
+
Tooling Access must be enabled once (admin role + eligible plan). Status reads can
|
|
1894
|
+
return HTTP 403 when feature access is unavailable; successful authentication alone
|
|
1895
|
+
does not guarantee access. The control-plane methods live on `qn.admin`:
|
|
1711
1896
|
|
|
1712
1897
|
```ruby
|
|
1713
1898
|
# Ruby
|
data/sig/quicknode_sdk.rbs
CHANGED
|
@@ -102,7 +102,7 @@ module QuicknodeSdk
|
|
|
102
102
|
def get_endpoint_logs: (id: String, from_time: String, to_time: String, ?include_details: bool, ?limit: Integer, ?next_at: String) -> untyped
|
|
103
103
|
def get_log_details: (id: String, request_id: String) -> untyped
|
|
104
104
|
def get_security_options: (id: String) -> untyped
|
|
105
|
-
def update_security_options: (id: String, ?tokens: String, ?referrers: String, ?jwts: String, ?ips: String, ?domain_masks: String, ?hsts: String, ?cors: String, ?request_filters: String, ?ip_custom_header: String) -> untyped
|
|
105
|
+
def update_security_options: (id: String, ?tokens: String, ?referrers: String, ?jwts: String, ?ips: String, ?domain_masks: String, ?hsts: String, ?cors: String, ?request_filters: String, ?ip_custom_header: String, ?response_logging: String) -> untyped
|
|
106
106
|
def create_token: (id: String) -> void
|
|
107
107
|
def delete_token: (id: String, token_id: String) -> untyped
|
|
108
108
|
def create_referrer: (id: String, referrer: String) -> void
|
|
@@ -113,6 +113,39 @@ module QuicknodeSdk
|
|
|
113
113
|
def delete_domain_mask: (id: String, domain_mask_id: String) -> untyped
|
|
114
114
|
def create_jwt: (id: String, kid: String, public_key: String, name: String) -> void
|
|
115
115
|
def delete_jwt: (id: String, jwt_id: String) -> void
|
|
116
|
+
def get_request_filters: (id: String) -> untyped
|
|
117
|
+
def create_request_filter_pattern: (id: String, pattern: Hash[String, untyped]) -> untyped
|
|
118
|
+
def update_request_filter_pattern: (id: String, request_filter_id: String, pattern: Hash[String, untyped]) -> void
|
|
119
|
+
def get_client_certs: (id: String) -> untyped
|
|
120
|
+
def create_client_cert: (id: String, certificate: String) -> untyped
|
|
121
|
+
def update_client_certs: (id: String, enabled: bool) -> untyped
|
|
122
|
+
def delete_client_cert: (id: String, fingerprint: String) -> untyped
|
|
123
|
+
def get_method_blacklist: (id: String) -> untyped
|
|
124
|
+
def update_method_blacklist: (id: String, methods: Array[String]) -> untyped
|
|
125
|
+
def get_range_limits: (id: String) -> untyped
|
|
126
|
+
def update_range_limits: (id: String, limits: Hash[String, Integer]) -> untyped
|
|
127
|
+
def get_blocked_ips: (id: String) -> untyped
|
|
128
|
+
def create_blocked_ip: (id: String, ip: String) -> untyped
|
|
129
|
+
def delete_blocked_ip: (id: String, ip_id: String) -> untyped
|
|
130
|
+
def list_activity_logs: (?q: String, ?actor: String, ?endpoint_id: String, ?target_type: String, ?from_time: String, ?to_time: String, ?limit: Integer, ?offset: Integer) -> untyped
|
|
131
|
+
def list_activity_log_filters: () -> untyped
|
|
132
|
+
def get_activity_log: (id: String) -> untyped
|
|
133
|
+
def list_transactions: (?last: String, ?from_time: String, ?to_time: String, ?network: String, ?method: String, ?state: String, ?transaction_hash: String, ?cursor: String, ?endpoints: Array[Integer], ?limit: Integer) -> untyped
|
|
134
|
+
def get_transaction: (network: String, hash: String, ?include_payloads: bool) -> untyped
|
|
135
|
+
def get_usage_credits_summary: (?last: String, ?from_time: String, ?to_time: String, ?cursor: String, ?limit: Integer) -> untyped
|
|
136
|
+
def get_usage_rpc_summary: (?last: String, ?from_time: String, ?to_time: String, ?cursor: String, ?limit: Integer, ?group_by: Array[String], ?endpoint_names: Array[String], ?chains: Array[String], ?networks: Array[String], ?methods: Array[String], ?tag_ids: Array[String], ?addon_ids: Array[String]) -> untyped
|
|
137
|
+
def get_usage_streams_summary: (?last: String, ?from_time: String, ?to_time: String, ?cursor: String, ?limit: Integer, ?group_by: Array[String], ?stream_id: String) -> untyped
|
|
138
|
+
def get_usage_webhooks_summary: (?last: String, ?from_time: String, ?to_time: String, ?cursor: String, ?limit: Integer, ?group_by: Array[String], ?webhook_id: String) -> untyped
|
|
139
|
+
def get_traffic_summary: (?last: String, ?from_time: String, ?to_time: String, ?cursor: String, ?limit: Integer, ?group_by: Array[String], ?endpoint_names: Array[String], ?chains: Array[String], ?networks: Array[String], ?methods: Array[String], ?tag_ids: Array[String], ?addon_ids: Array[String]) -> untyped
|
|
140
|
+
def get_errors_summary: (?last: String, ?from_time: String, ?to_time: String, ?cursor: String, ?limit: Integer, ?group_by: Array[String], ?endpoints: Array[Integer], ?networks: Array[String], ?methods: Array[String], ?codes: Array[String], ?status_codes: Array[String], ?kind: String) -> untyped
|
|
141
|
+
def get_endpoint_errors_summary: (id: String, ?last: String, ?from_time: String, ?to_time: String, ?cursor: String, ?limit: Integer, ?group_by: Array[String], ?networks: Array[String], ?methods: Array[String], ?codes: Array[String], ?status_codes: Array[String], ?kind: String) -> untyped
|
|
142
|
+
def create_token_with_response: (id: String) -> untyped
|
|
143
|
+
def create_referrer_with_response: (id: String, referrer: String) -> untyped
|
|
144
|
+
def create_ip_with_response: (id: String, ip: String) -> untyped
|
|
145
|
+
def create_domain_mask_with_response: (id: String, ?domain_mask: String) -> untyped
|
|
146
|
+
def create_jwt_with_response: (id: String, kid: String, public_key: String, name: String) -> untyped
|
|
147
|
+
def create_tag_with_response: (id: String, ?label: String) -> untyped
|
|
148
|
+
def update_rate_limits_with_response: (id: String, ?rps: Integer, ?rpm: Integer, ?rpd: Integer, ?limit_by_ip: bool) -> untyped
|
|
116
149
|
def create_request_filter: (id: String, methods: Array[String]) -> untyped
|
|
117
150
|
def update_request_filter: (id: String, request_filter_id: String, ?methods: Array[String]) -> void
|
|
118
151
|
def delete_request_filter: (id: String, request_filter_id: String) -> void
|
|
@@ -121,14 +154,14 @@ module QuicknodeSdk
|
|
|
121
154
|
def create_or_update_ip_custom_header: (id: String, header_name: String) -> untyped
|
|
122
155
|
def delete_ip_custom_header: (id: String) -> untyped
|
|
123
156
|
def get_method_rate_limits: (id: String) -> untyped
|
|
124
|
-
def create_method_rate_limit: (id: String, interval: String, methods: Array[String], rate: Integer) -> untyped
|
|
125
|
-
def update_method_rate_limit: (id: String, method_rate_limit_id: String, ?methods: Array[String], ?status: String, ?rate: Integer) -> untyped
|
|
157
|
+
def create_method_rate_limit: (id: String, interval: String, methods: Array[String], rate: Integer, ?limit_by_ip: bool) -> untyped
|
|
158
|
+
def update_method_rate_limit: (id: String, method_rate_limit_id: String, ?methods: Array[String], ?status: String, ?rate: Integer, ?limit_by_ip: bool) -> untyped
|
|
126
159
|
def delete_method_rate_limit: (id: String, method_rate_limit_id: String) -> void
|
|
127
|
-
def update_rate_limits: (id: String, ?rps: Integer, ?rpm: Integer, ?rpd: Integer) -> void
|
|
160
|
+
def update_rate_limits: (id: String, ?rps: Integer, ?rpm: Integer, ?rpd: Integer, ?limit_by_ip: bool) -> void
|
|
128
161
|
def get_rate_limits: (id: String) -> untyped
|
|
129
162
|
def delete_rate_limit_override: (id: String, override_id: String) -> void
|
|
130
163
|
def get_endpoint_urls: (id: String) -> untyped
|
|
131
|
-
def get_endpoint_metrics: (id: String, period: String, metric: String) -> untyped
|
|
164
|
+
def get_endpoint_metrics: (id: String, period: String, metric: String, ?percentile: Integer) -> untyped
|
|
132
165
|
def get_account_metrics: (period: String, metric: String, ?percentile: String) -> untyped
|
|
133
166
|
def list_chains: () -> untyped
|
|
134
167
|
def account_info: () -> untyped
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: quicknode_sdk
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.9.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Quicknode
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-10-29 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: hashie
|