Get Wallet Registration Nonce
Initiates a wallet registration request for the specified user. This endpoint will return a nonce
that must be signed by the private key of the wallet address you are registering against the user using the SIWE EIP-4361 (Sign in with Ethereum) spec. We will apply this to both Ethereum and Solana. In the case of Solana, instead of ${domain} wants you to sign in with your Ethereum account:
, we will expect ${domain} wants you to sign in with your Solana account:
and also Chain ID will not be expected either for Solana. Once verified, we will attach the wallet to the user specified.
HTTP Request
POST /v1/auth/wallets/registrations/nonce
Returns
A successful response returns an object with nonce
and `user_id` properties.
Body
-
Determines the type of wallet to register. Possible values: ETH, SOL (more coming soon!).
Minimum length is
1
. -
Public wallet address of the wallet.
Minimum length is
1
. -
user_id string
Unique user ID to associate the wallet with. If left blank/omitted and no user is previously attached to this wallet, we will create a user. Otherwise. we will return the user_id of attached to this wallet in the response.
Minimum length is
1
.
curl \
-X POST https://api.streambird.io/v1/auth/wallets/registrations/nonce \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"wallet_type":"ETH","user_id":"user_24wFP9pDa9YiMJLun94iKykoZs2","public_address":"0xF7E9D631bfBd90C19691566Db4AB96697A2663C6"}'
{
"wallet_type": "ETH",
"user_id": "user_24wFP9pDa9YiMJLun94iKykoZs2",
"public_address": "0xF7E9D631bfBd90C19691566Db4AB96697A2663C6"
}
{
"id": "walletrr_2BgK7k6hr0PCWNXEYrQ5IwACNtD",
"user_id": "user_24wFP9pDa9YiMJLun94iKykoZs2",
"nonce": "Oah2WPXGcKVEdJxpfrL1iFFUqqYuPu0q0z80z1NAB7U",
"user_created": false
}