feat: upgrade @solana/subscriptions to 0.4.0-rc.2 + devnet/network switching - #2
Open
avneesh0612 wants to merge 3 commits into
Open
feat: upgrade @solana/subscriptions to 0.4.0-rc.2 + devnet/network switching#2avneesh0612 wants to merge 3 commits into
avneesh0612 wants to merge 3 commits into
Conversation
Secure the MPC key share and other sensitive secrets instead of keeping them as plaintext in .env: - Encrypt the key share with AES-256-GCM (PBKDF2-SHA256, 600k iterations, unique salt/IV, authenticated). Stored as `enc:v1:…` envelope. - Store sensitive secrets (key share, API token, WALLET_BACKUP_PASSWORD) in the macOS Keychain when available; .env keeps only non-sensitive config. Falls back to .env off-macOS. - Per-session keystore passphrase: SUBS_KEYSTORE_PASSPHRASE is never stored — read from the env var or an interactive hidden prompt — so a Keychain compromise alone can't decrypt the share. - setup now enables backUpToDynamic with WALLET_BACKUP_PASSWORD (auto-generated if unset) for recovery. - New commands: `secrets` (migrate .env secrets into the Keychain) and `encrypt-shares` (encrypt a share created without a passphrase). - Docs (SKILL.md, README.md, .env.example) updated; removed dead MERCHANT_ADDRESS config and a stale error-table row. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Out of scope for this local skill. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…itching - Bump @solana/subscriptions 0.2.0 → 0.4.0-rc.2 (matches deployed devnet program) - Split SubscriptionAuthority init into a separate tx so the real on-chain initId can be read before building the subscribe instruction (required by rc.1+) - Pass expectedSubscriptionAuthorityInitId from fetched authority account - Add `pnpm subs network [devnet|mainnet]` command to switch RPC and persist to .env - Add network switching section to SKILL.md so Claude knows when to call it - Pre-emptively await getUpdatePlanOverlayInstruction in cmdSunsetPlan for rc.2 compat Tested full lifecycle on devnet: list-plans → subscribe → subs → collect → cancel. All green. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
@solana/subscriptionsbumped from 0.2.0 → 0.4.0-rc.2 to match the Solana Foundation's deployed devnet program (rc.1 was hitting a 0x67 PDA derivation error on subscribe)SubscriptionAuthorityinit into a separate transaction so the on-chaininitIdcan be fetched before building the subscribe instruction — required by rc.1+ (expectedSubscriptionAuthorityInitIdmust be passed explicitly)pnpm subs network [devnet|mainnet]command that writes the chosen RPC URL to.envand persists across commands; SKILL.md updated so Claude knows to call it when the user says "use devnet"Test plan
pnpm subs balance— wallet shows SOL + USDC on devnetpnpm subs list-plans <merchant>— returns existing planpnpm subs subscribe <merchant> 0— previously failing with 0x67, now succeedspnpm subs subs— subscription shows as activepnpm subs collect <plan> <sub> <delegator> 5— payment collectedpnpm subs cancel <plan> <sub>— cancellation queuedpnpm subs network devnet/pnpm subs network mainnet— switches RPC and prints confirmation🤖 Generated with Claude Code