Skip to content

Latest commit

 

History

History

circle-smart-account

Circle Smart Account Example

This example Vite application demonstrates how to register and log in to a Circle Smart Account using passkeys. It also showcases how to perform a user operation with the account on Polygon Amoy.

Run the example app

Please follow the instructions to run the example app on your local machine.

Environment Variables

Before you start to run the app, you need to make sure that all environment variables are configured correctly.

Make a copy of .env.example and rename it to .env.

Under .env, make sure the following environment variables are configured properly:

Once you have these environment variables setup, you can now follow the steps below to run the app locally.

Install dependencies

You first need to make sure you have followed the README under project root and have installed all dependencies under root folder:

$ yarn install

Now you need to go to this example folder:

$ cd examples/circle-smart-account

Once you are under the example folder, install all dependencies for the app:

$ yarn install

Run the app

To run the app locally:

$ yarn dev

Now you should be able to see your app up and running in your browser at: http://localhost:5173/.

Important Notes

  • Do Not Import from src or dist Directories Directly:

    Always import the Core SDK using the package name:

    import { yourFunction } from 'w3s-web-core-sdk'
  • Watching Changes from the Core SDK Package

    If you are developing new SDK features, run yarn dev from the core SDK package directory to build your changes in real time.

  • Ensure Build-Time Constants Are Replaced:

    Variables like SDK_VERSION should be replaced during the build process. If you encounter issues, make sure you're using the compiled code from the dist directory.