Skip to content

Conversation

@SgtPooki
Copy link
Collaborator

@SgtPooki SgtPooki commented Dec 8, 2025

Add view-only auth path (--view-address / walletAddress + readOnly) that wires to AddressOnlySigner so balances/status can be inspected without signing.

Tighten auth parsing/validation to keep modes mutually exclusive and update messaging to mention view-only mode.

Refresh tests/mocks for the new option.

@FilOzzy FilOzzy added team/filecoin-pin "Filecoin Pin" project is a stakeholder for this work. team/fs-wg FOC working group is a stakeholder for this work, and thus wants to track it on their project board. labels Dec 8, 2025
@FilOzzy FilOzzy added this to FS Dec 8, 2025
@github-project-automation github-project-automation bot moved this to 📌 Triage in FS Dec 8, 2025
Copy link
Collaborator Author

@SgtPooki SgtPooki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self review

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds view-only authentication mode to allow read-only operations (checking balances and status) without requiring signing capabilities. The implementation introduces a new --view-address CLI option that configures an address-only signer for querying operations.

  • Adds ReadOnlyConfig type and readOnly flag to support authentication using only a wallet address
  • Introduces --view-address CLI option with environment variable support
  • Tightens authentication validation to ensure the four modes (standard, session-key, read-only, signer) remain mutually exclusive
  • Updates test mocks and adds read-only mode test coverage

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
src/utils/cli-options.ts Adds --view-address CLI option with documentation
src/utils/cli-auth.ts Implements parsing logic to convert viewAddress to walletAddress + readOnly config
src/core/synapse/index.ts Adds ReadOnlyConfig type, type guard, validation, and initialization logic using AddressOnlySigner
src/index-types.ts Exports new ReadOnlyConfig type for public API
src/test/unit/synapse-service.test.ts Adds test coverage for read-only mode initialization
src/test/unit/import.test.ts Updates mock error message to include view-address option
src/test/unit/data-set.test.ts Updates mock error message to include view-address option
src/test/unit/add.test.ts Updates mock error message to include view-address option

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@SgtPooki SgtPooki merged commit 167c148 into master Dec 8, 2025
12 checks passed
@SgtPooki SgtPooki deleted the allow-inspecting-other-accts branch December 8, 2025 20:56
@github-project-automation github-project-automation bot moved this from 📌 Triage to 🎉 Done in FS Dec 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

team/filecoin-pin "Filecoin Pin" project is a stakeholder for this work. team/fs-wg FOC working group is a stakeholder for this work, and thus wants to track it on their project board.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants