https://github.com/thirdweb-example/smart-wallet-script
Simple Smart Wallet demo in node.js
https://github.com/thirdweb-example/smart-wallet-script
Last synced: 9 months ago
JSON representation
Simple Smart Wallet demo in node.js
- Host: GitHub
- URL: https://github.com/thirdweb-example/smart-wallet-script
- Owner: thirdweb-example
- Created: 2023-05-10T05:06:20.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-10-06T17:43:39.000Z (over 2 years ago)
- Last Synced: 2023-10-06T18:37:30.749Z (over 2 years ago)
- Language: TypeScript
- Size: 270 KB
- Stars: 9
- Watchers: 2
- Forks: 9
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Smart Wallet demo script
This simple node script demonstrates how to use thirdweb to deploy and use Smart Wallets - ERC4337 smart contracts - using the Wallet SDK.
The script will:
1. generate a personal wallet using LocalWallet
2. connect to the corresponding smart wallet
3. claim a ERC20 token using the thirdweb SDK
4. create a scoped session key
5. claim a ERC20 using the session key
6. revoke the session key
## Install dependencies
```bash
yarn install
```
## Configuration
The script requires a thirdweb API key.
paste your thirdweb API secret key in your .env file:
```.env
THIRDWEB_SECRET_KEY={{your_secret_key}}
```
## Run the project:
```bash
yarn dev
```
## Documentation
Full documentation at: [https://portal.thirdweb.com/wallet/smart-wallet](https://portal.thirdweb.com/wallet/smart-wallet)