Verify Wallet (beta)
Verifies a wallet signature. This endpoint will verify the signature signed by the wallet private key using the challenge presented by the BeginWalletRegistration
endpoint for the wallet address specified. If signature is valid, we will return the wallet object with its associated user ID. If the wallet is not previously attached the the user initiating the wallet registration, the wallet will be attached to the user.
HTTP Request
POST /v1/auth/wallets/verify
Returns
A successful response returns a Wallet
object.
Body
-
Determines the type of wallet to register. Possible values: ETH, SOL (more coming soon!).
Minimum length is
1
. -
Signed message using the associated private key of the wallet address. We expect ETH signed message to be base64 encoded (e.g. 0x...) and SOL signed message will be bs58 encoded.
Minimum length is
1
. -
Public wallet address of the wallet.
Minimum length is
1
. -
session_expires_in number
Optional
Extend the session expiration time to N minutes from now, must be between 5 to 525600 minutes (365 days). This parameter will create a new session if there is no existing session along with asession_token
andsession_jwt
. However, if a validsession_token
orsession_jwt
is sent in, it will extend that session by the minutes specified. If not sent in, no session will be created by default. -
session_token string
Optional
Unique session token to verify. -
session_jwt string
Optional
Unique Session JWT to verify.
curl \
-X POST https://api.streambird.io/v1/auth/wallets/verify \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"wallet_type":"ETH","signature":"0xb27c94381c930151c4823fd4b7f0b45d700f0c9d30a7b98821413e07eef7604319a1dbc28dda881d0fc8d18b08aceeeb0fcdb80d6caec6f6e9901800c43894c31b","public_address":"0xF7E9D631bfBd90C19691566Db4AB96697A2663C6"}'
{
"wallet_type": "ETH",
"signature": "0xb27c94381c930151c4823fd4b7f0b45d700f0c9d30a7b98821413e07eef7604319a1dbc28dda881d0fc8d18b08aceeeb0fcdb80d6caec6f6e9901800c43894c31b",
"public_address": "0xF7E9D631bfBd90C19691566Db4AB96697A2663C6"
}
{
"id": "wallet_24tdfcVDSJQpK5huDnZaqPP2aiI",
"app_id": "app_24ydphdixx2ydhF0E5WUFUKWNqi",
"user_id": "user_24wFP9pDa9YiMJLun94iKykoZs2",
"public_address": "0xf7e9d631bfbd90c19691566db4ab96697a2663c6",
"wallet_type": "ETH",
"is_default": false,
"is_ready_only": true,
"is_imported": true,
"updated_at": 1644453920,
"created_at": 1644453920
}