Skip to content

Update relayer.gen.ts and TransactionPrecondition interface#293

Closed
Dargon789 wants to merge 12 commits intomasterfrom
main
Closed

Update relayer.gen.ts and TransactionPrecondition interface#293
Dargon789 wants to merge 12 commits intomasterfrom
main

Conversation

@Dargon789
Copy link
Copy Markdown
Owner

@Dargon789 Dargon789 commented Feb 13, 2026

Summary by Sourcery

Add ETHAuth support and environment abstraction across wallet core/WDK, improve passkey handling, and update infrastructure, networks, and demos.

New Features:

  • Introduce ETHAuth settings and proof handling in the dapp client, including transport types, storage, and session management.
  • Add CoreEnv and WdkEnv abstractions to configure fetch, crypto, storage, timers, locks, and navigation instead of relying on global browser APIs.
  • Provide a pluggable PasskeyProvider and related typings to customize passkey creation, discovery, and signing, including injectable WebAuthn implementations.
  • Expose ETHAuth proof retrieval from DappClient and wire it into connection flows so dapps can consume verified proofs.
  • Add support for the Etherlink Shadownet Testnet network in primitives and default network lists.
  • Scaffold a new wagmi-based demo app showcasing Sequence integration.

Enhancements:

  • Refine manager option resolution into a strongly typed ResolvedManagerOptions, including identity options, env, and database initialization using the new env abstraction.
  • Make state providers, indexed DB stores, and encrypted key storage work in non-browser environments by routing through CoreEnv/WdkEnv helpers and explicit error handling.
  • Update passkey signer implementation to accept injectable WebAuthn interfaces and normalize signatures via guard configuration.
  • Improve recovery handling by using address equality helpers, catching per-provider errors during queued payload discovery, and tightening topology trimming logic.
  • Harden cron job scheduling and persistence to use env-provided timers, locks, and storage when available, with better abort/error detection.
  • Avoid leaking internal details in primitives CLI parse errors by returning a generic parse error response.
  • Allow Pimlico bundler and dev HTTP state providers to use injected fetch implementations and fail fast when none is available.
  • Tighten identity handling by resolving env, using WebCrypto via injected crypto, and passing crypto into IdentitySigner and auth key helpers.

Build:

  • Update multiple package.json versions to 3.0.0-beta.16 across services, utils, wallet core, dapp client, primitives, and WDK.
  • Adjust the tests GitHub Actions workflow to run a non-frozen pnpm install before tests and add permissions for the format-label workflow.
  • Add basic CircleCI and Azure Pipelines configurations for alternate CI environments.
  • Add pnpm/npm config and TS/biome/Vite configs within the new wagmi project.

CI:

  • Configure an on-PR pnpm-format-label workflow with explicit permissions and add CI configs for CircleCI and Azure Pipelines.

Documentation:

  • Add changelog entries and changesets for the 3.0.0-beta.15 and 3.0.0-beta.16 releases, documenting ETHAuth support and new chains.
  • Introduce GitHub issue templates for bug reports, feature requests, and custom issues, plus a SECURITY policy document.
  • Add a README for the new wagmi demo project.

Tests:

  • Add a dapp-client ETHAuth proof test scaffold (placeholder for ETHAuth-related testing).

Chores:

  • Add a CNAME, FUNDING, codesandbox, and related project metadata files.
  • Generate v8 compile cache artifacts and various project scaffolding files for the new wagmi project.

@bolt-new-by-stackblitz
Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@codesandbox
Copy link
Copy Markdown

codesandbox bot commented Feb 13, 2026

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

@vercel

This comment was marked as resolved.

@sourcery-ai
Copy link
Copy Markdown

sourcery-ai bot commented Feb 13, 2026

Reviewer's Guide

This PR generalizes environment access (crypto, storage, timers, fetch, IndexedDB, URL/navigation, WebAuthn) across wallet-core and wallet-wdk, introduces an injectable passkey provider, adds ETHAuth support to the dapp client (including proof storage and surfaces), improves robustness of cron, recovery, and identity flows, and adds a new wagmi demo project plus CI/config/issue templates and version bumps for a new beta release.

Sequence diagram for connect flow with ETHAuth proof creation and storage

sequenceDiagram
  actor DappUser
  participant DappClient
  participant ChainSessionManager
  participant DappTransport
  participant WalletApp
  participant WalletBackend
  participant SequenceStorage

  DappUser->>DappClient: connect(ethAuthSettings)
  DappClient->>ChainSessionManager: initializeAndConnect(options)
  ChainSessionManager->>DappTransport: sendConnectRequest(payload with ethAuth)
  DappTransport->>WalletApp: openWalletAndPostMessage(request)

  WalletApp->>WalletBackend: handleConnectRequest(request)
  WalletBackend->>WalletBackend: authenticateUser
  WalletBackend->>WalletBackend: buildETHAuthTypedData
  WalletBackend->>WalletBackend: signTypedData
  WalletBackend-->>WalletApp: connectResponse(ethAuthProof)

  WalletApp-->>DappTransport: postMessage(connectResponse)
  DappTransport-->>ChainSessionManager: deliverConnectResponse

  ChainSessionManager->>ChainSessionManager: _saveEthAuthProofIfProvided(ethAuthProof)
  ChainSessionManager->>SequenceStorage: saveEthAuthProof(ethAuthProof)
  SequenceStorage-->>ChainSessionManager: ok

  ChainSessionManager-->>DappClient: connect completed
  DappClient-->>DappUser: connected

  DappUser->>DappClient: getEthAuthProof()
  DappClient->>SequenceStorage: getEthAuthProof()
  SequenceStorage-->>DappClient: ETHAuthProof
  DappClient-->>DappUser: return ETHAuthProof
