@farcaster/frame-sdk 0.0.24 → 0.0.26

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/types.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { AddFrame, FrameContext, FrameNotificationDetails, ReadyOptions, SetPrimaryButtonOptions, SignIn } from '@farcaster/frame-core';
1
+ import type { AddFrame, Context, FrameNotificationDetails, ReadyOptions, SetPrimaryButtonOptions, SignIn, ViewProfile } from '@farcaster/frame-core';
2
2
  import type { EventEmitter } from 'eventemitter3';
3
3
  import type { Provider } from 'ox';
4
4
  declare global {
@@ -29,14 +29,15 @@ export type EventMap = {
29
29
  export type Emitter = Compute<EventEmitter<EventMap>>;
30
30
  type SetPrimaryButton = (options: SetPrimaryButtonOptions) => Promise<void>;
31
31
  export type FrameSDK = {
32
- context: Promise<FrameContext>;
32
+ context: Promise<Context.FrameContext>;
33
33
  actions: {
34
34
  ready: (options?: Partial<ReadyOptions>) => Promise<void>;
35
35
  openUrl: (url: string) => Promise<void>;
36
- signIn: SignIn.SignIn;
37
36
  close: () => Promise<void>;
38
37
  setPrimaryButton: SetPrimaryButton;
39
38
  addFrame: AddFrame.AddFrame;
39
+ signIn: SignIn.SignIn;
40
+ viewProfile: ViewProfile.ViewProfile;
40
41
  };
41
42
  wallet: {
42
43
  ethProvider: Provider.Provider;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@farcaster/frame-sdk",
3
- "version": "0.0.24",
3
+ "version": "0.0.26",
4
4
  "main": "dist/index.js",
5
5
  "files": [
6
6
  "dist",
@@ -16,7 +16,7 @@
16
16
  "comlink": "^4.4.2",
17
17
  "eventemitter3": "^5.0.1",
18
18
  "ox": "^0.4.4",
19
- "@farcaster/frame-core": "0.0.22"
19
+ "@farcaster/frame-core": "0.0.24"
20
20
  },
21
21
  "scripts": {
22
22
  "clean": "rm -rf dist",
package/src/sdk.ts CHANGED
@@ -36,6 +36,7 @@ export const sdk: FrameSDK = {
36
36
  setPrimaryButton: frameHost.setPrimaryButton.bind(frameHost),
37
37
  ready: frameHost.ready.bind(frameHost),
38
38
  close: frameHost.close.bind(frameHost),
39
+ viewProfile: frameHost.viewProfile.bind(frameHost),
39
40
  signIn: async (options) => {
40
41
  const response = await frameHost.signIn(options)
41
42
  if (response.result) {
package/src/types.ts CHANGED
@@ -1,10 +1,11 @@
1
1
  import type {
2
2
  AddFrame,
3
- FrameContext,
3
+ Context,
4
4
  FrameNotificationDetails,
5
5
  ReadyOptions,
6
6
  SetPrimaryButtonOptions,
7
7
  SignIn,
8
+ ViewProfile,
8
9
  } from '@farcaster/frame-core'
9
10
  import type { EventEmitter } from 'eventemitter3'
10
11
  import type { Provider } from 'ox'
@@ -46,14 +47,15 @@ export type Emitter = Compute<EventEmitter<EventMap>>
46
47
  type SetPrimaryButton = (options: SetPrimaryButtonOptions) => Promise<void>
47
48
 
48
49
  export type FrameSDK = {
49
- context: Promise<FrameContext>
50
+ context: Promise<Context.FrameContext>
50
51
  actions: {
51
52
  ready: (options?: Partial<ReadyOptions>) => Promise<void>
52
53
  openUrl: (url: string) => Promise<void>
53
- signIn: SignIn.SignIn
54
54
  close: () => Promise<void>
55
55
  setPrimaryButton: SetPrimaryButton
56
56
  addFrame: AddFrame.AddFrame
57
+ signIn: SignIn.SignIn
58
+ viewProfile: ViewProfile.ViewProfile
57
59
  }
58
60
  wallet: {
59
61
  ethProvider: Provider.Provider