@farcaster/frame-sdk 0.0.32 → 0.0.35

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,6 +1,6 @@
1
- import type { AddFrame, Context, FrameNotificationDetails, Ready, SetPrimaryButtonOptions, SignIn, Swap, ViewProfile, ViewToken } from '@farcaster/frame-core';
1
+ import type { AddFrame, ComposeCast, Context, FrameNotificationDetails, Ready, SetPrimaryButtonOptions, SignIn, Swap, ViewProfile, ViewToken } from '@farcaster/frame-core';
2
2
  import type { EventEmitter } from 'eventemitter3';
3
- import type { Provider } from 'ox';
3
+ import type * as Provider from 'ox/Provider';
4
4
  declare global {
5
5
  interface Window {
6
6
  ReactNativeWebView: {
@@ -40,6 +40,7 @@ export type FrameSDK = {
40
40
  viewProfile: ViewProfile.ViewProfile;
41
41
  viewToken: ViewToken.ViewToken;
42
42
  swap: Swap.Swap;
43
+ composeCast: <close extends boolean | undefined = undefined>(options?: ComposeCast.Options<close>) => Promise<ComposeCast.Result<close>>;
43
44
  };
44
45
  wallet: {
45
46
  ethProvider: Provider.Provider;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@farcaster/frame-sdk",
3
- "version": "0.0.32",
3
+ "version": "0.0.35",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -22,7 +22,7 @@
22
22
  "comlink": "^4.4.2",
23
23
  "eventemitter3": "^5.0.1",
24
24
  "ox": "^0.4.4",
25
- "@farcaster/frame-core": "0.0.29"
25
+ "@farcaster/frame-core": "0.0.32"
26
26
  },
27
27
  "scripts": {
28
28
  "clean": "rm -rf dist",
package/src/provider.ts CHANGED
@@ -8,7 +8,9 @@ import type {
8
8
  EIP1193Provider,
9
9
  EIP6963ProviderDetail,
10
10
  } from 'mipd'
11
- import { Provider, RpcRequest, RpcResponse } from 'ox'
11
+ import * as Provider from 'ox/Provider'
12
+ import * as RpcRequest from 'ox/RpcRequest'
13
+ import * as RpcResponse from 'ox/RpcResponse'
12
14
  import { frameHost } from './frameHost'
13
15
 
14
16
  const emitter = Provider.createEmitter()
package/src/sdk.ts CHANGED
@@ -71,6 +71,9 @@ export const sdk: FrameSDK = {
71
71
 
72
72
  throw new Error('Unreachable')
73
73
  },
74
+ composeCast(options = {}) {
75
+ return frameHost.composeCast(options) as never
76
+ },
74
77
  },
75
78
  wallet: {
76
79
  ethProvider: provider,
package/src/types.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import type {
2
2
  AddFrame,
3
+ ComposeCast,
3
4
  Context,
4
5
  FrameNotificationDetails,
5
6
  Ready,
@@ -10,7 +11,7 @@ import type {
10
11
  ViewToken,
11
12
  } from '@farcaster/frame-core'
12
13
  import type { EventEmitter } from 'eventemitter3'
13
- import type { Provider } from 'ox'
14
+ import type * as Provider from 'ox/Provider'
14
15
 
15
16
  declare global {
16
17
  interface Window {
@@ -60,6 +61,9 @@ export type FrameSDK = {
60
61
  viewProfile: ViewProfile.ViewProfile
61
62
  viewToken: ViewToken.ViewToken
62
63
  swap: Swap.Swap
64
+ composeCast: <close extends boolean | undefined = undefined>(
65
+ options?: ComposeCast.Options<close>,
66
+ ) => Promise<ComposeCast.Result<close>>
63
67
  }
64
68
  wallet: {
65
69
  ethProvider: Provider.Provider