To ensure the security and integrity of transactions, our API requires to authorize wallet before initiating any bridging operations. This process involves signing a message with wallet, which establishes a protected working session. This step is crucial for maintaining the security of transactions.
Get message to sign
Firstly, message to sign should be requested from our backend.
Once message to sign object received, it has to be signed by web3 wallet using a custom code on the caller side. Here is an example of message signing:
Signed message has to be sent to API to validate signature and establish protected session.
Upon successful validation, you will receive a response with cookies in the headers. Save them for future use.
Validates signed message and returns session cookies in the header.
POST/api/wallet_auth/message
Request Body
Name
Type
Description
wallet_address*
string
Address of wallet performed signature
signature*
string
Signature made by a wallet
network_type*
string
EVM or Starknet
Here is a code sample to showcase how to retrieve and store cookies:
To enhance user convenience and reduce the frequency of signing messages for each bridge operation, the system allows for a verification check to determine if a wallet is already authorized.
Allows to check whether wallet is already authorized via message signature.
GET/api/wallet_auth/wallet/{wallet_address}
Path Parameters
Name
Type
Description
wallet_address*
string
authorized wallet address
Headers
Name
Type
Description
network-type*
string
EVM or Starknet
Here is a code sample of how to use cookies to validate active session:
Upon successfully completing the wallet authorization steps, the stage is set to proceed to the next step - Get Supported Networks. This marks the readiness to explore and interact with the variety of networks supported by the service.