Interact with the RIF wallet
The RIF Wallet uses the RIF Relay Server to send transactions on behalf of the user. The user creates a transaction in the app, signs it, and then passes it to the RIF Relay Server to get a cost estimation. That estimation is returned to the user, and the user signs an updated transaction with that cost and passes it to the Relay Server.
The server takes the fee as payment for the transaction and broadcasts the transaction to the network paying the gas fee.
In the case that the the RIF Relay Server no longer exists or is not providing the service correctly, the users still have full access to their private key and funds. In the smart wallet contract there is a method called
directExecute which allows a user to send transactions directly to the smart contract. In this scenario, the Externally Owned Account (EOA) can execute transactions directly on the smart contract while paying for the gas in rBTC.
Interacting with the wallet without the Relay Server
Use the Sample Script. The script in
main.js is a sample example of how to interact with the user's smart contract without the use of RIF Relay. The user's
smartwallet includes a function called
directExecute that allows the user to execute any transaction directly on the smartwallet and pay the gas fee from their EOA wallet.