Skip to content

Add bitsocial community export command (pkc-js 0.0.41 export API) #64

@Rinse12

Description

@Rinse12

Summary

Upgrade @pkcprotocol/pkc-js from 0.0.40 to 0.0.41 and expose the new community export API (pkcprotocol/pkc-js#100) in the CLI.

Plan

1. Upgrade pkc-js

  • npm install --save-exact @pkcprotocol/pkc-js@0.0.41

2. New command: bitsocial community export [ADDRESS]

Triggers an export on the RPC server, streams progress, downloads the finished SQLite snapshot via GET /exports/<exportId>, and verifies its sha256 against the export record.

Flags:

  • ADDRESS arg + --name / --publicKey — community lookup (same trio as community get)
  • -o, --path — local destination file (default: ./<address>.sqlite)
  • --includePrivateKey — ask the RPC server to include the community signer's private key in the export
  • --force — overwrite an existing file at the destination
  • --quiet — suppress progress output (only print the final file path)
  • Ctrl+C cancels the in-flight export via cancelExport()

3. New daemon flag: --allowPrivateKeyExport

Server-side policy passed to the pkc-js WS server options, controlling whether RPC clients may request includePrivateKey exports.

4. Tests

  • Export command: happy path, lookup variants, --includePrivateKey, overwrite protection / --force, sha256 mismatch failure
  • Daemon flag plumbing

Progress

  • Upgrade pkc-js to 0.0.41
  • community export command
  • daemon --allowPrivateKeyExport flag
  • Tests
  • Build + full test suite pass

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions