Using the above arranged identity, generate a message using the below endpoint and sign it using default address by following guide for respective chains
Generate Message
post
/identity/generate-message
Authorizations
secret-keystringRequired
Body
idstringRequired
identifierstringRequired
providerstringRequired
currentSignaturestringOptional
previousSignaturestringOptional
Responses
200Success
application/json
400Error
application/json
401Error
application/json
post
/identity/generate-message
After generating message, you need to sign message using appropriate functions for respective chains, check our guide for each blockchain here
There are 2 signatures needed while updating identity
currentSignature - Will be signed by current (new) default address
previousSignature - Will be signed by previous (old) default address, only if default is updated
If default isn't updated, you need to use same signature for both currentSignature and previousSignature
Update Identity
After signing the message, add the generated signature in the arranged identity, at currentSignature and previousSignature respectively
Now, data should look something like this
Call Update Identity API
Important Note
If default chain is APTOS, then while calling this API, swap default address with public key of the same address, so that we can easily verify signatures
If default is changing in this request, then send previous default address's public key in extraData: { publicKey: "" }
For example
satyam@martian has APTOS has default chain
In this request, we are updating it to EVM
Signed message using EVM address will be in currentSignature
Signed message using APTOS address will be in previousSignature
To verify previousSignature, we need to have publicKey of the APTOS address, which we will send in extraData
So now, data will look something like this
Update Identity
patch
/identity
Authorizations
secret-keystringRequired
Body
idstringRequired
currentSignaturestringRequired
previousSignaturestringOptional
Responses
200Success
application/json
400Error
application/json
401Error
application/json
patch
/identity
Identity should now be created, if faced with any error, check our troubleshooting guide or ask in our discord