Skip to main content

3 posts tagged with "sdk"

View All Tags

· 3 min read

Automating token actions should be simple, safe, and secure. With the new Safe Allowance Module, we’re excited to offer a permission-based system that enables controlled access to tokens, making it easier to set up secure automation. Whether you’re handling recurring payments, subscriptions, or specific smart contract actions, this module provides a foundation for secure and permissioned transactions.

Why Choose the Safe Allowance Module?

Traditional systems for sharing account access often involve broad permissions, granting more access than necessary for simple tasks. The Safe Allowance Module changes this by using a permission-based approach. It allows account owners to set up specific, controlled permissions for delegates, such as individual accounts or automated services, enabling them to handle predefined transactions securely. This module doesn’t automate transactions on its own but provides a safe framework where authorized automation services can operate as delegates, precisely according to the owner's permissions.

Key Features:

  • Controlled Permissions: Account owners decide who can access funds, which tokens they’re allowed to use, and under what conditions. No surprises—just clear, permissioned access.
  • Customizable Setup: Owners can establish permissions that fit their needs, from one-time transactions to recurring. It’s a streamlined approach to token automation.

Real-World Use Cases of the Safe Allowance Module

Recurring Transfers

For recurring transfers—such as stipends, or scheduled payments—the Safe Allowance Module allows users to define permissions for a delegate, who then handle the regular transactions. Once permissions are set, automation services can operate securely, automating processes without needing repeated approvals.

Subscription

Automating monthly subscription becomes seamless. Users can authorize automation services to make secure, consistent payments every cycle, ensuring funds are transferred reliably and securely.

Investment with Dollar-Cost Averaging (DCA)

For users managing investments through dollar-cost averaging, the Safe Allowance Module enables secure permissions for regular buys. By defining token allowance and schedule, users can allow automation services to handle scheduled buys safely.

Custom Contract Delegations

The module’s flexible permission system empowers developers to design tailored settings for specific use cases. Examples include automated debt repayment for lending platforms like AAVE, or any other custom smart contract operations.

Getting Started

Safe Allowance in AbstractionKit

Safe Allowance is integrated in AbstractionKit, simplifying the setup of permission-based token transfers within Safe Smart Accounts. AbstractionKit’s intuitive interface allows developers to configure delegate permissions effortlessly, unlocking secure automation with ease.

Visit the documentation page to access step-by-step setup guides, code examples, and best practices for integrating the Safe Allowance Module.

Candide Automation with Safe Allowance

Candide Automation is a new service that works seamlessly with the Safe Allowance Module, allowing developers to set up triggers that execute predefined actions within user-approved permissions. It integrates well with ERC-4337 transaction infrastructure, providing a straightforward, trust-minimized solution for account automation.

Coming Soon: Candide Automation will be self-served on the Dashboard. For early access, contact the team via Discord or at team@candidelabs.com for a same-day response.

· 3 min read

abstractionkit_poster

We have released a new version of AbstractionKit, now equipped with new features for designing Smart Wallets. This version aligns with the latest Account Abstraction upgrades in EntryPoint v0.7. It includes audited, battle-tested Safe Smart Accounts and new Modules not previously available in the latest stable release, providing end users with greater flexibility and ownership control without compromising on the user experience.

We highlight here the main features and the changelog for developers integrating with AbstractionKit. If you want to learn more about these features, see our blogpost on Introduction AbstractionKit V0.02.

New Features

  • EntryPoint v0.7 Support:

    • Added support for EntryPoint v0.7 in the Bundler class.
    • Added support for EntryPoint v0.7 in the CandidePaymaster class.
  • CandidePaymaster:

    • Integrated support for Candide Paymaster API V3, that introduces Gas Policies sponsorship.
  • SafeAccountV0.3.0:

    • Added support for SafeAccountV0_3_0, which includes compatibility with ERC-4337 EntryPoint v0.7.
  • New Modules:

    • Added support for the Safe Passkeys, enhancing security with WebAuthn authentication.
    • Added support for the Social Recovery, bringing the ability for onchain account recovery.

