Skip to content

Commit

Permalink
🔄 synced file(s) with circlefin/modularwallets-web-sdk-internal (#4)
Browse files Browse the repository at this point in the history
synced local file(s) with
[circlefin/modularwallets-web-sdk-internal](https://github.com/circlefin/modularwallets-web-sdk-internal).



<details>
<summary>Changed files</summary>
<ul>
<li>synced local directory <code>examples/</code> with remote directory
<code>examples/</code></li><li>synced local directory
<code>packages/</code> with remote directory
<code>packages/</code></li><li>synced local <code>yarn.lock</code> with
remote <code>yarn.lock</code></li>
</ul>
</details>

---

This PR was created automatically by the
[repo-file-sync-action](https://github.com/BetaHuhn/repo-file-sync-action)
workflow run
[#12821088094](https://github.com/circlefin/modularwallets-web-sdk-internal/actions/runs/12821088094)
  • Loading branch information
circle-github-action-bot authored Jan 17, 2025
1 parent 806322e commit 1e6a689
Show file tree
Hide file tree
Showing 9 changed files with 72 additions and 25 deletions.
2 changes: 1 addition & 1 deletion examples/circle-smart-account/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
toModularTransport,
toPasskeyTransport,
toWebAuthnCredential,
} from 'w3s-web-core-sdk'
} from '@circle-fin/modular-wallets-core'

const clientKey = import.meta.env.VITE_CLIENT_KEY as string
const clientUrl = import.meta.env.VITE_CLIENT_URL as string
Expand Down
2 changes: 1 addition & 1 deletion examples/circle-smart-account/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"viem": "^2.21.27",
"w3s-web-core-sdk": "file:../../packages/w3s-web-core-sdk"
"@circle-fin/modular-wallets-core": "^1.0.0"
},
"devDependencies": {
"@types/react": "^18.0.27",
Expand Down
2 changes: 1 addition & 1 deletion examples/modular-wallets-provider/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { publicActions } from "viem"
import { createBundlerClient } from "viem/account-abstraction"
import { toModularTransport } from "w3s-web-core-sdk"
import { toModularTransport } from "@circle-fin/modular-wallets-core"

const transport = toModularTransport("<my-client-url>", "<my-client-key>")

Expand Down
2 changes: 1 addition & 1 deletion examples/modular-wallets-provider/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
"version": "0.0.0",
"private": true,
"dependencies": {
"w3s-web-core-sdk": "file:../../packages/w3s-web-core-sdk"
"@circle-fin/modular-wallets-core": "^1.0.0"
}
}
25 changes: 24 additions & 1 deletion packages/w3s-web-core-sdk/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,24 @@
# W3S Web SDK Core Package
# Modular Wallets Web SDK

## Overview

Modular Wallets is a smart wallet solution built on top of Account Abstraction and adheres to the ERC-6900 and ERC-4337 standards.
The Web SDK implements [Viem](https://viem.sh/docs/clients/intro)’s interfaces, and allows you to build secure and scalable web applications using our robust [blockchain infrastructures](https://developers.circle.com/w3s/programmable-wallets-blockchain-infra), including Indexing Service and Gas Station. You can also leverage the advanced [Passkey](https://developers.circle.com/w3s/modular-wallets-passkey) technology for private key management.
Check out our [quickstart guide](https://developers.circle.com/w3s/modular-wallets-quickstart) to create your first Modular Wallet and send a gasless transaction.

## Installation

```bash
npm install @circle-fin/modular-wallets-core
```

## Documentation

- [Modular Wallets SDKs](https://developers.circle.com/w3s/modular-wallets-sdks)
- [Web SDK API doc](https://developers.circle.com/w3s/modular-wallets-web-sdk)

## Examples

We've created some example apps in the [examples](https://github.com/circlefin/modularwallets-web-sdk/tree/master/examples) folder:

- [circle-smart-account](https://github.com/circlefin/modularwallets-web-sdk/tree/master/examples/circle-smart-account)
4 changes: 3 additions & 1 deletion packages/w3s-web-core-sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
{
"name": "@circle-fin/modular-wallets-core",
"description": "Serverless Typescript SDK",
"version": "1.0.0",
"version": "1.0.1",
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"license": "Apache-2.0",
"homepage": "https://developers.circle.com/w3s/modular-wallets-web-sdk",
"repository": "circlefin/modularwallets-web-sdk",
"files": [
"dist",
"package.json",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export async function toWebAuthnCredential(
* @param username - The username to use.
* @returns A WebAuthn Credential.
*/
export async function startRegistration(
async function startRegistration(
client: RpClient,
username: string | null = null,
): Promise<WebAuthnCredential> {
Expand Down Expand Up @@ -115,7 +115,7 @@ export async function startRegistration(
* @param credentialId - The credential ID to use.
* @returns A WebAuthn Credential.
*/
export async function startAuthentication(
async function startAuthentication(
client: RpClient,
credentialId: string | null = null,
): Promise<WebAuthnCredential> {
Expand Down Expand Up @@ -161,7 +161,7 @@ export async function startAuthentication(
* @param options - CustomPublicKeyCredentialCreationOptions instance.
* @returns PublicKeyCredentialCreationOptions instance.
*/
export function getCredentialCreationOptions(
function getCredentialCreationOptions(
options: CustomPublicKeyCredentialCreationOptions,
): PublicKeyCredentialCreationOptions {
return {
Expand All @@ -179,7 +179,7 @@ export function getCredentialCreationOptions(
* @param options - CustomPublicKeyCredentialRequestOptions instance.
* @returns PublicKeyCredentialRequestOptions instance.
*/
export function getCredentialRequestOptions(
function getCredentialRequestOptions(
options: CustomPublicKeyCredentialRequestOptions,
): PublicKeyCredentialRequestOptions {
return {
Expand Down
34 changes: 27 additions & 7 deletions packages/w3s-web-core-sdk/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,34 @@ export * from './actions'
// Clients
export * from './clients'

// Constants
export * from './constants'

// Providers
export * from './providers'

// Types
export * from './types'

// Utils
export * from './utils'
export {
WebAuthnMode,
type AuthenticatorAssertionResponse,
type AuthenticatorAttestationResponse,
type CircleSmartAccountImplementation,
type CreateCredentialParameters,
type CustomPublicKeyCredentialCreationOptions,
type CustomPublicKeyCredentialDescriptor,
type CustomPublicKeyCredentialRequestOptions,
type CustomPublicKeyCredentialUserEntity,
type GetAddressReturnType,
type GetAddressRpcSchema,
type GetLoginOptionsReturnType,
type GetLoginOptionsRpcSchema,
type GetLoginVerificationReturnType,
type GetLoginVerificationRpcSchema,
type GetRegistrationOptionsReturnType,
type GetRegistrationOptionsRpcSchema,
type GetRegistrationVerificationReturnType,
type GetRegistrationVerificationRpcSchema,
type ModularWalletRpcSchema,
type RpRpcSchema,
type ToCircleSmartAccountParameters,
type ToCircleSmartAccountReturnType,
type ToWebAuthnAccountParameters,
type WebAuthnCredential,
} from './types'
18 changes: 10 additions & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,16 @@
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==

"@circle-fin/modular-wallets-core@^1.0.0":
version "1.0.0"
resolved "https://registry.yarnpkg.com/@circle-fin/modular-wallets-core/-/modular-wallets-core-1.0.0.tgz#253aeb0a3a2c82bede85fb4cb1445ef4347e9d1a"
integrity sha512-fNbJpxVC2dsTbvxfSjHPYbnEY3ZxDI/gOUDhuXHaWG/17rePPnFN/ULuECAdo3L60DuL58CD7peYZh+QP7dGrQ==
dependencies:
uuid "^11.0.3"
viem "^2.21.27"
web3 "^4.13.0"
webauthn-p256 "0.0.5"

"@cspotcode/source-map-support@^0.8.0":
version "0.8.1"
resolved "https://registry.yarnpkg.com/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz#00629c35a688e05a88b1cda684fb9d5e73f000a1"
Expand Down Expand Up @@ -5406,14 +5416,6 @@ w3c-xmlserializer@^4.0.0:
dependencies:
xml-name-validator "^4.0.0"

"w3s-web-core-sdk@file:packages/w3s-web-core-sdk":
version "1.0.0"
dependencies:
uuid "^11.0.3"
viem "^2.21.27"
web3 "^4.13.0"
webauthn-p256 "0.0.5"

walker@^1.0.8:
version "1.0.8"
resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.8.tgz#bd498db477afe573dc04185f011d3ab8a8d7653f"
Expand Down

0 comments on commit 1e6a689

Please sign in to comment.