Loading

Class diagram for CoreEnv and WdkEnv abstractions and main consumers

classDiagram
  class CoreEnv {
    +fetch: fetch
    +crypto: CryptoLike
    +storage: StorageLike
    +indexedDB: IDBFactory
    +text: TextEncodingLike
  }

  class StorageLike {
    +getItem(key: string) string
    +setItem(key: string, value: string) void
    +removeItem(key: string) void
  }

  class CryptoLike {
    +subtle: SubtleCrypto
    +getRandomValues(array: ArrayBufferView) ArrayBufferView
  }

  class TextEncodingLike {
    +TextEncoder: TextEncoder
    +TextDecoder: TextDecoder
  }

  class WdkEnv {
    +fetch: fetch
    +crypto: CryptoLike
    +storage: StorageLike
    +indexedDB: IDBFactory
    +text: TextEncodingLike
    +timers: TimersLike
    +locks: LockManagerLike
    +navigation: NavigationLike
    +urlSearchParams: URLSearchParams
  }

  class TimersLike {
    +setTimeout(handler: Function, timeout: number) any
    +clearTimeout(id: any) void
    +setInterval(handler: Function, timeout: number) any
    +clearInterval(id: any) void
  }

  class LockManagerLike {
    +request(name: string, callback: Function) Promise~void~
  }

  class NavigationLike {
    +getPathname() string
    +redirect(url: string) void
  }

  class EnvFunctionsCore {
    +resolveCoreEnv(env: CoreEnv) CoreEnv
  }

  class EnvFunctionsWdk {
    +resolveWdkEnv(env: WdkEnv) WdkEnv
  }

  class EncryptedPksDb {
    -localStorageKeyPrefix: string
    -tableName: string
    -env: CoreEnv
    +EncryptedPksDb(localStorageKeyPrefix: string, tableName: string, env: CoreEnv)
    +generateAndStore() Promise~EncryptedData~
    +getEncryptedPkStore(address: Address) Promise~EncryptedPkStore~
    +listAddresses() Promise~Address[]~
    +delete(address: Address) Promise~void~
    -getIndexedDB() IDBFactory
    -getStorage() StorageLike
    -getCrypto() CryptoLike
    -getTextEncoderCtor() TextEncoder
    -getTextDecoderCtor() TextDecoder
    -openDB() Promise~IDBDatabase~
  }

  class EncryptedPkStore {
    -encrypted: EncryptedData
    -env: CoreEnv
    +EncryptedPkStore(encrypted: EncryptedData, env: CoreEnv)
    +address() Address
    +signDigest(digest: Bytes) Promise~SignatureParts~
    -getStorage() StorageLike
    -getCrypto() CryptoLike
    -getTextDecoderCtor() TextDecoder
  }

  class IndexedDbStore {
    -dbName: string
    -_db: IDBDatabase
    -env: CoreEnv
    +IndexedDbStore(dbName: string, env: CoreEnv)
    -getIndexedDB() IDBFactory
    -openDB() Promise~IDBDatabase~
  }

  class PimlicoBundler {
    +id: string
    +provider: Provider
    +bundlerRpcUrl: string
    -fetcher: fetch
    +PimlicoBundler(bundlerRpcUrl: string, provider: Provider, fetcher: fetch)
    -bundlerRpc(method: string, params: any[]) Promise~any~
  }

  class DevHttpProvider {
    -baseUrl: string
    -fetcher: fetch
    +DevHttpProvider(baseUrl: string, fetcher: fetch)
    -request(method: string, path: string, body: any) Promise~any~
  }

  class StateSequenceProvider {
    -service: Sessions
    +Provider(host: string, fetcher: Fetch)
  }

  class AuthKeysDb {
    -expirationTimers: Map~string, any~
    -env: WdkEnv
    +AuthKeys(dbName: string, env: WdkEnv)
    +getBySigner(signer: string, attempt: number) Promise~AuthKey~
    -scheduleExpiration(authKey: AuthKey) void
    -clearExpiration(address: string) void
  }

  class Cron {
    -STORAGE_KEY: string
    -isStopping: boolean
    -currentCheckJobsPromise: Promise~void~
    -checkInterval: any
    -env: WdkEnv
    +Cron(shared: Shared)
    -start() void
    -checkJobs() Promise~void~
    -runJobs() Promise~void~
    -getStorageState() Promise~Map~string, any~~
    -syncWithStorage() Promise~void~
    -isAbortError(error: any) boolean
  }

  class IdentityHandler {
    -nitro: IdentityInstrument
    -authKeys: AuthKeysDb
    -signatures: Signatures
    +identityType: IdentityType
    +env: WdkEnv
    +IdentityHandler(nitro: IdentityInstrument, authKeys: AuthKeysDb, signatures: Signatures, identityType: IdentityType, env: WdkEnv)
    +onStatusChange(cb: Function) Function
    +commitVerifier(challenge: Hex) Promise~CommitResult~
    +completeAuth(challenge: Hex, signer: string) Promise~CompleteResult~
    +getIdentitySigner(signer: string) Promise~IdentitySigner~
    -getAuthKey(signer: string) Promise~AuthKey~
  }

  CoreEnv <|-- WdkEnv
  EnvFunctionsCore ..> CoreEnv
  EnvFunctionsWdk ..> WdkEnv

  EncryptedPksDb --> CoreEnv
  EncryptedPkStore --> CoreEnv
  IndexedDbStore --> CoreEnv
  PimlicoBundler --> CoreEnv : uses fetch
  DevHttpProvider --> CoreEnv : uses fetch
  StateSequenceProvider --> CoreEnv : uses fetch

  AuthKeysDb --> WdkEnv
  Cron --> WdkEnv
  IdentityHandler --> WdkEnv
  WdkEnv --> TimersLike
  WdkEnv --> LockManagerLike
  WdkEnv --> NavigationLike
