quicknode_sdk 0.1.0.pre.alpha.30-arm64-darwin → 0.2.0-arm64-darwin
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 +43 -25
- data/lib/quicknode_sdk/quicknode_sdk.bundle +0 -0
- 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: 731055e0f33dbdcce951cc7ba34b2716d77d10ec4e54944f34209bb9f4cbb7a1
|
|
4
|
+
data.tar.gz: ee8f6a32939e6ec7d5f29459939716017c3d79d2581a3b0da4945ef5710c16a9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a234e1b45fbbeabbc6a1ff4d9d38a7aec0f86991b984145829e179a954a902af79ed9ca9006ca2ce7d30e5cbda792cc1cf7f389740c0e6e9feb023340b3e8271
|
|
7
|
+
data.tar.gz: a4e158b5299cd826eb0a667cff6e13c73317c5cf6e6f736f51c9ef5481cc3a707c919b60455af3f79d3b146e41b59e24bebf1ce288c9a8bdd876b8c4cac993bd
|
data/README.md
CHANGED
|
@@ -4,6 +4,8 @@ Ruby bindings for the Quicknode SDK.
|
|
|
4
4
|
|
|
5
5
|
This is one of four language bindings published from the same Rust core. See the [project README](https://github.com/quicknode/sdk/blob/main/README.md) for the polyglot overview, development setup, and release process.
|
|
6
6
|
|
|
7
|
+
> **Pre-1.0**: While on `0.x`, releases may contain breaking changes. Check the [release notes](https://github.com/quicknode/sdk/releases) before upgrading.
|
|
8
|
+
|
|
7
9
|
## Table of Contents
|
|
8
10
|
|
|
9
11
|
- [Installation](#installation)
|
|
@@ -137,7 +139,9 @@ Snippets assume `qn` was already constructed via the Quick Start. Optional param
|
|
|
137
139
|
|
|
138
140
|
### Language conventions
|
|
139
141
|
|
|
140
|
-
- Methods are **blocking** (not async). Parameters are a single Hash with symbol keys.
|
|
142
|
+
- Methods are **blocking** (not async). Parameters are a single Hash with symbol keys. Unknown parameter keys raise `ArgumentError`.
|
|
143
|
+
- **Response shape.** Every method that returns data returns a `QuicknodeSdk::IndifferentHash` — a plain `Hash` subclass with `Hashie::Extensions::IndifferentAccess`. Access values with `resp[:data]`, `resp["data"]`, or `resp.dig(:data, :id)`. Nested hashes and arrays are wrapped recursively, so symbol or string keys work at every level. **Dot accessors (`resp.data.id`) do not work** — there is no `MethodAccess` extension on this class. Use `[]` or `dig`.
|
|
144
|
+
- **Pagination key naming differs across products** because the underlying APIs do. Admin list endpoints return `resp[:pagination]` (`{ total, limit, offset }`); streams and webhooks list endpoints return `resp[:pageInfo]` (same shape, camelCase). Per-method `**Returns**` blocks note which one applies.
|
|
141
145
|
|
|
142
146
|
---
|
|
143
147
|
|
|
@@ -833,13 +837,13 @@ Returns the rate-limit rows currently enforced on the endpoint, each identifying
|
|
|
833
837
|
|
|
834
838
|
**Parameters**: `id` (endpoint id, required).
|
|
835
839
|
|
|
836
|
-
**Returns**: `GetRateLimitsResponse` (as
|
|
840
|
+
**Returns**: `GetRateLimitsResponse` (as an `IndifferentHash`) with `data[:rate_limits]: Array<RateLimitEntry>`.
|
|
837
841
|
|
|
838
842
|
```ruby
|
|
839
843
|
# Ruby
|
|
840
844
|
resp = qn.admin.get_rate_limits(id: "123")
|
|
841
|
-
resp.data
|
|
842
|
-
puts "#{row
|
|
845
|
+
resp.dig(:data, :rate_limits)&.each do |row|
|
|
846
|
+
puts "#{row[:bucket]} #{row[:rate_limit]} #{row[:source]} #{row[:id]}"
|
|
843
847
|
end
|
|
844
848
|
```
|
|
845
849
|
|
|
@@ -864,14 +868,14 @@ Returns the HTTP and WebSocket URLs for the endpoint without fetching the full e
|
|
|
864
868
|
|
|
865
869
|
**Parameters**: `id` (endpoint id, required).
|
|
866
870
|
|
|
867
|
-
**Returns**: `GetEndpointUrlsResponse` (as
|
|
871
|
+
**Returns**: `GetEndpointUrlsResponse` (as an `IndifferentHash`) with `data[:http_url]`, `data[:wss_url]`, and `data[:multichain_urls]`.
|
|
868
872
|
|
|
869
873
|
```ruby
|
|
870
874
|
# Ruby
|
|
871
875
|
resp = qn.admin.get_endpoint_urls(id: "123")
|
|
872
|
-
puts resp.data
|
|
873
|
-
resp.data
|
|
874
|
-
puts "#{network} #{urls
|
|
876
|
+
puts resp.dig(:data, :http_url)
|
|
877
|
+
resp.dig(:data, :multichain_urls)&.each do |network, urls|
|
|
878
|
+
puts "#{network} #{urls[:http_url]}"
|
|
875
879
|
end
|
|
876
880
|
```
|
|
877
881
|
|
|
@@ -883,7 +887,7 @@ Returns metric series for an endpoint over a time period.
|
|
|
883
887
|
|
|
884
888
|
**Parameters**: `id` (endpoint id, required); body: `period` (`"hour"` | `"day"` | `"week"` | `"month"`), `metric` (e.g. `"method_calls_over_time"`, `"response_status_breakdown"`).
|
|
885
889
|
|
|
886
|
-
**Returns**: `GetEndpointMetricsResponse` (as
|
|
890
|
+
**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"]`.
|
|
887
891
|
|
|
888
892
|
```ruby
|
|
889
893
|
# Ruby
|
|
@@ -900,7 +904,7 @@ Returns account-level metric series. Supports an optional `percentile` (e.g. `"p
|
|
|
900
904
|
|
|
901
905
|
**Parameters**: `period` (required), `metric` (required), `percentile` (string, optional).
|
|
902
906
|
|
|
903
|
-
**Returns**: `GetAccountMetricsResponse` (as
|
|
907
|
+
**Returns**: `GetAccountMetricsResponse` (as an `IndifferentHash`) with `data: Array<EndpointMetric>`. See `get_endpoint_metrics` above for the `tag: Array<String>` shape.
|
|
904
908
|
|
|
905
909
|
```ruby
|
|
906
910
|
# Ruby
|
|
@@ -1010,13 +1014,13 @@ resp = qn.admin.list_tags
|
|
|
1010
1014
|
|
|
1011
1015
|
Renames an account-level tag.
|
|
1012
1016
|
|
|
1013
|
-
**Parameters**: `
|
|
1017
|
+
**Parameters**: `id` (i32, required — the tag id); body: `label` (string, required).
|
|
1014
1018
|
|
|
1015
1019
|
**Returns**: `RenameTagResponse` with updated `AccountTag`.
|
|
1016
1020
|
|
|
1017
1021
|
```ruby
|
|
1018
1022
|
# Ruby
|
|
1019
|
-
resp = qn.admin.rename_tag(
|
|
1023
|
+
resp = qn.admin.rename_tag(id: 42, label: "staging")
|
|
1020
1024
|
```
|
|
1021
1025
|
|
|
1022
1026
|
##### `delete_account_tag` / `deleteAccountTag`
|
|
@@ -1032,6 +1036,24 @@ Deletes a tag from the account. The tag must first be removed from any endpoints
|
|
|
1032
1036
|
qn.admin.delete_account_tag(id: 42)
|
|
1033
1037
|
```
|
|
1034
1038
|
|
|
1039
|
+
#### Tag / delete method parameter quick-reference
|
|
1040
|
+
|
|
1041
|
+
The pattern across the Admin client: `id:` always names the **parent** resource. The child resource takes its own `<child>_id:`. The two account-level tag operations collapse to a single `id:` (the tag id) because there is no parent endpoint.
|
|
1042
|
+
|
|
1043
|
+
| Method | Required keys |
|
|
1044
|
+
|---|---|
|
|
1045
|
+
| `delete_tag` (per-endpoint) | `id:` (endpoint id), `tag_id:` |
|
|
1046
|
+
| `delete_account_tag` | `id:` (tag id) |
|
|
1047
|
+
| `rename_tag` | `id:` (tag id), `label:` |
|
|
1048
|
+
| `delete_token` | `id:` (endpoint id), `token_id:` |
|
|
1049
|
+
| `delete_referrer` | `id:`, `referrer_id:` |
|
|
1050
|
+
| `delete_ip` | `id:`, `ip_id:` |
|
|
1051
|
+
| `delete_domain_mask` | `id:`, `domain_mask_id:` |
|
|
1052
|
+
| `delete_jwt` | `id:`, `jwt_id:` |
|
|
1053
|
+
| `delete_method_rate_limit` | `id:`, `method_rate_limit_id:` |
|
|
1054
|
+
| `delete_request_filter` | `id:`, `request_filter_id:` |
|
|
1055
|
+
| `delete_rate_limit_override` | `id:`, `override_id:` |
|
|
1056
|
+
|
|
1035
1057
|
---
|
|
1036
1058
|
|
|
1037
1059
|
### Streams Client
|
|
@@ -1048,20 +1070,16 @@ Enums used across stream methods:
|
|
|
1048
1070
|
- **`FilterLanguage`**: `Javascript`, `Go`, `Wasm`.
|
|
1049
1071
|
- **`StreamMetadataLocation`**: `Body`, `Header`, `None`.
|
|
1050
1072
|
|
|
1051
|
-
Destinations are expressed via `DestinationAttributes`. Each variant wraps an attribute struct:
|
|
1073
|
+
Destinations are expressed via `DestinationAttributes`. Each variant wraps an attribute struct. On returned `Stream` records, `destination_attributes` is **flat** (no `attributes:` nesting) — access fields directly with `resp.dig(:destination_attributes, :url)`.
|
|
1074
|
+
|
|
1052
1075
|
|
|
1053
1076
|
| Variant | Struct | Key fields |
|
|
1054
1077
|
|---|---|---|
|
|
1055
1078
|
| `Webhook` | `WebhookAttributes` | `url`, `max_retry`, `retry_interval_sec`, `post_timeout_sec`, `compression`, `security_token?` |
|
|
1056
1079
|
| `S3` | `S3Attributes` | `endpoint`, `access_key`, `secret_key`, `bucket`, `object_prefix`, `compression`, `file_type`, `max_retry`, `retry_interval_sec`, `use_ssl?` |
|
|
1057
1080
|
| `Azure` | `AzureAttributes` | `storage_account`, `sas_token`, `container`, `compression`, `file_type`, `max_retry`, `retry_interval_sec`, `blob_prefix?` |
|
|
1058
|
-
| `Postgres` | `PostgresAttributes` | `host`, `port
|
|
1059
|
-
| `
|
|
1060
|
-
| `Mongo` | `MongoAttributes` | `connection_string`, `database`, `collection`, `max_retry`, `retry_interval_sec` |
|
|
1061
|
-
| `Clickhouse` | `ClickhouseAttributes` | `host`, `port`, `username`, `password`, `database`, `table`, `max_retry`, `retry_interval_sec`, `use_ssl?` |
|
|
1062
|
-
| `Snowflake` | `SnowflakeAttributes` | `account`, `warehouse`, `database`, `schema`, `table`, `username`, `private_key`, `max_retry`, `retry_interval_sec` |
|
|
1063
|
-
| `Kafka` | `KafkaAttributes` | `bootstrap_servers`, `topic`, `compression`, `max_retry`, `retry_interval_sec` |
|
|
1064
|
-
| `Redis` | `RedisAttributes` | `host`, `port`, `username`, `password`, `key`, `max_retry`, `retry_interval_sec`, `use_ssl?` |
|
|
1081
|
+
| `Postgres` | `PostgresAttributes` | `host`, `port?` (default `5432`), `username`, `password`, `database`, `table_name`, `sslmode`, `max_retry?`, `retry_interval_sec?` |
|
|
1082
|
+
| `Kafka` | `KafkaAttributes` | `bootstrap_servers`, `topic_name`, `compression_type`, `batch_size?`, `linger_ms?`, `max_message_bytes?`, `timeout_sec?`, `max_retry?`, `retry_interval_sec?`, `username?`, `password?`, `protocol?`, `mechanisms?` |
|
|
1065
1083
|
|
|
1066
1084
|
Wrapper naming per language:
|
|
1067
1085
|
|
|
@@ -1109,7 +1127,7 @@ Paginated list of streams on the account.
|
|
|
1109
1127
|
|
|
1110
1128
|
**Parameters** (all optional): `offset` (i64), `limit` (i64), `order_by` (string), `order_direction` (`"asc"` | `"desc"`), `stream_type` (string).
|
|
1111
1129
|
|
|
1112
|
-
**Returns**: `ListStreamsResponse` with `data: Stream[]` and `
|
|
1130
|
+
**Returns**: `ListStreamsResponse` with `data: Stream[]` and `pageInfo` (camelCase on the wire — access as `resp[:pageInfo][:total]`).
|
|
1113
1131
|
|
|
1114
1132
|
```ruby
|
|
1115
1133
|
# Ruby
|
|
@@ -1250,7 +1268,7 @@ Accessed as `qn.webhooks`. Creates webhooks from filter templates and manages th
|
|
|
1250
1268
|
| Factory | Argument struct | Fields |
|
|
1251
1269
|
|---|---|---|
|
|
1252
1270
|
| `evm_wallet_filter` | `EvmWalletFilterTemplate` | `wallets: string[]` |
|
|
1253
|
-
| `evm_contract_events` | `EvmContractEventsTemplate` | `contracts: string[]`, `
|
|
1271
|
+
| `evm_contract_events` | `EvmContractEventsTemplate` | `contracts: string[]`, `eventHashes?: string[]` (camelCase — `event_hashes` is rejected by the API) |
|
|
1254
1272
|
| `evm_abi_filter` | `EvmAbiFilterTemplate` | `abi: string` (JSON), `contracts: string[]` |
|
|
1255
1273
|
| `solana_wallet_filter` | `SolanaWalletFilterTemplate` | `accounts: string[]` |
|
|
1256
1274
|
| `bitcoin_wallet_filter` | `BitcoinWalletFilterTemplate` | `wallets: string[]` |
|
|
@@ -1262,7 +1280,7 @@ Accessed as `qn.webhooks`. Creates webhooks from filter templates and manages th
|
|
|
1262
1280
|
|
|
1263
1281
|
`WebhookStartFrom`: `Last` (resume from last delivered block) or `Latest` (start from newest).
|
|
1264
1282
|
|
|
1265
|
-
In Ruby, `template_args` is passed as a JSON string under the key `template_args_json
|
|
1283
|
+
In Ruby, `template_args` is passed as a JSON string under the key `template_args_json` on every template-aware method. The destination is passed as a JSON string under `destination_attributes_json` on `create_webhook_from_template` and `update_webhook`. **`update_webhook_template` cannot change the destination** — it accepts only `webhook_id`, `template_args_json`, `name?`, and `notification_email?`.
|
|
1266
1284
|
|
|
1267
1285
|
#### Webhooks methods
|
|
1268
1286
|
|
|
@@ -1333,9 +1351,9 @@ webhook = qn.webhooks.update_webhook(id: "wh-1", name: "Renamed Webhook")
|
|
|
1333
1351
|
|
|
1334
1352
|
##### `update_webhook_template` / `updateWebhookTemplate`
|
|
1335
1353
|
|
|
1336
|
-
Updates the template args (and optionally name
|
|
1354
|
+
Updates the template args (and optionally name and notification email) on an existing template-backed webhook. The destination cannot be changed after creation — to point a webhook at a new URL or storage backend, create a new one.
|
|
1337
1355
|
|
|
1338
|
-
**Parameters**: `webhook_id` (required), `
|
|
1356
|
+
**Parameters**: `webhook_id` (required), `template_args_json` (required — JSON string); optional: `name`, `notification_email`.
|
|
1339
1357
|
|
|
1340
1358
|
**Returns**: updated `Webhook`.
|
|
1341
1359
|
|
|
Binary file
|
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.2.0
|
|
5
5
|
platform: arm64-darwin
|
|
6
6
|
authors:
|
|
7
7
|
- Quicknode
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-05-
|
|
11
|
+
date: 2026-05-29 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: hashie
|