hyperliquid 2.0.0 → 2.0.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8e6bb2e8c5d8813c99f4b22bddf75f04c86064312adae19611084220da933abd
4
- data.tar.gz: 1e2af33ccfd4e1ed6675d0b5bbf37f5beda70dd701a4705bed9b2806105bb076
3
+ metadata.gz: 353285075e17708af138c8d14c934607f73c9d2e29e898fca33f7c2d70bb34e8
4
+ data.tar.gz: e76bd9c3307fab826dddab97056165be1d0323857b5723eda36f7a90f3a8b6c5
5
5
  SHA512:
6
- metadata.gz: 0234a3af5933018870b8cfcff64fcd576ec5686d5e0afef43f97e52fc5c8fbdcec793a67c52648f157acf2f1f7b67ef3134ed8ab17450bab0c15ddf96d7b2b7a
7
- data.tar.gz: 16ece5522815247ca7c708e70d9fb7529cdfdeeac3727fdf654dfff8e41df37aa4246d926d4b81e6f26db7e78be312f6ed61947653c6a9b8a5ad679b55900902
6
+ metadata.gz: 02b0ba9749c8fe7dc3918db4a674877f073da2138c20f980097a6844c974588152f92eda956a84a198d6fe3fb2307828a436191a96c8ad2a5417d4c2a3377674
7
+ data.tar.gz: 85e56fa57887fb750ca7eecf9ecff9abc3ed252519ddf39c5c22fb5d88db717ef5f2c159a55bea101016fc33e6b3ad354b92b601cc5fdfa34ce3f510d6503d43
data/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  ## [Ruby Hyperliquid SDK Changelog]
2
2
 
3
+ ## [2.0.1] - 2026-10-30
4
+
5
+ ### Security
6
+
7
+ - `hyperliquid` now requires `rbsecp256k1` `~> 6.0, >= 6.0.1`. rbsecp256k1 6.0.1 and later require rubyzip `~> 3.4`, so applications installing this gem resolve a rubyzip release fixed for GHSA-47m2-wp7j-p9vc (CVE-2026-85396); run `bundle update hyperliquid rbsecp256k1 rubyzip` to pick it up. This also requires `eth` 0.5.11 or later, because eth 0.5.0–0.5.10 required rbsecp256k1 5.x.
8
+ - The development and CI lockfile now uses `rbsecp256k1` 6.0.2 from RubyGems instead of the `carter2099/rbsecp256k1` fork. Applications that added the fork line from the 1.9.2 README can remove it; keeping it also satisfies the new requirement.
9
+
10
+ ### Fixed
11
+
12
+ - `Info#user_subaccounts` sent `type: "subaccounts"`, which the API rejects with 422; it now sends `subAccounts`, matching the Python SDK. Its documented return value is now an array of sub-account hashes, or `nil` when the user has none.
13
+
3
14
  ## [2.0.0] - 2026-10-02
4
15
 
5
16
  ### Breaking
data/README.md CHANGED
@@ -24,32 +24,6 @@ Or install it yourself as:
24
24
 
25
25
  $ gem install hyperliquid
26
26
 
27
- ### rubyzip 3 (optional)
28
-
29
- This gem signs with [`eth`](https://github.com/q9f/eth.rb), which depends on
30
- `rbsecp256k1 ~> 6.0`. The latest `rbsecp256k1` on RubyGems (6.0.0) pins `rubyzip ~> 2.3`,
31
- so your app stays on rubyzip 2.x and scanners report
32
- [GHSA-47m2-wp7j-p9vc](https://github.com/advisories/GHSA-47m2-wp7j-p9vc) (fixed in rubyzip
33
- 3.4.0).
34
-
35
- The practical risk is small. `rbsecp256k1` uses rubyzip only while installing, to unpack
36
- its libsecp256k1 source archive, which is checked against a pinned SHA-256. Neither this
37
- SDK nor `eth` loads rubyzip at runtime.
38
-
39
- Upstream has merged rubyzip 3 support
40
- ([etscrivner/rbsecp256k1#85](https://github.com/etscrivner/rbsecp256k1/pull/85)), but it
41
- is not on RubyGems yet. Until that release, you can move to rubyzip 3 by adding the
42
- maintained fork to your own Gemfile. The fork is version 6.1.0: it allows `rubyzip >= 3.4,
43
- < 4` and bundles libsecp256k1 0.8.0, and it still satisfies `eth`'s `~> 6.0` requirement.
44
-
45
- ```ruby
46
- gem 'hyperliquid'
47
- gem 'rbsecp256k1', github: 'carter2099/rbsecp256k1', ref: 'bbfe3e346828e39d13aa590cca7cc74f663d2fde'
48
- ```
49
-
50
- Then run `bundle update rbsecp256k1 rubyzip`. This SDK's own test suite and CI run against
51
- that fork.
52
-
53
27
  ## Usage
54
28
 
55
29
  ### Basic Setup
data/docs/EXAMPLES.md CHANGED
@@ -78,7 +78,9 @@ twap_fills_ranged = sdk.info.user_twap_slice_fills(user_address, start_time_ms,
78
78
 
79
79
  # Retrieve a user's subaccounts
80
80
  subaccounts = sdk.info.user_subaccounts(user_address)
81
- # => ["0x1111...", ...]
81
+ # => [{ "name" => "sub1", "subAccountUser" => "0x2222...", "master" => "0x...",
82
+ # "clearinghouseState" => {...}, "spotState" => {...} }, ...]
83
+ # => nil when the user has no subaccounts
82
84
 
83
85
  # Retrieve details for a vault
84
86
  vault_addr = "0x..."
@@ -180,10 +180,11 @@ module Hyperliquid
180
180
  end
181
181
 
182
182
  # Retrieve a user's subaccounts
183
- # @param user [String]
184
- # @return [Array]
183
+ # @param user [String] Wallet address
184
+ # @return [Array<Hash>, nil] Array of entries with name, subAccountUser, master,
185
+ # clearinghouseState and spotState; nil if the user has no subaccounts
185
186
  def user_subaccounts(user)
186
- @client.post(Constants::INFO_ENDPOINT, { type: 'subaccounts', user: user })
187
+ @client.post(Constants::INFO_ENDPOINT, { type: 'subAccounts', user: user })
187
188
  end
188
189
 
189
190
  # Retrieve a user's V2 subaccounts (per-dex clearinghouse + spot state)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Hyperliquid
4
- VERSION = '2.0.0'
4
+ VERSION = '2.0.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hyperliquid
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - carter2099
@@ -79,6 +79,26 @@ dependencies:
79
79
  - - "~>"
80
80
  - !ruby/object:Gem::Version
81
81
  version: '1.7'
82
+ - !ruby/object:Gem::Dependency
83
+ name: rbsecp256k1
84
+ requirement: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - "~>"
87
+ - !ruby/object:Gem::Version
88
+ version: '6.0'
89
+ - - ">="
90
+ - !ruby/object:Gem::Version
91
+ version: 6.0.1
92
+ type: :runtime
93
+ prerelease: false
94
+ version_requirements: !ruby/object:Gem::Requirement
95
+ requirements:
96
+ - - "~>"
97
+ - !ruby/object:Gem::Version
98
+ version: '6.0'
99
+ - - ">="
100
+ - !ruby/object:Gem::Version
101
+ version: 6.0.1
82
102
  - !ruby/object:Gem::Dependency
83
103
  name: ws_lite
84
104
  requirement: !ruby/object:Gem::Requirement