@farcaster/miniapp-sdk 0.0.0-canary-20250630230419 → 0.0.0-canary-20250705122814

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@farcaster/miniapp-sdk",
3
- "version": "0.0.0-canary-20250630230419",
3
+ "version": "0.0.0-canary-20250705122814",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -23,7 +23,7 @@
23
23
  "comlink": "^4.4.2",
24
24
  "eventemitter3": "^5.0.1",
25
25
  "ox": "^0.4.4",
26
- "@farcaster/miniapp-core": "0.0.0-canary-20250630230419"
26
+ "@farcaster/miniapp-core": "0.0.0-canary-20250705122814"
27
27
  },
28
28
  "scripts": {
29
29
  "clean": "rm -rf dist",
package/src/back.ts CHANGED
@@ -15,7 +15,7 @@ export const createBack: (options: {
15
15
  emitter: Emitter
16
16
  miniAppHost: Remote<WireMiniAppHost>
17
17
  }) => Back = ({ miniAppHost, emitter }) => {
18
- let teardownWebNavigation: (() => void) | undefined = undefined
18
+ let teardownWebNavigation: (() => void) | undefined
19
19
  let backCb: (() => unknown) | null = null
20
20
 
21
21
  return {
@@ -57,13 +57,7 @@ export const createBack: (options: {
57
57
  }
58
58
  }
59
59
 
60
- function setupWebBack({
61
- emitter,
62
- back,
63
- }: {
64
- emitter: Emitter
65
- back: Back
66
- }) {
60
+ function setupWebBack({ emitter, back }: { emitter: Emitter; back: Back }) {
67
61
  const navigation = getWebNavigation()
68
62
  if (navigation) {
69
63
  return setupNavigationApi({ emitter, back, navigation })
package/src/endpoint.ts CHANGED
@@ -14,7 +14,6 @@ const mockEndpoint: Endpoint = {
14
14
 
15
15
  const webViewEndpoint: Endpoint = {
16
16
  postMessage: (data: unknown) => {
17
- console.debug('[webview:req]', data)
18
17
  window.ReactNativeWebView.postMessage(JSON.stringify(data))
19
18
  },
20
19
  addEventListener: (_, listener, ...args) => {
package/src/index.ts CHANGED
@@ -1,11 +1,9 @@
1
1
  import { sdk } from './sdk.ts'
2
2
 
3
- export * from './miniAppHost.ts'
4
- export * from './sdk.ts'
5
3
  export * from '@farcaster/miniapp-core'
6
-
4
+ export * from './miniAppHost.ts'
7
5
  export * as QuickAuth from './quickAuth.ts'
8
-
9
6
  export { quickAuth } from './quickAuth.ts'
7
+ export * from './sdk.ts'
10
8
 
11
9
  export default sdk
package/src/quickAuth.ts CHANGED
@@ -58,7 +58,7 @@ export const quickAuth: QuickAuth = (() => {
58
58
  payload: JWTPayload
59
59
  }
60
60
  | undefined
61
- let pendingPromise: Promise<getToken.ReturnValue> | undefined = undefined
61
+ let pendingPromise: Promise<getToken.ReturnValue> | undefined
62
62
 
63
63
  async function getTokenInner(options: getToken.Options): getToken.ReturnType {
64
64
  const quickAuthClient = createLightClient({
package/src/sdk.ts CHANGED
@@ -55,7 +55,9 @@ async function isInMiniApp(timeoutMs = 50): Promise<boolean> {
55
55
  }
56
56
 
57
57
  const addMiniApp = async () => {
58
- const response = await miniAppHost.addMiniApp()
58
+ // Use the existing message overcomlink for backwards compat until
59
+ // hosts are all upgraded.
60
+ const response = await miniAppHost.addFrame()
59
61
  if (response.result) {
60
62
  return response.result
61
63
  }
@@ -1,8 +1,8 @@
1
1
  import {
2
+ createSolanaWalletProvider,
2
3
  type MiniAppHostCapability,
3
4
  type SolanaWalletProvider,
4
5
  type SolanaWireRequestFn,
5
- createSolanaWalletProvider,
6
6
  unwrapSolanaProviderRequest,
7
7
  } from '@farcaster/miniapp-core'
8
8
 
package/src/types.ts CHANGED
@@ -45,7 +45,9 @@ export type EventMap = {
45
45
  }) => void
46
46
  miniAppAddRejected: ({
47
47
  reason,
48
- }: { reason: AddMiniApp.AddMiniAppRejectedReason }) => void
48
+ }: {
49
+ reason: AddMiniApp.AddMiniAppRejectedReason
50
+ }) => void
49
51
  miniAppRemoved: () => void
50
52
  notificationsEnabled: ({
51
53
  notificationDetails,