@universal-everything/sdk-core-privy 1.1.0-dev.f8883ee → 1.1.1-dev.edaedee

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 +16 -12
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -17,32 +17,36 @@ pnpm add @universal-everything/sdk-core-privy @universal-everything/sdk-core
17
17
 
18
18
  ```ts
19
19
  import {
20
- PrivyIdentityProvider,
21
- PrivyKeyCustodyProvider,
20
+ createPrivyIdentityProvider,
21
+ createPrivyKeyCustodyProvider,
22
22
  } from "@universal-everything/sdk-core-privy";
23
23
 
24
- const identity = new PrivyIdentityProvider({
24
+ const identity = createPrivyIdentityProvider({
25
25
  appId: process.env.PRIVY_APP_ID!,
26
26
  issuer: "privy.io",
27
27
  });
28
28
 
29
- const custody = new PrivyKeyCustodyProvider({
29
+ const custody = createPrivyKeyCustodyProvider({
30
30
  appId: process.env.PRIVY_APP_ID!,
31
31
  appSecret: process.env.PRIVY_APP_SECRET!,
32
32
  });
33
33
 
34
- // `identity.verify(jwt)` → `{ subject: "did:privy:…", isAdmin }`
35
- // `custody.signTransaction({ walletId, tx, opContext })` → serialized tx
34
+ // `identity.verifyToken(jwt)` → `{ subject: "did:privy:…", claims }`
35
+ // `custody.signTransaction(walletId, tx, opContext)` → serialized tx
36
36
  ```
37
37
 
38
38
  ## What each provider does
39
39
 
40
- - **`PrivyIdentityProvider`** — verifies ES256 JWTs via Privy's JWKS,
41
- checks `iss`/`aud` claims, returns a subject identity. No secrets
42
- needed (public-key verification only).
43
- - **`PrivyKeyCustodyProvider`** — calls Privy's REST API
44
- (`api.privy.io`) to create / import / sign with user-owned wallets.
45
- Requires the Privy app secret. Forwards
40
+ - **`createPrivyIdentityProvider`** — verifies ES256 JWTs via Privy's
41
+ JWKS, checks `iss`/`aud` claims, returns `{ subject, claims }`. No
42
+ secrets needed (public-key verification only). `mapJoseError` is
43
+ exported so callers can distinguish a bad token (401) from a JWKS
44
+ outage (503).
45
+ - **`createPrivyKeyCustodyProvider`** (also the `PrivyKeyCustodyProvider`
46
+ class) — calls Privy's REST API (`api.privy.io`) to create and sign
47
+ with user-owned wallets. `importWallet` / `exportWallet` are not yet
48
+ implemented and throw a clear `provider_unavailable` error (tracked
49
+ under Milestone 10's cryptobox). Requires the Privy app secret. Forwards
46
50
  `privy-authorization-signature` + `privy-request-expiry` headers
47
51
  from the caller's `opContext` so user-owned wallets are signable
48
52
  end-to-end.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@universal-everything/sdk-core-privy",
3
- "version": "1.1.0-dev.f8883ee",
3
+ "version": "1.1.1-dev.edaedee",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/universal-everything/universal-relayer.git",
@@ -23,7 +23,7 @@
23
23
  },
24
24
  "dependencies": {
25
25
  "jose": "^6.2.2",
26
- "@universal-everything/sdk-core": "1.1.0-dev.f8883ee"
26
+ "@universal-everything/sdk-core": "1.1.0-dev.edaedee"
27
27
  },
28
28
  "devDependencies": {
29
29
  "@types/node": "^26.2.0",