July 31, 2025 | 31 Juillet 2025
As both Swift Protocol and DexPal repositories are currently closed-source, we have decided to provide relevant snippets of code within this repository to faciliate review by the iExec team.
Enables secure Telegram notifications through iExec's decentralized infrastructure.
- Validates input (user_id, subject, message);
- Verifies GDPR consent for the user;
- Retrieves protected Telegram chat ID using DataProtector;
- Sends notification via Web3telegram with voucher;
- Returns notification ID and task ID for tracking.
Retrieves protected Telegram data for authenticated users in client-side applications.
- Validates DataProtector client initialization;
- Gets current user's wallet address;
- Queries protected data with telegram_chatId schema;
- Returns latest protected data entry with address, owner, and timestamp;
- Throws error if no protected data found.
Note: Only available in client-side mode with web3Provider initialization.
Protects Telegram chat ID data for authenticated users in client-side applications.
- Validates DataProtector client initialization;
- Gets current user's wallet address;
- Removes existing protected data if found;
- Protects new Telegram chat ID data;
- Grants access to web3telegram app for sending messages;
- Returns protected data entry with address, owner, and timestamp.
Note: Only available in client-side mode with web3Provider initialization.
Sends a Telegram notification to the authenticated user.
- Validates input (userAddress, subject, message);
- Sends notification via Web3telegram with voucher;
- Returns notification ID and task ID for tracking.
Information below from pull request.
Chain management for iExec Sidechain (id 134):
- Detects current chain and provides
switchToIExecChain()
function; - Returns chain status and switching state.
WAGMI -> Web3Provider wrapper for use with Swift-iExec SDK:
- Only provides web3Provider when on iExec Sidechain;
- Converts Wagmi wallet client to EIP-1193 compatible provider.
Wrapper component integrating SwiftProvider with WAGMI using useIExecWeb3Provider()
.
Three-step modal allowing users to set up Telegram notifications via iExec Web3Telegram:
- Begin conversation with iExec Telegram bot;
- Retrieve chat ID from conversation;
- Provide chat ID in modal form.
Reusable GDPR consent modal for informing users of data usage and of their rights. Could be reused by DexPal for further Swift Protocol integration or for reinforcement of GDPR compliance vis-a-vis users.
Added:
- Notification registration state loading;
- GDPR consent state loading;
- Registration handler;
- Consent revocation handler.
- SWIFT_IEXEC_APP_ID (currently extraneous): Application identifier generated at time of provisioning. Unique to DexPal.
- SWIFT_IEXEC_API_KEY: Application API key generated at time of provisioning. Unique to DexPal.
- NEXT_PUBLIC_SWIFT_IEXEC_API_URL: Swift Protocol-iExec API URL.