Document SweepManagedWallet mutation#34
Conversation
Add a "Sweeping a Managed Wallet" section to the managed-wallets guide covering the onboarding-to-self-custody flow, and backlink to it from the hot-cold inventories guide, the transferring-tokens guide, and the wallets API reference. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
|
||
| A successful call returns `true`. | ||
|
|
||
| :::note Runs in the background |
There was a problem hiding this comment.
We also need another note that SweepManagedWallet either requires ENJ in the user's managed wallet, or, needs to be combined with a fuel tank that permits the managed wallet to perform the sweep.
This documentation may be best if we combine it with a notice about 'Creating a Secure Fuel Tank for Managed Wallets Only' which explains requireSignature and its use.
| mutation SweepManagedWallet { | ||
| SweepManagedWallet( | ||
| network: CANARY | ||
| chain: MATRIX | ||
| signerExternalId: "docs-example-player" #The managed wallet to empty | ||
| recipient: "cxLf6yvvtscKrHRfKDphnzsT3eoRY45VbJvqXKub5pmj5mdbQ" #The player's self-custodial wallet | ||
| ) | ||
| } |
There was a problem hiding this comment.
We strongly want to recommend that people use variables since there's a tendency to copy-and-paste and then simply modify the example value (eg. recipient) with a value that gets injected server-side (not via GraphQL Variables) and then there's a serious security concern.
It's better to be consistent with the documentation and teach the best practices: the use of variables within GraphQL.
c7174e9 to
43324b3
Compare
Convert the SweepManagedWallet examples (guide + API reference) to use GraphQL variables, and add CLAUDE.md documenting the "use GraphQL variables in snippets" convention for future contributors. Add a note that sweeping needs the managed wallet to hold ENJ or be covered by a fuel tank, linking to the Require Signature setup. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
signerAccount is not a valid CreateTransaction/SweepManagedWallet argument; the schema exposes signerAddress. (General-page occurrences are fixed on the fuel-tank branch.) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
5f015f0 to
feeb2ce
Compare
Documents the new
SweepManagedWalletmutation, which empties a managed wallet (all transferable tokens + ENJ) to a recipient in one call. Adds a "Sweeping a Managed Wallet" section to the managed-wallets guide framed around the onboarding → self-custody flow, and backlinks to it from the hot-cold inventories guide, the transferring-tokens guide, and the wallets API reference.