@renown/sdk 6.2.2-dev.19 → 6.2.2-dev.20

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.
@@ -5,9 +5,13 @@ import { ConnectedWallet, LoginModalOptions } from "@privy-io/react-auth";
5
5
 
6
6
  //#region src/wallet/privy/adapter.d.ts
7
7
  type Hex = `0x${string}`;
8
+ type PrivyOAuthProviderId = "google" | "apple";
8
9
  declare function resolvePrivyMethods(methods?: string[]): LoginMethod[];
9
10
  interface PrivyBindings {
10
11
  openLoginModal: (options?: LoginModalOptions) => void;
12
+ initOAuth: (options: {
13
+ provider: PrivyOAuthProviderId;
14
+ }) => Promise<void>;
11
15
  logout: () => Promise<void>;
12
16
  signTypedData: (args: Parameters<SignCredentialTypedData>[0], address: Hex) => Promise<Hex>;
13
17
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/wallet/privy/adapter.ts","../../../src/wallet/privy/bridge.tsx","../../../src/wallet/privy/provider.tsx","../../../src/wallet/privy/index.ts"],"mappings":";;;;;;KAYK,GAAA;AAAA,iBAgBW,mBAAA,CAAoB,OAAA,cAAqB,WAAA;AAAA,UAexC,aAAA;EACf,cAAA,GAAiB,OAAA,GAAU,iBAAA;EAC3B,MAAA,QAAc,OAAA;EACd,aAAA,GACE,IAAA,EAAM,UAAA,CAAW,uBAAA,MACjB,OAAA,EAAS,GAAA,KACN,OAAA,CAAQ,GAAA;AAAA;AAAA,cAUF,SAAA;EAAA,SACF,gBAAA,EAAkB,WAAA;EAAA,QAEnB,QAAA;EAAA,QACA,OAAA;EAAA,QACA,OAAA;EAAA,QACA,SAAA;cAEI,gBAAA,EAAkB,WAAA;EAI9B,IAAA,CAAK,QAAA,EAAU,aAAA;EAOf,UAAA,CAAA,GAAc,aAAA;EAMd,SAAA,CACE,QAAA,GAAW,OAAA,EAAS,aAAA;EAAA,QASd,IAAA;EAMR,sBAAA,CAAuB,MAAA,EAAQ,eAAA;EA8B/B,YAAA,CAAA;EAOA,gBAAA,CAAiB,KAAA;EAOX,OAAA,CAAQ,MAAA,GAAS,WAAA,GAAc,OAAA,CAAQ,aAAA;EA+BvC,UAAA,CAAA,GAAc,OAAA;AAAA;;;UClKZ,uBAAA;EACR,IAAA,EAAM,SAAA;AAAA;AAAA,iBAKQ,kBAAA,CAAA;EAAqB;AAAA,GAAQ,uBAAA;;;UCbnC,mBAAA;EACR,KAAA;EACA,QAAA;AAAA;AAAA,iBAKc,mBAAA,CACd,IAAA,EAAM,SAAA,EACN,MAAA,EAAQ,mBAAA,GACP,aAAA;EAAgB,QAAA,EAAU,SAAA;EAAW,KAAA,GAAQ,WAAA;AAAA;;;UCV/B,0BAAA;EACf,KAAA;EACA,QAAA;EACA,OAAA;AAAA;AAAA,iBAKc,kBAAA,CACd,MAAA,EAAQ,0BAAA,GACP,aAAA"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/wallet/privy/adapter.ts","../../../src/wallet/privy/bridge.tsx","../../../src/wallet/privy/provider.tsx","../../../src/wallet/privy/index.ts"],"mappings":";;;;;;KAYK,GAAA;AAAA,KAcA,oBAAA;AAAA,iBAaW,mBAAA,CAAoB,OAAA,cAAqB,WAAA;AAAA,UAexC,aAAA;EACf,cAAA,GAAiB,OAAA,GAAU,iBAAA;EAC3B,SAAA,GAAY,OAAA;IAAW,QAAA,EAAU,oBAAA;EAAA,MAA2B,OAAA;EAC5D,MAAA,QAAc,OAAA;EACd,aAAA,GACE,IAAA,EAAM,UAAA,CAAW,uBAAA,MACjB,OAAA,EAAS,GAAA,KACN,OAAA,CAAQ,GAAA;AAAA;AAAA,cAUF,SAAA;EAAA,SACF,gBAAA,EAAkB,WAAA;EAAA,QAEnB,QAAA;EAAA,QACA,OAAA;EAAA,QACA,OAAA;EAAA,QACA,SAAA;cAEI,gBAAA,EAAkB,WAAA;EAI9B,IAAA,CAAK,QAAA,EAAU,aAAA;EAOf,UAAA,CAAA,GAAc,aAAA;EAMd,SAAA,CACE,QAAA,GAAW,OAAA,EAAS,aAAA;EAAA,QASd,IAAA;EAMR,sBAAA,CAAuB,MAAA,EAAQ,eAAA;EA8B/B,YAAA,CAAA;EAOA,gBAAA,CAAiB,KAAA;EAOX,OAAA,CAAQ,MAAA,GAAS,WAAA,GAAc,OAAA,CAAQ,aAAA;EAuCvC,UAAA,CAAA,GAAc,OAAA;AAAA;;;UCrLZ,uBAAA;EACR,IAAA,EAAM,SAAA;AAAA;AAAA,iBAKQ,kBAAA,CAAA;EAAqB;AAAA,GAAQ,uBAAA;;;UCdnC,mBAAA;EACR,KAAA;EACA,QAAA;AAAA;AAAA,iBAKc,mBAAA,CACd,IAAA,EAAM,SAAA,EACN,MAAA,EAAQ,mBAAA,GACP,aAAA;EAAgB,QAAA,EAAU,SAAA;EAAW,KAAA,GAAQ,WAAA;AAAA;;;UCV/B,0BAAA;EACf,KAAA;EACA,QAAA;EACA,OAAA;AAAA;AAAA,iBAKc,kBAAA,CACd,MAAA,EAAQ,0BAAA,GACP,aAAA"}
@@ -1,7 +1,7 @@
1
1
  import { i as normalizeWalletTheme, n as DEFAULT_PRIVY_METHODS, r as LoginMethod } from "../../types-DG816Qa8.js";
