@sodax/skills 2.2.0-rc.8 → 2.3.0-rc.1
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/AGENTS.md +11 -10
- package/README.md +5 -5
- package/package.json +6 -5
- package/skills/sodax-build/SKILL.md +3 -3
- package/skills/sodax-build/knowledge/README.md +1 -1
- package/skills/sodax-build/knowledge/feature-catalog.md +4 -0
- package/skills/sodax-build/knowledge/glossary.md +1 -0
- package/skills/sodax-build/knowledge/handoff.md +3 -0
- package/skills/sodax-build/knowledge/interview-guide.md +1 -0
- package/skills/sodax-dapp-kit/SKILL.md +23 -5
- package/skills/sodax-dapp-kit/auxiliary-services/SKILL.md +4 -1
- package/skills/sodax-dapp-kit/bridge/SKILL.md +1 -1
- package/skills/sodax-dapp-kit/integration/knowledge/ai-rules.md +3 -0
- package/skills/sodax-dapp-kit/integration/knowledge/architecture.md +18 -4
- package/skills/sodax-dapp-kit/integration/knowledge/features/auxiliary-services.md +31 -1
- package/skills/sodax-dapp-kit/integration/knowledge/features/bridge.md +8 -0
- package/skills/sodax-dapp-kit/integration/knowledge/features/leverage-yield.md +17 -3
- package/skills/sodax-dapp-kit/integration/knowledge/features/swap.md +24 -0
- package/skills/sodax-dapp-kit/integration/knowledge/recipes/README.md +1 -0
- package/skills/sodax-dapp-kit/integration/knowledge/recipes/bridge.md +2 -0
- package/skills/sodax-dapp-kit/integration/knowledge/recipes/dex.md +23 -8
- package/skills/sodax-dapp-kit/integration/knowledge/recipes/leverage-yield-product-anatomy.md +150 -0
- package/skills/sodax-dapp-kit/integration/knowledge/recipes/leverage-yield.md +122 -38
- package/skills/sodax-dapp-kit/integration/knowledge/recipes/swap.md +141 -1
- package/skills/sodax-dapp-kit/integration/knowledge/reference/hooks-index.md +14 -3
- package/skills/sodax-dapp-kit/integration/knowledge/reference/public-api.md +1 -1
- package/skills/sodax-dapp-kit/integration/knowledge/reference/querykey-conventions.md +8 -0
- package/skills/sodax-dapp-kit/leverage-yield/SKILL.md +27 -10
- package/skills/sodax-dapp-kit/swap/SKILL.md +3 -3
- package/skills/sodax-sdk/SKILL.md +2 -1
- package/skills/sodax-sdk/bridge/SKILL.md +3 -1
- package/skills/sodax-sdk/integration/knowledge/ai-rules.md +3 -0
- package/skills/sodax-sdk/integration/knowledge/architecture.md +1 -1
- package/skills/sodax-sdk/integration/knowledge/features/bridge-api.md +5 -3
- package/skills/sodax-sdk/integration/knowledge/features/bridge.md +8 -0
- package/skills/sodax-sdk/integration/knowledge/features/leverage-yield.md +81 -12
- package/skills/sodax-sdk/integration/knowledge/features/swap.md +68 -2
- package/skills/sodax-sdk/integration/knowledge/features/swaps-api.md +56 -2
- package/skills/sodax-sdk/integration/knowledge/reference/error-codes.md +27 -1
- package/skills/sodax-sdk/integration/knowledge/reference/public-api.md +30 -1
- package/skills/sodax-sdk/leverage-yield/SKILL.md +16 -8
- package/skills/sodax-sdk/migration-v1-to-v2/knowledge/breaking-changes/architecture.md +1 -1
- package/skills/sodax-sdk/migration-v1-to-v2/knowledge/reference/sodax-config.md +9 -1
- package/skills/sodax-sdk/swap/SKILL.md +3 -1
- package/skills/sodax-sdk/swaps-api/SKILL.md +3 -2
- package/skills/sodax-wallet-sdk-core/SKILL.md +20 -2
- package/skills/sodax-wallet-sdk-core/evm/SKILL.md +2 -1
- package/skills/sodax-wallet-sdk-core/integration/knowledge/README.md +1 -1
- package/skills/sodax-wallet-sdk-core/integration/knowledge/features/evm.md +6 -0
- package/skills/sodax-wallet-sdk-core/integration/knowledge/reference/interfaces.md +4 -1
- package/skills/sodax-wallet-sdk-core/migration-v1-to-v2/knowledge/README.md +1 -1
- package/skills/sodax-wallet-sdk-react/SKILL.md +20 -3
- package/skills/sodax-wallet-sdk-react/integration/knowledge/README.md +2 -1
- package/skills/sodax-wallet-sdk-react/integration/knowledge/ai-rules.md +2 -0
- package/skills/sodax-wallet-sdk-react/integration/knowledge/architecture.md +10 -6
- package/skills/sodax-wallet-sdk-react/integration/knowledge/examples/05-privy-email-login.tsx +157 -0
- package/skills/sodax-wallet-sdk-react/integration/knowledge/examples/README.md +1 -0
- package/skills/sodax-wallet-sdk-react/integration/knowledge/recipes/privy-email-login.md +111 -0
- package/skills/sodax-wallet-sdk-react/integration/knowledge/reference/api-surface.md +14 -0
- package/skills/sodax-wallet-sdk-react/integration/knowledge/reference/chain-support.md +1 -1
- package/skills/sodax-wallet-sdk-react/migration-v1-to-v2/knowledge/README.md +1 -1
- package/skills/sodax-wallet-sdk-react/privy/SKILL.md +53 -0
- package/skills/sodax-wallet-sdk-react/wallet-modal/SKILL.md +1 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sodax-wallet-sdk-react-privy
|
|
3
|
+
description: 'Granular skill for @sodax/wallet-sdk-react v2 email login with Privy only — the privy field on the EVM slot of SodaxWalletConfig, built with privy() from the @sodax/wallet-sdk-react/privy sub-path, which adds an "Email (Privy)" embedded wallet next to MetaMask and WalletConnect. Use when a React dapp wants email onboarding on EVM — e.g. "add email login", "log in with email", "Privy", "embedded wallet", "email wallet", "Privy app id". INTEGRATION only: email login is new in v2, so there is no v1 setup to port. Links into the parent sodax-wallet-sdk-react knowledge tree. EVM only; for the connect UI itself use the connect / wallet-modal skills.'
|
|
4
|
+
license: MIT
|
|
5
|
+
metadata:
|
|
6
|
+
version: '0.0.1'
|
|
7
|
+
author: sodax
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Email login with Privy (`wallet-sdk-react` granular skill)
|
|
11
|
+
|
|
12
|
+
Granular skill for the `privy` field on the `EVM` slot of `SodaxWalletConfig`. Source-of-truth reference lives in the parent broad skill's knowledge tree; this file is the focused workflow only.
|
|
13
|
+
|
|
14
|
+
## Step 1 — Clarify with user before coding
|
|
15
|
+
|
|
16
|
+
You write the code; the user owns the Privy app and receives the email code. Ask:
|
|
17
|
+
|
|
18
|
+
1. **Do they have a Privy App ID?** If not, give them the dashboard checklist in step 0 of the recipe (Email login, Ethereum embedded wallets, allowed origins, test accounts).
|
|
19
|
+
2. **Do they accept the trade-offs?** Privy custodies access (no signing while it is down), addresses belong to their Privy app, a lost email is a lost wallet, and the app is billed per signature.
|
|
20
|
+
3. **`showWalletUIs` and `disconnectBehavior`?** Both change the UX; the recipe's step 0 explains each choice.
|
|
21
|
+
4. **Does the app already mount a `PrivyProvider`?** Then follow the recipe's *App already on Privy?* branch.
|
|
22
|
+
|
|
23
|
+
## Integration workflow (new v2 code)
|
|
24
|
+
|
|
25
|
+
1. [`../integration/knowledge/ai-rules.md`](../integration/knowledge/ai-rules.md) — DO / DON'T (read first).
|
|
26
|
+
2. [`../integration/knowledge/recipes/setup.md`](../integration/knowledge/recipes/setup.md) — prerequisite: provider mounted with the `EVM` slot.
|
|
27
|
+
3. [`../integration/knowledge/recipes/privy-email-login.md`](../integration/knowledge/recipes/privy-email-login.md) — install the peer, add `privy: privy({ appId })`, verify. Whole-file starter: [`../integration/knowledge/examples/05-privy-email-login.tsx`](../integration/knowledge/examples/05-privy-email-login.tsx).
|
|
28
|
+
4. Lookups → [`../integration/knowledge/reference/api-surface.md`](../integration/knowledge/reference/api-surface.md) (`privy`, `PrivyOptions`, `PRIVY_CONNECTOR_ID`).
|
|
29
|
+
|
|
30
|
+
### Privy-specific anti-patterns
|
|
31
|
+
|
|
32
|
+
- **Writing `privy: { appId }` or importing `privy` from the main entry.** The value must come from `privy()` on the `@sodax/wallet-sdk-react/privy` sub-path.
|
|
33
|
+
- **Hiding the App ID behind a backend.** It is public; only SODAX API keys need a proxy.
|
|
34
|
+
- **Adding `@privy-io/wagmi` or a second `PrivyProvider`.** The SDK mounts Privy itself.
|
|
35
|
+
- Full list → the recipe's *Anti-patterns*.
|
|
36
|
+
|
|
37
|
+
## Migration workflow (port v1 → v2)
|
|
38
|
+
|
|
39
|
+
None: email login is new in v2. Finish the broad skill's migration first, then add Privy with the integration workflow above.
|
|
40
|
+
|
|
41
|
+
## Verification
|
|
42
|
+
|
|
43
|
+
1. `pnpm tsc --noEmit` and the production build pass.
|
|
44
|
+
2. `privy: privy({ appId })` sits on the `EVM` slot, imported from `@sodax/wallet-sdk-react/privy`.
|
|
45
|
+
3. The user confirms what you cannot test (the email code): "Email (Privy)" appears, a test-account login shows an address that survives a reload, and a small SODAX action signs.
|
|
46
|
+
|
|
47
|
+
## Related skills (same family)
|
|
48
|
+
|
|
49
|
+
- [`../wallet-modal/SKILL.md`](../wallet-modal/SKILL.md) — a custom modal renders nothing while Privy's own dialog is open.
|
|
50
|
+
- [`../connect/SKILL.md`](../connect/SKILL.md) — the connect button / connector discovery hooks.
|
|
51
|
+
- [`../walletconnect/SKILL.md`](../walletconnect/SKILL.md) — the other optional EVM wallet source.
|
|
52
|
+
|
|
53
|
+
For multi-feature work, load the broad [`sodax-wallet-sdk-react` skill](../SKILL.md).
|
|
@@ -50,5 +50,6 @@ Granular skill for the headless multi-chain modal + connection-flow + batch hook
|
|
|
50
50
|
|
|
51
51
|
- [`../connect/SKILL.md`](../connect/SKILL.md) — a plain connect/disconnect button + account reads (no modal).
|
|
52
52
|
- [`../walletconnect/SKILL.md`](../walletconnect/SKILL.md) — add Fireblocks / Ledger / mobile wallets to the modal.
|
|
53
|
+
- [`../privy/SKILL.md`](../privy/SKILL.md) — add "Email (Privy)"; render nothing while Privy's own dialog is open.
|
|
53
54
|
|
|
54
55
|
For multi-feature work, load the broad [`sodax-wallet-sdk-react` skill](../SKILL.md).
|