Sign authorization entries
In order to take advantage of contract authorization, you can use Freighter's API to sign an authorization entry. A good example of how signing an authorization entry works can be found in the authorizeEntry helper of stellar-sdk.
Like in the helper, you can construct a HashIdPreimageSorobanAuthorization and use the xdr representation of that structure to call await freighterApi.signAuthEntry(preimageXdr). This call will return a Buffer of the signed hash of the HashIdPreimageSorobanAuthorization passed in, which can then be used to submit to the network during a contract authorization workflow.
Guides in this category:
📄 Connect to the Testnet
Create a Stellar account on Testnet with Freighter
📄 Enable Soroban tokens
Add smart contract tokens to your Freighter wallet
📄 Integrate Freighter with a React dapp
Integrate the Freighter wallet into your React dapps
📄 Prompt Freighter to sign transactions as a JS dapp developer
Sign smart contract transactions using the Freighter browser extension
📄 Send Soroban token payments
Send a smart contract token payment directly from Freighter
📄 Sign authorization entries
Use Freighter's API to sign an authorization entry
📄 Sign Soroban XDRs
Sign smart contract XDRs using dapps integrated with Freighter