Requesting Smart Contract Wallets
Rollup Account Abstraction Claims and API
Last updated
Rollup Account Abstraction Claims and API
Last updated
With Rollup your can request access to your users ERC 4337 smart contract wallets. If they don't have a smart contract wallet, no sweat, we will help them create one when they onboard to your application. The following will guide you through setting up this flow.
Currently for this feature we only support ethereum and polygon with their testnets. Contact us if you'd like to add something else.
Setup an application with one of our supported paymaster providers.
Login into Console
Go to your app (if you don't have one, set one up)
Go to the Blockchain setting tab
In the paymaster section, enter your paymaster credential and save.
Go to the OAuth settings tab
In the scopes dropdown select erc_4337
scope
Update your application to include the erc_4337
scope in the authorization request
When your users login to your application you will now be presented with an access token that contains the erc_4337
claim and a list of smart contract wallet addresses and a nickname. For example:
With this access token you can now make requests to the Galaxy API to register your session key. To register a session key you will always need to generate a ethers wallet and send the public address along with the specified smart contract wallet to register. For example:
Once a session key has been registered you should receive session key data that can be used directly with your ethers library or account abstraction / paymaster provider SDK directly.
When registering a session key we will use your configured paymaster provider and their tools to fulfill the registration. Please ensure the API keys saved in your paymaster settings are the same you use in your application's transactions.
Once user authorized app to create a session key for provided wallet, user easily can revoke this session key at any time.
Here's how to do that:
Go to Passport
Navigate to Applications
tab in side-menu
Select app for which to revoke session key and hit Edit Access
button
Then push Revoke Access
button
This action will revoke all scopes user authorized app to use, including the revocation of session keys for all authorized smart contract wallets.
Revocation of Smart Contract wallets results in a blockchain transaction. Be aware that any revocation of smart contract wallet will cost gas fees.
Save on fees with your applications personal L2 for batching transactions across multiple users. Coming soon: https://github.com/proofzero/rollupid/issues/2252