@valve-tech/wallet-adapter 0.11.2 → 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -6,6 +6,26 @@ this file.
6
6
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
7
7
  and this project adheres to [Semantic Versioning](https://semver.org/).
8
8
 
9
+ ## [0.12.0] — 2026-05-11
10
+
11
+ ### Added
12
+
13
+ - Three more `examples/` covering wallet-plumbing classes the
14
+ original five didn't reach (now 8 total):
15
+
16
+ | Example | Covers | Helper |
17
+ |---|---|---|
18
+ | `06-ethers-adapter.ts` | ethers v6 `Signer` (`BrowserProvider.getSigner()` or `Wallet`). For dapps still on ethers or mid-migration to viem. | `walletAdapterFromEthersSigner(...)` |
19
+ | `07-privy-embedded.ts` | Privy embedded wallets via `@privy-io/react-auth`'s `useWallets()`. Handles CAIP-2 chain encoding (`eip155:<id>`) and lazy provider fetching across wallet swaps. | `walletAdapterFromPrivyWallet(...)` |
20
+ | `08-safe-multisig.ts` | Safe (Gnosis Safe) multisig via `@safe-global/protocol-kit` + `@safe-global/api-kit`. **Returns a safeTxHash, not an on-chain tx hash** — UIs have to fork to await the executed hash separately. File header documents the consumer-visible implications. | `walletAdapterFromSafe(...)` |
21
+
22
+ Each follows the existing example shape (inline SDK type-stubs +
23
+ no-network sanity check) so the files typecheck and run without
24
+ any wallet libraries installed.
25
+
26
+ - README "Bridging a real wallet to `WalletAdapter`" table extended
27
+ from 5 to 8 rows.
28
+
9
29
  ## [0.11.2] — 2026-05-11
10
30
 
11
31
  ### Notes
package/README.md CHANGED
@@ -218,6 +218,9 @@ thing:
218
218
  | [`03-server-relayer.ts`](./examples/03-server-relayer.ts) | Backend code: relayer signing from a private key (env var / KMS). No provider, no chain-switching, hard-fail on cross-chain. Right for sponsored-tx services, indexer write paths, integration tests. | `walletAdapterFromRelayer(...)` |
219
219
  | [`04-erc4337-smart-account.ts`](./examples/04-erc4337-smart-account.ts) | ERC-4337 smart accounts via permissionless.js or similar. `adapter.address` is the smart-account address (not the EOA signer). | `walletAdapterFromSmartAccount(...)` |
220
220
  | [`05-hardware-wallet-direct.ts`](./examples/05-hardware-wallet-direct.ts) | Hardware wallets attached **directly** via USB/HID (no wallet app in between) — `@ledgerhq/hw-app-eth` for Ledger; the same shape works for Trezor via `@trezor/connect`. For backend code, kiosk apps, dev tooling. | `walletAdapterFromLedger(...)` |
221
+ | [`06-ethers-adapter.ts`](./examples/06-ethers-adapter.ts) | Dapps still on ethers v6 (or in mid-migration), bridging an `ethers.Signer` (`BrowserProvider.getSigner()` or `Wallet`) without re-wiring to viem. | `walletAdapterFromEthersSigner(...)` |
222
+ | [`07-privy-embedded.ts`](./examples/07-privy-embedded.ts) | Privy embedded wallets via `@privy-io/react-auth`'s `useWallets()`. Handles CAIP-2 chain encoding and lazy provider fetching across wallet swaps. | `walletAdapterFromPrivyWallet(...)` |
223
+ | [`08-safe-multisig.ts`](./examples/08-safe-multisig.ts) | Safe (Gnosis Safe) multisig via `@safe-global/protocol-kit` + `@safe-global/api-kit`. **Returns a safeTxHash, not an on-chain tx hash** — UIs need to fork to await the executed hash separately. | `walletAdapterFromSafe(...)` |
221
224
 
222
225
  Each example includes a no-network sanity check at the bottom so you
223
226
  can run it (`yarn tsx examples/0X-...ts`) without installing any of
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@valve-tech/wallet-adapter",
3
- "version": "0.11.2",
3
+ "version": "0.12.0",
4
4
  "description": "Framework-agnostic vocabulary + runtime helpers for EVM dapp wallet integration. WalletAdapter interface (sign + send), WriteHookParams full lifecycle with rich TxContext payloads (chainId + original request) on every event so consumers don't side-channel; six named hooks (onAwaitingSignature, onTransactionHash, onConfirmed, onFailed, onDropped, onReplaced) plus complementary onPhase(event) discriminated-union shape derived from the WritePhaseSteps phase-map; sendTransactionWithHooks + awaitReceiptWithHooks helpers that fire the hooks at real boundaries (with awaitReceiptWithHooks fetching the containing block once on behalf of all downstream consumers); typed WalletRejectedError + ContractRevertedError for instanceof-discriminated catch; plus TX_STATUS / TX_FLOW / TrackedTx for tx-state UI. Lets SDKs and dapps share one contract instead of each redefining it. Part of the valve-tech/evm-toolkit synchronized release line.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/valve-tech/evm-toolkit/tree/main/packages/wallet-adapter#readme",
@@ -49,7 +49,7 @@
49
49
  "prepare": "yarn build"
50
50
  },
51
51
  "dependencies": {
52
- "@valve-tech/viem-errors": "^0.11.2"
52
+ "@valve-tech/viem-errors": "^0.12.0"
53
53
  },
54
54
  "peerDependencies": {
55
55
  "viem": "^2.0.0"