@farcaster/frame-sdk 0.0.28 → 0.0.30

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, Context, FrameNotificationDetails, ReadyOptions, SetPrimaryButtonOptions, SignIn, ViewProfile } from '@farcaster/frame-core';
1
+ import type { AddFrame, Context, FrameNotificationDetails, Ready, SetPrimaryButtonOptions, SignIn, Swap, ViewProfile, ViewToken } from '@farcaster/frame-core';
2
2
  import type { EventEmitter } from 'eventemitter3';
3
3
  import type { Provider } from 'ox';
4
4
  declare global {
@@ -31,13 +31,15 @@ type SetPrimaryButton = (options: SetPrimaryButtonOptions) => Promise<void>;
31
31
  export type FrameSDK = {
32
32
  context: Promise<Context.FrameContext>;
33
33
  actions: {
34
- ready: (options?: Partial<ReadyOptions>) => Promise<void>;
34
+ ready: (options?: Partial<Ready.ReadyOptions>) => Promise<void>;
35
35
  openUrl: (url: string) => Promise<void>;
36
36
  close: () => Promise<void>;
37
37
  setPrimaryButton: SetPrimaryButton;
38
38
  addFrame: AddFrame.AddFrame;
39
39
  signIn: SignIn.SignIn;
40
40
  viewProfile: ViewProfile.ViewProfile;
41
+ viewToken: ViewToken.ViewToken;
42
+ swap: Swap.Swap;
41
43
  };
42
44
  wallet: {
43
45
  ethProvider: Provider.Provider;
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@farcaster/frame-sdk",
3
- "version": "0.0.28",
3
+ "version": "0.0.30",
4
4
  "main": "dist/index.js",
5
5
  "files": [
6
6
  "dist",
7
7
  "src"
8
8
  ],
9
9
  "devDependencies": {
10
- "esbuild": "^0.24.2",
10
+ "esbuild": "^0.25.0",
11
11
  "mipd": "^0.0.7",
12
12
  "typescript": "^5.7.2",
13
13
  "@farcaster/tsconfig": "0.0.2"
@@ -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.26"
19
+ "@farcaster/frame-core": "0.0.28"
20
20
  },
21
21
  "scripts": {
22
22
  "clean": "rm -rf dist",
package/src/sdk.ts CHANGED
@@ -37,6 +37,8 @@ export const sdk: FrameSDK = {
37
37
  ready: frameHost.ready.bind(frameHost),
38
38
  close: frameHost.close.bind(frameHost),
39
39
  viewProfile: frameHost.viewProfile.bind(frameHost),
40
+ viewToken: frameHost.viewToken.bind(frameHost),
41
+ swap: frameHost.swap.bind(frameHost),
40
42
  signIn: async (options) => {
41
43
  const response = await frameHost.signIn(options)
42
44
  if (response.result) {
package/src/types.ts CHANGED
@@ -2,10 +2,12 @@ import type {
2
2
  AddFrame,
3
3
  Context,
4
4
  FrameNotificationDetails,
5
- ReadyOptions,
5
+ Ready,
6
6
  SetPrimaryButtonOptions,
7
7
  SignIn,
8
+ Swap,
8
9
  ViewProfile,
10
+ ViewToken,
9
11
  } from '@farcaster/frame-core'
10
12
  import type { EventEmitter } from 'eventemitter3'
11
13
  import type { Provider } from 'ox'
@@ -49,13 +51,15 @@ type SetPrimaryButton = (options: SetPrimaryButtonOptions) => Promise<void>
49
51
  export type FrameSDK = {
50
52
  context: Promise<Context.FrameContext>
51
53
  actions: {
52
- ready: (options?: Partial<ReadyOptions>) => Promise<void>
54
+ ready: (options?: Partial<Ready.ReadyOptions>) => Promise<void>
53
55
  openUrl: (url: string) => Promise<void>
54
56
  close: () => Promise<void>
55
57
  setPrimaryButton: SetPrimaryButton
56
58
  addFrame: AddFrame.AddFrame
57
59
  signIn: SignIn.SignIn
58
60
  viewProfile: ViewProfile.ViewProfile
61
+ viewToken: ViewToken.ViewToken
62
+ swap: Swap.Swap
59
63
  }
60
64
  wallet: {
61
65
  ethProvider: Provider.Provider