Skip to content

feat: implement eip-1193 wallet helpers and unit tests#70

Open
NoobFaris wants to merge 1 commit into
Adamantine-guild:mainfrom
NoobFaris:feat/eip-1193-wallet-helpers
Open

feat: implement eip-1193 wallet helpers and unit tests#70
NoobFaris wants to merge 1 commit into
Adamantine-guild:mainfrom
NoobFaris:feat/eip-1193-wallet-helpers

Conversation

@NoobFaris

@NoobFaris NoobFaris commented Jun 20, 2026

Copy link
Copy Markdown

Description

Implements standard EIP-1193 browser wallet helper functions to safely detect, connect, and manage user wallet interactions within the SDK. This includes cross-platform stability fixes to ensure correct runtime script execution on legacy Windows operating systems.

The following utilities were added:

  • hasInjectedWallet: Detects the presence of an injected provider context safely across SSR and client rendering environments.
  • connectWallet: Handles requesting account arrays using eth_requestAccounts.
  • getChainId: Requests the current blockchain network hex ID via eth_chainId.
  • switchChain: Manages proactive user network switching contexts utilizing wallet_switchEthereumChain.

All helper implementations have been thoroughly evaluated via an explicit Vitest test suite (tests/wallet.test.ts), resulting in 6/6 passing unit tests out of the box.

Semver impact: minor

Linked Issue

Closes #

Type of Change

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

Linked Issue

Closes #60

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement EIP-1193 wallet provider helpers

1 participant