Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
(I've only tested this in conjunction with #375) |
There was a problem hiding this comment.
Pull request overview
Adds session-key based authentication support to the pinning server startup flow, extending configuration and CLI flags so the server can be run without a full private key when a session key is available.
Changes:
- Add
WALLET_ADDRESS/SESSION_KEY(andVIEW_ADDRESS) to the appConfigandcreateConfig()env parsing. - Update pinning server Synapse initialization to accept either private-key auth or session-key auth.
- Extend the
serverCLI command and startup error messaging to reflect the new auth options.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/server.ts | Updates startup error messaging to guide users toward private-key or session-key auth. |
| src/filecoin-pinning-server.ts | Adds auth selection logic (buildSynapseConfig) and switches Synapse initialization to the new union config. |
| src/core/synapse/index.ts | Extends the shared Config interface with session-key and view-address fields. |
| src/config.ts | Reads new auth-related environment variables into config. |
| src/commands/server.ts | Adds --wallet-address and --session-key flags and maps them into env vars before starting the daemon. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
sorry i didn't get to this. heading on vacation so i wont be able to look until 2026 APR 8+ @silent-cipher can you take over? |
silent-cipher
left a comment
There was a problem hiding this comment.
Overall, this looks good to me.
It would be great to add a few more test cases for the Filecoin pin server:
sessionKeywithoutwalletAddress/walletAddresswithoutsessionKey- Invalid format for walletAddress or sessionKey
rvagg
left a comment
There was a problem hiding this comment.
lgtm but viewAddress / VIEW_ADDRESS isn't needed in here as far as I can tell, it's dead code in src/config.ts or src/core/synapse/index.ts as we don't use it for the pinning server and the CLI doesn't use createConfig() and has its own path to consume --view-address. Probably also best to not add it to the README. I don't think we have a good use for it in the CLI now anyway because we now use viem chains to do the config of addresses.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Reviewer @SgtPooki
Changes