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.
$ npm install @circle-fin/w3s-pw-web-sdk
Sign up for Circle's Dev Console to obtain an APP ID.
A minimal example for initiating the SDK is as follows:
import { W3SSdk } from '@circle-fin/w3s-pw-web-sdk'
const sdk = new W3SSdk({
appSettings: {
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}`)
}
})
Check out the developer documentations below for an easy-breezy setup and smoother usage experience.
We provide 3 frontend examples for you to try out:
Please follow the steps below to start building:
- Clone this repo.
- Obtain the APP ID from Circle Developer Console.
- Running the script. please follow the README.md in the example folder to execute the sample app.