@farcaster/frame-sdk 0.0.0-canary-20250509164556 → 0.0.0-canary-20250510204457

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/sdk.js CHANGED
@@ -1,13 +1,7 @@
1
- import { AddFrame, SignIn, } from '@farcaster/frame-core';
2
- import { proxy } from 'comlink';
1
+ import { AddFrame, SignIn, createSolanaWalletProvider, } from '@farcaster/frame-core';
3
2
  import { EventEmitter } from 'eventemitter3';
4
3
  import { frameHost } from './frameHost';
5
4
  import { provider } from './provider';
6
- import { initializeReactNativeSDK, isInReactNativeWebViewEnvironment, } from './rn';
7
- // We need to ensure the React Native specific parts of the SDK are initialized
8
- // before the SDK is used. Otherwise certain functionality, such as proxied function
9
- // calls, will not work.
10
- initializeReactNativeSDK();
11
5
  export function createEmitter() {
12
6
  const emitter = new EventEmitter();
13
7
  return {
@@ -110,18 +104,13 @@ export const sdk = {
110
104
  viewToken: frameHost.viewToken.bind(frameHost),
111
105
  sendToken: frameHost.sendToken.bind(frameHost),
112
106
  swapToken: frameHost.swapToken.bind(frameHost),
107
+ solanaProvider: frameHost.solanaProviderRequest
108
+ ? createSolanaWalletProvider(frameHost.solanaProviderRequest)
109
+ : undefined,
113
110
  },
114
111
  wallet: {
115
112
  ethProvider: provider,
116
113
  },
117
- setShareStateProvider: (fn) => {
118
- if (isInReactNativeWebViewEnvironment()) {
119
- frameHost.setShareStateProvider.bind(frameHost)(fn);
120
- }
121
- else {
122
- frameHost.setShareStateProvider.bind(frameHost)(proxy(fn));
123
- }
124
- },
125
114
  };
126
115
  // Required to pass SSR
127
116
  if (typeof document !== 'undefined') {