Management API Reference

Ecosystem wallet

Sponsor transactions

One of the biggest UX enhancements unlocked by smart accounts is the ability for app developers to sponsor their users' transactions. If your ecosystem has a gas policy enabled, you can start sponsorship your user's transactions by using the policy in your dashboard.

To make these instructions concrete, we have created a sample ecosystem wallet called Rapidfire ID. To interact with it, you can find its SDK in the NPM package directory: @rapidfire/id.

You can check out the GitHub repository for Rapidfire Wallet to learn how to create your own wallet.

Use a policy when injecting your provider#

Sponsor all transactions that will be made with the injected provider.

app.tsx
sdk.ts

_10
import { sdk } from './sdk'
_10
_10
function App() {
_10
useEffect(() => {
_10
config.getEthereumProvider({policy: 'pol_...'});
_10
}, []);
_10
return (
_10
<div/>
_10
)
_10
}

Updating the policy#

Updating your policy is useful if you change chain and need to specify a different policy ID.

app.tsx
sdk.ts

_10
import { sdk } from './sdk'
_10
_10
function App() {
_10
useEffect(() => {
_10
config.setPolicy({policy: 'pol_...'});
_10
}, []);
_10
return (
_10
<div/>
_10
)
_10
}


You can also configure your own app level policy. Check the details in the dashboard section.