primecli 0.2.7__tar.gz → 0.3.0__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,13 +1,13 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: primecli
3
- Version: 0.2.7
4
- Summary: Agent-friendly CLI tools for the DeltaPrime (Avalanche) and DegenPrime (Base) lending and leverage protocols. Preview-by-default; no Etherscan key required.
3
+ Version: 0.3.0
4
+ Summary: Agent-friendly CLI tools for the DeltaPrime (Avalanche + Arbitrum) and DegenPrime (Base) lending and leverage protocols. Preview-by-default; no Etherscan key required.
5
5
  Author: Mnemosyne-quest contributors
6
6
  License: MIT
7
7
  Project-URL: Homepage, https://github.com/Mnemosyne-quest/primecli
8
8
  Project-URL: Issues, https://github.com/Mnemosyne-quest/primecli/issues
9
9
  Project-URL: Documentation, https://github.com/Mnemosyne-quest/primecli/tree/main/docs
10
- Keywords: defi,deltaprime,degenprime,avalanche,base,lending,leverage,ethereum,web3,agent,cli
10
+ Keywords: defi,deltaprime,degenprime,arbprime,avalanche,base,arbitrum,lending,leverage,ethereum,web3,agent,cli
11
11
  Classifier: Development Status :: 4 - Beta
12
12
  Classifier: Environment :: Console
13
13
  Classifier: Intended Audience :: Developers
@@ -32,13 +32,13 @@ Dynamic: license-file
32
32
 
33
33
  # primecli
34
34
 
35
- > Command-line tools for the **DeltaPrime** (Avalanche C-chain) and **DegenPrime** (Base) lending and leverage protocols.
35
+ > Command-line tools for the **DeltaPrime** (Avalanche C-chain + Arbitrum One) and **DegenPrime** (Base) lending and leverage protocols.
36
36
 
