quicknode_sdk 0.3.0-aarch64-linux → 0.5.0-aarch64-linux
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 +45 -5
- data/lib/quicknode_sdk/clients/sql.rb +4 -0
- data/lib/quicknode_sdk/quicknode_sdk.so +0 -0
- data/lib/quicknode_sdk/sdk.rb +4 -0
- data/lib/quicknode_sdk.rb +1 -0
- data/sig/quicknode_sdk.rbs +12 -4
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1799801200a8bd2398578efea491e9752a76b471e7b3a2b7c746f38c295074c2
|
|
4
|
+
data.tar.gz: 404c3c0cd3246bb57155c62f86e8703561b3d82d17e7d6e81af996dedca43b0c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e823f53aa2599d86115b6be9df96ab1a58fdd98d250d0c26ab0f13e81195a24490e3c9a20def590144ce32d8e1b1591bd7a14e7b06b0456215447f9105dcb83e
|
|
7
|
+
data.tar.gz: 85de7cc321550af364578240366188a5491e7ae8f990f707e0c21d46d771c61cce13ad176d1a62856519ccbc2a0ae0d64c3197aa88c2f7fcae6207e8c8e38cd6
|
data/README.md
CHANGED
|
@@ -46,6 +46,7 @@ This is one of four language bindings published from the same Rust core. See the
|
|
|
46
46
|
- [KV Store Client](#kv-store-client)
|
|
47
47
|
- [Sets](#sets)
|
|
48
48
|
- [Lists](#lists)
|
|
49
|
+
- [SQL Client](#sql-client)
|
|
49
50
|
- [Error Handling](#error-handling)
|
|
50
51
|
- [License](#license)
|
|
51
52
|
|
|
@@ -55,7 +56,7 @@ This is one of four language bindings published from the same Rust core. See the
|
|
|
55
56
|
|
|
56
57
|
## Quick Start
|
|
57
58
|
|
|
58
|
-
Construct the SDK once, then reach into the
|
|
59
|
+
Construct the SDK once, then reach into the five sub-clients (`admin`, `streams`, `webhooks`, `kvstore`, `sql`). Subsequent API Reference snippets assume you have a `qn` handle from one of these blocks.
|
|
59
60
|
|
|
60
61
|
```ruby
|
|
61
62
|
# Ruby
|
|
@@ -94,6 +95,7 @@ Environment variables (prefix `QN_SDK__`, separator `__`):
|
|
|
94
95
|
| `QN_SDK__STREAMS__BASE_URL` | no | `https://api.quicknode.com/streams/rest/v1/` | Override streams base URL |
|
|
95
96
|
| `QN_SDK__WEBHOOKS__BASE_URL` | no | `https://api.quicknode.com/webhooks/rest/v1/` | Override webhooks base URL |
|
|
96
97
|
| `QN_SDK__KVSTORE__BASE_URL` | no | `https://api.quicknode.com/kv/rest/v1/` | Override KV store base URL |
|
|
98
|
+
| `QN_SDK__SQL__BASE_URL` | no | `https://api.quicknode.com/sql/rest/v1/` | Override SQL Explorer base URL |
|
|
97
99
|
| `QN_SDK__HTTP__HEADERS__<NAME>` | no | — | Custom HTTP header sent on every request. Overrides SDK-managed headers (see below). |
|
|
98
100
|
|
|
99
101
|
### Custom headers and `User-Agent`
|
|
@@ -547,7 +549,7 @@ qn.admin.delete_token(id: "ep-123", token_id: "tok-1")
|
|
|
547
549
|
|
|
548
550
|
Whitelists a referrer URL or domain on an endpoint.
|
|
549
551
|
|
|
550
|
-
**Parameters**: `id` (endpoint id, required); body: `referrer` (string,
|
|
552
|
+
**Parameters**: `id` (endpoint id, required); body: `referrer` (string, required).
|
|
551
553
|
|
|
552
554
|
**Returns**: nothing.
|
|
553
555
|
|
|
@@ -575,7 +577,7 @@ qn.admin.delete_referrer(id: "ep-123", referrer_id: "ref-1")
|
|
|
575
577
|
|
|
576
578
|
Whitelists an IP address on an endpoint.
|
|
577
579
|
|
|
578
|
-
**Parameters**: `id` (endpoint id, required); body: `ip` (string,
|
|
580
|
+
**Parameters**: `id` (endpoint id, required); body: `ip` (string, required).
|
|
579
581
|
|
|
580
582
|
**Returns**: nothing.
|
|
581
583
|
|
|
@@ -631,7 +633,7 @@ qn.admin.delete_domain_mask(id: "ep-123", domain_mask_id: "dm-1")
|
|
|
631
633
|
|
|
632
634
|
Configures JWT validation on an endpoint.
|
|
633
635
|
|
|
634
|
-
**Parameters**: `id` (endpoint id, required); body: `public_key` (string,
|
|
636
|
+
**Parameters**: `id` (endpoint id, required); body: `public_key` (string, required), `kid` (string, required), `name` (string, required).
|
|
635
637
|
|
|
636
638
|
**Returns**: nothing.
|
|
637
639
|
|
|
@@ -664,7 +666,7 @@ Whitelist specific RPC methods on an endpoint. Requests for methods not on the l
|
|
|
664
666
|
|
|
665
667
|
##### `create_request_filter` / `createRequestFilter`
|
|
666
668
|
|
|
667
|
-
**Parameters**: `id` (endpoint id, required); body: `method` (string[],
|
|
669
|
+
**Parameters**: `id` (endpoint id, required); body: `method` (string[], required). Ruby's Hash key is `methods` (plural).
|
|
668
670
|
|
|
669
671
|
**Returns**: `CreateRequestFilterResponse` with `data.id`.
|
|
670
672
|
|
|
@@ -1613,6 +1615,44 @@ Deletes a list and all of its items.
|
|
|
1613
1615
|
qn.kvstore.delete_list(key: "my-list")
|
|
1614
1616
|
```
|
|
1615
1617
|
|
|
1618
|
+
---
|
|
1619
|
+
|
|
1620
|
+
### SQL Client
|
|
1621
|
+
|
|
1622
|
+
Accessed as `qn.sql`. Runs SQL queries against indexed blockchain data and fetches the database schema. Backed by `https://api.quicknode.com/sql/rest/v1/`.
|
|
1623
|
+
|
|
1624
|
+
##### `query`
|
|
1625
|
+
|
|
1626
|
+
Executes a SQL query against a cluster and returns the result set. Paginate by writing `LIMIT`/`OFFSET` into the SQL.
|
|
1627
|
+
|
|
1628
|
+
**Parameters** (Hash): `query:` (String, required), `cluster_id:` (String, required).
|
|
1629
|
+
|
|
1630
|
+
**Returns** a Hash with `meta` (column metadata, each with `name` and `type`), `data` (rows as Hashes keyed by column name), `rows`, `rows_before_limit_at_least`, `statistics` (`elapsed`, `rows_read`, `bytes_read`), and `credits`. Access with `[]` or `dig`.
|
|
1631
|
+
|
|
1632
|
+
```ruby
|
|
1633
|
+
# Ruby
|
|
1634
|
+
resp = qn.sql.query(
|
|
1635
|
+
query: "SELECT action_type, user FROM hyperliquid_system_actions ORDER BY block_time DESC LIMIT 100",
|
|
1636
|
+
cluster_id: "hyperliquid-core-mainnet"
|
|
1637
|
+
)
|
|
1638
|
+
puts resp[:rows]
|
|
1639
|
+
puts resp[:data].first
|
|
1640
|
+
```
|
|
1641
|
+
|
|
1642
|
+
##### `get_schema`
|
|
1643
|
+
|
|
1644
|
+
Fetches the database schema for a cluster: table names, columns, types, sort keys, and partition strategies.
|
|
1645
|
+
|
|
1646
|
+
**Parameters** (Hash): `cluster_id:` (String, required).
|
|
1647
|
+
|
|
1648
|
+
**Returns** a Hash with `chain`, `cluster_id`, and `tables` (each with `name`, `engine`, `total_rows`, `partition_key`, `sorting_key`, and `columns` of `{ name, type }`).
|
|
1649
|
+
|
|
1650
|
+
```ruby
|
|
1651
|
+
# Ruby
|
|
1652
|
+
schema = qn.sql.get_schema(cluster_id: "hyperliquid-core-mainnet")
|
|
1653
|
+
puts schema[:tables].length
|
|
1654
|
+
```
|
|
1655
|
+
|
|
1616
1656
|
## Error Handling
|
|
1617
1657
|
|
|
1618
1658
|
Every binding exposes a typed exception hierarchy derived from the core `SdkError`
|
|
Binary file
|
data/lib/quicknode_sdk/sdk.rb
CHANGED
data/lib/quicknode_sdk.rb
CHANGED
|
@@ -13,4 +13,5 @@ require_relative "quicknode_sdk/clients/admin"
|
|
|
13
13
|
require_relative "quicknode_sdk/clients/streams"
|
|
14
14
|
require_relative "quicknode_sdk/clients/webhooks"
|
|
15
15
|
require_relative "quicknode_sdk/clients/kvstore"
|
|
16
|
+
require_relative "quicknode_sdk/clients/sql"
|
|
16
17
|
require_relative "quicknode_sdk/sdk"
|
data/sig/quicknode_sdk.rbs
CHANGED
|
@@ -33,6 +33,7 @@ module QuicknodeSdk
|
|
|
33
33
|
def streams: () -> Streams
|
|
34
34
|
def webhooks: () -> Webhooks
|
|
35
35
|
def kvstore: () -> KvStore
|
|
36
|
+
def sql: () -> Sql
|
|
36
37
|
end
|
|
37
38
|
|
|
38
39
|
class DestinationAttributes
|
|
@@ -64,15 +65,15 @@ module QuicknodeSdk
|
|
|
64
65
|
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
|
|
65
66
|
def create_token: (id: String) -> void
|
|
66
67
|
def delete_token: (id: String, token_id: String) -> untyped
|
|
67
|
-
def create_referrer: (id: String,
|
|
68
|
+
def create_referrer: (id: String, referrer: String) -> void
|
|
68
69
|
def delete_referrer: (id: String, referrer_id: String) -> untyped
|
|
69
|
-
def create_ip: (id: String,
|
|
70
|
+
def create_ip: (id: String, ip: String) -> void
|
|
70
71
|
def delete_ip: (id: String, ip_id: String) -> untyped
|
|
71
72
|
def create_domain_mask: (id: String, ?domain_mask: String) -> void
|
|
72
73
|
def delete_domain_mask: (id: String, domain_mask_id: String) -> untyped
|
|
73
|
-
def create_jwt: (id: String, kid: String,
|
|
74
|
+
def create_jwt: (id: String, kid: String, public_key: String, name: String) -> void
|
|
74
75
|
def delete_jwt: (id: String, jwt_id: String) -> void
|
|
75
|
-
def create_request_filter: (id: String,
|
|
76
|
+
def create_request_filter: (id: String, methods: Array[String]) -> untyped
|
|
76
77
|
def update_request_filter: (id: String, request_filter_id: String, ?methods: Array[String]) -> void
|
|
77
78
|
def delete_request_filter: (id: String, request_filter_id: String) -> void
|
|
78
79
|
def enable_multichain: (id: String) -> void
|
|
@@ -158,4 +159,11 @@ module QuicknodeSdk
|
|
|
158
159
|
def delete_list_item: (key: String, item: String) -> void
|
|
159
160
|
def delete_list: (key: String) -> void
|
|
160
161
|
end
|
|
162
|
+
|
|
163
|
+
class Sql
|
|
164
|
+
def initialize: (untyped native) -> void
|
|
165
|
+
|
|
166
|
+
def query: (query: String, cluster_id: String) -> untyped
|
|
167
|
+
def get_schema: (cluster_id: String) -> untyped
|
|
168
|
+
end
|
|
161
169
|
end
|
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.5.0
|
|
5
5
|
platform: aarch64-linux
|
|
6
6
|
authors:
|
|
7
7
|
- Quicknode
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-06-
|
|
11
|
+
date: 2026-06-25 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: hashie
|
|
@@ -34,6 +34,7 @@ files:
|
|
|
34
34
|
- lib/quicknode_sdk.rb
|
|
35
35
|
- lib/quicknode_sdk/clients/admin.rb
|
|
36
36
|
- lib/quicknode_sdk/clients/kvstore.rb
|
|
37
|
+
- lib/quicknode_sdk/clients/sql.rb
|
|
37
38
|
- lib/quicknode_sdk/clients/streams.rb
|
|
38
39
|
- lib/quicknode_sdk/clients/webhooks.rb
|
|
39
40
|
- lib/quicknode_sdk/native_delegator.rb
|