quicknode_sdk 0.4.0-aarch64-linux → 0.6.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 +70 -1
- 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 +10 -0
- 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: a2616f4fa4188dd16880a9320b248220ad593cc20ec969fee94c597d6419d808
|
|
4
|
+
data.tar.gz: fdd2ecf9b82a870515feab735c2ad27e242c2adc42800ad9d584151efae02b8a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: db149fe5acb0957676f301abf8beef8d5f78f3f01c0a2bd321621710783fa96c8ff8b374b5894f95bc9aa13dd1b3a8e9e0258130682bfdddb2a68f23574c6541
|
|
7
|
+
data.tar.gz: 64d34507518bb16dfc21930036080ae63afaf6d8bdcdfcd6b183a9f8a3bcfa3efe05262549a47530de41bc6d0ea7a3af41c470ce937c57e54517d501db0fd76d
|
data/README.md
CHANGED
|
@@ -34,6 +34,7 @@ This is one of four language bindings published from the same Rust core. See the
|
|
|
34
34
|
- [Endpoint URLs](#endpoint-urls)
|
|
35
35
|
- [Metrics](#metrics)
|
|
36
36
|
- [Chains](#chains)
|
|
37
|
+
- [Account](#account)
|
|
37
38
|
- [Billing](#billing)
|
|
38
39
|
- [Bulk Operations](#bulk-operations)
|
|
39
40
|
- [Account Tags](#account-tags)
|
|
@@ -46,6 +47,7 @@ This is one of four language bindings published from the same Rust core. See the
|
|
|
46
47
|
- [KV Store Client](#kv-store-client)
|
|
47
48
|
- [Sets](#sets)
|
|
48
49
|
- [Lists](#lists)
|
|
50
|
+
- [SQL Client](#sql-client)
|
|
49
51
|
- [Error Handling](#error-handling)
|
|
50
52
|
- [License](#license)
|
|
51
53
|
|
|
@@ -55,7 +57,7 @@ This is one of four language bindings published from the same Rust core. See the
|
|
|
55
57
|
|
|
56
58
|
## Quick Start
|
|
57
59
|
|
|
58
|
-
Construct the SDK once, then reach into the
|
|
60
|
+
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
61
|
|
|
60
62
|
```ruby
|
|
61
63
|
# Ruby
|
|
@@ -94,6 +96,7 @@ Environment variables (prefix `QN_SDK__`, separator `__`):
|
|
|
94
96
|
| `QN_SDK__STREAMS__BASE_URL` | no | `https://api.quicknode.com/streams/rest/v1/` | Override streams base URL |
|
|
95
97
|
| `QN_SDK__WEBHOOKS__BASE_URL` | no | `https://api.quicknode.com/webhooks/rest/v1/` | Override webhooks base URL |
|
|
96
98
|
| `QN_SDK__KVSTORE__BASE_URL` | no | `https://api.quicknode.com/kv/rest/v1/` | Override KV store base URL |
|
|
99
|
+
| `QN_SDK__SQL__BASE_URL` | no | `https://api.quicknode.com/sql/rest/v1/` | Override SQL Explorer base URL |
|
|
97
100
|
| `QN_SDK__HTTP__HEADERS__<NAME>` | no | — | Custom HTTP header sent on every request. Overrides SDK-managed headers (see below). |
|
|
98
101
|
|
|
99
102
|
### Custom headers and `User-Agent`
|
|
@@ -926,6 +929,34 @@ Lists the blockchains supported by Quicknode along with their networks.
|
|
|
926
929
|
resp = qn.admin.list_chains
|
|
927
930
|
```
|
|
928
931
|
|
|
932
|
+
#### Account
|
|
933
|
+
|
|
934
|
+
##### `account_info` / `accountInfo`
|
|
935
|
+
|
|
936
|
+
Returns details about the account, including its id, name, creation timestamp, billing version, and current subscription.
|
|
937
|
+
|
|
938
|
+
**Parameters**: none.
|
|
939
|
+
|
|
940
|
+
**Returns**: `AccountInfoResponse` with `data: AccountInfo` (including a nested `subscription: AccountSubscription`).
|
|
941
|
+
|
|
942
|
+
```ruby
|
|
943
|
+
# Ruby
|
|
944
|
+
resp = qn.admin.account_info
|
|
945
|
+
```
|
|
946
|
+
|
|
947
|
+
##### `get_api_credits` / `getApiCredits`
|
|
948
|
+
|
|
949
|
+
Returns the per-method API credit costs for a chain, identified by its slug (the same slugs returned by `list_chains`, e.g. `ethereum`). An unknown chain slug raises `ApiError` (status 404).
|
|
950
|
+
|
|
951
|
+
**Parameters**: `chain` (string, required) — the chain slug.
|
|
952
|
+
|
|
953
|
+
**Returns**: `GetApiCreditsResponse` with `data: [ApiCredit]`, where each `ApiCredit` has `method` and `credits`.
|
|
954
|
+
|
|
955
|
+
```ruby
|
|
956
|
+
# Ruby
|
|
957
|
+
resp = qn.admin.get_api_credits(chain: "ethereum")
|
|
958
|
+
```
|
|
959
|
+
|
|
929
960
|
#### Billing
|
|
930
961
|
|
|
931
962
|
##### `list_invoices` / `listInvoices`
|
|
@@ -1613,6 +1644,44 @@ Deletes a list and all of its items.
|
|
|
1613
1644
|
qn.kvstore.delete_list(key: "my-list")
|
|
1614
1645
|
```
|
|
1615
1646
|
|
|
1647
|
+
---
|
|
1648
|
+
|
|
1649
|
+
### SQL Client
|
|
1650
|
+
|
|
1651
|
+
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/`.
|
|
1652
|
+
|
|
1653
|
+
##### `query`
|
|
1654
|
+
|
|
1655
|
+
Executes a SQL query against a cluster and returns the result set. Paginate by writing `LIMIT`/`OFFSET` into the SQL.
|
|
1656
|
+
|
|
1657
|
+
**Parameters** (Hash): `query:` (String, required), `cluster_id:` (String, required).
|
|
1658
|
+
|
|
1659
|
+
**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`.
|
|
1660
|
+
|
|
1661
|
+
```ruby
|
|
1662
|
+
# Ruby
|
|
1663
|
+
resp = qn.sql.query(
|
|
1664
|
+
query: "SELECT action_type, user FROM hyperliquid_system_actions ORDER BY block_time DESC LIMIT 100",
|
|
1665
|
+
cluster_id: "hyperliquid-core-mainnet"
|
|
1666
|
+
)
|
|
1667
|
+
puts resp[:rows]
|
|
1668
|
+
puts resp[:data].first
|
|
1669
|
+
```
|
|
1670
|
+
|
|
1671
|
+
##### `get_schema`
|
|
1672
|
+
|
|
1673
|
+
Fetches the database schema for a cluster: table names, columns, types, sort keys, and partition strategies.
|
|
1674
|
+
|
|
1675
|
+
**Parameters** (Hash): `cluster_id:` (String, required).
|
|
1676
|
+
|
|
1677
|
+
**Returns** a Hash with `chain`, `cluster_id`, and `tables` (each with `name`, `engine`, `total_rows`, `partition_key`, `sorting_key`, and `columns` of `{ name, type }`).
|
|
1678
|
+
|
|
1679
|
+
```ruby
|
|
1680
|
+
# Ruby
|
|
1681
|
+
schema = qn.sql.get_schema(cluster_id: "hyperliquid-core-mainnet")
|
|
1682
|
+
puts schema[:tables].length
|
|
1683
|
+
```
|
|
1684
|
+
|
|
1616
1685
|
## Error Handling
|
|
1617
1686
|
|
|
1618
1687
|
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
|
|
@@ -90,6 +91,8 @@ module QuicknodeSdk
|
|
|
90
91
|
def get_endpoint_metrics: (id: String, period: String, metric: String) -> untyped
|
|
91
92
|
def get_account_metrics: (period: String, metric: String, ?percentile: String) -> untyped
|
|
92
93
|
def list_chains: () -> untyped
|
|
94
|
+
def account_info: () -> untyped
|
|
95
|
+
def get_api_credits: (chain: String) -> untyped
|
|
93
96
|
def list_invoices: () -> untyped
|
|
94
97
|
def list_payments: () -> untyped
|
|
95
98
|
def list_teams: () -> untyped
|
|
@@ -158,4 +161,11 @@ module QuicknodeSdk
|
|
|
158
161
|
def delete_list_item: (key: String, item: String) -> void
|
|
159
162
|
def delete_list: (key: String) -> void
|
|
160
163
|
end
|
|
164
|
+
|
|
165
|
+
class Sql
|
|
166
|
+
def initialize: (untyped native) -> void
|
|
167
|
+
|
|
168
|
+
def query: (query: String, cluster_id: String) -> untyped
|
|
169
|
+
def get_schema: (cluster_id: String) -> untyped
|
|
170
|
+
end
|
|
161
171
|
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.6.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-
|
|
11
|
+
date: 2026-07-07 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
|