@circle-fin/w3s-pw-web-sdk
TypeScript icon, indicating that this package has built-in type declarations

1.0.10 • Public • Published

Circle Programmable Wallets Web SDK

Table of Contents


Overview

Programmable Wallets Web SDK empowers developers to build web3 wallets on web apps with ease. It’s a non-custodial wallet solution that brings seamless onboarding & transaction experience for end-users and utilizes industry standard MPC cryptographic technology to ensure the security of private key as well as the safety of user assets.

Installation

$ npm install @circle-fin/w3s-pw-web-sdk

Usage

Prerequisites

Sign up for Circle's Dev Console to obtain an APP ID.

Initiating the SDK

A minimal example for initiating the SDK is as follows:

import { W3SSdk } from '@circle-fin/w3s-pw-web-sdk'

const sdk = new W3SSdk()

sdk.setAppSettings({
  appId: '<Your App Id>',
})
sdk.setAuthentication({
  userToken: '<Your user token>',
  encryptionKey: '<Your encryption key>',
})

sdk.execute(challengeId, (error, result) => {
  if (error) {
    console.log(
      `${error?.code?.toString() || 'Unknown code'}: ${
        error?.message ?? 'Error!'
      }`
    )

    return
  }

  console.log(`Challenge: ${result.type}`)
  console.log(`status: ${result.status}`)

  if (result.data) {
    console.log(`signature: ${result.data?.signature}`)
  }
})

Documentation

Check out the developer documentations below for an easy-breezy setup and smoother usage experience.

Examples

We provide 3 frontend examples for you to try out:

Please follow the steps below to start building:

  1. Clone this repo.
  2. Obtain the APP ID from Circle Developer Console.
  3. Running the script. please follow the README.md in the example folder to execute the sample app.

Package Sidebar

Install

npm i @circle-fin/w3s-pw-web-sdk

Weekly Downloads

441

Version

1.0.10

License

Apache-2.0

Unpacked Size

156 kB

Total Files

57

Last publish

Collaborators

  • tomleicircle
  • elvin-circle
  • circle-smartin
  • ashuk-circle
  • deepakgummi-circle
  • prakashb-circle