fere-sdk 0.6.0__tar.gz → 0.7.0.dev53__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: fere-sdk
3
- Version: 0.6.0
3
+ Version: 0.7.0.dev53
4
4
  Summary: Python SDK for the FereAI Gateway API
5
5
  Author-email: Fere AI <hello@fereai.xyz>
6
6
  License-Expression: MIT
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "fere-sdk"
3
- version = "0.6.0"
3
+ version = "0.7.0.dev53"
4
4
  description = "Python SDK for the FereAI Gateway API"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.10"
@@ -356,15 +356,22 @@ class FereClient:
356
356
  async def perp_withdraw(
357
357
  self,
358
358
  amount_usd: float,
359
- destination_chain_id: int,
359
+ destination_chain_id: int | None = None,
360
360
  destination_token: str | None = None,
361
361
  timeout: int = DEFAULT_TIMEOUT,
362
+ to_address: str | None = None,
362
363
  ) -> dict:
363
- """Withdraw perp collateral and wait for completion."""
364
+ """Withdraw perp collateral and wait for completion.
365
+
366
+ Pass ``to_address`` to receive USDC on Arbitrum at an outside
367
+ address directly, or ``destination_chain_id`` (+ token) to land it
368
+ in the agent's own wallet on that chain.
369
+ """
364
370
  req = PerpWithdrawRequest(
365
371
  amount_usd=amount_usd,
366
372
  destination_chain_id=destination_chain_id,
367
373
  destination_token=destination_token,
374
+ to_address=to_address,
368
375
  )
369
376
  return await self._api.perp_withdraw(req, wait=True, timeout=timeout)
370
377
 
@@ -101,15 +101,24 @@ class PerpFundRequest:
101
101
 
102
102
  @dataclass
103
103
  class PerpWithdrawRequest:
104
+ """Withdraw perp collateral.
105
+
106
+ Set ``destination_chain_id`` (+ token) to land it in the agent's own
107
+ wallet, or ``to_address`` to receive USDC on Arbitrum at an outside
108
+ address directly (Hyperliquid's $1 fee deducted). One is required.
109
+ """
110
+
104
111
  amount_usd: float
105
- destination_chain_id: int
112
+ destination_chain_id: int | None = None
106
113
  destination_token: str | None = None
114
+ to_address: str | None = None
107
115
 
108
116
  def to_dict(self) -> dict:
109
- d: dict = {
110
- "amount_usd": self.amount_usd,
111
- "destination_chain_id": self.destination_chain_id,
112
- }
117
+ d: dict = {"amount_usd": self.amount_usd}
118
+ if self.destination_chain_id is not None:
119
+ d["destination_chain_id"] = self.destination_chain_id
113
120
  if self.destination_token is not None:
114
121
  d["destination_token"] = self.destination_token
122
+ if self.to_address is not None:
123
+ d["to_address"] = self.to_address
115
124
  return d
File without changes
File without changes