@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/dist/back.js +2 -2
- package/dist/endpoint.js +0 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/index.min.js +7 -7
- package/dist/index.min.js.map +4 -4
- package/dist/quickAuth.js +1 -1
- package/dist/sdk.js +3 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/back.ts +2 -8
- package/src/endpoint.ts +0 -1
- package/src/index.ts +2 -4
- package/src/quickAuth.ts +1 -1
- package/src/sdk.ts +3 -1
- package/src/solanaProvider.ts +1 -1
- package/src/types.ts +3 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@farcaster/miniapp-sdk",
|
|
3
|
-
"version": "0.0.0-canary-
|
|
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-
|
|
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
|
|
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
|
|
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
|
-
|
|
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
|
}
|
package/src/solanaProvider.ts
CHANGED
package/src/types.ts
CHANGED
|
@@ -45,7 +45,9 @@ export type EventMap = {
|
|
|
45
45
|
}) => void
|
|
46
46
|
miniAppAddRejected: ({
|
|
47
47
|
reason,
|
|
48
|
-
}: {
|
|
48
|
+
}: {
|
|
49
|
+
reason: AddMiniApp.AddMiniAppRejectedReason
|
|
50
|
+
}) => void
|
|
49
51
|
miniAppRemoved: () => void
|
|
50
52
|
notificationsEnabled: ({
|
|
51
53
|
notificationDetails,
|