Loading

Class diagram for passkey provider, handlers, and wallet integration

classDiagram
  class PasskeySigner {
    <<interface>>
    +credentialId: string
    +publicKey: PasskeysPublicKey
    +imageHash: Hex
    +signSapient(wallet: Address, chainId: number, payload: Payload, imageHash: Hex) Promise~any~
  }

  class PasskeyProvider {
    <<interface>>
    +create(extensions: PasskeysExtensions, options: CreatePasskeyOptions) Promise~PasskeySigner~
    +find(stateReader: StateReader, extensions: PasskeysExtensions, options: FindPasskeyOptions) Promise~PasskeySigner~
    +loadFromWitness(stateReader: StateReader, extensions: PasskeysExtensions, wallet: Address, imageHash: Hex, options: FindPasskeyOptions) Promise~PasskeySigner~
    +fromCredential(args: FromCredentialArgs) PasskeySigner
    +isSigner(signer: unknown) boolean
  }

  class DefaultPasskeyProvider {
    +create(extensions: PasskeysExtensions, options: CreatePasskeyOptions) Promise~PasskeySigner~
    +find(stateReader: StateReader, extensions: PasskeysExtensions, options: FindPasskeyOptions) Promise~PasskeySigner~
    +loadFromWitness(stateReader: StateReader, extensions: PasskeysExtensions, wallet: Address, imageHash: Hex, options: FindPasskeyOptions) Promise~PasskeySigner~
    +fromCredential(args: FromCredentialArgs) PasskeySigner
    +isSigner(signer: unknown) boolean
  }

  class CorePasskey {
    +address: Address
    +credentialId: string
    +publicKey: PasskeysPublicKey
    +imageHash: Hex
    +Passkey(options: PasskeyOptions)
    +signSapient(wallet: Address, chainId: number, payload: Payload, imageHash: Hex) Promise~Signature~
    +create(extensions: PasskeysExtensions, options: CreatePasskeyOptions) Promise~CorePasskey~
    +find(stateReader: StateReader, extensions: PasskeysExtensions, options: FindPasskeyOptions) Promise~CorePasskey~
    +loadFromWitness(stateReader: StateReader, extensions: PasskeysExtensions, wallet: Address, imageHash: Hex, options: FindPasskeyOptions) Promise~CorePasskey~
  }

  class PasskeysHandler {
    +kind: string
    -readySigners: Map~string, PasskeySigner~
    -signatures: Signatures
    -extensions: PasskeysExtensions
    -stateReader: StateReader
    -passkeyProvider: PasskeyProvider
    +PasskeysHandler(signatures: Signatures, extensions: PasskeysExtensions, stateReader: StateReader, passkeyProvider: PasskeyProvider)
    +onStatusChange(cb: Function) Function
    +addReadySigner(signer: PasskeySigner) void
    +handle(request: BaseSignatureRequest) Promise~SignerUnavailable \| SignerActionable~
    -loadPasskey(wallet: Address, imageHash: Hex) Promise~PasskeySigner~
  }

  class Wallets {
    -shared: Shared
    +Wallets(shared: Shared)
    +startSignUp(args: StartSignUpArgs) Promise~any~
    +login(args: LoginArgs) Promise~any~
    -isPasskeySigner(signer: unknown) boolean
  }

  class Shared {
    +sequence: Sequence
    +databases: Databases
    +env: WdkEnv
    +passkeyProvider: PasskeyProvider
  }

  class ManagerOptions {
    +env: WdkEnv
    +passkeyProvider: PasskeyProvider
  }

  class ResolvedManagerOptions {
    +env: WdkEnv
    +passkeyProvider: PasskeyProvider
  }

  class Manager {
    -ops: ResolvedManagerOptions
    -passkeysHandler: PasskeysHandler
    +Manager(options: ManagerOptions)
  }

  PasskeyProvider <|.. DefaultPasskeyProvider
  PasskeySigner <|.. CorePasskey

  DefaultPasskeyProvider ..> CorePasskey

  PasskeysHandler --> PasskeyProvider
  PasskeysHandler --> PasskeySigner

  Shared --> PasskeyProvider
  Wallets --> Shared
  Wallets --> PasskeySigner

  ManagerOptions --> PasskeyProvider
  ResolvedManagerOptions --> PasskeyProvider
  Manager --> ResolvedManagerOptions
  Manager --> PasskeysHandler
Loading

Class diagram for DappClient ETHAuth types and storage integration