37
37
  [![PyPI](https://img.shields.io/pypi/v/primecli.svg)](https://pypi.org/project/primecli/)
38
38
  [![Python](https://img.shields.io/pypi/pyversions/primecli.svg)](https://pypi.org/project/primecli/)
39
39
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
40
40
 
41
- `primecli` installs two console commands, `deltaprime` and `degenprime`, that drive the lending and leverage protocols built by the DeltaPrimeLabs team on Avalanche C-chain and Base respectively. Both share a per-user smart-account architecture (EIP-2535 diamond) and are operated through the same CLI shape: savings pools, per-user Prime / Degen Accounts, borrow / repay / fund, swaps, debt refinancing, delayed collateral withdrawals. The Avalanche side additionally exposes GMX V2 LP (GM and GM+), TraderJoe V2 LB, sJOE staking, PRIME leverage tiers, and a leveraged-long zap macro. The Base side ships a read-only Aerodrome position inventory; write paths are deferred to v2.
41
+ `primecli` installs three console commands, `deltaprime`, `degenprime`, and `arbprime`, that drive the lending and leverage protocols built by the DeltaPrimeLabs team on Avalanche C-chain, Base, and Arbitrum One respectively. All share a per-user smart-account architecture (EIP-2535 diamond) and are operated through the same CLI shape: savings pools, per-user Prime / Degen Accounts, borrow / repay / fund, swaps, debt refinancing, delayed collateral withdrawals. The Avalanche side additionally exposes GMX V2 LP (GM and GM+), TraderJoe V2 LB, sJOE staking, PRIME leverage tiers, and a leveraged-long zap macro. The Arbitrum side carries the same leverage stack adapted to GMX's home chain — 10 GM + 3 GM+ markets, GLV vaults, 11 TraderJoe LB pairs, PRIME tiers, zap (no sJOE). The Base side ships a read-only Aerodrome position inventory; write paths are deferred to v2.
42
42
 
43
43
  Built for agent use:
44
44
 
@@ -48,7 +48,7 @@ Built for agent use:
48
48
  - RedStone-signed solvency math handled internally, with a regression test pinning the half-boundary `toFixed(8)` encoding.
49
49
  - ParaSwap calldata validated client-side against the on-chain executor allowlist before broadcast.
50
50
 
51
- **Current version:** 0.1.2. The 0.x line is pre-1.0, so breaking changes are possible. See [Releases](https://github.com/Mnemosyne-quest/primecli/releases).
51
+ **Current version:** 0.3.0. The 0.x line is pre-1.0, so breaking changes are possible. See [Releases](https://github.com/Mnemosyne-quest/primecli/releases).
52
52
 
53
53
  ## Security and trust
54
54
 
@@ -151,6 +151,23 @@ Pools (v1): `usdc`, `weth`, `cbbtc`, `aero`, `brett`, `kaito`, `cbdoge`, `cbxrp`
151
151
 
152
152
  Full per-command reference: [docs/degenprime-reference.md](docs/degenprime-reference.md). Per-capability build spec: [docs/degenprime-capabilities.md](docs/degenprime-capabilities.md).
153
153
 
154
+ ### `arbprime` (Arbitrum One)
155
+
156
+ | Group | Commands |
157
+ |-------|----------|
158
+ | Lending core | `pool-info [--json]`, `my-positions`, `deposit`, `withdraw` (24h delayed lender flow, step 1), `withdrawal-requests`, `execute-withdrawal-request --pool X [--index N]`, `cancel-withdrawal-request --pool X --index N`, `borrow`, `repay`, `fund` |
159
+ | Prime Account | `create-prime-account` (alias `create-account`), `prime-summary`, `defi --json`, `withdraw-collateral`, `withdrawal-intents`, `execute-withdrawal`, `cancel-withdrawal` |
160
+ | Swaps | `swap --from S --to S --amount N [--via yak\|paraswap] [--slippage P]`, `swap-debt --from S --to S --amount N [--slippage P]` |
161
+ | GMX V2 LP (async, keeper-executed) | `gmx-positions`, `gmx-deposit --market M --amount N [--side auto\|long\|short]`, `gmx-withdraw --market M --amount N` |
162
+ | GMX GLV vaults (async, keeper-executed) | `glv-positions`, `glv-deposit --vault V --amount N [--side auto\|long\|short] [--target-market GM]`, `glv-withdraw --vault V --amount N [--target-market GM]` |
163
+ | TraderJoe V2 LB | `lb-positions`, `lb-add --pair P --amount-x N --amount-y N [--shape spot\|curve\|bidask] [--range R]`, `lb-remove --pair P` |
164
+ | PRIME leverage tiers | `prime-tier`, `prime-needed --borrow X [--tier premium\|basic]`, `prime-deposit --amount N`, `prime-activate [--amount N]`, `prime-deactivate [--withdraw]`, `prime-unstake --amount N`, `prime-repay --amount N` |
165
+ | Zaps (multi-tx macro) | `zap --market M --collateral P --collateral-amount N --borrow-amount N [--deposit-amount N] [--side auto\|long\|short] [--swap]` |
166
+
167
+ Pools: `usdc`, `eth`, `arb`, `btc` (native-wrapped asset is WETH, account symbol `ETH`). GM markets (two-sided, all vs USDC): `eth-usdc`, `btc-usdc`, `arb-usdc`, `link-usdc`, `uni-usdc`, `gmx-usdc`, `near-usdc`, `atom-usdc`, `sui-usdc`, `sei-usdc`; single-sided GM+: `eth+`, `btc+`, `gmx+`. GLV vaults: `weth-usdc`, `btc-usdc`. LB pairs: `eth-usdc`, `eth-usdc-10`, `eth-usdt`, `eth-usdt-10`, `arb-eth`, `arb-eth-v22`, `btc-eth`, `gmx-eth`, `joe-eth`, `wsteth-eth`, `weeth-eth`. Beyond the 4 lendable pools, the live TokenManager registers 29 collateral symbols (GMX, LINK, UNI, weETH, wstETH, JOE, PRIME, the GM/GLV baskets, …) usable as collateral and for `swap` / `swap-debt`.
168
+
169
+ Note: DeltaPrime has TWO deployments on Arbitrum; `arbprime` targets the live one used by app.deltaprime.io (factory `0xFf5e…c20`, TokenManager `0x0a0D…E255`), with every address verified on-chain against the live SmartLoanDiamondBeacon. The stale artifact deployment (factory `0x97f4…E4E`) only carries ETH+USDC pools — don't use addresses from the repo's `deployments/arbitrum/*TUP.json` artifacts.
170
+
154
171
  ## Configuration
155
172
 
156
173
  | Env var | Default | Purpose |
@@ -161,6 +178,9 @@ Full per-command reference: [docs/degenprime-reference.md](docs/degenprime-refer
161
178
  | `DEGENPRIME_PRIVATE_KEY` | falls back to `DELTAPRIME_PRIVATE_KEY` | Your Base signing key. Same EVM key works on both chains. |
162
179
  | `DEGENPRIME_KEY_FILE` | falls back to `DELTAPRIME_KEY_FILE` | Path to key file for Base. |
163
180
  | `DEGENPRIME_RPC` | `https://base.publicnode.com` | Base RPC. |
181
+ | `ARBPRIME_PRIVATE_KEY` | falls back to `DELTAPRIME_PRIVATE_KEY` | Your Arbitrum signing key. Same EVM key works on all three chains. |
182
+ | `ARBPRIME_AGENT` | falls back to `DELTAPRIME_AGENT` | Named-agent key selection (multi-wallet setups). |
183
+ | `ARBPRIME_RPC` | `https://arb1.arbitrum.io/rpc` | Arbitrum One RPC. |
164
184
 
165
185
  The CLI also accepts a per-command `--key <0xhex>` override that takes precedence over all env vars. Handy for one-off operations from a shell where you don't want to persist the key.
166
186
 
@@ -200,6 +220,23 @@ A copy-paste template is at [examples/env.example](examples/env.example).
200
220
  | Aerodrome write paths (claim, decrease, add, stake) | deferred to v2 |
201
221
  | `$DgP` staking | not deployed on-chain yet |
202
222
 
223
+ ### `arbprime` (Arbitrum One)
224
+
225
+ | Area | Status |
226
+ |------|--------|
227
+ | Savings pools (USDC, ETH, ARB, BTC) | full read + write |
228
+ | Prime Account creation and funding | full |
229
+ | Borrow / repay / fund / withdraw-collateral | full (24h+48h intent flow, same as Avalanche) |
230
+ | Solvency views (health ratio, total value, debt, solvent flag) | full (RedStone-gated reads, `redstone-primary-prod`) |
231
+ | Swap (YieldYak + ParaSwap v6) | full (Arbitrum Yak router) |
232
+ | Swap-debt (debt refinancing) | full |
233
+ | GMX V2 LP (GM ×10 + GM+ ×3 markets) | full (async, account freezes until keeper callback) |
234
+ | GMX GLV vaults (×2, Arbitrum-only) | full (deposit / withdraw / positions, `targetMarket` routing) |
235
+ | TraderJoe V2 LB (11 whitelisted pairs) | full (max 300 bins per account — Arbitrum facet override) |
236
+ | PRIME leverage tiers (BASIC / PREMIUM) | full (PRIME-WETH LP pair, not PRIME-WAVAX) |
237
+ | Leveraged-long zap macro | full (GM-terminal) |
238
+ | Penpie / Beefy / Sushi facets | not yet (live on-chain; deferred by scope) |
239
+
203
240
  ## Documentation
204
241
 
205
242
  - [DeltaPrime reference](docs/deltaprime-reference.md): protocol model, addresses, facet map, RedStone integration, full command table, GMX / LB / PRIME flows.
@@ -1,12 +1,12 @@
1
1
  # primecli
2
2
 
3
- > Command-line tools for the **DeltaPrime** (Avalanche C-chain) and **DegenPrime** (Base) lending and leverage protocols.
3
+ > Command-line tools for the **DeltaPrime** (Avalanche C-chain + Arbitrum One) and **DegenPrime** (Base) lending and leverage protocols.
4
4
 
5
5
  [![PyPI](https://img.shields.io/pypi/v/primecli.svg)](https://pypi.org/project/primecli/)
6
6
  [![Python](https://img.shields.io/pypi/pyversions/primecli.svg)](https://pypi.org/project/primecli/)
7
7
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
8
8
 
9
- `primecli` installs two console commands, `deltaprime` and `degenprime`, that drive the lending and leverage protocols built by the DeltaPrimeLabs team on Avalanche C-chain and Base respectively. Both share a per-user smart-account architecture (EIP-2535 diamond) and are operated through the same CLI shape: savings pools, per-user Prime / Degen Accounts, borrow / repay / fund, swaps, debt refinancing, delayed collateral withdrawals. The Avalanche side additionally exposes GMX V2 LP (GM and GM+), TraderJoe V2 LB, sJOE staking, PRIME leverage tiers, and a leveraged-long zap macro. The Base side ships a read-only Aerodrome position inventory; write paths are deferred to v2.
9
+ `primecli` installs three console commands, `deltaprime`, `degenprime`, and `arbprime`, that drive the lending and leverage protocols built by the DeltaPrimeLabs team on Avalanche C-chain, Base, and Arbitrum One respectively. All share a per-user smart-account architecture (EIP-2535 diamond) and are operated through the same CLI shape: savings pools, per-user Prime / Degen Accounts, borrow / repay / fund, swaps, debt refinancing, delayed collateral withdrawals. The Avalanche side additionally exposes GMX V2 LP (GM and GM+), TraderJoe V2 LB, sJOE staking, PRIME leverage tiers, and a leveraged-long zap macro. The Arbitrum side carries the same leverage stack adapted to GMX's home chain — 10 GM + 3 GM+ markets, GLV vaults, 11 TraderJoe LB pairs, PRIME tiers, zap (no sJOE). The Base side ships a read-only Aerodrome position inventory; write paths are deferred to v2.
10
10
 
11
11
  Built for agent use:
12
12
 
@@ -16,7 +16,7 @@ Built for agent use:
16
16
  - RedStone-signed solvency math handled internally, with a regression test pinning the half-boundary `toFixed(8)` encoding.
17
17
  - ParaSwap calldata validated client-side against the on-chain executor allowlist before broadcast.
18
18
 
19
- **Current version:** 0.1.2. The 0.x line is pre-1.0, so breaking changes are possible. See [Releases](https://github.com/Mnemosyne-quest/primecli/releases).
19
+ **Current version:** 0.3.0. The 0.x line is pre-1.0, so breaking changes are possible. See [Releases](https://github.com/Mnemosyne-quest/primecli/releases).
20
20
 
21
21
  ## Security and trust
22
22
 
@@ -119,6 +119,23 @@ Pools (v1): `usdc`, `weth`, `cbbtc`, `aero`, `brett`, `kaito`, `cbdoge`, `cbxrp`
119
119
 
120
120
  Full per-command reference: [docs/degenprime-reference.md](docs/degenprime-reference.md). Per-capability build spec: [docs/degenprime-capabilities.md](docs/degenprime-capabilities.md).
121
121
 
122
+ ### `arbprime` (Arbitrum One)
123
+
124
+ | Group | Commands |
125
+ |-------|----------|
126
+ | Lending core | `pool-info [--json]`, `my-positions`, `deposit`, `withdraw` (24h delayed lender flow, step 1), `withdrawal-requests`, `execute-withdrawal-request --pool X [--index N]`, `cancel-withdrawal-request --pool X --index N`, `borrow`, `repay`, `fund` |
127
+ | Prime Account | `create-prime-account` (alias `create-account`), `prime-summary`, `defi --json`, `withdraw-collateral`, `withdrawal-intents`, `execute-withdrawal`, `cancel-withdrawal` |
128
+ | Swaps | `swap --from S --to S --amount N [--via yak\|paraswap] [--slippage P]`, `swap-debt --from S --to S --amount N [--slippage P]` |
129
+ | GMX V2 LP (async, keeper-executed) | `gmx-positions`, `gmx-deposit --market M --amount N [--side auto\|long\|short]`, `gmx-withdraw --market M --amount N` |
130
+ | GMX GLV vaults (async, keeper-executed) | `glv-positions`, `glv-deposit --vault V --amount N [--side auto\|long\|short] [--target-market GM]`, `glv-withdraw --vault V --amount N [--target-market GM]` |
131
+ | TraderJoe V2 LB | `lb-positions`, `lb-add --pair P --amount-x N --amount-y N [--shape spot\|curve\|bidask] [--range R]`, `lb-remove --pair P` |
132
+ | PRIME leverage tiers | `prime-tier`, `prime-needed --borrow X [--tier premium\|basic]`, `prime-deposit --amount N`, `prime-activate [--amount N]`, `prime-deactivate [--withdraw]`, `prime-unstake --amount N`, `prime-repay --amount N` |
133
+ | Zaps (multi-tx macro) | `zap --market M --collateral P --collateral-amount N --borrow-amount N [--deposit-amount N] [--side auto\|long\|short] [--swap]` |
134
+
135
+ Pools: `usdc`, `eth`, `arb`, `btc` (native-wrapped asset is WETH, account symbol `ETH`). GM markets (two-sided, all vs USDC): `eth-usdc`, `btc-usdc`, `arb-usdc`, `link-usdc`, `uni-usdc`, `gmx-usdc`, `near-usdc`, `atom-usdc`, `sui-usdc`, `sei-usdc`; single-sided GM+: `eth+`, `btc+`, `gmx+`. GLV vaults: `weth-usdc`, `btc-usdc`. LB pairs: `eth-usdc`, `eth-usdc-10`, `eth-usdt`, `eth-usdt-10`, `arb-eth`, `arb-eth-v22`, `btc-eth`, `gmx-eth`, `joe-eth`, `wsteth-eth`, `weeth-eth`. Beyond the 4 lendable pools, the live TokenManager registers 29 collateral symbols (GMX, LINK, UNI, weETH, wstETH, JOE, PRIME, the GM/GLV baskets, …) usable as collateral and for `swap` / `swap-debt`.
136
+
137
+ Note: DeltaPrime has TWO deployments on Arbitrum; `arbprime` targets the live one used by app.deltaprime.io (factory `0xFf5e…c20`, TokenManager `0x0a0D…E255`), with every address verified on-chain against the live SmartLoanDiamondBeacon. The stale artifact deployment (factory `0x97f4…E4E`) only carries ETH+USDC pools — don't use addresses from the repo's `deployments/arbitrum/*TUP.json` artifacts.
138
+
122
139
  ## Configuration
123
140
 
124
141
  | Env var | Default | Purpose |
@@ -129,6 +146,9 @@ Full per-command reference: [docs/degenprime-reference.md](docs/degenprime-refer
129
146
  | `DEGENPRIME_PRIVATE_KEY` | falls back to `DELTAPRIME_PRIVATE_KEY` | Your Base signing key. Same EVM key works on both chains. |
130
147
  | `DEGENPRIME_KEY_FILE` | falls back to `DELTAPRIME_KEY_FILE` | Path to key file for Base. |
131
148
  | `DEGENPRIME_RPC` | `https://base.publicnode.com` | Base RPC. |
149
+ | `ARBPRIME_PRIVATE_KEY` | falls back to `DELTAPRIME_PRIVATE_KEY` | Your Arbitrum signing key. Same EVM key works on all three chains. |
150
+ | `ARBPRIME_AGENT` | falls back to `DELTAPRIME_AGENT` | Named-agent key selection (multi-wallet setups). |
151
+ | `ARBPRIME_RPC` | `https://arb1.arbitrum.io/rpc` | Arbitrum One RPC. |
132
152
 
133
153
  The CLI also accepts a per-command `--key <0xhex>` override that takes precedence over all env vars. Handy for one-off operations from a shell where you don't want to persist the key.
134
154
 
@@ -168,6 +188,23 @@ A copy-paste template is at [examples/env.example](examples/env.example).
168
188
  | Aerodrome write paths (claim, decrease, add, stake) | deferred to v2 |
169
189
  | `$DgP` staking | not deployed on-chain yet |
170
190
 
191
+ ### `arbprime` (Arbitrum One)
192
+
193
+ | Area | Status |
194
+ |------|--------|
195
+ | Savings pools (USDC, ETH, ARB, BTC) | full read + write |
196
+ | Prime Account creation and funding | full |
197
+ | Borrow / repay / fund / withdraw-collateral | full (24h+48h intent flow, same as Avalanche) |
198
+ | Solvency views (health ratio, total value, debt, solvent flag) | full (RedStone-gated reads, `redstone-primary-prod`) |
199
+ | Swap (YieldYak + ParaSwap v6) | full (Arbitrum Yak router) |
200
+ | Swap-debt (debt refinancing) | full |
201
+ | GMX V2 LP (GM ×10 + GM+ ×3 markets) | full (async, account freezes until keeper callback) |
202
+ | GMX GLV vaults (×2, Arbitrum-only) | full (deposit / withdraw / positions, `targetMarket` routing) |
203
+ | TraderJoe V2 LB (11 whitelisted pairs) | full (max 300 bins per account — Arbitrum facet override) |
204
+ | PRIME leverage tiers (BASIC / PREMIUM) | full (PRIME-WETH LP pair, not PRIME-WAVAX) |
205
+ | Leveraged-long zap macro | full (GM-terminal) |
206
+ | Penpie / Beefy / Sushi facets | not yet (live on-chain; deferred by scope) |
207
+
171
208
  ## Documentation
172
209
 
173
210
  - [DeltaPrime reference](docs/deltaprime-reference.md): protocol model, addresses, facet map, RedStone integration, full command table, GMX / LB / PRIME flows.
@@ -1,4 +1,4 @@
1
- """primecli - command-line tools for DeltaPrime (Avalanche) and DegenPrime (Base)."""
1
+ """primecli - command-line tools for DeltaPrime (Avalanche + Arbitrum) and DegenPrime (Base)."""
2
2
 
3
3
  from importlib.metadata import PackageNotFoundError, version as _pkg_version
4
4