Token Layer Action Guide
Use this guide for practical integration withPOST /token-layer.
Decision Flow
- New wallet with no
user_walletsmapping: callaction.type=register. - Registered wallet: call
action.type=createToken. - If you get
IDENTITY_NOT_REGISTERED, runregisterfirst, then retry your action.
Register (Web3, Single Step)
Use this action to bootstrap identity for wallets that are not registered yet. Requirements:Authorization: Bearer 0x...(wallet address)signature: EIP-712 signature for register actionnonce: timestamp in msaction.message+action.signatureaction.messagemust include a 13-digit timestamp in ms- message timestamp must match
nonceand be insideexpiresAfter
Create Token
Use this action after wallet registration. Requirements:Authorization: Bearer 0x...for wallet-signed modesignature: EIP-712 signature for createToken payloadnonce: timestamp in ms
Common Errors
IDENTITY_NOT_REGISTERED: wallet signature is valid but wallet has no user mapping.REPLAY_DETECTED: same(wallet, nonce, actionHash)was already used.ACTION_EXPIRED:nonce + expiresAfteris invalid.INVALID_ACTION_SIGNATURE: EIP-712 signature does not match payload.