Breaking Changes

  1. CandidePaymaster:

    import { CandidePaymaster } from "abstractionkit";

    const paymasterRpc = "https://api.candide.dev/paymaster/$version/$network/$apikey";
    const paymaster: CandidePaymaster = new CandidePaymaster(paymasterRPC);

    // Construct user operation using createUserOperation()
    const userOperation = smartAccount.createUserOperation(..);

    // New return structure
    const [sponsoredUserOperation, sponsorMetadata] =
    await paymaster.createSponsorPaymasterUserOperation(
    userOperation,
    bundlerUrl
    );

    Ensure your implementation captures both values, as the sponsor metadata is now a necessary part of the returned operation.

  2. SafeAccountV0_2_0 Update:

    • The variable EIP712_SAFE_OPERATION has been removed from the SafeAccountV0_2_0 class. It is now imported as a constant from the library. Please update your imports:
    // EntryPoint V0.06
    import { EIP712_SAFE_OPERATION_V6_TYPE } from "abstractionkit";
    // or for EntryPoint V0.07
    import { EIP712_SAFE_OPERATION_V7_TYPE } from "abstractionkit";
  3. Some breaking changes to internal and advanced functions. Please see our updated docs for the specific updates.

Update Guides from v0.1.3

To update from v0.1.3 to v0.2.0, ensure the following changes are made in your code:

  1. Update any references to createSponsorPaymasterUserOperation to capture both the sponsoredUserOperation and the sponsorMetadata.
  2. For SafeAccount implementations, replace EIP712_SAFE_OPERATION with the correct imported constant from the updated library version.
  3. Review new module integrations (e.g., Safe Passkeys Module and Social Recovery Module) to determine if your application can leverage these enhanced features.
  4. Consider updating to the latest SafeAccountV0_3_0, so you can benefit your users from the latest Account Abstraction upgrades.

Dedicated Office Hours for Enterprises

To assist with this upgrades, we are offering dedicated office hours for enterprise customers on the Leader plan. Our team is be available to answer any questions, provide technical support, and ensure a smooth migration to v0.2.0.

Feel free to reach out directly to our private support channels schedule a session or ask about specific migration challenges.


· 3 min read

abstractionkit_poster

Candide released AbstractionKit v0.1.x, adding first-class support for the new fully audited ERC-4337 Safe canonical module. Audits by Open Zepplin and Ackee. At its core, AbstractionKit empowers developers to build Smart Wallets using Safe Contracts and the ERC-4337 standard, ushering in a new era of possibilities:

Enhanced Account Security: Leveraging battle-tested Safe Contracts, developers can seamlessly integrate various authentication methods, ensuring robust account security with features designed for easy login and recovery.

Gas Fee Abstraction: AbstractionKit takes the hassle out of gas management for users, providing the option to completely abstract gas concerns or allowing users to pay fees in different ERC-20s tokens such as stablecoins.

One-click Interfaces: AbstractionKit simplifies transaction workflows by enabling batched transactions or the automated execution of multiple transactions in a single one.

AbstractionKit embodies a lightweight design to minimize dependencies on external libraries. It natively interacts with Safe Contracts, without any external wrapping to other libraries. The interface strikes a balance between intuition and flexibility, empowering developers with the ability to make overrides, such as gas estimates and state overrides. The library provides two distinct sets of methods, catering to developers who prefer minimal abstraction and a high-level library approach:

  • The Essentials method provides a comprehensive set of functionalities with support for overrides, delivering a simplified and efficient approach.
  • The Advanced method provides intricate control and customization options, specifically tailored for developers seeking detailed configurations.

AbstractionKit comes equipped with a suite of infrastructure with Candide Atelier, including hosted Bundlers and a Paymaster API, ready for developers to use right out of the box. It is Ethereum interface library-agnostic; it can be used with ethers, viem, or web3js. Furthermore, it can be used with any Bundler client, thanks to ERC-4337 standardization across different platforms like LlamaNodes, BlockPi, or other Account Abstraction Providers.

Thanks to the support from the Safe Grants Program, Candide secured funding for the development of the Reference SDK for ERC-4337 Safe{Core}. While ERC-4337 introduces a novel paradigm for account abstraction, its practical application has been hindered by the so far limited adoption of battle tested smart-contract based accounts, in particularly Safe based accounts.

The introduction of Safe{Core} contracts to AbstractionKit paves the way for the adoption of Safe Accounts. This integration not only aims to streamline the development of Smart Wallets, but also ensures that these wallets operate cohesively within the ecosystem. It allows applications and their user bases to be expanded with the most battle tested Safe smart account standard.

To begin using AbstractionKit, visit the getting started tutorial starting with npm i abstractionkit.

If you are building on account abstraction, reach out on twitter, Discord or come say hello at team@candidelabs.com

Special thanks to Andre Thiessen, John Guilding, Thomas Wiesner, Shareef Hadid, Bertrand Juglas, Nicholas Rodrigues Lordello and SungEun Choi for the early feedback on pre-releases versions for AbstractionKit.