@farcaster/miniapp-sdk 0.0.0-canary-20250816182708 → 0.0.0-canary-20250905164304

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,4 +1,4 @@
1
- import { AddMiniApp, SignIn, } from '@farcaster/miniapp-core';
1
+ import { AddMiniApp, SignIn, SignManifest, } from '@farcaster/miniapp-core';
2
2
  import { createBack } from "./back.js";
3
3
  import { ethereumProvider, getEthereumProvider } from "./ethereumProvider.js";
4
4
  import { miniAppHost } from "./miniAppHost.js";
@@ -99,6 +99,22 @@ export const sdk = {
99
99
  },
100
100
  experimental: {
101
101
  getSolanaProvider,
102
+ signManifest: async (options) => {
103
+ const response = await miniAppHost.signManifest(options);
104
+ if (response.result) {
105
+ return response.result;
106
+ }
107
+ if (response.error.type === 'rejected_by_user') {
108
+ throw new SignManifest.RejectedByUser();
109
+ }
110
+ if (response.error.type === 'invalid_domain') {
111
+ throw new SignManifest.InvalidDomain();
112
+ }
113
+ if (response.error.type === 'generic_error') {
114
+ throw new SignManifest.GenericError(response.error.message);
115
+ }
116
+ throw new Error('Unreachable');
117
+ },
102
118
  quickAuth(options) {
103
119
  return quickAuth.getToken(options);
104
120
  },