@tuwaio/satellite-evm 0.3.4 → 0.3.5

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.
Files changed (2) hide show
  1. package/README.md +30 -35
  2. package/package.json +9 -9
package/README.md CHANGED
@@ -4,24 +4,24 @@
4
4
  [![License](https://img.shields.io/npm/l/@tuwaio/satellite-evm.svg)](./LICENSE)
5
5
  [![Build Status](https://img.shields.io/github/actions/workflow/status/TuwaIO/satellite-connect/release.yml?branch=main)](https://github.com/TuwaIO/satellite-connect/actions)
6
6
 
7
- EVM-specific implementation for the Satellite ecosystem, providing comprehensive utilities and adapters for interacting with EVM wallets and chains.
7
+ Low-level EVM wallet connectivity adapters built strictly on top of `viem` and `wagmi` primitives for the TUWA Ecosystem.
8
8
 
9
9
  ---
10
10
 
11
11
  ## 🏛️ What is `@tuwaio/satellite-evm`?
12
12
 
13
- `@tuwaio/satellite-evm` is the EVM implementation of the Satellite ecosystem's wallet connection system. It provides specialized adapters and utilities for interacting with EVM-compatible wallets like MetaMask, WalletConnect, and others.
13
+ `@tuwaio/satellite-evm` is the low-level EVM network connection adapter (Tier 4) of the Satellite framework. It implements native connection watchers, cryptographic signature handlers, and smart contract verification layers directly on top of `viem` and `@wagmi/core`.
14
14
 
15
- Built on top of `@tuwaio/satellite-core`, this package integrates seamlessly with modern Web3 libraries like `viem` and `@wagmi/core`.
15
+ By bypassing proprietary wallet connection wrappers, this package ensures direct execution on raw client protocols and enforces strict RPC endpoint isolation.
16
16
 
17
17
  ---
18
18
 
19
- ## ✨ Key Features
19
+ ## ✨ Engineering Features
20
20
 
21
- - **Chain Management:** Built-in utilities for handling multiple EVM chains
22
- - **Type Safety:** Full TypeScript support with proper type definitions
23
- - **Wagmi Integration:** Seamless integration with @wagmi/core utilities
24
- - **Modern Architecture:** Built on Viem for optimal performance
21
+ - **Direct Wagmi Alignment:** Deep integration with `@wagmi/core` configurations, avoiding wrapper bloat.
22
+ - **Custom Connection Watchers:** Low-level event listener hooks tracking provider chain changes, account switches, and connection states.
23
+ - **Contract Wallet Checks:** Native, caching verification utilities (`checkIsWalletAddressContract`) for verifying EIP-1271 signatures or contract accounts.
24
+ - **RPC Transport Isolation:** Isolated transport rules with explicit path mapping using the `createDefaultTransports` controller.
25
25
 
26
26
  ---
27
27
 
@@ -35,9 +35,9 @@ Built on top of `@tuwaio/satellite-core`, this package integrates seamlessly wit
35
35
  ```bash
36
36
  # Using pnpm (recommended), but you can use npm, yarn or bun as well
37
37
  pnpm add @tuwaio/satellite-evm @tuwaio/satellite-core viem @wagmi/core immer zustand @tuwaio/orbit-core @tuwaio/orbit-evm
38
- ````
38
+ ```
39
39
 
40
- -----
40
+ ---
41
41
 
42
42
  ## 🚀 Quick Start
43
43
 
@@ -50,20 +50,17 @@ import { injected } from '@wagmi/connectors';
50
50
  import { mainnet, sepolia } from 'viem/chains';
51
51
  import type { Chain } from 'viem/chains';
52
52
 
53
- export const appEVMChains = [
54
- mainnet,
55
- sepolia,
56
- ] as readonly [Chain, ...Chain[]];
53
+ export const appEVMChains = [mainnet, sepolia] as readonly [Chain, ...Chain[]];
57
54
 
58
55
  export const wagmiConfig = createConfig({
59
- connectors: [injected()],
60
- transports: createDefaultTransports(appEVMChains), // Automatically creates http transports
61
- chains: appEVMChains,
62
- ssr: true, // Enable SSR support if needed (e.g., in Next.js)
56
+ connectors: [injected()],
57
+ transports: createDefaultTransports(appEVMChains), // Automatically creates http transports
58
+ chains: appEVMChains,
59
+ ssr: true, // Enable SSR support if needed (e.g., in Next.js)
63
60
  });
64
61
  ```
65
62
 
66
- -----
63
+ ---
67
64
 
68
65
  ## 🔌 Using the EVM Adapter
69
66
 
@@ -97,21 +94,21 @@ const queryClient = new QueryClient();
97
94
  function AppProviders({ children }: { children: React.ReactNode }) {
98
95
  return (
99
96
  <WagmiProvider config={wagmiConfig}>
100
- <QueryClientProvider client={queryClient}>
101
- <SatelliteConnectProvider
102
- adapter={evmAdapter} // Pass the EVM adapter
103
- autoConnect={true} // Optional: enable auto-connect
104
- >
105
- <EVMConnectorsWatcher wagmiConfig={wagmiConfig} /> {/* Manages EVM wallet state */}
106
- {children}
107
- </SatelliteConnectProvider>
108
- </QueryClientProvider>
97
+ <QueryClientProvider client={queryClient}>
98
+ <SatelliteConnectProvider
99
+ adapter={evmAdapter} // Pass the EVM adapter
100
+ autoConnect={true} // Optional: enable auto-connect
101
+ >
102
+ <EVMConnectorsWatcher wagmiConfig={wagmiConfig} /> {/* Manages EVM wallet state */}
103
+ {children}
104
+ </SatelliteConnectProvider>
105
+ </QueryClientProvider>
109
106
  </WagmiProvider>
110
107
  );
111
108
  }
112
109
  ```
113
110
 
114
- -----
111
+ ---
115
112
 
116
113
  ## 🔐 Sign-In with Ethereum (SIWE) Integration
117
114
 
@@ -150,7 +147,7 @@ function SatelliteSiweProvider({ children }: { children: ReactNode }) {
150
147
  }
151
148
 
152
149
  // Step 2: Compose all providers in the correct order
153
- // Create QueryClient
150
+ // Create QueryClient
154
151
  const queryClient = new QueryClient();
155
152
 
156
153
  function Providers({ children }: { children: ReactNode }) {
@@ -159,9 +156,7 @@ function Providers({ children }: { children: ReactNode }) {
159
156
  <QueryClientProvider client={queryClient}>
160
157
  {/* SIWE Provider must wrap SatelliteSiweProvider to provide context */}
161
158
  <SiweNextAuthProvider wagmiConfig={wagmiConfig} enabled={true}>
162
- <SatelliteSiweProvider>
163
- {children}
164
- </SatelliteSiweProvider>
159
+ <SatelliteSiweProvider>{children}</SatelliteSiweProvider>
165
160
  </SiweNextAuthProvider>
166
161
  </QueryClientProvider>
167
162
  </WagmiProvider>
@@ -179,7 +174,7 @@ function RootLayout({ children }: { children: React.ReactNode }) {
179
174
  }
180
175
  ```
181
176
 
182
- -----
177
+ ---
183
178
 
184
179
  - ## 🛠️ Core Utilities
185
180
 
@@ -187,7 +182,7 @@ function RootLayout({ children }: { children: React.ReactNode }) {
187
182
  - **`checkIsWalletAddressContract`**: Utility to check if a connected address is a smart contract address. The result is cached in memory.
188
183
  - **`createEVMConnectionsWatcher`**: Framework-agnostic utility to monitor wagmi connection changes and synchronize them with the global state store. Handles account switches, network changes, disconnections, and optional SIWE rejection scenarios. Returns a cleanup function.
189
184
 
190
- -----
185
+ ---
191
186
 
192
187
  ## 🤝 Contributing & Support
193
188
 
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@tuwaio/satellite-evm",
3
- "version": "0.3.4",
3
+ "version": "0.3.5",
4
4
  "private": false,
5
5
  "author": "Oleksandr Tkach",
6
6
  "license": "Apache-2.0",
7
- "description": "An adapter for the Satellite Connect that adds support for connect wallets on EVM-compatible chains. Integrates with Viem and Wagmi.",
7
+ "description": "Tier 4 of the TUWA Ecosystem. Low-level EVM wallet connectivity adapters built strictly on top of viem and wagmi primitives.",
8
8
  "main": "./dist/index.js",
9
9
  "module": "./dist/index.mjs",
10
10
  "types": "./dist/index.d.ts",
@@ -48,17 +48,17 @@
48
48
  "@tuwaio/satellite-core": ">=0.3.2"
49
49
  },
50
50
  "devDependencies": {
51
- "@wagmi/core": "^3.5.0",
52
- "@tuwaio/orbit-core": "^0.2.8",
53
- "@tuwaio/orbit-evm": "^0.2.13",
51
+ "@wagmi/core": "^3.5.1",
52
+ "@tuwaio/orbit-core": "^0.2.12",
53
+ "@tuwaio/orbit-evm": "^0.2.17",
54
54
  "immer": "^11.1.8",
55
55
  "jsdom": "^29.1.1",
56
56
  "tsup": "^8.5.1",
57
57
  "typescript": "^6.0.3",
58
- "viem": "^2.51.3",
59
- "vitest": "^4.1.7",
60
- "zustand": "^5.0.13",
61
- "@tuwaio/satellite-core": "^0.3.3"
58
+ "viem": "^2.53.1",
59
+ "vitest": "^4.1.9",
60
+ "zustand": "^5.0.14",
61
+ "@tuwaio/satellite-core": "^0.3.4"
62
62
  },
63
63
  "scripts": {
64
64
  "start": "tsup src/index.ts --watch",