Skip to content

Document SweepManagedWallet mutation#34

Open
EtayM wants to merge 3 commits into
enjin:masterfrom
EtayM:docs/sweep-managed-wallet
Open

Document SweepManagedWallet mutation#34
EtayM wants to merge 3 commits into
enjin:masterfrom
EtayM:docs/sweep-managed-wallet

Conversation

@EtayM

@EtayM EtayM commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Documents the new SweepManagedWallet mutation, 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.

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Comment on lines +919 to +926
mutation SweepManagedWallet {
SweepManagedWallet(
network: CANARY
chain: MATRIX
signerExternalId: "docs-example-player" #The managed wallet to empty
recipient: "cxLf6yvvtscKrHRfKDphnzsT3eoRY45VbJvqXKub5pmj5mdbQ" #The player's self-custodial wallet
)
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

@EtayM EtayM force-pushed the docs/sweep-managed-wallet branch from c7174e9 to 43324b3 Compare July 6, 2026 10:05
EtayM and others added 2 commits July 6, 2026 13:13
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>
@EtayM EtayM force-pushed the docs/sweep-managed-wallet branch from 5f015f0 to feeb2ce Compare July 6, 2026 10:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants