fibx 0.1.0 → 0.1.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.
- package/README.md +38 -22
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
A command-line tool for specialized DeFi operations on **Base**, powered by [Fibrous Finance](https://fibrous.finance) aggregation and [Privy](https://privy.io) Server Wallets.
|
|
4
4
|
|
|
5
|
+
[](https://badge.fury.io/js/fibx)
|
|
6
|
+
|
|
5
7
|
## Features
|
|
6
8
|
|
|
7
9
|
- **Privy Server Wallets**: Uses "Agentic" server-side wallets (ownerless) for seamless, automated signing without user interaction.
|
|
@@ -18,25 +20,28 @@ A command-line tool for specialized DeFi operations on **Base**, powered by [Fib
|
|
|
18
20
|
|
|
19
21
|
## Quick Start
|
|
20
22
|
|
|
21
|
-
### 1.
|
|
23
|
+
### 1. Installation
|
|
24
|
+
|
|
25
|
+
You can use `fibx` without installation via `npx`, or install it globally.
|
|
26
|
+
|
|
27
|
+
**Option A: No Installation (Recommended for Agents)**
|
|
22
28
|
|
|
23
29
|
```bash
|
|
24
|
-
|
|
30
|
+
npx fibx <command>
|
|
25
31
|
```
|
|
26
32
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
Copy the example environment file and add your Privy credentials:
|
|
33
|
+
**Option B: Global Install**
|
|
30
34
|
|
|
31
35
|
```bash
|
|
32
|
-
|
|
36
|
+
npm install -g fibx
|
|
37
|
+
fibx <command>
|
|
33
38
|
```
|
|
34
39
|
|
|
35
|
-
|
|
40
|
+
Set your Privy credentials as environment variables:
|
|
36
41
|
|
|
37
|
-
```
|
|
38
|
-
PRIVY_APP_ID=your_app_id
|
|
39
|
-
PRIVY_APP_SECRET=your_app_secret
|
|
42
|
+
```bash
|
|
43
|
+
export PRIVY_APP_ID="your_app_id"
|
|
44
|
+
export PRIVY_APP_SECRET="your_app_secret"
|
|
40
45
|
```
|
|
41
46
|
|
|
42
47
|
### 3. Authenticate & Provision Wallet
|
|
@@ -46,17 +51,17 @@ This two-step process links your email to a server-side wallet.
|
|
|
46
51
|
**Step 1: Request OTP**
|
|
47
52
|
|
|
48
53
|
```bash
|
|
49
|
-
|
|
54
|
+
npx fibx auth login <email>
|
|
50
55
|
# Example:
|
|
51
|
-
|
|
56
|
+
npx fibx auth login user@example.com
|
|
52
57
|
```
|
|
53
58
|
|
|
54
59
|
**Step 2: Verify & Create Session**
|
|
55
60
|
|
|
56
61
|
```bash
|
|
57
|
-
|
|
62
|
+
npx fibx auth verify <email> <code>
|
|
58
63
|
# Example:
|
|
59
|
-
|
|
64
|
+
npx fibx auth verify user@example.com 123456
|
|
60
65
|
```
|
|
61
66
|
|
|
62
67
|
_Successfully verifying will create a local session file and provision a Server Wallet if one doesn't exist._
|
|
@@ -66,7 +71,7 @@ _Successfully verifying will create a local session file and provision a Server
|
|
|
66
71
|
Verify that you are authenticated and the API is healthy:
|
|
67
72
|
|
|
68
73
|
```bash
|
|
69
|
-
|
|
74
|
+
npx fibx status
|
|
70
75
|
```
|
|
71
76
|
|
|
72
77
|
## Usage
|
|
@@ -76,7 +81,7 @@ pnpm dev status
|
|
|
76
81
|
View your ETH and USDC balances on Base:
|
|
77
82
|
|
|
78
83
|
```bash
|
|
79
|
-
|
|
84
|
+
npx fibx balance
|
|
80
85
|
```
|
|
81
86
|
|
|
82
87
|
### Send Tokens
|
|
@@ -86,13 +91,13 @@ Transfer ETH or ERC-20 tokens to another address.
|
|
|
86
91
|
**Send ETH (Default):**
|
|
87
92
|
|
|
88
93
|
```bash
|
|
89
|
-
|
|
94
|
+
npx fibx send 0.001 0xRecipientAddress
|
|
90
95
|
```
|
|
91
96
|
|
|
92
97
|
**Send ERC-20 (e.g., USDC):**
|
|
93
98
|
|
|
94
99
|
```bash
|
|
95
|
-
|
|
100
|
+
npx fibx send 10 0xRecipientAddress USDC
|
|
96
101
|
```
|
|
97
102
|
|
|
98
103
|
### Swap Tokens
|
|
@@ -100,17 +105,17 @@ pnpm dev send 10 0xRecipientAddress USDC
|
|
|
100
105
|
Swap tokens using Fibrous Finance's aggregator.
|
|
101
106
|
|
|
102
107
|
```bash
|
|
103
|
-
|
|
108
|
+
npx fibx trade <amount> <from_token> <to_token>
|
|
104
109
|
```
|
|
105
110
|
|
|
106
111
|
**Examples:**
|
|
107
112
|
|
|
108
113
|
```bash
|
|
109
114
|
# Swap 0.0001 ETH to USDC
|
|
110
|
-
|
|
115
|
+
npx fibx trade 0.0001 ETH USDC
|
|
111
116
|
|
|
112
117
|
# Swap 20 USDC to DAI
|
|
113
|
-
|
|
118
|
+
npx fibx trade 20 USDC DAI
|
|
114
119
|
```
|
|
115
120
|
|
|
116
121
|
**Options:**
|
|
@@ -123,9 +128,20 @@ pnpm dev trade 20 USDC DAI
|
|
|
123
128
|
Print your connected server wallet address:
|
|
124
129
|
|
|
125
130
|
```bash
|
|
126
|
-
|
|
131
|
+
npx fibx address
|
|
127
132
|
```
|
|
128
133
|
|
|
134
|
+
## Agent Skills
|
|
135
|
+
|
|
136
|
+
Looking to use `fibx` with an AI Agent? Check out the [fibx-agentic-wallet-skills](./fibx-agentic-wallet-skills/README.md) package.
|
|
137
|
+
|
|
138
|
+
## Development
|
|
139
|
+
|
|
140
|
+
1. Clone the repo
|
|
141
|
+
2. `pnpm install`
|
|
142
|
+
3. `cp .env.example .env` (add secrets)
|
|
143
|
+
4. Run commands with `pnpm dev <command>`
|
|
144
|
+
|
|
129
145
|
# Architecture
|
|
130
146
|
|
|
131
147
|
This CLI uses a **Server Wallet** architecture:
|