classDiagram
  class EthAuthSettings {
    +app: string
    +expiry: number
    +origin: string
    +nonce: number
  }

  class ETHAuthProof {
    +typedData: TypedDataToSign
    +ewtString: string
  }

  class CreateNewSessionPayload {
    +origin: string
    +session: ExplicitSession
    +includeImplicitSession: boolean
    +ethAuth: EthAuthSettings
    +preferredLoginMethod: LoginMethod
    +email: string
  }

  class CreateNewSessionResponse {
    +session: ExplicitSession
    +walletAddress: Address
    +userEmail: string
    +loginMethod: LoginMethod
    +guard: GuardConfig
    +ethAuthProof: ETHAuthProof
  }

  class SequenceStorage {
    <<interface>>
    +saveEthAuthProof(proof: ETHAuthProof) Promise~void~
    +getEthAuthProof() Promise~ETHAuthProof~
    +clearEthAuthProof() Promise~void~
  }

  class WebStorage {
    +saveEthAuthProof(proof: ETHAuthProof) Promise~void~
    +getEthAuthProof() Promise~ETHAuthProof~
    +clearEthAuthProof() Promise~void~
  }

  class ChainSessionManager {
    -sequenceStorage: SequenceStorage
    +connect(options: ConnectOptions) Promise~void~
    +_saveEthAuthProofIfProvided(ethAuthProof: ETHAuthProof) Promise~void~
  }

  class DappClient {
    -sequenceStorage: SequenceStorage
    +connect(options: ConnectOptions) Promise~void~
    +getEthAuthProof() Promise~ETHAuthProof~
  }

  SequenceStorage <|.. WebStorage

  ChainSessionManager --> SequenceStorage
  ChainSessionManager --> CreateNewSessionPayload
  ChainSessionManager --> CreateNewSessionResponse
  ChainSessionManager --> ETHAuthProof

  DappClient --> ChainSessionManager
  DappClient --> SequenceStorage
  DappClient --> EthAuthSettings
  DappClient --> ETHAuthProof
Loading

File-Level Changes

Change Details Files
Introduce env abstraction layers for core and WDK and wire them through managers, handlers, DBs, cron, and identity flows instead of using global browser APIs directly.
  • Add CoreEnv and resolveCoreEnv in wallet-core/env to encapsulate fetch, crypto, storage, indexedDB, and text encoders/decoders, and refactor EncryptedPksDb and IndexedDbStore to use it
  • Add WdkEnv/resolveWdkEnv in wallet-wdk/env to extend CoreEnv with timers, locks, navigation, and URLSearchParams, and thread env through ManagerOptions/ResolvedManagerOptions, Shared, Manager construction, and handlers
  • Update ManagerOptions defaults and applyManagerOptionsDefaults to resolve env, construct env-aware DBs and state provider, require a stateProvider when no fetch is available, and return a strongly typed ResolvedManagerOptions
packages/wallet/core/src/env.ts
packages/wallet/wdk/src/env.ts
packages/wallet/wdk/src/sequence/manager.ts
packages/wallet/wdk/src/sequence/cron.ts
packages/wallet/wdk/src/sequence/handlers/identity.ts
packages/wallet/wdk/src/dbs/auth-keys.ts
packages/wallet/wdk/src/index.ts
packages/wallet/core/src/index.ts
packages/wallet/core/src/state/local/indexed-db.ts
packages/wallet/core/src/signers/pk/encrypted.ts
Make passkey handling injectable via a PasskeyProvider interface and add WebAuthn abstraction to passkey signer.
  • Define PasskeySigner and PasskeyProvider interfaces and defaultPasskeyProvider implementation, exporting them from the sequence index
  • Refactor Wallets and PasskeysHandler to use an injected passkeyProvider instead of directly using Signers.Passkey.Passkey factory/static methods and add a runtime type guard for passkey signers
  • Extend passkey signer with a WebAuthnLike abstraction and options for create/find/loadFromWitness, and normalize passkey signatures via Config.normalizeSignerSignature before storing
packages/wallet/wdk/src/sequence/passkeys-provider.ts
packages/wallet/wdk/src/sequence/index.ts
packages/wallet/wdk/src/sequence/manager.ts
packages/wallet/wdk/src/sequence/wallets.ts
packages/wallet/wdk/src/sequence/handlers/passkeys.ts
packages/wallet/core/src/signers/passkey.ts
Add ETHAuth integration to the dapp client, including request parameters, response payloads, storage, and a convenience accessor.
  • Extend dapp-client types with EthAuthSettings and ETHAuthProof, and include ethAuth/ethAuthProof fields on CreateNewSessionPayload and CreateNewSessionResponse
  • Persist ETHAuth proof in WebStorage via new save/get/clearEthAuthProof methods keyed in IndexedDB and included in clearAll
  • Update ChainSessionManager connect and redirect flows to forward ethAuth options to the wallet and save proofs when present
  • Expose getEthAuthProof on DappClient and re-export EthAuthSettings/ETHAuthProof from the public index
  • Add a dedicated dapp-client ETHAuth proof test file (skeleton)
packages/wallet/dapp-client/src/types/index.ts
packages/wallet/dapp-client/src/utils/storage.ts
packages/wallet/dapp-client/src/ChainSessionManager.ts
packages/wallet/dapp-client/src/DappClient.ts
packages/wallet/dapp-client/src/index.ts
packages/wallet/dapp-client/test/ethauth-proof.test.ts
Harden and generalize usage of timers, storage, locks, crypto, URL APIs, and error handling for cron, identity, OTP/authcode flows, and primitives.
  • Update Cron scheduler to use env-provided timers, optional navigator.locks, and env.storage instead of global setInterval/clearInterval/localStorage, with extracted runJobs and robust AbortError detection
  • Refactor IdentityHandler/IdentitySigner and OTP/AuthCode(AuthCodePkce) handlers to resolve crypto via env, pass crypto into toIdentityAuthKey, and remove direct window.crypto/URLSearchParams access via injectable env/navigation/urlSearchParams
  • Improve AuthKeys expiry handling to use env timers instead of window.setTimeout/clearTimeout
  • Switch recovery address comparisons and trimTopology to use Address.isEqual and wrap Recovery.fetchQueuedPayloads per-provider in try/catch to avoid bailing on failures
  • Make DevHttpProvider and PimlicoBundler accept injectable fetch implementations with runtime availability checks, and make Sequence state Provider require a fetcher instance
  • Avoid leaking internal parse errors from primitives CLI server JSON-RPC handler by returning a generic parse error message only
