Wallets
https://platform.enjin.io/graphql
The Enjin Platform has three wallet-related mutations: CreateManagedWallet and SweepManagedWallet for platform-managed wallets, and CreateLinkingCode for linking end-user wallets. Managed wallets are keypairs derived from the Wallet Daemon's seed plus an externalId you control — they let your application create signing accounts on demand without managing private keys.
End-user wallets aren't created through the API — the user's wallet already exists on chain. Instead, use CreateLinkingCode to link a user's Enjin Wallet to your account, after which CreateTransaction(..., signerAddress: <linked-address>) delivers transaction requests straight to their Enjin Wallet app for approval. See Sending Wallet Requests for the full flow.
CreateManagedWallet
Creates a new managed wallet keyed by your externalId. The wallet is the same keypair across networks (mainnet and canary) — there is no network / chain argument.
Once created, look up the wallet's public key with GetManagedWallet(externalId:) and use it as recipient on mint/transfer actions, or as signerAddress / signerExternalId on CreateTransaction to have it sign a transaction.
- GraphQL
- Response
mutation CreateManagedWallet {
CreateManagedWallet(
externalId: "e73f9f38-6832-4822-922b-b9225245ba24"
)
}
{
"data": {
"CreateManagedWallet": true
}
}
SweepManagedWallet
Transfers all transferable tokens and ENJ out of a managed wallet to a single recipient in one call — the simplest way to migrate a player to a self-custodial wallet. Identify the wallet to empty with signerExternalId (or signerAddress for its public key); the work runs asynchronously and is rate-limited to once per hour per wallet. Returns true once the sweep is accepted.
See Sweeping a Managed Wallet for the full walkthrough.
- GraphQL
- Response
mutation SweepManagedWallet($network: Network!, $chain: Chain!, $signerExternalId: String, $recipient: String!) {
SweepManagedWallet(
network: $network
chain: $chain
signerExternalId: $signerExternalId
recipient: $recipient
)
}
Variables:
{
"network": "ENJIN",
"chain": "MATRIX",
"signerExternalId": "e73f9f38-6832-4822-922b-b9225245ba24",
"recipient": "cxLf6yvvtscKrHRfKDphnzsT3eoRY45VbJvqXKub5pmj5mdbQ"
}
{
"data": {
"SweepManagedWallet": true
}
}
CreateLinkingCode
Creates a short-lived linking code that a user scans (as a QR code) with their Enjin Wallet app to link their wallet to your Enjin Platform account — authorizing you to send transaction requests to their app. Requires a completed Developer Profile.
You can pass your own idempotencyKey or let the platform generate one; once the user approves, look up the linked wallet with GetLinkedWallet using the same key. Each key identifies one linking code and can never be reused — if a code expires unused, create the next one with a fresh key. See Sending Wallet Requests for the full walkthrough.
- GraphQL
- Response
mutation CreateLinkingCode($idempotencyKey: String) {
CreateLinkingCode(idempotencyKey: $idempotencyKey) {
idempotencyKey
qr
url
expires
}
}
Variables:
{
"idempotencyKey": "player-123"
}
{
"data": {
"CreateLinkingCode": {
"idempotencyKey": "player-123",
"qr": "https://platform.enjin.io/qrcode/aHR0cHM6Ly9wbGF0Zm9ybS5lbmppbi5pby9saW5rLzMyNzIzMTky",
"url": "https://platform.enjin.io/link/32723192",
"expires": "2026-08-24T15:36:12Z"
}
}
}
qr— a renderable QR code image of the linking link, ready to display to the user.url— the linking link itself, for when your application runs on the same device as the Enjin Wallet app.expires— when the code stops working; create a new one if it expires before the user finishes linking.
- For Wallet Daemon-signed transactions, see
CreateTransaction. - For Managed Wallet-signed transactions, pass
signerAddressorsignerExternalIdonCreateTransaction. - For transactions signed by a user's linked Enjin Wallet, pass the linked address as
signerAddressonCreateTransaction— the request is delivered to their app for approval. See Sending Wallet Requests. - For custom end-user signing integrations (browser extension, etc.), pair
CreateTransaction(... signerAddress:)withSignTransaction.