2
2
  import { useEffect, useMemo, useRef } from "react";
3
3
  import { jsx, jsxs } from "react/jsx-runtime";
4
- import { PrivyProvider, getEmbeddedConnectedWallet, useLogin, useLogout, usePrivy, useSignTypedData, useWallets } from "@privy-io/react-auth";
4
+ import { PrivyProvider, getEmbeddedConnectedWallet, useLogin, useLoginWithOAuth, useLogout, usePrivy, useSignTypedData, useWallets } from "@privy-io/react-auth";
5
5
  //#region src/wallet/privy/adapter.ts
6
6
  const PRIVY_METHOD_MAP = {
7
7
  [LoginMethod.WALLET]: "wallet",
@@ -9,6 +9,10 @@ const PRIVY_METHOD_MAP = {
9
9
  [LoginMethod.APPLE]: "apple",
10
10
  [LoginMethod.EMAIL]: "email"
11
11
  };
12
+ const PRIVY_OAUTH_PROVIDERS = {
13
+ [LoginMethod.GOOGLE]: "google",
14
+ [LoginMethod.APPLE]: "apple"
15
+ };
12
16
  function resolvePrivyMethods(methods) {
13
17
  if (!methods || methods.length === 0) return [...DEFAULT_PRIVY_METHODS];
14
18
  const resolved = [];
@@ -84,16 +88,21 @@ var PrivyCore = class {
84
88
  const privyMethod = PRIVY_METHOD_MAP[chosen];
85
89
  if (!privyMethod || !this.supportedMethods.includes(chosen)) throw new Error(`PrivyAdapter does not support login method "${chosen}"`);
86
90
  const bindings = this.bindings;
91
+ const oauthProvider = PRIVY_OAUTH_PROVIDERS[chosen];
87
92
  return new Promise((resolve, reject) => {
88
93
  this.pending = {
89
94
  resolve,
90
95
  reject
91
96
  };
92
- try {
93
- bindings.openLoginModal({ loginMethods: [privyMethod] });
94
- } catch (error) {
97
+ const fail = (error) => {
95
98
  this.pending = null;
96
99
  reject(error instanceof Error ? error : new Error(String(error)));
100
+ };
101
+ try {
102
+ if (oauthProvider) bindings.initOAuth({ provider: oauthProvider }).catch(fail);
103
+ else bindings.openLoginModal({ loginMethods: [privyMethod] });
104
+ } catch (error) {
105
+ fail(error);
97
106
  }
98
107
  });
99
108
  }
@@ -117,25 +126,30 @@ function PrivyAdapterBridge({ core }) {
117
126
  const { signTypedData } = useSignTypedData();
118
127
  const { logout } = useLogout();
119
128
  const { login: openLoginModal } = useLogin({ onError: (error) => core.handleLoginError(error) });
129
+ const { initOAuth } = useLoginWithOAuth({ onError: (error) => core.handleLoginError(error) });
120
130
  const fnsRef = useRef({
121
131
  openLoginModal,
132
+ initOAuth,
122
133
  logout,
123
134
  signTypedData
124
135
  });
125
136
  useEffect(() => {
126
137
  fnsRef.current = {
127
138
  openLoginModal,
139
+ initOAuth,
128
140
  logout,
129
141
  signTypedData
130
142
  };
131
143
  }, [
132
144
  openLoginModal,
145
+ initOAuth,
133
146
  logout,
134
147
  signTypedData
135
148
  ]);
136
149
  useEffect(() => {
137
150
  return core.bind({
138
151
  openLoginModal: (opts) => fnsRef.current.openLoginModal(opts),
152
+ initOAuth: (opts) => fnsRef.current.initOAuth(opts),
139
153
  logout: () => fnsRef.current.logout(),
140
154
  signTypedData: async (args, address) => {
141
155
  return (await fnsRef.current.signTypedData(args, {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../src/wallet/privy/adapter.ts","../../../src/wallet/privy/bridge.tsx","../../../src/wallet/privy/provider.tsx","../../../src/wallet/privy/index.ts"],"sourcesContent":["import type {\n ConnectedWallet,\n LoginModalOptions,\n SignTypedDataParams,\n} from \"@privy-io/react-auth\";\nimport type { SignCredentialTypedData } from \"../../credential.js\";\nimport {\n DEFAULT_PRIVY_METHODS,\n LoginMethod,\n type WalletSession,\n} from \"../types.js\";\n\ntype Hex = `0x${string}`;\ntype PrivyLoginMethodId = NonNullable<\n LoginModalOptions[\"loginMethods\"]\n>[number];\n\n// Login methods the Privy adapter can drive. Config `methods` is validated\n// against these; the default is [GOOGLE, EMAIL].\nconst PRIVY_METHOD_MAP: Partial<Record<LoginMethod, PrivyLoginMethodId>> = {\n [LoginMethod.WALLET]: \"wallet\",\n [LoginMethod.GOOGLE]: \"google\",\n [LoginMethod.APPLE]: \"apple\",\n [LoginMethod.EMAIL]: \"email\",\n};\n\n// Resolve config `methods` (LoginMethod string values) to the supported set,\n// falling back to the default when none are provided.\nexport function resolvePrivyMethods(methods?: string[]): LoginMethod[] {\n if (!methods || methods.length === 0) return [...DEFAULT_PRIVY_METHODS];\n const resolved: LoginMethod[] = [];\n for (const method of methods) {\n const value = method as LoginMethod;\n if (!(value in PRIVY_METHOD_MAP)) {\n throw new Error(`PrivyAdapter cannot support login method \"${method}\"`);\n }\n resolved.push(value);\n }\n return resolved;\n}\n\n// Privy React functions captured by <PrivyAdapterBridge> via bind(). Until bind\n// runs, connect/disconnect calls throw.\nexport interface PrivyBindings {\n openLoginModal: (options?: LoginModalOptions) => void;\n logout: () => Promise<void>;\n signTypedData: (\n args: Parameters<SignCredentialTypedData>[0],\n address: Hex,\n ) => Promise<Hex>;\n}\n\ninterface PendingLogin {\n resolve(session: WalletSession): void;\n reject(error: Error): void;\n}\n\n// Framework-agnostic core the bridge drives. Holds the session and pending\n// login promise so the class can operate Privy without owning React state.\nexport class PrivyCore {\n readonly supportedMethods: LoginMethod[];\n\n private bindings: PrivyBindings | null = null;\n private pending: PendingLogin | null = null;\n private session: WalletSession | undefined = undefined;\n private listeners = new Set<(session: WalletSession | undefined) => void>();\n\n constructor(supportedMethods: LoginMethod[]) {\n this.supportedMethods = supportedMethods;\n }\n\n bind(bindings: PrivyBindings): () => void {\n this.bindings = bindings;\n return () => {\n if (this.bindings === bindings) this.bindings = null;\n };\n }\n\n getSession(): WalletSession | undefined {\n return this.session;\n }\n\n // Push session changes to subscribers, replaying the current one on subscribe.\n // Lets the host complete sign-in when a session arrives with no pending connect().\n subscribe(\n listener: (session: WalletSession | undefined) => void,\n ): () => void {\n this.listeners.add(listener);\n if (this.session) listener(this.session);\n return () => {\n this.listeners.delete(listener);\n };\n }\n\n private emit(session: WalletSession | undefined): void {\n for (const listener of this.listeners) listener(session);\n }\n\n // Called by the bridge when the embedded wallet is available. Builds the\n // session and resolves any pending login promise.\n syncFromEmbeddedWallet(wallet: ConnectedWallet): void {\n const address = wallet.address as Hex;\n const chainId = parseCaip2ChainId(wallet.chainId);\n\n const signTypedData: SignCredentialTypedData = async (args) => {\n if (!this.bindings) {\n throw new Error(\"PrivyAdapter not bound (bridge not mounted)\");\n }\n return this.bindings.signTypedData(args, address);\n };\n\n // Privy's embedded wallet signs without a prompt, so a host may auto-complete\n // sign-in with this session after a full-page OAuth redirect return.\n const session: WalletSession = {\n address,\n chainId,\n signTypedData,\n canSignSilently: true,\n };\n this.session = session;\n // A live connect() (in-page popup flow) consumes the session via its promise;\n // otherwise the promise died with the pre-redirect page, so emit to subscribers.\n if (this.pending) {\n this.pending.resolve(session);\n this.pending = null;\n } else {\n this.emit(session);\n }\n }\n\n clearSession(): void {\n this.session = undefined;\n this.emit(undefined);\n }\n\n // Called by the bridge on Privy's onError. String codes like `exited_auth_flow`\n // mean the user dismissed the modal.\n handleLoginError(error: unknown): void {\n if (!this.pending) return;\n const err = error instanceof Error ? error : new Error(String(error));\n this.pending.reject(err);\n this.pending = null;\n }\n\n async connect(method?: LoginMethod): Promise<WalletSession> {\n if (this.session) return this.session;\n if (!this.bindings) {\n throw new Error(\n \"PrivyAdapter not bound. Ensure the adapter Provider wraps the app.\",\n );\n }\n\n const chosen = method ?? this.supportedMethods.at(0);\n if (!chosen) {\n throw new Error(\"PrivyAdapter has no supported login methods configured\");\n }\n const privyMethod = PRIVY_METHOD_MAP[chosen];\n if (!privyMethod || !this.supportedMethods.includes(chosen)) {\n throw new Error(`PrivyAdapter does not support login method \"${chosen}\"`);\n }\n\n // Open Privy's modal (social OAuth runs in a popup, keeping this page alive)\n // so the pending promise resolves in-page and Renown sign-in can run.\n const bindings = this.bindings;\n return new Promise<WalletSession>((resolve, reject) => {\n this.pending = { resolve, reject };\n try {\n bindings.openLoginModal({ loginMethods: [privyMethod] });\n } catch (error) {\n this.pending = null;\n reject(error instanceof Error ? error : new Error(String(error)));\n }\n });\n }\n\n async disconnect(): Promise<void> {\n this.clearSession();\n if (!this.bindings) return;\n await this.bindings.logout();\n }\n}\n\nfunction parseCaip2ChainId(caip2: string): number {\n const last = caip2.split(\":\").at(-1);\n const n = Number(last);\n if (!Number.isFinite(n)) {\n throw new Error(\n `PrivyAdapter: could not parse chainId from CAIP-2 \"${caip2}\"`,\n );\n }\n return n;\n}\n\nexport type { SignTypedDataParams };\n","import { useEffect, useRef } from \"react\";\nimport {\n getEmbeddedConnectedWallet,\n useLogin,\n useLogout,\n usePrivy,\n useSignTypedData,\n useWallets,\n} from \"@privy-io/react-auth\";\nimport type { PrivyCore, SignTypedDataParams } from \"./adapter.js\";\n\ntype Hex = `0x${string}`;\n\ninterface PrivyAdapterBridgeProps {\n core: PrivyCore;\n}\n\n// Captures the React-only Privy hooks and wires them into PrivyCore so the\n// class can drive Privy without owning React state. Mounted inside PrivyProvider.\nexport function PrivyAdapterBridge({ core }: PrivyAdapterBridgeProps) {\n const { ready, authenticated } = usePrivy();\n const { wallets } = useWallets();\n const { signTypedData } = useSignTypedData();\n const { logout } = useLogout();\n const { login: openLoginModal } = useLogin({\n onError: (error) => core.handleLoginError(error),\n });\n\n // Privy returns fresh function references each render. A ref keeps the bind\n // stable so we bind once per core instead of re-binding every render.\n const fnsRef = useRef({ openLoginModal, logout, signTypedData });\n useEffect(() => {\n fnsRef.current = { openLoginModal, logout, signTypedData };\n }, [openLoginModal, logout, signTypedData]);\n\n useEffect(() => {\n return core.bind({\n openLoginModal: (opts) => fnsRef.current.openLoginModal(opts),\n logout: () => fnsRef.current.logout(),\n // Privy owns the embedded wallet keys, so showWalletUIs:false signs the\n // credential typed-data silently as part of login.\n signTypedData: async (args, address) => {\n const result = await fnsRef.current.signTypedData(\n args as unknown as SignTypedDataParams,\n { address, uiOptions: { showWalletUIs: false } },\n );\n return result.signature as Hex;\n },\n });\n }, [core]);\n\n useEffect(() => {\n if (!ready) return;\n if (!authenticated) {\n core.clearSession();\n return;\n }\n const embedded = getEmbeddedConnectedWallet(wallets);\n if (embedded) core.syncFromEmbeddedWallet(embedded);\n }, [core, ready, authenticated, wallets]);\n\n return null;\n}\n","import { useMemo, type ComponentType, type ReactNode } from \"react\";\nimport { PrivyProvider, type PrivyClientConfig } from \"@privy-io/react-auth\";\nimport { normalizeWalletTheme, type WalletTheme } from \"../types.js\";\nimport type { PrivyCore } from \"./adapter.js\";\nimport { PrivyAdapterBridge } from \"./bridge.js\";\n\ninterface PrivyProviderConfig {\n appId: string;\n clientId?: string;\n}\n\n// Build the adapter Provider bound to a specific core + config. Mounts\n// PrivyProvider with embedded wallets + showWalletUIs:false for silent signing.\nexport function createPrivyProvider(\n core: PrivyCore,\n config: PrivyProviderConfig,\n): ComponentType<{ children: ReactNode; theme?: WalletTheme }> {\n return function PrivyAuthProvider({\n children,\n theme,\n }: {\n children: ReactNode;\n theme?: WalletTheme;\n }) {\n const { mode } = normalizeWalletTheme(theme);\n // Memoize so a new config object per render doesn't rebuild PrivyProvider's\n // context and cascade re-renders into descendants.\n const privyConfig = useMemo<PrivyClientConfig>(\n () => ({\n appearance: { theme: mode },\n embeddedWallets: {\n ethereum: { createOnLogin: \"users-without-wallets\" as const },\n showWalletUIs: false,\n },\n // Social/email adapter only (external wallets go through the rainbow\n // adapter), so don't init WalletConnect / fetch its registry on mount.\n externalWallets: {\n disableAllExternalWallets: true,\n walletConnect: { enabled: false },\n },\n }),\n [mode],\n );\n\n return (\n <PrivyProvider\n appId={config.appId}\n clientId={config.clientId}\n config={privyConfig}\n >\n <PrivyAdapterBridge core={core} />\n {children}\n </PrivyProvider>\n );\n };\n}\n","import type { LoginMethod, WalletAdapter, WalletController } from \"../types.js\";\nimport { PrivyCore, resolvePrivyMethods } from \"./adapter.js\";\nimport { createPrivyProvider } from \"./provider.js\";\n\n// Config slice for the Privy adapter (mirrors connect.renown.adapters.privy).\n// `methods` defaults to [GOOGLE, EMAIL] when omitted.\nexport interface PHRenownPrivyAdapterConfig {\n appId: string;\n clientId?: string;\n methods?: string[];\n}\n\n// Build the Privy WalletAdapter. Provider mounts PrivyProvider + a bridge;\n// useController exposes imperative connect/disconnect over the shared core.\nexport function createPrivyAdapter(\n config: PHRenownPrivyAdapterConfig,\n): WalletAdapter {\n const supportedMethods: LoginMethod[] = resolvePrivyMethods(config.methods);\n const core = new PrivyCore(supportedMethods);\n const Provider = createPrivyProvider(core, {\n appId: config.appId,\n clientId: config.clientId,\n });\n\n function useController(): WalletController {\n return {\n connect: (method) => core.connect(method),\n disconnect: () => core.disconnect(),\n getSession: () => core.getSession(),\n subscribe: (listener) => core.subscribe(listener),\n supportedMethods,\n };\n }\n\n return {\n id: \"privy\",\n supportedMethods,\n Provider,\n useController,\n };\n}\n\nexport { PrivyCore, resolvePrivyMethods } from \"./adapter.js\";\nexport type { PrivyBindings } from \"./adapter.js\";\nexport { PrivyAdapterBridge } from \"./bridge.js\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C;GACF,GACD,CAAC,KAAK,CACP;AAED,SACE,qBAAC,eAAD;GACE,OAAO,OAAO;GACd,UAAU,OAAO;GACjB,QAAQ;aAHV,CAKE,oBAAC,oBAAD,EAA0B,MAAQ,CAAA,EACjC,SACa;;;;;;ACtCtB,SAAgB,mBACd,QACe;CACf,MAAM,mBAAkC,oBAAoB,OAAO,QAAQ;CAC3E,MAAM,OAAO,IAAI,UAAU,iBAAiB;CAC5C,MAAM,WAAW,oBAAoB,MAAM;EACzC,OAAO,OAAO;EACd,UAAU,OAAO;EAClB,CAAC;CAEF,SAAS,gBAAkC;AACzC,SAAO;GACL,UAAU,WAAW,KAAK,QAAQ,OAAO;GACzC,kBAAkB,KAAK,YAAY;GACnC,kBAAkB,KAAK,YAAY;GACnC,YAAY,aAAa,KAAK,UAAU,SAAS;GACjD;GACD;;AAGH,QAAO;EACL,IAAI;EACJ;EACA;EACA;EACD"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../src/wallet/privy/adapter.ts","../../../src/wallet/privy/bridge.tsx","../../../src/wallet/privy/provider.tsx","../../../src/wallet/privy/index.ts"],"sourcesContent":["import type {\n ConnectedWallet,\n LoginModalOptions,\n SignTypedDataParams,\n} from \"@privy-io/react-auth\";\nimport type { SignCredentialTypedData } from \"../../credential.js\";\nimport {\n DEFAULT_PRIVY_METHODS,\n LoginMethod,\n type WalletSession,\n} from \"../types.js\";\n\ntype Hex = `0x${string}`;\ntype PrivyLoginMethodId = NonNullable<\n LoginModalOptions[\"loginMethods\"]\n>[number];\n\n// Login methods the Privy adapter can drive. Config `methods` is validated\n// against these; the default is [GOOGLE, EMAIL].\nconst PRIVY_METHOD_MAP: Partial<Record<LoginMethod, PrivyLoginMethodId>> = {\n [LoginMethod.WALLET]: \"wallet\",\n [LoginMethod.GOOGLE]: \"google\",\n [LoginMethod.APPLE]: \"apple\",\n [LoginMethod.EMAIL]: \"email\",\n};\n\ntype PrivyOAuthProviderId = \"google\" | \"apple\";\n\n// Methods Privy can start headlessly with initOAuth. Opening the modal for these\n// would only render a single button for a provider the caller already picked.\nconst PRIVY_OAUTH_PROVIDERS: Partial<\n Record<LoginMethod, PrivyOAuthProviderId>\n> = {\n [LoginMethod.GOOGLE]: \"google\",\n [LoginMethod.APPLE]: \"apple\",\n};\n\n// Resolve config `methods` (LoginMethod string values) to the supported set,\n// falling back to the default when none are provided.\nexport function resolvePrivyMethods(methods?: string[]): LoginMethod[] {\n if (!methods || methods.length === 0) return [...DEFAULT_PRIVY_METHODS];\n const resolved: LoginMethod[] = [];\n for (const method of methods) {\n const value = method as LoginMethod;\n if (!(value in PRIVY_METHOD_MAP)) {\n throw new Error(`PrivyAdapter cannot support login method \"${method}\"`);\n }\n resolved.push(value);\n }\n return resolved;\n}\n\n// Privy React functions captured by <PrivyAdapterBridge> via bind(). Until bind\n// runs, connect/disconnect calls throw.\nexport interface PrivyBindings {\n openLoginModal: (options?: LoginModalOptions) => void;\n initOAuth: (options: { provider: PrivyOAuthProviderId }) => Promise<void>;\n logout: () => Promise<void>;\n signTypedData: (\n args: Parameters<SignCredentialTypedData>[0],\n address: Hex,\n ) => Promise<Hex>;\n}\n\ninterface PendingLogin {\n resolve(session: WalletSession): void;\n reject(error: Error): void;\n}\n\n// Framework-agnostic core the bridge drives. Holds the session and pending\n// login promise so the class can operate Privy without owning React state.\nexport class PrivyCore {\n readonly supportedMethods: LoginMethod[];\n\n private bindings: PrivyBindings | null = null;\n private pending: PendingLogin | null = null;\n private session: WalletSession | undefined = undefined;\n private listeners = new Set<(session: WalletSession | undefined) => void>();\n\n constructor(supportedMethods: LoginMethod[]) {\n this.supportedMethods = supportedMethods;\n }\n\n bind(bindings: PrivyBindings): () => void {\n this.bindings = bindings;\n return () => {\n if (this.bindings === bindings) this.bindings = null;\n };\n }\n\n getSession(): WalletSession | undefined {\n return this.session;\n }\n\n // Push session changes to subscribers, replaying the current one on subscribe.\n // Lets the host complete sign-in when a session arrives with no pending connect().\n subscribe(\n listener: (session: WalletSession | undefined) => void,\n ): () => void {\n this.listeners.add(listener);\n if (this.session) listener(this.session);\n return () => {\n this.listeners.delete(listener);\n };\n }\n\n private emit(session: WalletSession | undefined): void {\n for (const listener of this.listeners) listener(session);\n }\n\n // Called by the bridge when the embedded wallet is available. Builds the\n // session and resolves any pending login promise.\n syncFromEmbeddedWallet(wallet: ConnectedWallet): void {\n const address = wallet.address as Hex;\n const chainId = parseCaip2ChainId(wallet.chainId);\n\n const signTypedData: SignCredentialTypedData = async (args) => {\n if (!this.bindings) {\n throw new Error(\"PrivyAdapter not bound (bridge not mounted)\");\n }\n return this.bindings.signTypedData(args, address);\n };\n\n // Privy's embedded wallet signs without a prompt, so a host may auto-complete\n // sign-in with this session after a full-page OAuth redirect return.\n const session: WalletSession = {\n address,\n chainId,\n signTypedData,\n canSignSilently: true,\n };\n this.session = session;\n // A live connect() (in-page popup flow) consumes the session via its promise;\n // otherwise the promise died with the pre-redirect page, so emit to subscribers.\n if (this.pending) {\n this.pending.resolve(session);\n this.pending = null;\n } else {\n this.emit(session);\n }\n }\n\n clearSession(): void {\n this.session = undefined;\n this.emit(undefined);\n }\n\n // Called by the bridge on Privy's onError. String codes like `exited_auth_flow`\n // mean the user dismissed the modal.\n handleLoginError(error: unknown): void {\n if (!this.pending) return;\n const err = error instanceof Error ? error : new Error(String(error));\n this.pending.reject(err);\n this.pending = null;\n }\n\n async connect(method?: LoginMethod): Promise<WalletSession> {\n if (this.session) return this.session;\n if (!this.bindings) {\n throw new Error(\n \"PrivyAdapter not bound. Ensure the adapter Provider wraps the app.\",\n );\n }\n\n const chosen = method ?? this.supportedMethods.at(0);\n if (!chosen) {\n throw new Error(\"PrivyAdapter has no supported login methods configured\");\n }\n const privyMethod = PRIVY_METHOD_MAP[chosen];\n if (!privyMethod || !this.supportedMethods.includes(chosen)) {\n throw new Error(`PrivyAdapter does not support login method \"${chosen}\"`);\n }\n\n const bindings = this.bindings;\n const oauthProvider = PRIVY_OAUTH_PROVIDERS[chosen];\n return new Promise<WalletSession>((resolve, reject) => {\n this.pending = { resolve, reject };\n const fail = (error: unknown) => {\n this.pending = null;\n reject(error instanceof Error ? error : new Error(String(error)));\n };\n try {\n // initOAuth navigates away, so this promise stays pending until the page\n // unloads; syncFromEmbeddedWallet emits the session on the redirect back.\n if (oauthProvider) {\n bindings.initOAuth({ provider: oauthProvider }).catch(fail);\n } else {\n bindings.openLoginModal({ loginMethods: [privyMethod] });\n }\n } catch (error) {\n fail(error);\n }\n });\n }\n\n async disconnect(): Promise<void> {\n this.clearSession();\n if (!this.bindings) return;\n await this.bindings.logout();\n }\n}\n\nfunction parseCaip2ChainId(caip2: string): number {\n const last = caip2.split(\":\").at(-1);\n const n = Number(last);\n if (!Number.isFinite(n)) {\n throw new Error(\n `PrivyAdapter: could not parse chainId from CAIP-2 \"${caip2}\"`,\n );\n }\n return n;\n}\n\nexport type { SignTypedDataParams };\n","import { useEffect, useRef } from \"react\";\nimport {\n getEmbeddedConnectedWallet,\n useLogin,\n useLoginWithOAuth,\n useLogout,\n usePrivy,\n useSignTypedData,\n useWallets,\n} from \"@privy-io/react-auth\";\nimport type { PrivyCore, SignTypedDataParams } from \"./adapter.js\";\n\ntype Hex = `0x${string}`;\n\ninterface PrivyAdapterBridgeProps {\n core: PrivyCore;\n}\n\n// Captures the React-only Privy hooks and wires them into PrivyCore so the\n// class can drive Privy without owning React state. Mounted inside PrivyProvider.\nexport function PrivyAdapterBridge({ core }: PrivyAdapterBridgeProps) {\n const { ready, authenticated } = usePrivy();\n const { wallets } = useWallets();\n const { signTypedData } = useSignTypedData();\n const { logout } = useLogout();\n const { login: openLoginModal } = useLogin({\n onError: (error) => core.handleLoginError(error),\n });\n // Also mounts this hook on the page Privy redirects back to, which is what\n // lets it finish the OAuth flow there.\n const { initOAuth } = useLoginWithOAuth({\n onError: (error) => core.handleLoginError(error),\n });\n\n // Privy returns fresh function references each render. A ref keeps the bind\n // stable so we bind once per core instead of re-binding every render.\n const fnsRef = useRef({ openLoginModal, initOAuth, logout, signTypedData });\n useEffect(() => {\n fnsRef.current = { openLoginModal, initOAuth, logout, signTypedData };\n }, [openLoginModal, initOAuth, logout, signTypedData]);\n\n useEffect(() => {\n return core.bind({\n openLoginModal: (opts) => fnsRef.current.openLoginModal(opts),\n initOAuth: (opts) => fnsRef.current.initOAuth(opts),\n logout: () => fnsRef.current.logout(),\n // Privy owns the embedded wallet keys, so showWalletUIs:false signs the\n // credential typed-data silently as part of login.\n signTypedData: async (args, address) => {\n const result = await fnsRef.current.signTypedData(\n args as unknown as SignTypedDataParams,\n { address, uiOptions: { showWalletUIs: false } },\n );\n return result.signature as Hex;\n },\n });\n }, [core]);\n\n useEffect(() => {\n if (!ready) return;\n if (!authenticated) {\n core.clearSession();\n return;\n }\n const embedded = getEmbeddedConnectedWallet(wallets);\n if (embedded) core.syncFromEmbeddedWallet(embedded);\n }, [core, ready, authenticated, wallets]);\n\n return null;\n}\n","import { useMemo, type ComponentType, type ReactNode } from \"react\";\nimport { PrivyProvider, type PrivyClientConfig } from \"@privy-io/react-auth\";\nimport { normalizeWalletTheme, type WalletTheme } from \"../types.js\";\nimport type { PrivyCore } from \"./adapter.js\";\nimport { PrivyAdapterBridge } from \"./bridge.js\";\n\ninterface PrivyProviderConfig {\n appId: string;\n clientId?: string;\n}\n\n// Build the adapter Provider bound to a specific core + config. Mounts\n// PrivyProvider with embedded wallets + showWalletUIs:false for silent signing.\nexport function createPrivyProvider(\n core: PrivyCore,\n config: PrivyProviderConfig,\n): ComponentType<{ children: ReactNode; theme?: WalletTheme }> {\n return function PrivyAuthProvider({\n children,\n theme,\n }: {\n children: ReactNode;\n theme?: WalletTheme;\n }) {\n const { mode } = normalizeWalletTheme(theme);\n // Memoize so a new config object per render doesn't rebuild PrivyProvider's\n // context and cascade re-renders into descendants.\n const privyConfig = useMemo<PrivyClientConfig>(\n () => ({\n appearance: { theme: mode },\n embeddedWallets: {\n ethereum: { createOnLogin: \"users-without-wallets\" as const },\n showWalletUIs: false,\n },\n // Social/email adapter only (external wallets go through the rainbow\n // adapter), so don't init WalletConnect / fetch its registry on mount.\n externalWallets: {\n disableAllExternalWallets: true,\n walletConnect: { enabled: false },\n },\n }),\n [mode],\n );\n\n return (\n <PrivyProvider\n appId={config.appId}\n clientId={config.clientId}\n config={privyConfig}\n >\n <PrivyAdapterBridge core={core} />\n {children}\n </PrivyProvider>\n );\n };\n}\n","import type { LoginMethod, WalletAdapter, WalletController } from \"../types.js\";\nimport { PrivyCore, resolvePrivyMethods } from \"./adapter.js\";\nimport { createPrivyProvider } from \"./provider.js\";\n\n// Config slice for the Privy adapter (mirrors connect.renown.adapters.privy).\n// `methods` defaults to [GOOGLE, EMAIL] when omitted.\nexport interface PHRenownPrivyAdapterConfig {\n appId: string;\n clientId?: string;\n methods?: string[];\n}\n\n// Build the Privy WalletAdapter. Provider mounts PrivyProvider + a bridge;\n// useController exposes imperative connect/disconnect over the shared core.\nexport function createPrivyAdapter(\n config: PHRenownPrivyAdapterConfig,\n): WalletAdapter {\n const supportedMethods: LoginMethod[] = resolvePrivyMethods(config.methods);\n const core = new PrivyCore(supportedMethods);\n const Provider = createPrivyProvider(core, {\n appId: config.appId,\n clientId: config.clientId,\n });\n\n function useController(): WalletController {\n return {\n connect: (method) => core.connect(method),\n disconnect: () => core.disconnect(),\n getSession: () => core.getSession(),\n subscribe: (listener) => core.subscribe(listener),\n supportedMethods,\n };\n }\n\n return {\n id: \"privy\",\n supportedMethods,\n Provider,\n useController,\n };\n}\n\nexport { PrivyCore, resolvePrivyMethods } from \"./adapter.js\";\nexport type { PrivyBindings } from \"./adapter.js\";\nexport { PrivyAdapterBridge } from \"./bridge.js\";\nexport { createPrivyProvider } from \"./provider.js\";\n"],"mappings":";;;;;AAmBA,MAAM,mBAAqE;EACxE,YAAY,SAAS;EACrB,YAAY,SAAS;EACrB,YAAY,QAAQ;EACpB,YAAY,QAAQ;CACtB;AAMD,MAAM,wBAEF;EACD,YAAY,SAAS;EACrB,YAAY,QAAQ;CACtB;AAID,SAAgB,o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,MAAM;GAC3B,iBAAiB;IACf,UAAU,EAAE,eAAe,yBAAkC;IAC7D,eAAe;IAChB;GAGD,iBAAiB;IACf,2BAA2B;IAC3B,eAAe,EAAE,SAAS,OAAO;IAClC;GACF,GACD,CAAC,KAAK,CACP;AAED,SACE,qBAAC,eAAD;GACE,OAAO,OAAO;GACd,UAAU,OAAO;GACjB,QAAQ;aAHV,CAKE,oBAAC,oBAAD,EAA0B,MAAQ,CAAA,EACjC,SACa;;;;;;ACtCtB,SAAgB,mBACd,QACe;CACf,MAAM,mBAAkC,oBAAoB,OAAO,QAAQ;CAC3E,MAAM,OAAO,IAAI,UAAU,iBAAiB;CAC5C,MAAM,WAAW,oBAAoB,MAAM;EACzC,OAAO,OAAO;EACd,UAAU,OAAO;EAClB,CAAC;CAEF,SAAS,gBAAkC;AACzC,SAAO;GACL,UAAU,WAAW,KAAK,QAAQ,OAAO;GACzC,kBAAkB,KAAK,YAAY;GACnC,kBAAkB,KAAK,YAAY;GACnC,YAAY,aAAa,KAAK,UAAU,SAAS;GACjD;GACD;;AAGH,QAAO;EACL,IAAI;EACJ;EACA;EACA;EACD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@renown/sdk",
3
- "version": "6.2.2-dev.19",
3
+ "version": "6.2.2-dev.20",
4
4
  "description": "Renown SDK — wallet-based authentication and user identity management for Powerhouse React applications.",
5
5
  "license": "AGPL-3.0-only",
6
6
  "private": false,
@@ -86,7 +86,7 @@
86
86
  "key-did-resolver": "^4.0.0",
87
87
  "uint8arrays": "^5.1.0",
88
88
  "viem": "~2.50.4",
89
- "@powerhousedao/shared": "6.2.2-dev.19"
89
+ "@powerhousedao/shared": "6.2.2-dev.20"
90
90
  },
91
91
  "peerDependencies": {
92
92
  "@privy-io/react-auth": "^3.25.0",