@farcaster/frame-sdk 0.0.52 → 0.0.54
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/ethereumProvider.js +1 -1
- package/dist/frameHost.js +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +3 -3
- package/dist/index.min.js +8 -8
- package/dist/index.min.js.map +4 -4
- package/dist/sdk.d.ts +1 -1
- package/dist/sdk.js +8 -3
- package/dist/solanaProvider.js +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types.d.ts +6 -1
- package/package.json +3 -3
- package/src/ethereumProvider.ts +1 -1
- package/src/frameHost.ts +1 -1
- package/src/index.ts +3 -3
- package/src/sdk.ts +9 -4
- package/src/solanaProvider.ts +1 -1
- package/src/types.ts +6 -0
package/dist/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AddMiniApp, ComposeCast, Context, FrameNotificationDetails, GetCapabilities, GetChains, Ready, SendToken, SetPrimaryButtonOptions, SignIn, SolanaWalletProvider, SwapToken, ViewCast, ViewProfile, ViewToken } from '@farcaster/frame-core';
|
|
1
|
+
import type { AddMiniApp, ComposeCast, Context, FrameNotificationDetails, GetCapabilities, GetChains, Haptics, Ready, SendToken, SetPrimaryButtonOptions, SignIn, SolanaWalletProvider, SwapToken, ViewCast, ViewProfile, ViewToken } from '@farcaster/frame-core';
|
|
2
2
|
import type { EventEmitter } from 'eventemitter3';
|
|
3
3
|
import type * as Provider from 'ox/Provider';
|
|
4
4
|
declare global {
|
|
@@ -47,6 +47,11 @@ export type FrameSDK = {
|
|
|
47
47
|
viewToken: ViewToken.ViewToken;
|
|
48
48
|
sendToken: SendToken.SendToken;
|
|
49
49
|
swapToken: SwapToken.SwapToken;
|
|
50
|
+
haptics: {
|
|
51
|
+
impactOccurred: Haptics.ImpactOccurred;
|
|
52
|
+
notificationOccurred: Haptics.NotificationOccurred;
|
|
53
|
+
selectionChanged: Haptics.SelectionChanged;
|
|
54
|
+
};
|
|
50
55
|
};
|
|
51
56
|
experimental: {
|
|
52
57
|
getSolanaProvider: () => Promise<SolanaWalletProvider | undefined>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@farcaster/frame-sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.54",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -16,14 +16,14 @@
|
|
|
16
16
|
"esbuild": "^0.25.0",
|
|
17
17
|
"mipd": "^0.0.7",
|
|
18
18
|
"typescript": "^5.8.3",
|
|
19
|
-
"@farcaster/tsconfig": "0.0.
|
|
19
|
+
"@farcaster/tsconfig": "0.0.5"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@farcaster/quick-auth": "^0.0.5",
|
|
23
23
|
"comlink": "^4.4.2",
|
|
24
24
|
"eventemitter3": "^5.0.1",
|
|
25
25
|
"ox": "^0.4.4",
|
|
26
|
-
"@farcaster/frame-core": "0.1.
|
|
26
|
+
"@farcaster/frame-core": "0.1.3"
|
|
27
27
|
},
|
|
28
28
|
"scripts": {
|
|
29
29
|
"clean": "rm -rf dist",
|
package/src/ethereumProvider.ts
CHANGED
|
@@ -12,7 +12,7 @@ import type {
|
|
|
12
12
|
import * as Provider from 'ox/Provider'
|
|
13
13
|
import * as RpcRequest from 'ox/RpcRequest'
|
|
14
14
|
import * as RpcResponse from 'ox/RpcResponse'
|
|
15
|
-
import { frameHost } from './frameHost'
|
|
15
|
+
import { frameHost } from './frameHost.ts'
|
|
16
16
|
|
|
17
17
|
const emitter = Provider.createEmitter()
|
|
18
18
|
const store = RpcRequest.createStore()
|
package/src/frameHost.ts
CHANGED
package/src/index.ts
CHANGED
package/src/sdk.ts
CHANGED
|
@@ -6,10 +6,10 @@ import {
|
|
|
6
6
|
import { createLightClient } from '@farcaster/quick-auth/light'
|
|
7
7
|
import { EventEmitter } from 'eventemitter3'
|
|
8
8
|
import * as Siwe from 'ox/Siwe'
|
|
9
|
-
import { ethereumProvider, getEthereumProvider } from './ethereumProvider'
|
|
10
|
-
import { frameHost } from './frameHost'
|
|
11
|
-
import { getSolanaProvider } from './solanaProvider'
|
|
12
|
-
import type { Emitter, EventMap, FrameSDK } from './types'
|
|
9
|
+
import { ethereumProvider, getEthereumProvider } from './ethereumProvider.ts'
|
|
10
|
+
import { frameHost } from './frameHost.ts'
|
|
11
|
+
import { getSolanaProvider } from './solanaProvider.ts'
|
|
12
|
+
import type { Emitter, EventMap, FrameSDK } from './types.ts'
|
|
13
13
|
|
|
14
14
|
export function createEmitter(): Emitter {
|
|
15
15
|
const emitter = new EventEmitter<EventMap>()
|
|
@@ -131,6 +131,11 @@ export const sdk: FrameSDK = {
|
|
|
131
131
|
viewToken: frameHost.viewToken.bind(frameHost),
|
|
132
132
|
sendToken: frameHost.sendToken.bind(frameHost),
|
|
133
133
|
swapToken: frameHost.swapToken.bind(frameHost),
|
|
134
|
+
haptics: {
|
|
135
|
+
impactOccurred: frameHost.impactOccurred.bind(frameHost),
|
|
136
|
+
notificationOccurred: frameHost.notificationOccurred.bind(frameHost),
|
|
137
|
+
selectionChanged: frameHost.selectionChanged.bind(frameHost),
|
|
138
|
+
},
|
|
134
139
|
},
|
|
135
140
|
experimental: {
|
|
136
141
|
getSolanaProvider,
|
package/src/solanaProvider.ts
CHANGED
package/src/types.ts
CHANGED
|
@@ -5,6 +5,7 @@ import type {
|
|
|
5
5
|
FrameNotificationDetails,
|
|
6
6
|
GetCapabilities,
|
|
7
7
|
GetChains,
|
|
8
|
+
Haptics,
|
|
8
9
|
Ready,
|
|
9
10
|
SendToken,
|
|
10
11
|
SetPrimaryButtonOptions,
|
|
@@ -76,6 +77,11 @@ export type FrameSDK = {
|
|
|
76
77
|
viewToken: ViewToken.ViewToken
|
|
77
78
|
sendToken: SendToken.SendToken
|
|
78
79
|
swapToken: SwapToken.SwapToken
|
|
80
|
+
haptics: {
|
|
81
|
+
impactOccurred: Haptics.ImpactOccurred
|
|
82
|
+
notificationOccurred: Haptics.NotificationOccurred
|
|
83
|
+
selectionChanged: Haptics.SelectionChanged
|
|
84
|
+
}
|
|
79
85
|
}
|
|
80
86
|
experimental: {
|
|
81
87
|
getSolanaProvider: () => Promise<SolanaWalletProvider | undefined>
|