tools: drain-product-account (phone-signed PAS/PGAS mover)#406
Merged
Conversation
…ting the funds drip)
Contributor
|
Dev build ready — try this branch: |
Contributor
E2E Test Pass · ❌ FAILTag:
Sentry traces: view spans for this run |
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.
Adds
tools/drain-product-account.ts— abun-run helper to move native PAS + PGAS between the user's own phone-controlled product accounts, signed on the phone via the live CLI session.Why
Built to push a product account below the playground-app funds floors (native < 0.3 PAS and PGAS < 5B) so the "Become a builder" resource drip fires on a star — the live test for the playground-app funds gate (
hasSufficientFunds). Also doubles as a general "move funds between my product accounts" / refund tool (setPRODUCT_ID/DEST/LEAVE_*).Key facts baked into the header
/product/{productId}/{index}off the wallet root; the same phone signs for any of them —createPlaygroundSessionSigner(session, { productId, derivationIndex }). (Verified: same root →playground.dot/0andpr-472-playgroundtest.dot/0are different accounts the one phone controls.)SsoSessionsV3+deviceEncPubKey, host-papp 0.8.7 / terminal 0.5.0, CLI ≥ v0.40.x). A stale checkout silently returns 0 sessions → "NO SESSION".ChargeAssetTxPayment(pattern from polkadot-app-deploy'sPGAS_FEE_OPTIONS).DRY_RUN=1 bun tools/drain-product-account.tspreviews; each transfer is one phone approval.Sits alongside the other ad-hoc
tools/*.ts. Not in the typecheck scope;lint:licensepasses.