packages/wallet/wdk/src/sequence/cron.ts
packages/wallet/wdk/src/sequence/recovery.ts
packages/wallet/wdk/src/sequence/handlers/identity.ts
packages/wallet/wdk/src/sequence/handlers/otp.ts
packages/wallet/wdk/src/sequence/handlers/authcode.ts
packages/wallet/wdk/src/sequence/handlers/authcode-pkce.ts
packages/wallet/wdk/src/identity/signer.ts
packages/wallet/wdk/src/dbs/auth-keys.ts
packages/wallet/core/src/state/remote/dev-http.ts
packages/wallet/core/src/bundler/bundlers/pimlico.ts
packages/wallet/core/src/state/sequence/index.ts
packages/wallet/primitives/src/extensions/recovery.ts
packages/wallet/primitives-cli/src/subcommands/server.ts
Add new network support and upgrade package versions for a new beta.16 release with changesets.
  • Introduce ETHERLINK_SHADOWNET_TESTNET chain ID and update the corresponding network entry in Network.ALL with correct metadata and RPC/explorer URLs
  • Bump versions of core service, wallet, and utils packages from 3.0.0-beta.14 to 3.0.0-beta.16 (and .15 in changelogs) and add changelog entries noting ETHAuth support and chain/fix updates
  • Add changeset files documenting patch bumps for ETHAuth support and new chains/fixes
  • Update pre.json to reflect the new prerelease state
packages/wallet/primitives/src/network.ts
packages/services/api/CHANGELOG.md
packages/services/builder/CHANGELOG.md
packages/services/guard/CHANGELOG.md
packages/services/identity-instrument/CHANGELOG.md
packages/services/indexer/CHANGELOG.md
packages/services/marketplace/CHANGELOG.md
packages/services/metadata/CHANGELOG.md
packages/services/relayer/CHANGELOG.md
packages/services/userdata/CHANGELOG.md
packages/utils/abi/CHANGELOG.md
packages/wallet/core/CHANGELOG.md
packages/wallet/dapp-client/CHANGELOG.md
packages/wallet/primitives/CHANGELOG.md
packages/wallet/wdk/CHANGELOG.md
packages/services/api/package.json
packages/services/builder/package.json
packages/services/guard/package.json
packages/services/identity-instrument/package.json
packages/services/indexer/package.json
packages/services/marketplace/package.json
packages/services/metadata/package.json
packages/services/relayer/package.json
packages/services/userdata/package.json
packages/utils/abi/package.json
packages/wallet/core/package.json
packages/wallet/dapp-client/package.json
packages/wallet/primitives/package.json
packages/wallet/wdk/package.json
.changeset/all-rings-bow.md
.changeset/brave-papayas-join.md
.changeset/pre.json
Add a full wagmi-based demo project and various repo-level configs (CI, issue templates, SECURITY) and minor utilities.
  • Introduce a new wagmi-project React/Vite demo dapp showcasing Sequence wallet integration, ETHAuth verification, and multiple interactions (connect, sign, send transactions, read balances) with its own TS/Vite config and styling
  • Add CircleCI and Azure Pipelines sample configs plus Codesandbox tasks, FUNDING, CNAME, SECURITY, and GitHub issue templates for bugs, features, and custom issues
  • Add cryptographically secure ID generation in DappTransport using crypto.getRandomValues instead of Math.random
  • Adjust GitHub Actions workflows to install dependencies without frozen lockfile before tests/build, and tweak pnpm-format-label workflow permissions
wagmi-project/src/App.tsx
wagmi-project/src/main.tsx
wagmi-project/src/wagmi.ts
wagmi-project/src/index.css
wagmi-project/src/vite-env.d.ts
wagmi-project/index.html
wagmi-project/package.json
wagmi-project/tsconfig.json
wagmi-project/tsconfig.node.json
wagmi-project/vite.config.ts
wagmi-project/README.md
wagmi-project/.gitignore
wagmi-project/.npmrc
wagmi-project/biome.json
.github/workflows/tests.yml
.github/workflows/on_pr_pnpm-format-label.yml
.github/ISSUE_TEMPLATE/bug_report.md
.github/ISSUE_TEMPLATE/feature_request.md
.github/ISSUE_TEMPLATE/custom.md
SECURITY.md
CNAME
FUNDING.json
.codesandbox/tasks.json
.circleci/config.yml
azure-pipelines.yml
packages/wallet/dapp-client/src/DappTransport.ts

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@snyk-io
Copy link
Copy Markdown

snyk-io bot commented Feb 13, 2026

Snyk checks have failed. 1 issues have been found so far.

Status Scanner Critical High Medium Low Total (1)
Open Source Security 0 0 0 0 0 issues
Code Security 0 1 0 0 1 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

Copy link
Copy Markdown

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @Dargon789, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello @Dargon789, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces significant updates across several core packages, focusing on enhancing the relayer and userdata services, improving environment abstraction for better testability, and integrating ETHAuth proof handling in the dapp client. It also refines passkey management, updates network configurations, and includes a broad range of dependency and version updates to ensure stability and incorporate the latest features.

