Skip to main content

Smart Wallets

Smart wallets on Stellar are a growing piece of Stellar's ecosystem. Lots of development is taking place, and this documentation will grow and progress as we collaborate on an audited smart wallet solution. In the meantime, below you'll find some conceptual grounding, as well as some examples and tooling, to get you started.

Overview

Let's look at the various pieces that are at play in Stellar smart wallets.

Smart wallets

In short, a smart wallet is a smart contract that can act as an account on the network. A smart wallet can hold value and interact with other smart contracts.

They are digital wallets that leverage smart contract composability to offer enhanced functionality and security for managing digital assets. Unlike traditional wallets, smart wallets integrate features such as multi-signature support, policy signers, programmable transactions, and enhanced user experience.

Smart wallets enable users to interact seamlessly with blockchain ecosystems, providing a user-friendly interface for sending, receiving, and storing digital assets. They can incorporate signers of many types. Among the most exciting are passkey signers, which implement WebAuthn standards to ensure secure, password-less authentication, reducing the risks associated with traditional seed phrases and private keys.

By using smart contracts, smart wallets can automate transactions and implement advanced security protocols. For example: time-locked transfers, spending limits, and fraud detection. These features make smart wallets an ideal choice for users seeking a secure, convenient, and versatile solution for managing their digital assets in the evolving landscape of blockchain technology.

WebAuthn

WebAuthn (web authentication) is a web standard for secure, password-less authentication. It uses public-key cryptography to eliminate the reliance on shared secrets in the web2 world. In the context of a blockchain, using a WebAuthn signer enhances security and usability for dapps.

WebAuthn provides decentralized authentication (no central authority manages passwords), enhanced security (secret keys remain on the user’s device), improved user experience (users don’t have to worry about storing or remembering their secret keys), and broader interoperability (WebAuthn is already supported by major browsers and platforms).

Secp256r1

The secp256r1 signature scheme is an elliptic curve that is often used with the Elliptic Curve Digital Signature Algorithm (ECDSA), which is a widely used public key signature scheme.

Secp256r1 is a common signature algorithm used in WebAuthn, which is the standard behind the passkeys available on browsers, computers, and phones. Enabling on-chain secp256r1 verification allows developers to design contracts that incorporate passkeys to sign smart contract transactions and access accounts instead of using seed phrases or signing keys.

The launch of Protocol 21 enabled native support of secp256r1 verification in Stellar smart contracts on Mainnet as outlined in CAP-0051. This integration means that secp256r1 is built directly into the protocol and applications can both sign transactions and submit them to the network using secp256r1 without relying on a third party.

Passkeys

Passkeys are an implementation of the WebAuthn standard. The ability to use passkeys to sign transactions and access accounts removes the need for users to store or remember their secret keys and/or 12- to 24-word seed phrases, something that has been a massive barrier to entry for end-users entering the blockchain space. Secret keys and seed phrases can be overwhelming, hard to remember, entered incorrectly, and prone to security breaches.

Passkeys offer a faster, more secure method of identity authentication by using encrypted data stored on a device and performing user verification with hardware tokens (like YubiKeys), biometric data (like fingerprints or facial recognition), or other cryptographic methods.

Read more about passkeys in this introduction to passkeys blog.

How they work together

That's a lot of technical buzzwords. Taken together:

  1. Secp256r1 provides the cryptographic foundation for key generation and digital signatures,
  2. WebAuthn offers a standardized framework for passwordless authentication using public-key cryptography, and
  3. Passkeys implement these technologies to provide a seamless and secure user experience.

Bake all of that together into a Stellar smart contract, and you have the foundation for the planet's best smart wallet implementation!

Build with smart wallets

If you're building or experimenting with smart wallets on Stellar, some essential resources are:

Passkey Kit

The Passkey Kit is a TypeScript SDK for creating and managing Stellar smart wallets, primarily (though not exclusively) with passkey signers. It's intended to be used in tandem with Launchtube for submitting signed transactions on-chain, however this is not a requirement. This is both a client and a server-side library. PasskeyKit on the client and PasskeyServer on the server.

The source code also includes a smart contract implementation of a proposed smart wallet standardized interface.

Launchtube transaction submission

This is an API service where developers can send their smart contract transactions to get them funded and submitted to the Stellar network without having to worry about fees, sequence numbers, classic G addresses, or other complexities.

note

Launchtube is a prototype service. While SDF maintains a Mainnet implementation, we cannot offer any guarantees or SLAs for it. SDF's Mainnet Launchtube service may not be suitable for mission-critical production services.

SDP backend smart wallet

The Stellar Disbursement Platform team is also experimenting with smart wallet implementations. In a feature branch, they've implemented a smart wallet contract that can also be used.

Example projects

Explore some of the current work being done with smart wallets, passkeys, policy signers, and more on Stellar! Play around with the various examples linked below, build your own passkey-powered projects, and share your findings in the #passkeys channel on Discord.

note

These examples are not created or maintained officially by the SDF but by dedicated community members both internal and external to the SDF.

Zafegard

A smart wallet that demonstrates the use of stateful policy signers.

Do Math

A smart wallet that demonstrates the use of multi-sig and policy signers to, surprisingly, do math without needing to input a passkey for every interaction.

Soroban by example

An app that uses passkeys to sign Stellar smart contract transactions.

Super Peach

A passkey-powered multi-signer abstract account contract example.

Ye Olde Guestbook

A passkey-powered internet guestbook from yesteryear built with smart contracts and frontend code.

Get involved

Dev Discord

Join the discussion, ask questions, and share your own work with smart wallets in the Stellar Developer Discord in the #passkeys channel.

SEP discussion

Join the SEP discussion on the WebAuthn smart wallet contract interface in GitHub.