You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**Synapse SDK**: Initialize with callbacks (onProviderSelected, onDataSetResolved, onPieceAdded), upload returns {pieceCid, pieceId, provider}. See `src/core/synapse/index.ts`, `src/core/upload/synapse.ts`.
55
+
**Synapse SDK**: Initialize via `initializeSynapse()` in `src/core/synapse/index.ts`. Upload via `executeUpload()` in `src/core/upload/index.ts` with progress events (`onStored`, `onPullProgress`, `onCopyComplete`, `onPiecesAdded`, `onPiecesConfirmed`). Returns `{pieceCid, size, copies, failures}`.
54
56
55
57
**CAR files**: CARv1 streaming, handle 3 root cases (single/multiple/none), use zero CID for no roots. See `src/core/car/car-blockstore.ts`.
56
58
57
59
**UnixFS**: Helia for directory imports, chunking, CID calculation. See `src/core/unixfs/`.
58
60
59
-
**Payments**: `checkPaymentStatus()`, `setupPayments()` in `src/core/payments/index.ts`.
61
+
**Payments**: `getPaymentStatus()`, `setMaxAllowances()`, `validatePaymentCapacity()` in `src/core/payments/index.ts`.
**Default data dirs for pinning server**: Linux `~/.local/share/filecoin-pin/`, macOS `~/Library/Application Support/filecoin-pin/`, Windows `%APPDATA%/filecoin-pin/`
# Use a local foc-devnet (reads config from devnet-info.json, details below)
182
+
filecoin-pin add myfile.txt --network devnet
180
183
```
181
184
182
185
**Using environment variables:**
@@ -196,13 +199,30 @@ filecoin-pin add myfile.txt
196
199
3.`--network` flag or `NETWORK` environment variable
197
200
4. Default to Calibration testnet
198
201
202
+
### Local Development with foc-devnet
203
+
204
+
When using `--network devnet`, Filecoin Pin reads connection details from a running [foc-devnet](https://github.com/filecoin-project/foc-devnet) instance:
205
+
206
+
-**Private key**: Automatically resolved from `devnet-info.json` (no `PRIVATE_KEY` needed)
207
+
-**RPC URL**: Read from the devnet chain configuration
208
+
-**Contract addresses**: Resolved from the devnet chain definition
209
+
-**IPNI verification**: Automatically skipped (no IPNI infrastructure on devnet)
210
+
211
+
**Environment variables for devnet:**
212
+
213
+
| Variable | Description | Default |
214
+
|----------|-------------|---------|
215
+
|`FOC_DEVNET_BASEDIR`| Override the foc-devnet base directory |`~/.foc-devnet`|
216
+
|`DEVNET_INFO_PATH`| Explicit path to `devnet-info.json` (overrides basedir) |`<basedir>/state/latest/devnet-info.json`|
217
+
|`DEVNET_USER_INDEX`| Which user from `devnet-info.json` to use |`0`|
218
+
199
219
### Common CLI Arguments
200
220
201
221
*`-h`, `--help`: Display help information for each command
202
222
*`-V`, `--version`: Output the version number
203
223
*`-v`, `--verbose`: Verbose output
204
224
*`--private-key`: Ethereum-style (`0x`) private key, funded with USDFC (required)
205
-
*`--network`: Filecoin network to use: `mainnet`or `calibration` (default: `calibration`)
225
+
*`--network`: Filecoin network to use: `mainnet`, `calibration`, or `devnet` (default: `calibration`)
206
226
*`--rpc-url`: Filecoin RPC endpoint (overrides `--network` if specified)
207
227
208
228
Other arguments are possible for individual commands, use `--help` to find out more.
@@ -214,10 +234,10 @@ Other arguments are possible for individual commands, use `--help` to find out m
214
234
PRIVATE_KEY=0x... # Ethereum private key with USDFC tokens
215
235
216
236
# Optional - Network Configuration
217
-
NETWORK=mainnet # Network to use: mainnetor calibration (default: calibration)
237
+
NETWORK=mainnet # Network to use: mainnet, calibration, or devnet (default: calibration)
218
238
RPC_URL=wss://... # Filecoin RPC endpoint (overrides NETWORK if specified)
0 commit comments