Highlights

  • Relayer Service Enhancements: The feeOptions method in the relayer service has been updated to include a to address parameter, ensuring more precise fee calculations based on the transaction's destination. This change is reflected across the Relayer interface and its various implementations (RPC, EIP6963, Local, PK, and Sequence relayer).
  • Userdata Service Expansion: The userdata.gen.ts file has been significantly expanded with new RPC methods and schema types, introducing comprehensive capabilities for managing wallet preferences, signers, sessions, contacts, watched wallets, discover favorites/history, token favorites, and hidden tokens.
  • Environment Abstraction and Testability: New CoreEnv and WdkEnv types have been introduced in wallet-core and wallet-wdk respectively, providing a standardized way to abstract environment-specific APIs like fetch, crypto, localStorage, indexedDB, setTimeout, clearTimeout, navigator.locks, and URLSearchParams. This refactoring improves modularity and testability across the codebase.
  • ETHAuth Proof Handling in Dapp Client: The dapp-client now supports ETHAuth proofs, allowing dapps to request and persist these proofs during the connection flow. This includes new types (EthAuthSettings, ETHAuthProof), storage mechanisms, and methods for retrieving proofs.
  • Passkey Management Improvements: The Passkey signer in wallet-core has been refactored to use a WebAuthnLike abstraction, enhancing flexibility and testability for WebAuthn operations. Additionally, a PasskeyProvider abstraction has been introduced in wallet-wdk to centralize passkey creation, discovery, and loading logic.
  • Network Configuration Update: The ETHERLINK_SHADOWNET_TESTNET chain ID and its corresponding network configuration have been added to wallet-primitives, expanding the supported networks.
  • Dependency and Version Bumps: Numerous internal @0xsequence packages have had their beta versions updated from 3.0.0-beta.6 to 3.0.0-beta.16. External dependencies like next, @emnapi/runtime, caniuse-lite, semver, and turbo have also been updated to their latest versions.
