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.
For a full example of how to use contract authorization, the scaffold-soroban demo for an atomic swap makes use of both contract auth and Freighter's signAuthEntry
API.
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