Reference Sign in with a wallet
Sign in with a wallet
Signs in with a wallet on Robinhood Chain and returns a session for the account endpoints. Moth Console does this for you.
POSThttps://api.runmoth.si/v1/auth/verify
- Get a nonceGET/auth/nonce gives a nonce for ten minutes, the domain and chain 4663
- SignThe wallet signs a Sign-In with Ethereum message. No transaction, no gas
- VerifyPOST/auth/verify takes the message and its signature
- Session24 hA ses_ token, sent as Bearer to the account endpoints
domain, uri and chain. A nonce works once, and a new wallet gets a new account.Body
messagerequiredThe signed message, as signed.
signaturerequiredThe wallet's signature, as 0x hex.
Send the ses_ token as Authorization: Bearer to the account endpoints. A session lasts 24 hours, or less when the message says so, and POST /auth/logout ends it early.
Errors
400invalid_request_errorThe message or the signature is missing401authentication_errorThe signature, nonce, domain or chain didn't check out, so get a new nonce and sign again429rate_limit_errorToo many sign-in attempts from this address