Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
91 changes: 0 additions & 91 deletions .changeset/eip5792-implementation.md

This file was deleted.

2 changes: 1 addition & 1 deletion examples/node.js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"sdk_client": "yarn execute src/sdk_client.ts"
},
"dependencies": {
"@delvtech/drift": "^0.10.0",
"@delvtech/drift": "^0.10.1",
"@gud/math": "^1.0.0"
},
"devDependencies": {
Expand Down
8 changes: 4 additions & 4 deletions examples/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
"preview": "vite preview"
},
"dependencies": {
"@delvtech/drift": "^0.10.0",
"@delvtech/drift-ethers": "^0.10.0",
"@delvtech/drift-viem": "^0.10.0",
"@delvtech/drift-web3": "^0.10.0",
"@delvtech/drift": "^0.10.1",
"@delvtech/drift-ethers": "^0.10.1",
"@delvtech/drift-viem": "^0.10.1",
"@delvtech/drift-web3": "^0.10.1",
"@gud/math": "^1.0.0",
"@rainbow-me/rainbowkit": "^2.2.8",
"@tanstack/react-query": "^5.81.2",
Expand Down
2 changes: 2 additions & 0 deletions packages/drift-ethers-v5/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# @delvtech/drift-ethers-v5

## 0.10.1

## 0.10.0

### Patch Changes
Expand Down
6 changes: 3 additions & 3 deletions packages/drift-ethers-v5/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@delvtech/drift-ethers-v5",
"description": "Ethers.js v5 adapter for Drift",
"version": "0.10.0",
"version": "0.10.1",
"license": "Apache-2.0",
"type": "module",
"main": "dist/index.cjs",
Expand All @@ -28,11 +28,11 @@
"typecheck:watch": "tsc --noEmit --watch"
},
"peerDependencies": {
"@delvtech/drift": "^0.10.0",
"@delvtech/drift": "^0.10.1",
"ethers": "^5.7.2"
},
"devDependencies": {
"@delvtech/drift": "^0.10.0",
"@delvtech/drift": "^0.10.1",
"ethers": "^5.7.2",
"tsconfig-paths": "^4.2.0",
"tsup": "^8.5.0",
Expand Down
2 changes: 2 additions & 0 deletions packages/drift-ethers/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# @delvtech/drift-ethers

## 0.10.1

## 0.10.0

### Patch Changes
Expand Down
6 changes: 3 additions & 3 deletions packages/drift-ethers/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@delvtech/drift-ethers",
"description": "Ethers.js adapter for Drift",
"version": "0.10.0",
"version": "0.10.1",
"license": "Apache-2.0",
"type": "module",
"main": "dist/index.cjs",
Expand All @@ -28,11 +28,11 @@
"typecheck:watch": "tsc --noEmit --watch"
},
"peerDependencies": {
"@delvtech/drift": "^0.10.0",
"@delvtech/drift": "^0.10.1",
"ethers": "^6.14.4"
},
"devDependencies": {
"@delvtech/drift": "^0.10.0",
"@delvtech/drift": "^0.10.1",
"ethers": "^6.14.4",
"tsconfig-paths": "^4.2.0",
"tsup": "^8.5.0",
Expand Down
2 changes: 2 additions & 0 deletions packages/drift-viem/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# @delvtech/drift-viem

## 0.10.1

## 0.10.0

### Patch Changes
Expand Down
6 changes: 3 additions & 3 deletions packages/drift-viem/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@delvtech/drift-viem",
"description": "Viem adapter for Drift",
"version": "0.10.0",
"version": "0.10.1",
"license": "Apache-2.0",
"type": "module",
"main": "dist/index.cjs",
Expand All @@ -28,11 +28,11 @@
"typecheck:watch": "tsc --noEmit --watch"
},
"peerDependencies": {
"@delvtech/drift": "^0.10.0",
"@delvtech/drift": "^0.10.1",
"viem": "^2.31.4"
},
"devDependencies": {
"@delvtech/drift": "^0.10.0",
"@delvtech/drift": "^0.10.1",
"tsconfig-paths": "^4.2.0",
"tsup": "^8.5.0",
"typescript": "^5.8.3",
Expand Down
2 changes: 2 additions & 0 deletions packages/drift-web3/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# @delvtech/drift-web3

## 0.10.1

## 0.10.0

### Patch Changes
Expand Down
6 changes: 3 additions & 3 deletions packages/drift-web3/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@delvtech/drift-web3",
"description": "Web3.js adapter for Drift",
"version": "0.10.0",
"version": "0.10.1",
"license": "Apache-2.0",
"type": "module",
"main": "dist/Web3Adapter.cjs",
Expand All @@ -28,11 +28,11 @@
"typecheck:watch": "tsc --noEmit --watch"
},
"peerDependencies": {
"@delvtech/drift": "^0.10.0",
"@delvtech/drift": "^0.10.1",
"web3": "^4.16.0"
},
"devDependencies": {
"@delvtech/drift": "^0.10.0",
"@delvtech/drift": "^0.10.1",
"tsconfig-paths": "^4.2.0",
"tsup": "^8.5.0",
"typescript": "^5.8.3",
Expand Down
102 changes: 102 additions & 0 deletions packages/drift/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,107 @@
# @delvtech/drift

## 0.10.1

### Patch Changes

- b9fc425: EIP-5792 Wallet Call API Implementation

## 🚀 Features

**EIP-5792 Wallet Call API Support**

- Added complete [EIP-5792](https://www.eip5792.xyz) (Wallet Call API) implementation to all adapters with `getWalletCapabilities()`, `getCallsStatus()`, `showCallsStatus()`, and `sendCalls()` methods + comprehensive type definitions.
- Supports calls in a variety of formats including ABI function calls, ABI deploy calls, raw calldata, and raw bytecode (deployless) calls.
- Added methods for EIP-5792 functionality to `MockAdapter`:
- `onGetWalletCapabilities()`
- `onGetCallsStatus()`
- `onShowCallsStatus()`
- `onSendCalls()`
- Added `getWalletCallsStatusLabel()` util function for generating user-friendly labels for wallet call statuses.

**New Web Example Application**

- Added a React + TypeScript + Vite example application.
- Includes integration examples for all adapter types (default, ethers, viem, web3).
- Demonstrates EIP-5792 wallet call functionality.

## 🔧 Improvements

**Enhanced Testing Utilities**

- Added `randomSelection` utility for selecting random items from arrays.
- Added `createStubWalletCallsStatus` for testing EIP-5792 functionality.
- Improved `MockAdapter` with better type definitions and expanded functionality.
- Added method parameter types to exports:
- `OnReadParams`
- `OnSimulateWriteParams`
- `OnMulticallParams`
- `OnDeployParams`
- `OnWriteParams`
- `OnSendCallsParams`
- `StubMulticallCallParams`
- `StubWalletCallParams`.

**Call Preparation and Processing**

- Added `prepareCall` utility function for unified call preparation across different call types (function calls, deploy calls, encoded calls, bytecode calls).
- Enhanced multicall functionality to support mixed call types including encoded calls alongside ABI function calls.
- Improved call processing in all adapters by centralizing call preparation logic.

**Type System Enhancements**

- Added `BytecodeCallParams` type for bytecode-based calls without contract addresses.
- Improved type inference for multicall operations with mixed call types.
- Added `PartialByOptional` utility type for better optional property handling.

**Adapter Improvements**

- Better fallback handling for individual wallet call stub matching in `MockAdapter`.
- Refactored Web3 adapter to use injected provider for `getSignerAddress` and EIP-5792 calls.
- Improved internal adapter utilities and type safety.
- Added `NotImplementedError` as a generalized replacement for stub-specific errors.

**Client and Caching Enhancements**

- Enhanced multicall caching to support both function calls and encoded calls.
- Improved cache key generation for mixed call types.

**Utility Functions**

- Added `toHexString` utility for flexible hex string conversion
- Enhanced `isHexString` with configurable `prefix` option to control `0x` prefix enforcement.
- Improved `DriftError` to automatically use constructor name for subclasses.

## 🐛 Bug Fixes

**Package Configuration**

- Fixed `@delvtech/drift-web3` package.json fields to point to correct dist files.
- Updated gitignore files across all packages.

**Type Safety**

- Enhanced `FunctionCallParams` to infer function names even when `address` is missing.
- Improved adapter type definitions and method signatures.
- Better error handling and type checking throughout the codebase.
- Enhanced multicall type inference to support mixed call types (function calls, encoded calls, etc.).
- Improved readonly array handling for better immutability support.

## 📦 Dependencies

- Upgraded all dependencies to their latest versions.
- Updated Node.js version requirement (`.nvmrc`) to `v24`

## 🔄 Internal Changes

- Restructured examples directory with dedicated Node.js and web folders.
- Updated biome configuration (renamed from `.jsonc` to `.json`).
- Improved internal type utilities for better developer experience.

**Breaking Changes:** None

**Migration Guide:** This release is fully backward compatible. The new EIP-5792 functionality is opt-in and doesn't affect existing adapter usage patterns.

## 0.10.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/drift/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@delvtech/drift",
"description": "Effortless ethereum development across Web3 libraries",
"version": "0.10.0",
"version": "0.10.1",
"license": "Apache-2.0",
"type": "module",
"main": "dist/index.cjs",
Expand Down
Loading