Changelog
  • .changeset/all-rings-bow.md
    • Added 'ethauth support' entry.
  • .changeset/brave-papayas-join.md
    • Added 'New chains, minor fixes' entry.
  • .changeset/bright-pots-hope.md
    • Added 'Beta release with dapp connector fixes' entry.
  • .changeset/crisp-zoos-retire.md
    • Added 'dapp-client updates' entry.
  • .changeset/free-tips-switch.md
    • Added '3.0.0 beta' entry.
  • .changeset/new-turkeys-double.md
    • Added 'Apple auth fixes' entry.
  • .changeset/nice-tips-slide.md
    • Added 'Apple auth fix' entry.
  • .changeset/nine-areas-fall.md
    • Added 'Userdata service updates' entry.
  • .changeset/pre.json
    • Updated beta versions for all @0xsequence packages from 3.0.0-beta.5 to 3.0.0-beta.15.
    • Added new changeset entries: all-rings-bow, brave-papayas-join, bright-pots-hope, crisp-zoos-retire, free-tips-switch, new-turkeys-double, nice-tips-slide, nine-areas-fall, smart-cups-exist, tiny-files-chew.
  • .changeset/smart-cups-exist.md
    • Added 'Relayer fee options fix' entry.
  • .changeset/tiny-files-chew.md
    • Added 'dapp client updates for EOA login' entry.
  • extras/docs/package.json
    • Updated next dependency from ^15.5.9 to ^15.5.10.
  • extras/web/package.json
    • Updated next dependency from ^15.5.9 to ^15.5.10.
  • packages/services/api/CHANGELOG.md
    • Added changelog entries for beta versions 3.0.0-beta.7 through 3.0.0-beta.16.
  • packages/services/api/package.json
    • Updated package version from 3.0.0-beta.6 to 3.0.0-beta.16.
  • packages/services/builder/CHANGELOG.md
    • Added changelog entries for beta versions 3.0.0-beta.7 through 3.0.0-beta.16.
  • packages/services/builder/package.json
    • Updated package version from 3.0.0-beta.6 to 3.0.0-beta.16.
  • packages/services/guard/CHANGELOG.md
    • Added changelog entries for beta versions 3.0.0-beta.7 through 3.0.0-beta.16.
  • packages/services/guard/package.json
    • Updated package version from 3.0.0-beta.6 to 3.0.0-beta.16.
  • packages/services/identity-instrument/CHANGELOG.md
    • Added changelog entries for beta versions 3.0.0-beta.7 through 3.0.0-beta.16.
  • packages/services/identity-instrument/package.json
    • Updated package version from 3.0.0-beta.6 to 3.0.0-beta.16.
  • packages/services/indexer/CHANGELOG.md
    • Added changelog entries for beta versions 3.0.0-beta.7 through 3.0.0-beta.16.
  • packages/services/indexer/package.json
    • Updated package version from 3.0.0-beta.6 to 3.0.0-beta.16.
  • packages/services/marketplace/CHANGELOG.md
    • Added changelog entries for beta versions 3.0.0-beta.7 through 3.0.0-beta.16.
  • packages/services/marketplace/package.json
    • Updated package version from 3.0.0-beta.6 to 3.0.0-beta.16.
  • packages/services/metadata/CHANGELOG.md
    • Added changelog entries for beta versions 3.0.0-beta.7 through 3.0.0-beta.16.
  • packages/services/metadata/package.json
    • Updated package version from 3.0.0-beta.6 to 3.0.0-beta.16.
  • packages/services/relayer/CHANGELOG.md
    • Added changelog entries for beta versions 3.0.0-beta.7 through 3.0.0-beta.16, including updated dependencies.
  • packages/services/relayer/package.json
    • Updated package version from 3.0.0-beta.6 to 3.0.0-beta.16.
  • packages/services/relayer/src/relayer/relayer.ts
    • Added to parameter to the feeOptions interface.
  • packages/services/relayer/src/relayer/rpc-relayer/index.ts
    • Added to parameter to the feeOptions implementation and updated the to field in the client call.
  • packages/services/relayer/src/relayer/standard/eip6963.ts
    • Added to parameter to feeOptions and passed it to the underlying relayer.
  • packages/services/relayer/src/relayer/standard/local.ts
    • Added _to parameter to feeOptions and removed the decodeCalls method.
  • packages/services/relayer/src/relayer/standard/pk-relayer.ts
    • Added to parameter to feeOptions and passed it to the underlying relayer.
  • packages/services/relayer/src/relayer/standard/sequence.ts
    • Added to parameter to feeOptions and removed the redundant to = wallet assignment.
  • packages/services/relayer/test/relayer/relayer.test.ts
    • Updated feeOptions test call to include TEST_TO_ADDRESS.
  • packages/services/userdata/CHANGELOG.md
    • Added changelog entries for beta versions 3.0.0-beta.7 through 3.0.0-beta.16.
  • packages/services/userdata/package.json
    • Updated package version from 3.0.0-beta.6 to 3.0.0-beta.16.
  • packages/services/userdata/src/userdata.gen.ts
    • Updated the schema hash.
    • Added numerous new RPC methods and schema types for wallet preferences, signers, sessions, contacts, watched wallets, discover favorites/history, token favorites, and hidden tokens.
  • packages/utils/abi/CHANGELOG.md
    • Added changelog entries for beta versions 3.0.0-beta.7 through 3.0.0-beta.16.
  • packages/utils/abi/package.json
    • Updated package version from 3.0.0-beta.6 to 3.0.0-beta.16.
  • packages/wallet/core/CHANGELOG.md
    • Added changelog entries for beta versions 3.0.0-beta.7 through 3.0.0-beta.16, including updated dependencies.
  • packages/wallet/core/package.json
    • Updated package version from 3.0.0-beta.6 to 3.0.0-beta.16.
  • packages/wallet/core/src/bundler/bundlers/pimlico.ts
    • Added a fetcher property and constructor parameter, utilizing it for RPC calls.
  • packages/wallet/core/src/env.ts
    • Added new file defining StorageLike, CryptoLike, TextEncodingLike, CoreEnv types, and a resolveCoreEnv function for environment abstraction.
  • packages/wallet/core/src/index.ts
    • Exported contents from env.ts.
  • packages/wallet/core/src/signers/passkey.ts
    • Introduced WebAuthnLike type.
    • Added webauthn property to PasskeyOptions, CreatePasskeyOptions, and FindPasskeyOptions.
    • Updated the Passkey class to use the webauthn abstraction for WebAuthn operations.
  • packages/wallet/core/src/signers/pk/encrypted.ts
    • Updated EncryptedPksDb and EncryptedPkStore to use CoreEnv for accessing indexedDB, localStorage, crypto, and TextEncoder/Decoder.
  • packages/wallet/core/src/state/local/indexed-db.ts
    • Updated IndexedDbStore to use CoreEnv for accessing indexedDB.
  • packages/wallet/core/src/state/remote/dev-http.ts
    • Added a fetcher property and constructor parameter, utilizing it for HTTP requests.
  • packages/wallet/core/src/state/sequence/index.ts
    • Added a fetcher parameter to the constructor, using it for Sessions initialization.
  • packages/wallet/dapp-client/CHANGELOG.md
    • Added changelog entries for beta versions 3.0.0-beta.7 through 3.0.0-beta.16, including updated dependencies.
  • packages/wallet/dapp-client/package.json
    • Updated package version from 3.0.0-beta.6 to 3.0.0-beta.16.
  • packages/wallet/dapp-client/src/ChainSessionManager.ts
    • Added EthAuthSettings and ETHAuthProof types.
    • Included ethAuth option in the connect payload.
    • Implemented logic to save ETHAuth proofs.
    • Removed expired signer refresh logic.
    • Implemented call fingerprinting and caching for feeOptions and sendTransaction.
  • packages/wallet/dapp-client/src/DappClient.ts
    • Added EthAuthSettings and ETHAuthProof types.
    • Included ethAuth option in connect methods.
    • Added a getEthAuthProof method.
  • packages/wallet/dapp-client/src/DappTransport.ts
    • Simplified _onMessage source validation logic.
  • packages/wallet/dapp-client/src/index.ts
    • Exported new types: TransportMessage, EthAuthSettings, ETHAuthProof.
    • Exported new utility functions: createExplicitSessionConfig, getNetwork, getRelayerUrl, getRpcUrl, VALUE_FORWARDER_ADDRESS.
    • Exported Network from wallet-primitives.
  • packages/wallet/dapp-client/src/types/index.ts
    • Added LoginMethod 'eoa'.
    • Introduced EthAuthSettings and ETHAuthProof interfaces.
    • Added ethAuth to CreateNewSessionPayload and CreateNewSessionResponse.
  • packages/wallet/dapp-client/src/utils/index.ts
    • Added createExplicitSessionConfig function.
    • Introduced SessionDuration, NativeTokenSpending, and ExplicitSessionParams types.
    • Exported VALUE_FORWARDER_ADDRESS.
  • packages/wallet/dapp-client/src/utils/storage.ts
    • Added ETH_AUTH_PROOF_IDB_KEY.
    • Implemented saveEthAuthProof, getEthAuthProof, and clearEthAuthProof methods in SequenceStorage and WebStorage.
  • packages/wallet/dapp-client/test/ethauth-proof.test.ts
    • Added new test file for ETHAuth proof persistence.
  • packages/wallet/primitives/CHANGELOG.md
    • Added changelog entries for beta versions 3.0.0-beta.7 through 3.0.0-beta.16.
  • packages/wallet/primitives/package.json
    • Updated package version from 3.0.0-beta.6 to 3.0.0-beta.16.
  • packages/wallet/primitives/src/extensions/recovery.ts
    • Updated trimTopology to use Address.isEqual for signer comparison.
  • packages/wallet/primitives/src/network.ts
    • Added ETHERLINK_SHADOWNET_TESTNET chain ID and its network configuration.
  • packages/wallet/wdk/CHANGELOG.md
    • Added changelog entries for beta versions 3.0.0-beta.7 through 3.0.0-beta.16, including updated dependencies.
  • packages/wallet/wdk/package.json
    • Updated package version from 3.0.0-beta.6 to 3.0.0-beta.16.
  • packages/wallet/wdk/src/dbs/auth-keys.ts
    • Added env parameter to the constructor and utilized env.timers for setTimeout and clearTimeout.
  • packages/wallet/wdk/src/env.ts
    • Added new file defining TimersLike, LockManagerLike, NavigationLike, WdkEnv types, and a resolveWdkEnv function for environment abstraction.
  • packages/wallet/wdk/src/identity/signer.ts
    • Added crypto parameter to toIdentityAuthKey and IdentitySigner constructor, using it for WebCrypto operations.
  • packages/wallet/wdk/src/index.ts
    • Exported contents from env.ts.
  • packages/wallet/wdk/src/sequence/cron.ts
    • Added env property and utilized env.timers for setInterval and clearInterval, env.locks for navigator.locks, and env.storage for localStorage.
  • packages/wallet/wdk/src/sequence/handlers/authcode-pkce.ts
    • Added env parameter to the constructor and used this.serializeQuery instead of new URLSearchParams.
  • packages/wallet/wdk/src/sequence/handlers/authcode.ts
    • Added env parameter to the constructor.
    • Introduced serializeQuery method using env.urlSearchParams.
    • Added getNavigation method using env.navigation.
    • Removed scope parameter for Apple authentication.
  • packages/wallet/wdk/src/sequence/handlers/identity.ts
    • Added env property and constructor parameter, using env.crypto for WebCrypto operations.
  • packages/wallet/wdk/src/sequence/handlers/otp.ts
    • Added env parameter to the constructor.
  • packages/wallet/wdk/src/sequence/handlers/passkeys.ts
    • Introduced PasskeyProvider abstraction.
    • Added passkeyProvider to the constructor.
    • Updated passkey creation, loading, and signing to use the new provider.
  • packages/wallet/wdk/src/sequence/index.ts
    • Exported defaultPasskeyProvider and PasskeyProvider types.
  • packages/wallet/wdk/src/sequence/manager.ts
    • Added env and passkeyProvider to ManagerOptions and ResolvedManagerOptions.
    • Updated applyManagerOptionsDefaults to resolve environment dependencies and pass them to relevant constructors.
    • Updated PasskeysHandler and identity handlers to use the new env and passkeyProvider.
  • packages/wallet/wdk/src/sequence/passkeys-provider.ts
    • Added new file defining PasskeySigner and PasskeyProvider types, and a defaultPasskeyProvider implementation.
  • packages/wallet/wdk/src/sequence/recovery.ts
    • Updated removeRecoverySigner to use Address.isEqual.
    • Added error handling for fetchQueuedPayloads.
  • packages/wallet/wdk/src/sequence/transactions.ts
    • Modified feeOptions call to pass the correct to address based on wallet deployment status.
  • packages/wallet/wdk/src/sequence/wallets.ts
    • Updated createSigner and login methods to use passkeyProvider for passkey operations.
    • Added isPasskeySigner helper function.
  • packages/wallet/wdk/test/authcode.test.ts
    • Added test to ensure scope is not present for Apple authentication.
  • pnpm-lock.yaml
    • Updated various package versions, including next, @emnapi/runtime, caniuse-lite, semver, and turbo and its platform-specific packages.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@Dargon789 Dargon789 self-assigned this Feb 13, 2026
