@farcaster/frame-core 0.0.0-canary-20250523204431 → 0.0.0-canary-20250527172418
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/actions/AddMiniApp.d.ts +3 -3
- package/dist/actions/AddMiniApp.js +1 -1
- package/dist/actions/SignIn.d.ts +2 -2
- package/dist/actions/SignIn.js +1 -1
- package/dist/actions/ViewCast.d.ts +25 -0
- package/dist/actions/ViewCast.js +2 -0
- package/dist/actions/index.d.ts +9 -8
- package/dist/actions/index.js +10 -9
- package/dist/context.d.ts +1 -1
- package/dist/index.d.ts +9 -9
- package/dist/index.js +9 -9
- package/dist/schemas/embeds.js +9 -9
- package/dist/schemas/events.js +3 -3
- package/dist/schemas/index.d.ts +5 -5
- package/dist/schemas/index.js +5 -5
- package/dist/schemas/manifest.js +22 -22
- package/dist/schemas/notifications.js +2 -2
- package/dist/solanaWire.d.ts +1 -1
- package/dist/types.d.ts +10 -8
- package/dist/types.js +4 -3
- package/dist/wallet/index.d.ts +1 -1
- package/dist/wallet/index.js +1 -1
- package/esm/actions/AddMiniApp.d.ts +3 -3
- package/esm/actions/AddMiniApp.js +1 -1
- package/esm/actions/SignIn.d.ts +2 -2
- package/esm/actions/SignIn.js +1 -1
- package/esm/actions/ViewCast.d.ts +25 -0
- package/esm/actions/ViewCast.js +1 -0
- package/esm/actions/index.d.ts +9 -8
- package/esm/actions/index.js +9 -8
- package/esm/context.d.ts +1 -1
- package/esm/index.d.ts +9 -9
- package/esm/index.js +9 -9
- package/esm/schemas/embeds.js +1 -1
- package/esm/schemas/events.js +1 -1
- package/esm/schemas/index.d.ts +5 -5
- package/esm/schemas/index.js +5 -5
- package/esm/schemas/manifest.js +2 -2
- package/esm/schemas/notifications.js +1 -1
- package/esm/solanaWire.d.ts +1 -1
- package/esm/tsconfig.tsbuildinfo +1 -1
- package/esm/types.d.ts +10 -8
- package/esm/types.js +3 -2
- package/esm/wallet/index.d.ts +1 -1
- package/esm/wallet/index.js +1 -1
- package/package.json +2 -2
- package/src/actions/AddMiniApp.ts +3 -3
- package/src/actions/SignIn.ts +2 -2
- package/src/actions/ViewCast.ts +27 -0
- package/src/actions/index.ts +9 -8
- package/src/context.ts +1 -1
- package/src/index.ts +9 -9
- package/src/schemas/embeds.ts +1 -1
- package/src/schemas/events.ts +1 -1
- package/src/schemas/index.ts +5 -5
- package/src/schemas/manifest.ts +2 -2
- package/src/schemas/notifications.ts +1 -1
- package/src/solanaWire.ts +1 -1
- package/src/types.ts +12 -7
- package/src/wallet/index.ts +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as Errors from '../errors';
|
|
2
|
-
import type { OneOf } from '../internal/types';
|
|
3
|
-
import type { FrameNotificationDetails } from '../schemas';
|
|
1
|
+
import * as Errors from '../errors.ts';
|
|
2
|
+
import type { OneOf } from '../internal/types.ts';
|
|
3
|
+
import type { FrameNotificationDetails } from '../schemas/index.ts';
|
|
4
4
|
export type AddMiniAppResult = {
|
|
5
5
|
notificationDetails?: FrameNotificationDetails;
|
|
6
6
|
};
|
|
@@ -34,7 +34,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.RejectedByUser = exports.InvalidDomainManifest = void 0;
|
|
37
|
-
const Errors = __importStar(require("../errors"));
|
|
37
|
+
const Errors = __importStar(require("../errors.js"));
|
|
38
38
|
/**
|
|
39
39
|
* Thrown when the frame does not have a valid domain manifest.
|
|
40
40
|
*/
|
package/dist/actions/SignIn.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as Errors from '../errors';
|
|
2
|
-
import type { OneOf } from '../internal/types';
|
|
1
|
+
import * as Errors from '../errors.ts';
|
|
2
|
+
import type { OneOf } from '../internal/types.ts';
|
|
3
3
|
export type SignInOptions = {
|
|
4
4
|
/**
|
|
5
5
|
* A random string used to prevent replay attacks.
|
package/dist/actions/SignIn.js
CHANGED
|
@@ -34,7 +34,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.RejectedByUser = void 0;
|
|
37
|
-
const Errors = __importStar(require("../errors"));
|
|
37
|
+
const Errors = __importStar(require("../errors.js"));
|
|
38
38
|
/**
|
|
39
39
|
* Thrown when a sign in action was rejected.
|
|
40
40
|
*/
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export type ViewCastOptions = {
|
|
2
|
+
/**
|
|
3
|
+
* The hash of the cast to view.
|
|
4
|
+
* @example "0x6a112e2d35e2d2008e25dd29811e8769d1edd9ca"
|
|
5
|
+
*/
|
|
6
|
+
hash: string;
|
|
7
|
+
/**
|
|
8
|
+
* Whether the app should be closed when this action is called.
|
|
9
|
+
* If true, the app will be closed after opening the cast view.
|
|
10
|
+
*/
|
|
11
|
+
close?: boolean;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Opens a cast view in the Farcaster client.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```ts
|
|
18
|
+
* await sdk.actions.viewCast({
|
|
19
|
+
* hash: "0x6a112e2d35e2d2008e25dd29811e8769d1edd9ca"
|
|
20
|
+
* })
|
|
21
|
+
* ```
|
|
22
|
+
*
|
|
23
|
+
* @see {@link https://miniapps.farcaster.xyz/docs/sdk/actions/view-cast | View Cast Documentation}
|
|
24
|
+
*/
|
|
25
|
+
export type ViewCast = (options: ViewCastOptions) => Promise<void>;
|
package/dist/actions/index.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
export * as AddMiniApp from './AddMiniApp';
|
|
2
|
-
export * as ComposeCast from './ComposeCast';
|
|
3
|
-
export * as Ready from './Ready';
|
|
4
|
-
export * as SignIn from './SignIn';
|
|
5
|
-
export * as SendToken from './SendToken';
|
|
6
|
-
export * as SwapToken from './SwapToken';
|
|
7
|
-
export * as
|
|
8
|
-
export * as
|
|
1
|
+
export * as AddMiniApp from './AddMiniApp.ts';
|
|
2
|
+
export * as ComposeCast from './ComposeCast.ts';
|
|
3
|
+
export * as Ready from './Ready.ts';
|
|
4
|
+
export * as SignIn from './SignIn.ts';
|
|
5
|
+
export * as SendToken from './SendToken.ts';
|
|
6
|
+
export * as SwapToken from './SwapToken.ts';
|
|
7
|
+
export * as ViewCast from './ViewCast.ts';
|
|
8
|
+
export * as ViewProfile from './ViewProfile.ts';
|
|
9
|
+
export * as ViewToken from './ViewToken.ts';
|
package/dist/actions/index.js
CHANGED
|
@@ -33,12 +33,13 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.ViewToken = exports.ViewProfile = exports.SwapToken = exports.SendToken = exports.SignIn = exports.Ready = exports.ComposeCast = exports.AddMiniApp = void 0;
|
|
37
|
-
exports.AddMiniApp = __importStar(require("./AddMiniApp"));
|
|
38
|
-
exports.ComposeCast = __importStar(require("./ComposeCast"));
|
|
39
|
-
exports.Ready = __importStar(require("./Ready"));
|
|
40
|
-
exports.SignIn = __importStar(require("./SignIn"));
|
|
41
|
-
exports.SendToken = __importStar(require("./SendToken"));
|
|
42
|
-
exports.SwapToken = __importStar(require("./SwapToken"));
|
|
43
|
-
exports.
|
|
44
|
-
exports.
|
|
36
|
+
exports.ViewToken = exports.ViewProfile = exports.ViewCast = exports.SwapToken = exports.SendToken = exports.SignIn = exports.Ready = exports.ComposeCast = exports.AddMiniApp = void 0;
|
|
37
|
+
exports.AddMiniApp = __importStar(require("./AddMiniApp.js"));
|
|
38
|
+
exports.ComposeCast = __importStar(require("./ComposeCast.js"));
|
|
39
|
+
exports.Ready = __importStar(require("./Ready.js"));
|
|
40
|
+
exports.SignIn = __importStar(require("./SignIn.js"));
|
|
41
|
+
exports.SendToken = __importStar(require("./SendToken.js"));
|
|
42
|
+
exports.SwapToken = __importStar(require("./SwapToken.js"));
|
|
43
|
+
exports.ViewCast = __importStar(require("./ViewCast.js"));
|
|
44
|
+
exports.ViewProfile = __importStar(require("./ViewProfile.js"));
|
|
45
|
+
exports.ViewToken = __importStar(require("./ViewToken.js"));
|
package/dist/context.d.ts
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export * from './actions';
|
|
2
|
-
export * from './wallet';
|
|
3
|
-
export * as Errors from './errors';
|
|
4
|
-
export * as Context from './context';
|
|
5
|
-
export * as Manifest from './manifest';
|
|
6
|
-
export * from './types';
|
|
7
|
-
export * from './schemas';
|
|
8
|
-
export * from './solana';
|
|
9
|
-
export * from './solanaWire';
|
|
1
|
+
export * from './actions/index.ts';
|
|
2
|
+
export * from './wallet/index.ts';
|
|
3
|
+
export * as Errors from './errors.ts';
|
|
4
|
+
export * as Context from './context.ts';
|
|
5
|
+
export * as Manifest from './manifest.ts';
|
|
6
|
+
export * from './types.ts';
|
|
7
|
+
export * from './schemas/index.ts';
|
|
8
|
+
export * from './solana.ts';
|
|
9
|
+
export * from './solanaWire.ts';
|
package/dist/index.js
CHANGED
|
@@ -37,12 +37,12 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
37
37
|
})();
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.Manifest = exports.Context = exports.Errors = void 0;
|
|
40
|
-
__exportStar(require("./actions"), exports);
|
|
41
|
-
__exportStar(require("./wallet"), exports);
|
|
42
|
-
exports.Errors = __importStar(require("./errors"));
|
|
43
|
-
exports.Context = __importStar(require("./context"));
|
|
44
|
-
exports.Manifest = __importStar(require("./manifest"));
|
|
45
|
-
__exportStar(require("./types"), exports);
|
|
46
|
-
__exportStar(require("./schemas"), exports);
|
|
47
|
-
__exportStar(require("./solana"), exports);
|
|
48
|
-
__exportStar(require("./solanaWire"), exports);
|
|
40
|
+
__exportStar(require("./actions/index.js"), exports);
|
|
41
|
+
__exportStar(require("./wallet/index.js"), exports);
|
|
42
|
+
exports.Errors = __importStar(require("./errors.js"));
|
|
43
|
+
exports.Context = __importStar(require("./context.js"));
|
|
44
|
+
exports.Manifest = __importStar(require("./manifest.js"));
|
|
45
|
+
__exportStar(require("./types.js"), exports);
|
|
46
|
+
__exportStar(require("./schemas/index.js"), exports);
|
|
47
|
+
__exportStar(require("./solana.js"), exports);
|
|
48
|
+
__exportStar(require("./solanaWire.js"), exports);
|
package/dist/schemas/embeds.js
CHANGED
|
@@ -2,30 +2,30 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.safeParseFrameEmbed = exports.frameEmbedNextSchema = exports.buttonSchema = exports.actionSchema = exports.actionViewTokenSchema = exports.actionLaunchFrameSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
const
|
|
5
|
+
const shared_ts_1 = require("./shared.js");
|
|
6
6
|
exports.actionLaunchFrameSchema = zod_1.z.object({
|
|
7
7
|
type: zod_1.z.literal('launch_frame'),
|
|
8
|
-
name:
|
|
9
|
-
url:
|
|
10
|
-
splashImageUrl:
|
|
11
|
-
splashBackgroundColor:
|
|
8
|
+
name: shared_ts_1.frameNameSchema,
|
|
9
|
+
url: shared_ts_1.secureUrlSchema.optional(),
|
|
10
|
+
splashImageUrl: shared_ts_1.secureUrlSchema.optional(),
|
|
11
|
+
splashBackgroundColor: shared_ts_1.hexColorSchema.optional(),
|
|
12
12
|
});
|
|
13
13
|
exports.actionViewTokenSchema = zod_1.z.object({
|
|
14
14
|
type: zod_1.z.literal('view_token'),
|
|
15
|
-
token:
|
|
15
|
+
token: shared_ts_1.caip19TokenSchema,
|
|
16
16
|
});
|
|
17
17
|
exports.actionSchema = zod_1.z.discriminatedUnion('type', [
|
|
18
18
|
exports.actionLaunchFrameSchema,
|
|
19
19
|
exports.actionViewTokenSchema,
|
|
20
20
|
]);
|
|
21
21
|
exports.buttonSchema = zod_1.z.object({
|
|
22
|
-
title:
|
|
22
|
+
title: shared_ts_1.buttonTitleSchema,
|
|
23
23
|
action: exports.actionSchema,
|
|
24
24
|
});
|
|
25
25
|
exports.frameEmbedNextSchema = zod_1.z.object({
|
|
26
26
|
version: zod_1.z.literal('next'),
|
|
27
|
-
imageUrl:
|
|
28
|
-
aspectRatio:
|
|
27
|
+
imageUrl: shared_ts_1.secureUrlSchema,
|
|
28
|
+
aspectRatio: shared_ts_1.aspectRatioSchema.optional(),
|
|
29
29
|
button: exports.buttonSchema,
|
|
30
30
|
});
|
|
31
31
|
const safeParseFrameEmbed = (rawResponse) => exports.frameEmbedNextSchema.safeParse(rawResponse);
|
package/dist/schemas/events.js
CHANGED
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.serverEventSchema = exports.notificationsDisabledSchema = exports.eventNotificationsEnabledSchema = exports.eventFrameRemovedSchema = exports.eventFrameAddedSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
const
|
|
5
|
+
const notifications_ts_1 = require("./notifications.js");
|
|
6
6
|
exports.eventFrameAddedSchema = zod_1.z.object({
|
|
7
7
|
event: zod_1.z.literal('frame_added'),
|
|
8
|
-
notificationDetails:
|
|
8
|
+
notificationDetails: notifications_ts_1.notificationDetailsSchema.optional(),
|
|
9
9
|
});
|
|
10
10
|
exports.eventFrameRemovedSchema = zod_1.z.object({
|
|
11
11
|
event: zod_1.z.literal('frame_removed'),
|
|
12
12
|
});
|
|
13
13
|
exports.eventNotificationsEnabledSchema = zod_1.z.object({
|
|
14
14
|
event: zod_1.z.literal('notifications_enabled'),
|
|
15
|
-
notificationDetails:
|
|
15
|
+
notificationDetails: notifications_ts_1.notificationDetailsSchema.required(),
|
|
16
16
|
});
|
|
17
17
|
exports.notificationsDisabledSchema = zod_1.z.object({
|
|
18
18
|
event: zod_1.z.literal('notifications_disabled'),
|
package/dist/schemas/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from './embeds';
|
|
2
|
-
export * from './events';
|
|
3
|
-
export * from './shared';
|
|
4
|
-
export * from './manifest';
|
|
5
|
-
export * from './notifications';
|
|
1
|
+
export * from './embeds.ts';
|
|
2
|
+
export * from './events.ts';
|
|
3
|
+
export * from './shared.ts';
|
|
4
|
+
export * from './manifest.ts';
|
|
5
|
+
export * from './notifications.ts';
|
package/dist/schemas/index.js
CHANGED
|
@@ -14,8 +14,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./embeds"), exports);
|
|
18
|
-
__exportStar(require("./events"), exports);
|
|
19
|
-
__exportStar(require("./shared"), exports);
|
|
20
|
-
__exportStar(require("./manifest"), exports);
|
|
21
|
-
__exportStar(require("./notifications"), exports);
|
|
17
|
+
__exportStar(require("./embeds.js"), exports);
|
|
18
|
+
__exportStar(require("./events.js"), exports);
|
|
19
|
+
__exportStar(require("./shared.js"), exports);
|
|
20
|
+
__exportStar(require("./manifest.js"), exports);
|
|
21
|
+
__exportStar(require("./notifications.js"), exports);
|
package/dist/schemas/manifest.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.domainManifestSchema = exports.domainFrameConfigSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
const
|
|
6
|
-
const
|
|
5
|
+
const types_ts_1 = require("../types.js");
|
|
6
|
+
const shared_ts_1 = require("./shared.js");
|
|
7
7
|
const primaryCategorySchema = zod_1.z.enum([
|
|
8
8
|
'games',
|
|
9
9
|
'social',
|
|
@@ -47,40 +47,40 @@ exports.domainFrameConfigSchema = zod_1.z.object({
|
|
|
47
47
|
zod_1.z.literal('1'),
|
|
48
48
|
zod_1.z.literal('next'),
|
|
49
49
|
]),
|
|
50
|
-
name:
|
|
51
|
-
iconUrl:
|
|
52
|
-
homeUrl:
|
|
50
|
+
name: shared_ts_1.frameNameSchema,
|
|
51
|
+
iconUrl: shared_ts_1.secureUrlSchema,
|
|
52
|
+
homeUrl: shared_ts_1.secureUrlSchema,
|
|
53
53
|
/** deprecated, set ogImageUrl instead */
|
|
54
|
-
imageUrl:
|
|
54
|
+
imageUrl: shared_ts_1.secureUrlSchema.optional(),
|
|
55
55
|
/** deprecated, will rely on fc:frame meta tag */
|
|
56
|
-
buttonTitle:
|
|
57
|
-
splashImageUrl:
|
|
58
|
-
splashBackgroundColor:
|
|
59
|
-
webhookUrl:
|
|
56
|
+
buttonTitle: shared_ts_1.buttonTitleSchema.optional(),
|
|
57
|
+
splashImageUrl: shared_ts_1.secureUrlSchema.optional(),
|
|
58
|
+
splashBackgroundColor: shared_ts_1.hexColorSchema.optional(),
|
|
59
|
+
webhookUrl: shared_ts_1.secureUrlSchema.optional(),
|
|
60
60
|
/** see: https://github.com/farcasterxyz/miniapps/discussions/191 */
|
|
61
|
-
subtitle: (0,
|
|
62
|
-
description: (0,
|
|
63
|
-
screenshotUrls: zod_1.z.array(
|
|
61
|
+
subtitle: (0, shared_ts_1.createSimpleStringSchema)({ max: 30 }).optional(),
|
|
62
|
+
description: (0, shared_ts_1.createSimpleStringSchema)({ max: 170 }).optional(),
|
|
63
|
+
screenshotUrls: zod_1.z.array(shared_ts_1.secureUrlSchema).max(3).optional(),
|
|
64
64
|
primaryCategory: primaryCategorySchema.optional(),
|
|
65
65
|
tags: zod_1.z
|
|
66
|
-
.array((0,
|
|
66
|
+
.array((0, shared_ts_1.createSimpleStringSchema)({ max: 20, noSpaces: true }))
|
|
67
67
|
.max(5)
|
|
68
68
|
.optional(),
|
|
69
|
-
heroImageUrl:
|
|
70
|
-
tagline: (0,
|
|
71
|
-
ogTitle: (0,
|
|
72
|
-
ogDescription: (0,
|
|
73
|
-
ogImageUrl:
|
|
69
|
+
heroImageUrl: shared_ts_1.secureUrlSchema.optional(),
|
|
70
|
+
tagline: (0, shared_ts_1.createSimpleStringSchema)({ max: 30 }).optional(),
|
|
71
|
+
ogTitle: (0, shared_ts_1.createSimpleStringSchema)({ max: 30 }).optional(),
|
|
72
|
+
ogDescription: (0, shared_ts_1.createSimpleStringSchema)({ max: 100 }).optional(),
|
|
73
|
+
ogImageUrl: shared_ts_1.secureUrlSchema.optional(),
|
|
74
74
|
/** see: https://github.com/farcasterxyz/miniapps/discussions/204 */
|
|
75
75
|
noindex: zod_1.z.boolean().optional(),
|
|
76
76
|
/** see https://github.com/farcasterxyz/miniapps/discussions/256 */
|
|
77
77
|
requiredChains: zod_1.z.array(zod_1.z.enum(chainList)).max(chainList.length).optional(),
|
|
78
78
|
requiredCapabilities: zod_1.z
|
|
79
|
-
.array(zod_1.z.enum(
|
|
80
|
-
.max(
|
|
79
|
+
.array(zod_1.z.enum(types_ts_1.miniAppHostCapabilityList))
|
|
80
|
+
.max(types_ts_1.miniAppHostCapabilityList.length)
|
|
81
81
|
.optional(),
|
|
82
82
|
});
|
|
83
83
|
exports.domainManifestSchema = zod_1.z.object({
|
|
84
|
-
accountAssociation:
|
|
84
|
+
accountAssociation: shared_ts_1.encodedJsonFarcasterSignatureSchema,
|
|
85
85
|
frame: exports.domainFrameConfigSchema.optional(),
|
|
86
86
|
});
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.sendNotificationResponseSchema = exports.sendNotificationRequestSchema = exports.notificationDetailsSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
const
|
|
5
|
+
const shared_ts_1 = require("./shared.js");
|
|
6
6
|
exports.notificationDetailsSchema = zod_1.z.object({
|
|
7
7
|
url: zod_1.z.string(),
|
|
8
8
|
token: zod_1.z.string(),
|
|
@@ -11,7 +11,7 @@ exports.sendNotificationRequestSchema = zod_1.z.object({
|
|
|
11
11
|
notificationId: zod_1.z.string().max(128),
|
|
12
12
|
title: zod_1.z.string().max(32),
|
|
13
13
|
body: zod_1.z.string().max(128),
|
|
14
|
-
targetUrl:
|
|
14
|
+
targetUrl: shared_ts_1.secureUrlSchema,
|
|
15
15
|
tokens: zod_1.z.string().array().max(100),
|
|
16
16
|
});
|
|
17
17
|
exports.sendNotificationResponseSchema = zod_1.z.object({
|
package/dist/solanaWire.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { SolanaRequestFn, SolanaWireRequestFn } from './solana';
|
|
1
|
+
import type { SolanaRequestFn, SolanaWireRequestFn } from './solana.ts';
|
|
2
2
|
export declare function wrapSolanaProviderRequest(requestFn: SolanaRequestFn): SolanaWireRequestFn;
|
|
3
3
|
export declare function unwrapSolanaProviderRequest(wrappedRequestFn: SolanaWireRequestFn): SolanaRequestFn;
|
package/dist/types.d.ts
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import type { AddMiniApp, ComposeCast, Ready, SendToken, SignIn, SwapToken, ViewProfile, ViewToken } from './actions';
|
|
2
|
-
import type { FrameContext } from './context';
|
|
3
|
-
import type { EventFrameAdded, EventFrameRemoved, EventNotificationsDisabled, EventNotificationsEnabled } from './schemas';
|
|
4
|
-
import type { SolanaRequestFn, SolanaWireRequestFn } from './solana';
|
|
5
|
-
import type { Ethereum } from './wallet';
|
|
1
|
+
import type { AddMiniApp, ComposeCast, Ready, SendToken, SignIn, SwapToken, ViewCast, ViewProfile, ViewToken } from './actions/index.ts';
|
|
2
|
+
import type { FrameContext } from './context.ts';
|
|
3
|
+
import type { EventFrameAdded, EventFrameRemoved, EventNotificationsDisabled, EventNotificationsEnabled } from './schemas/index.ts';
|
|
4
|
+
import type { SolanaRequestFn, SolanaWireRequestFn } from './solana.ts';
|
|
5
|
+
import type { Ethereum } from './wallet/index.ts';
|
|
6
6
|
export type SetPrimaryButtonOptions = {
|
|
7
7
|
text: string;
|
|
8
8
|
loading?: boolean;
|
|
9
9
|
disabled?: boolean;
|
|
10
10
|
hidden?: boolean;
|
|
11
11
|
};
|
|
12
|
-
export * from './wallet/ethereum';
|
|
13
|
-
export { DEFAULT_READY_OPTIONS, ReadyOptions } from './actions/Ready';
|
|
12
|
+
export * from './wallet/ethereum.ts';
|
|
13
|
+
export { DEFAULT_READY_OPTIONS, ReadyOptions } from './actions/Ready.ts';
|
|
14
14
|
export type SignInOptions = SignIn.SignInOptions;
|
|
15
15
|
export type SetPrimaryButton = (options: SetPrimaryButtonOptions) => void;
|
|
16
16
|
export declare const miniAppHostCapabilityList: [string, ...string[]];
|
|
17
|
-
export type MiniAppHostCapability = 'wallet.getEthereumProvider' | 'wallet.getSolanaProvider' | 'actions.ready' | 'actions.openUrl' | 'actions.close' | 'actions.setPrimaryButton' | 'actions.addMiniApp' | 'actions.signIn' | 'actions.viewProfile' | 'actions.composeCast' | 'actions.viewToken' | 'actions.sendToken' | 'actions.swapToken';
|
|
17
|
+
export type MiniAppHostCapability = 'wallet.getEthereumProvider' | 'wallet.getSolanaProvider' | 'actions.ready' | 'actions.openUrl' | 'actions.close' | 'actions.setPrimaryButton' | 'actions.addMiniApp' | 'actions.signIn' | 'actions.viewCast' | 'actions.viewProfile' | 'actions.composeCast' | 'actions.viewToken' | 'actions.sendToken' | 'actions.swapToken';
|
|
18
18
|
export type GetCapabilities = () => Promise<MiniAppHostCapability[]>;
|
|
19
19
|
export type GetChains = () => Promise<string[]>;
|
|
20
20
|
export type WireFrameHost = {
|
|
@@ -29,6 +29,7 @@ export type WireFrameHost = {
|
|
|
29
29
|
eip6963RequestProvider: () => void;
|
|
30
30
|
solanaProviderRequest?: SolanaWireRequestFn;
|
|
31
31
|
addFrame: AddMiniApp.WireAddMiniApp;
|
|
32
|
+
viewCast: ViewCast.ViewCast;
|
|
32
33
|
viewProfile: ViewProfile.ViewProfile;
|
|
33
34
|
viewToken: ViewToken.ViewToken;
|
|
34
35
|
sendToken: SendToken.SendToken;
|
|
@@ -53,6 +54,7 @@ export type FrameHost = {
|
|
|
53
54
|
eip6963RequestProvider: () => void;
|
|
54
55
|
solanaProviderRequest?: SolanaRequestFn;
|
|
55
56
|
addFrame: AddMiniApp.AddMiniApp;
|
|
57
|
+
viewCast: ViewCast.ViewCast;
|
|
56
58
|
viewProfile: ViewProfile.ViewProfile;
|
|
57
59
|
viewToken: ViewToken.ViewToken;
|
|
58
60
|
sendToken: SendToken.SendToken;
|
package/dist/types.js
CHANGED
|
@@ -16,9 +16,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.miniAppHostCapabilityList = exports.DEFAULT_READY_OPTIONS = void 0;
|
|
18
18
|
// start backwards compat, remove in 1.0
|
|
19
|
-
__exportStar(require("./wallet/ethereum"), exports);
|
|
20
|
-
var
|
|
21
|
-
Object.defineProperty(exports, "DEFAULT_READY_OPTIONS", { enumerable: true, get: function () { return
|
|
19
|
+
__exportStar(require("./wallet/ethereum.js"), exports);
|
|
20
|
+
var Ready_ts_1 = require("./actions/Ready.js");
|
|
21
|
+
Object.defineProperty(exports, "DEFAULT_READY_OPTIONS", { enumerable: true, get: function () { return Ready_ts_1.DEFAULT_READY_OPTIONS; } });
|
|
22
22
|
exports.miniAppHostCapabilityList = [
|
|
23
23
|
'wallet.getEthereumProvider',
|
|
24
24
|
'wallet.getSolanaProvider',
|
|
@@ -28,6 +28,7 @@ exports.miniAppHostCapabilityList = [
|
|
|
28
28
|
'actions.setPrimaryButton',
|
|
29
29
|
'actions.addMiniApp',
|
|
30
30
|
'actions.signIn',
|
|
31
|
+
'actions.viewCast',
|
|
31
32
|
'actions.viewProfile',
|
|
32
33
|
'actions.composeCast',
|
|
33
34
|
'actions.viewToken',
|
package/dist/wallet/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * as Ethereum from './ethereum';
|
|
1
|
+
export * as Ethereum from './ethereum.ts';
|
package/dist/wallet/index.js
CHANGED
|
@@ -34,4 +34,4 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.Ethereum = void 0;
|
|
37
|
-
exports.Ethereum = __importStar(require("./ethereum"));
|
|
37
|
+
exports.Ethereum = __importStar(require("./ethereum.js"));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as Errors from '../errors';
|
|
2
|
-
import type { OneOf } from '../internal/types';
|
|
3
|
-
import type { FrameNotificationDetails } from '../schemas';
|
|
1
|
+
import * as Errors from '../errors.ts';
|
|
2
|
+
import type { OneOf } from '../internal/types.ts';
|
|
3
|
+
import type { FrameNotificationDetails } from '../schemas/index.ts';
|
|
4
4
|
export type AddMiniAppResult = {
|
|
5
5
|
notificationDetails?: FrameNotificationDetails;
|
|
6
6
|
};
|
package/esm/actions/SignIn.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as Errors from '../errors';
|
|
2
|
-
import type { OneOf } from '../internal/types';
|
|
1
|
+
import * as Errors from '../errors.ts';
|
|
2
|
+
import type { OneOf } from '../internal/types.ts';
|
|
3
3
|
export type SignInOptions = {
|
|
4
4
|
/**
|
|
5
5
|
* A random string used to prevent replay attacks.
|
package/esm/actions/SignIn.js
CHANGED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export type ViewCastOptions = {
|
|
2
|
+
/**
|
|
3
|
+
* The hash of the cast to view.
|
|
4
|
+
* @example "0x6a112e2d35e2d2008e25dd29811e8769d1edd9ca"
|
|
5
|
+
*/
|
|
6
|
+
hash: string;
|
|
7
|
+
/**
|
|
8
|
+
* Whether the app should be closed when this action is called.
|
|
9
|
+
* If true, the app will be closed after opening the cast view.
|
|
10
|
+
*/
|
|
11
|
+
close?: boolean;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Opens a cast view in the Farcaster client.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```ts
|
|
18
|
+
* await sdk.actions.viewCast({
|
|
19
|
+
* hash: "0x6a112e2d35e2d2008e25dd29811e8769d1edd9ca"
|
|
20
|
+
* })
|
|
21
|
+
* ```
|
|
22
|
+
*
|
|
23
|
+
* @see {@link https://miniapps.farcaster.xyz/docs/sdk/actions/view-cast | View Cast Documentation}
|
|
24
|
+
*/
|
|
25
|
+
export type ViewCast = (options: ViewCastOptions) => Promise<void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/esm/actions/index.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
export * as AddMiniApp from './AddMiniApp';
|
|
2
|
-
export * as ComposeCast from './ComposeCast';
|
|
3
|
-
export * as Ready from './Ready';
|
|
4
|
-
export * as SignIn from './SignIn';
|
|
5
|
-
export * as SendToken from './SendToken';
|
|
6
|
-
export * as SwapToken from './SwapToken';
|
|
7
|
-
export * as
|
|
8
|
-
export * as
|
|
1
|
+
export * as AddMiniApp from './AddMiniApp.ts';
|
|
2
|
+
export * as ComposeCast from './ComposeCast.ts';
|
|
3
|
+
export * as Ready from './Ready.ts';
|
|
4
|
+
export * as SignIn from './SignIn.ts';
|
|
5
|
+
export * as SendToken from './SendToken.ts';
|
|
6
|
+
export * as SwapToken from './SwapToken.ts';
|
|
7
|
+
export * as ViewCast from './ViewCast.ts';
|
|
8
|
+
export * as ViewProfile from './ViewProfile.ts';
|
|
9
|
+
export * as ViewToken from './ViewToken.ts';
|
package/esm/actions/index.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
export * as AddMiniApp from
|
|
2
|
-
export * as ComposeCast from
|
|
3
|
-
export * as Ready from
|
|
4
|
-
export * as SignIn from
|
|
5
|
-
export * as SendToken from
|
|
6
|
-
export * as SwapToken from
|
|
7
|
-
export * as
|
|
8
|
-
export * as
|
|
1
|
+
export * as AddMiniApp from "./AddMiniApp.js";
|
|
2
|
+
export * as ComposeCast from "./ComposeCast.js";
|
|
3
|
+
export * as Ready from "./Ready.js";
|
|
4
|
+
export * as SignIn from "./SignIn.js";
|
|
5
|
+
export * as SendToken from "./SendToken.js";
|
|
6
|
+
export * as SwapToken from "./SwapToken.js";
|
|
7
|
+
export * as ViewCast from "./ViewCast.js";
|
|
8
|
+
export * as ViewProfile from "./ViewProfile.js";
|
|
9
|
+
export * as ViewToken from "./ViewToken.js";
|
package/esm/context.d.ts
CHANGED
package/esm/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export * from './actions';
|
|
2
|
-
export * from './wallet';
|
|
3
|
-
export * as Errors from './errors';
|
|
4
|
-
export * as Context from './context';
|
|
5
|
-
export * as Manifest from './manifest';
|
|
6
|
-
export * from './types';
|
|
7
|
-
export * from './schemas';
|
|
8
|
-
export * from './solana';
|
|
9
|
-
export * from './solanaWire';
|
|
1
|
+
export * from './actions/index.ts';
|
|
2
|
+
export * from './wallet/index.ts';
|
|
3
|
+
export * as Errors from './errors.ts';
|
|
4
|
+
export * as Context from './context.ts';
|
|
5
|
+
export * as Manifest from './manifest.ts';
|
|
6
|
+
export * from './types.ts';
|
|
7
|
+
export * from './schemas/index.ts';
|
|
8
|
+
export * from './solana.ts';
|
|
9
|
+
export * from './solanaWire.ts';
|
package/esm/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * as Errors from
|
|
4
|
-
export * as Context from
|
|
5
|
-
export * as Manifest from
|
|
6
|
-
export * from
|
|
7
|
-
export * from
|
|
8
|
-
export * from
|
|
9
|
-
export * from
|
|
1
|
+
export * from "./actions/index.js";
|
|
2
|
+
export * from "./wallet/index.js";
|
|
3
|
+
export * as Errors from "./errors.js";
|
|
4
|
+
export * as Context from "./context.js";
|
|
5
|
+
export * as Manifest from "./manifest.js";
|
|
6
|
+
export * from "./types.js";
|
|
7
|
+
export * from "./schemas/index.js";
|
|
8
|
+
export * from "./solana.js";
|
|
9
|
+
export * from "./solanaWire.js";
|
package/esm/schemas/embeds.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { aspectRatioSchema, buttonTitleSchema, caip19TokenSchema, frameNameSchema, hexColorSchema, secureUrlSchema, } from
|
|
2
|
+
import { aspectRatioSchema, buttonTitleSchema, caip19TokenSchema, frameNameSchema, hexColorSchema, secureUrlSchema, } from "./shared.js";
|
|
3
3
|
export const actionLaunchFrameSchema = z.object({
|
|
4
4
|
type: z.literal('launch_frame'),
|
|
5
5
|
name: frameNameSchema,
|
package/esm/schemas/events.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { notificationDetailsSchema } from
|
|
2
|
+
import { notificationDetailsSchema } from "./notifications.js";
|
|
3
3
|
export const eventFrameAddedSchema = z.object({
|
|
4
4
|
event: z.literal('frame_added'),
|
|
5
5
|
notificationDetails: notificationDetailsSchema.optional(),
|
package/esm/schemas/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from './embeds';
|
|
2
|
-
export * from './events';
|
|
3
|
-
export * from './shared';
|
|
4
|
-
export * from './manifest';
|
|
5
|
-
export * from './notifications';
|
|
1
|
+
export * from './embeds.ts';
|
|
2
|
+
export * from './events.ts';
|
|
3
|
+
export * from './shared.ts';
|
|
4
|
+
export * from './manifest.ts';
|
|
5
|
+
export * from './notifications.ts';
|
package/esm/schemas/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
1
|
+
export * from "./embeds.js";
|
|
2
|
+
export * from "./events.js";
|
|
3
|
+
export * from "./shared.js";
|
|
4
|
+
export * from "./manifest.js";
|
|
5
|
+
export * from "./notifications.js";
|