@naculus/connect-appkit-react 0.2.1 → 0.2.3

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 +62 -1
  2. package/package.json +20 -20
package/README.md CHANGED
@@ -1,6 +1,11 @@
1
1
  # @naculus/connect-appkit-react
2
2
 
3
- **React bindings for Naculus Connect Web Components** — auto-generated React wrappers for all 24 Stencil components. Use `<ConnectButton>`, `<WalletModal>`, etc. as native React components.
3
+ **React bindings for Naculus Connect** — 54 hooks plus auto-generated React
4
+ wrappers for all 24 Stencil components.
5
+
6
+ The components are the smaller half. Two files in this package contain JSX; the
7
+ rest is connection state, capability negotiation, session keys, simulation and
8
+ transaction lifecycle, reachable as hooks.
4
9
 
5
10
  > **🔗 Wraps `@naculus/connect-appkit-wc`. If you need the raw Web Components or another framework, see the table below.**
6
11
 
@@ -31,6 +36,62 @@ function App() {
31
36
  }
32
37
  ```
33
38
 
39
+ ## Hooks
40
+
41
+ <!-- This list is the point of the package and was missing from the README that
42
+ npm renders, so people reading the npm page concluded the capability layer
43
+ did not exist. Keep it in step with `src/index.ts`. -->
44
+
45
+ **Connection** — `useAccount`, `useConnect`, `useDisconnect`, `useWallet`,
46
+ `useSession`, `useChain`, `useSwitchChain`, `useWeb3`, `useWeb3ErrorHandler`
47
+
48
+ **Capabilities and batched calls (EIP-5792)** — `useCapabilities`,
49
+ `useSendCalls`, `useExecuteCalls`
50
+
51
+ **Smart accounts and delegation (ERC-4337, EIP-7702)** — `useSmartAccount`,
52
+ `useSendUserOperation`, `useUserOpStatus`, `useDelegation`,
53
+ `useDelegationPolicy`
54
+
55
+ **Session keys** — `useCreateSessionKey`, `useSessionKeys`,
56
+ `useSendWithSession`, `useRevokeSession`
57
+
58
+ **Sign-in (EIP-4361 / CAIP-122)** — `useSIWxLogin`, `useSIWxSession`,
59
+ `useSiwxAuthSession`, `useSignInWithEthereum`, `useSignInWithX`,
60
+ `useSignMessage`
61
+
62
+ **Transactions** — `useSendTransaction`, `useTxMonitor`, `useTxHistory`,
63
+ `useLastTx`, `useSimulateTransfer`, `useTransactionSimulation`,
64
+ `useValidateDestination`
65
+
66
+ **Tokens and balances** — `useBalance`, `useTokenBalance`, `useTokenList`,
67
+ `useTokenSearch`, `useERC20Allowance`, `useERC20Approve`, `useERC20Transfer`,
68
+ `useERC20TransferSimulation`
69
+
70
+ **Routing** — `useRouteQuote`, `useExecuteRoute`, `useCompareCosts`
71
+
72
+ **Solana** — `useSolanaAccount`, `useSolanaBalance`, `useSolanaTransaction`
73
+
74
+ **Embedded wallet** — `useEmbeddedWallet`, `usePassphraseGate`
75
+
76
+ **Names** — `useResolveName`, `useLookupAddress`
77
+
78
+ **Other** — `useViemClient`, `useNotification`
79
+
80
+ ### Ask before executing
81
+
82
+ ```tsx
83
+ const { atomic } = useCapabilities();
84
+
85
+ if (atomic === "supported") {
86
+ await sendCalls(calls); // one batch, all or nothing
87
+ }
88
+ ```
89
+
90
+ `atomic` is `"supported" | "unsupported" | "unknown"`. A wallet that does not
91
+ implement `wallet_getCapabilities` has not said no — EIP-5792 is explicit that
92
+ absence is not a denial, and `"unknown"` also covers a query that failed or is
93
+ still in flight.
94
+
34
95
  ## License
35
96
 
36
97
  MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naculus/connect-appkit-react",
3
- "version": "0.2.1",
3
+ "version": "0.2.3",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",
@@ -22,18 +22,18 @@
22
22
  "README.md"
23
23
  ],
24
24
  "dependencies": {
25
- "@stencil/react-output-target": "^1.6.1",
26
- "viem": "^2.54.6",
27
- "@naculus/connect-core": "^0.2.0",
28
- "@naculus/connector-walletconnect": "^0.2.0",
29
- "@naculus/connector-evm-injected": "^0.2.0",
30
- "@naculus/connector-embedded": "^0.2.0",
31
- "@naculus/connector-passkeys": "^0.2.0",
32
- "@naculus/connector-solana": "^0.2.0",
33
- "@naculus/siwx": "^0.2.0",
34
- "@naculus/wallet-engine": "^0.2.0",
35
- "@naculus/connect-appkit-wc": "0.2.1",
36
- "@naculus/connect-appkit-core": "0.2.1"
25
+ "@naculus/connect-core": "^0.2.1",
26
+ "@naculus/connector-embedded": "^0.2.1",
27
+ "@naculus/connector-evm-injected": "^0.2.1",
28
+ "@naculus/connector-passkeys": "^0.2.1",
29
+ "@naculus/connector-solana": "^0.2.1",
30
+ "@naculus/connector-walletconnect": "^0.2.1",
31
+ "@naculus/siwx": "^0.2.1",
32
+ "@naculus/wallet-engine": "^0.2.1",
33
+ "@stencil/react-output-target": "^1.6.2",
34
+ "viem": "^2.56.5",
35
+ "@naculus/connect-appkit-core": "0.2.3",
36
+ "@naculus/connect-appkit-wc": "0.2.3"
37
37
  },
38
38
  "peerDependencies": {
39
39
  "react": "^18.0.0 || ^19.0.0"
@@ -42,12 +42,12 @@
42
42
  "access": "public"
43
43
  },
44
44
  "devDependencies": {
45
- "@testing-library/react": "^16.3.0",
46
- "@types/react": "^19.0.0",
47
- "jsdom": "^25.0.0 || ^26.0.0 || ^28.0.0",
48
- "react": "^19.0.0",
49
- "react-dom": "^19.0.0",
50
- "tsup": "^8.3.6",
45
+ "@testing-library/react": "^16.3.3",
46
+ "@types/react": "^19.3.0",
47
+ "jsdom": "^30.0.1",
48
+ "react": "^19.3.0",
49
+ "react-dom": "^19.3.0",
50
+ "tsup": "^8.5.1",
51
51
  "typescript": "^5.9.3"
52
52
  },
53
53
  "repository": {
@@ -67,7 +67,7 @@
67
67
  "react"
68
68
  ],
69
69
  "optionalDependencies": {
70
- "@naculus/connect-appkit-ui": "0.2.1"
70
+ "@naculus/connect-appkit-ui": "0.2.3"
71
71
  },
72
72
  "scripts": {
73
73
  "build": "tsup",