@Dargon789 Dargon789 added bug Something isn't working documentation Improvements or additions to documentation enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers invalid This doesn't seem right dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code labels Feb 13, 2026
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This is a substantial pull request that introduces several major features and improvements across the wallet-sdk. Key changes include the addition of ETHAuth support, a comprehensive environment abstraction layer (CoreEnv and WdkEnv) to decouple from browser-specific APIs, and a pluggable PasskeyProvider for greater flexibility. The relayer API has also been updated for more explicit transaction destination handling.

The code quality is high, and the architectural changes for environment abstraction are well-executed, enhancing portability and testability. I've found one medium-severity issue related to URL query serialization in non-browser environments, for which I've provided a suggestion. Overall, this is an excellent set of updates that significantly modernizes the codebase.

@Dargon789 Dargon789 linked an issue Feb 19, 2026 that may be closed by this pull request
@Dargon789 Dargon789 closed this Feb 22, 2026
auto-merge was automatically disabled February 22, 2026 20:16

Pull request was closed

@github-project-automation github-project-automation bot moved this from Todo to Done in web3-Defi-Gamefi Feb 22, 2026
@github-project-automation github-project-automation bot moved this from Backlog to Done in Hardhat Feb 22, 2026
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 28, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
sequence-js-docs Ready Ready Preview, Comment Mar 28, 2026 2:01am
sequence-js-web Ready Ready Preview, Comment Mar 28, 2026 2:01am
sequence.js Ready Ready Preview, Comment Mar 28, 2026 2:01am
wagmi-project Ready Ready Preview, Comment Mar 28, 2026 2:01am

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed invalid This doesn't seem right javascript Pull requests that update javascript code

Projects

Archived in project
Status: Done

4 participants