@owney/sdk 0.8.0-beta.1 → 0.8.0

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.
package/README.md CHANGED
@@ -143,27 +143,6 @@ the funds are already credited or earning yield.
143
143
 
144
144
  Returns: `OwneyDepositResult` (single agent) or `OwneyMultiDepositResult` (all agents)
145
145
 
146
- When `depositCallback` is omitted, deposits are gas-free by default:
147
-
148
- | Asset | Chains | Gas-free rail |
149
- | ------ | ------------------------- | ------------------------------------------------- |
150
- | `USDC` | Base, Arbitrum, Ethereum | EIP-3009 signature |
151
- | `EURC` | Ethereum, Base | EIP-3009 signature, like USDC |
152
- | `WETH` | Base, Arbitrum, Ethereum | Permit2 signature (one-time Permit2 approval) |
153
- | `USDT` | Ethereum | Permit2 signature, like WETH (one-time approval) |
154
-
155
- ### `approvePermit2(asset?)`
156
-
157
- One-time, user-paid approval of Permit2 on the active chain for a Permit2 asset
158
- (`"WETH"`, the default, or `"USDT"`). Needed once per wallet per chain before
159
- the first gas-free deposit of that asset; afterwards `deposit()` is
160
- signature-only. Resolves after the approval is mined and returns its tx hash.
161
-
162
- ```typescript
163
- await sdk.approvePermit2(); // WETH
164
- await sdk.approvePermit2("USDT");
165
- ```
166
-
167
146
  ```typescript
168
147
  // Deposit to a specific agent
169
148
  const result = await sdk.deposit({
@@ -467,9 +446,9 @@ console.log(usdcBaseApy.agentApy.zyfai.averageApy); // APY scoped to USDC on Bas
467
446
  type AgentId = "zyfai";
468
447
  type Asset = string;
469
448
  type DailyApyDays = "7D" | "14D" | "30D";
470
- type OwneySupportedChainId = 8453 | 42161 | 1;
471
- type OwneySupportedChains = "BASE" | "ARBITRUM" | "ETHEREUM";
472
- type OwneySupportedTokens = "USDC" | "WETH" | "EURC" | "USDT";
449
+ type OwneySupportedChainId = 8453 | 42161;
450
+ type OwneySupportedChains = "BASE" | "ARBITRUM";
451
+ type OwneySupportedTokens = "USDC" | "WETH";
473
452
 
474
453
  type AgentSupportedAsset = {
475
454
  readonly symbol: string;
@@ -608,7 +587,7 @@ interface OwneyAccountApy {
608
587
  apyByChainAndAsset: ApyByChainAndAsset;
609
588
  }
610
589
 
611
- type HistoryAction = "Rebalance" | "Deposit" | "Top up" | "Withdraw" | "Earned";
590
+ type HistoryAction = "Rebalance" | "Allocate" | "Deposit" | "Withdraw" | "Earned";
612
591
 
613
592
  interface HistoryTransaction {
614
593
  txHashes: string[];
@@ -725,7 +704,7 @@ type OwneyErrorCode =
725
704
  | "AGENT_CHAIN_INCOMPATIBLE" // Agent(s) don't support the given chain
726
705
  | "AGENT_EMPTY_LIST" // Empty agentId array passed to activateAgent()
727
706
  // Chain
728
- | "CHAIN_UNSUPPORTED" // Chain ID not in supported list (8453, 42161, 1)
707
+ | "CHAIN_UNSUPPORTED" // Chain ID not in supported list (8453, 42161)
729
708
  | "CHAIN_NO_COMPATIBLE_AGENTS" // No agents support the given chain
730
709
  // Asset
731
710
  | "ASSET_UNSUPPORTED" // Agent doesn't support the asset on the active chain