-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #131 from bcnmy/refactor/session-keys
📝 Documentation Update: Intro and Session Validation Module
- Loading branch information
Showing
2 changed files
with
134 additions
and
127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,55 @@ | ||
--- | ||
sidebar_label: 'Introduction' | ||
sidebar_label: "Introduction" | ||
sidebar_position: 1 | ||
--- | ||
|
||
# Introduction | ||
# Introduction to Session Keys in dApps 🌐 | ||
|
||
This tutorial will cover how to use session keys in a dApp. In this tutorial we will: | ||
This guide focuses on **session keys** in decentralized applications (dApps), highlighting their role in enhancing user experience and security. | ||
|
||
- Go over a smart contract that allows for sessions to be validated for ERC20 token transfers. | ||
- Go over initilization and creation of a session key on a Next JS frontend. (note that the steps for this will be the same as any React frontend) | ||
- Execute a basic ERC20 token transfer without the need to sign | ||
:::note | ||
**Session Keys**: Session keys are **temporary cryptographic keys** used in dApps for validating transactions or operations without the need for constant user interaction, maintaining both security and ease of use. They're like one-time passwords but for blockchain transactions. | ||
::: | ||
|
||
## Why Session Keys? | ||
|
||
Traditionally, blockchain operations require **explicit user approval** for each transaction, typically through a **digital signature**. While secure, this can be cumbersome, particularly for frequent transactions. Session keys offer a **seamless and user-friendly alternative**. | ||
|
||
:::tip | ||
**User-Friendly Transactions**: Utilizing session keys allows dApps to process multiple transactions with **single user approval**, greatly enhancing the user experience. | ||
::: | ||
|
||
## How Do Session Keys Work? | ||
|
||
Session keys are **temporary** and have **defined permissions**. Once a user approves a session, the dApp can autonomously execute transactions within the session's limits, eliminating the need for further approvals. | ||
|
||
:::info | ||
**Scope and Permissions**: The scope of a session key, like the **types, duration and volume of transactions** it can authorize, is predefined. This ensures a balance between **control and convenience**. | ||
::: | ||
|
||
## Use Cases of Session Keys | ||
|
||
- **Token Transfers**: Automating small, recurrent token transfers without requiring the user to confirm each one. | ||
- **Voting in DAOs**: Facilitating users to participate in multiple votes in a decentralized autonomous organization (DAO) without repeated confirmations. | ||
|
||
:::warning | ||
**Security Reminder**: Despite their convenience, session keys must be handled with care. It's crucial to **strictly define their scope** to mitigate potential security risks. | ||
::: | ||
|
||
## Next Steps | ||
|
||
Throughout this tutorial series, we'll explore: | ||
|
||
- **Smart Contract Analysis:** Understanding the Session Validation Module. | ||
- **Frontend Initialization:** Setting up the frontend using Next JS. | ||
- **SDK Integration:** Integrating Biconomy SDK for smart account management. | ||
- **Session Key Management:** Creating and managing session keys. | ||
- **ERC20 Transfer Execution:** Using session keys for ERC20 token transfers. | ||
|
||
Ready to get started? Let's head over to the **Session Validation Module** in the next section! 🌟 | ||
|
||
:::danger | ||
**Advanced Topic**: This guide is tailored for those with a grasp of blockchain concepts and basic programming skills. New to blockchain? Consider reviewing foundational concepts first. | ||
::: | ||
|
||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters