@farcaster/miniapp-core 0.3.1 → 0.3.3
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/index.d.ts +1 -1
- package/dist/actions/index.js +2 -2
- package/dist/index.d.ts +3 -3
- package/dist/index.js +4 -4
- package/dist/schemas/index.d.ts +1 -1
- package/dist/schemas/index.js +1 -1
- package/dist/schemas/manifest.d.ts +117 -1
- package/dist/schemas/manifest.js +6 -0
- package/dist/schemas/shared.js +1 -1
- package/dist/solanaWire.js +1 -1
- package/dist/types.d.ts +3 -1
- package/dist/types.js +2 -2
- package/esm/actions/index.d.ts +1 -1
- package/esm/actions/index.js +1 -1
- package/esm/index.d.ts +3 -3
- package/esm/index.js +3 -3
- package/esm/schemas/index.d.ts +1 -1
- package/esm/schemas/index.js +1 -1
- package/esm/schemas/manifest.d.ts +117 -1
- package/esm/schemas/manifest.js +6 -0
- package/esm/schemas/shared.js +1 -1
- package/esm/solanaWire.js +1 -1
- package/esm/tsconfig.tsbuildinfo +1 -1
- package/esm/types.d.ts +3 -1
- package/esm/types.js +1 -1
- package/package.json +1 -1
- package/src/actions/index.ts +1 -1
- package/src/index.ts +3 -3
- package/src/schemas/index.ts +1 -1
- package/src/schemas/manifest.ts +6 -0
- package/src/schemas/shared.ts +5 -2
- package/src/solana.ts +1 -3
- package/src/solanaWire.ts +1 -1
- package/src/types.ts +3 -1
package/dist/actions/index.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ export * as AddMiniApp from './AddMiniApp.ts';
|
|
|
2
2
|
export * as ComposeCast from './ComposeCast.ts';
|
|
3
3
|
export * as Haptics from './Haptics.ts';
|
|
4
4
|
export * as Ready from './Ready.ts';
|
|
5
|
-
export * as SignIn from './SignIn.ts';
|
|
6
5
|
export * as SendToken from './SendToken.ts';
|
|
6
|
+
export * as SignIn from './SignIn.ts';
|
|
7
7
|
export * as SwapToken from './SwapToken.ts';
|
|
8
8
|
export * as ViewCast from './ViewCast.ts';
|
|
9
9
|
export * as ViewProfile from './ViewProfile.ts';
|
package/dist/actions/index.js
CHANGED
|
@@ -33,13 +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.ViewCast = exports.SwapToken = exports.
|
|
36
|
+
exports.ViewToken = exports.ViewProfile = exports.ViewCast = exports.SwapToken = exports.SignIn = exports.SendToken = exports.Ready = exports.Haptics = exports.ComposeCast = exports.AddMiniApp = void 0;
|
|
37
37
|
exports.AddMiniApp = __importStar(require("./AddMiniApp.js"));
|
|
38
38
|
exports.ComposeCast = __importStar(require("./ComposeCast.js"));
|
|
39
39
|
exports.Haptics = __importStar(require("./Haptics.js"));
|
|
40
40
|
exports.Ready = __importStar(require("./Ready.js"));
|
|
41
|
-
exports.SignIn = __importStar(require("./SignIn.js"));
|
|
42
41
|
exports.SendToken = __importStar(require("./SendToken.js"));
|
|
42
|
+
exports.SignIn = __importStar(require("./SignIn.js"));
|
|
43
43
|
exports.SwapToken = __importStar(require("./SwapToken.js"));
|
|
44
44
|
exports.ViewCast = __importStar(require("./ViewCast.js"));
|
|
45
45
|
exports.ViewProfile = __importStar(require("./ViewProfile.js"));
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export * from './actions/index.ts';
|
|
2
|
-
export * from './wallet/index.ts';
|
|
3
2
|
export * as Back from './back.ts';
|
|
4
|
-
export * as Errors from './errors.ts';
|
|
5
3
|
export * as Context from './context.ts';
|
|
4
|
+
export * as Errors from './errors.ts';
|
|
6
5
|
export * as Manifest from './manifest.ts';
|
|
7
|
-
export * from './types.ts';
|
|
8
6
|
export * from './schemas/index.ts';
|
|
9
7
|
export * from './solana.ts';
|
|
10
8
|
export * from './solanaWire.ts';
|
|
9
|
+
export * from './types.ts';
|
|
10
|
+
export * from './wallet/index.ts';
|
package/dist/index.js
CHANGED
|
@@ -36,14 +36,14 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
36
36
|
};
|
|
37
37
|
})();
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.Manifest = exports.
|
|
39
|
+
exports.Manifest = exports.Errors = exports.Context = exports.Back = void 0;
|
|
40
40
|
__exportStar(require("./actions/index.js"), exports);
|
|
41
|
-
__exportStar(require("./wallet/index.js"), exports);
|
|
42
41
|
exports.Back = __importStar(require("./back.js"));
|
|
43
|
-
exports.Errors = __importStar(require("./errors.js"));
|
|
44
42
|
exports.Context = __importStar(require("./context.js"));
|
|
43
|
+
exports.Errors = __importStar(require("./errors.js"));
|
|
45
44
|
exports.Manifest = __importStar(require("./manifest.js"));
|
|
46
|
-
__exportStar(require("./types.js"), exports);
|
|
47
45
|
__exportStar(require("./schemas/index.js"), exports);
|
|
48
46
|
__exportStar(require("./solana.js"), exports);
|
|
49
47
|
__exportStar(require("./solanaWire.js"), exports);
|
|
48
|
+
__exportStar(require("./types.js"), exports);
|
|
49
|
+
__exportStar(require("./wallet/index.js"), exports);
|
package/dist/schemas/index.d.ts
CHANGED
package/dist/schemas/index.js
CHANGED
|
@@ -16,6 +16,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./embeds.js"), exports);
|
|
18
18
|
__exportStar(require("./events.js"), exports);
|
|
19
|
-
__exportStar(require("./shared.js"), exports);
|
|
20
19
|
__exportStar(require("./manifest.js"), exports);
|
|
21
20
|
__exportStar(require("./notifications.js"), exports);
|
|
21
|
+
__exportStar(require("./shared.js"), exports);
|
|
@@ -133,7 +133,7 @@ export declare const domainMiniAppConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
133
133
|
castShareUrl?: string | undefined;
|
|
134
134
|
canonicalDomain?: string | undefined;
|
|
135
135
|
}>;
|
|
136
|
-
export declare const domainManifestSchema: z.ZodEffects<z.ZodObject<{
|
|
136
|
+
export declare const domainManifestSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
137
137
|
accountAssociation: z.ZodObject<{
|
|
138
138
|
header: z.ZodString;
|
|
139
139
|
payload: z.ZodString;
|
|
@@ -647,4 +647,120 @@ export declare const domainManifestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
647
647
|
castShareUrl?: string | undefined;
|
|
648
648
|
canonicalDomain?: string | undefined;
|
|
649
649
|
} | undefined;
|
|
650
|
+
}>, {
|
|
651
|
+
frame: {
|
|
652
|
+
name: string;
|
|
653
|
+
version: "1" | "next" | "0.0.0" | "0.0.1";
|
|
654
|
+
iconUrl: string;
|
|
655
|
+
homeUrl: string;
|
|
656
|
+
splashImageUrl?: string | undefined;
|
|
657
|
+
splashBackgroundColor?: string | undefined;
|
|
658
|
+
imageUrl?: string | undefined;
|
|
659
|
+
buttonTitle?: string | undefined;
|
|
660
|
+
webhookUrl?: string | undefined;
|
|
661
|
+
subtitle?: string | undefined;
|
|
662
|
+
description?: string | undefined;
|
|
663
|
+
screenshotUrls?: string[] | undefined;
|
|
664
|
+
primaryCategory?: "games" | "social" | "finance" | "utility" | "productivity" | "health-fitness" | "news-media" | "music" | "shopping" | "education" | "developer-tools" | "entertainment" | "art-creativity" | undefined;
|
|
665
|
+
tags?: string[] | undefined;
|
|
666
|
+
heroImageUrl?: string | undefined;
|
|
667
|
+
tagline?: string | undefined;
|
|
668
|
+
ogTitle?: string | undefined;
|
|
669
|
+
ogDescription?: string | undefined;
|
|
670
|
+
ogImageUrl?: string | undefined;
|
|
671
|
+
noindex?: boolean | undefined;
|
|
672
|
+
requiredChains?: ("eip155:1" | "eip155:8453" | "eip155:42161" | "eip155:421614" | "eip155:84532" | "eip155:666666666" | "eip155:100" | "eip155:10" | "eip155:11155420" | "eip155:137" | "eip155:11155111" | "eip155:7777777" | "eip155:130" | "eip155:10143" | "eip155:42220" | "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp")[] | undefined;
|
|
673
|
+
requiredCapabilities?: ("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" | "haptics.impactOccurred" | "haptics.notificationOccurred" | "haptics.selectionChanged" | "back")[] | undefined;
|
|
674
|
+
castShareUrl?: string | undefined;
|
|
675
|
+
canonicalDomain?: string | undefined;
|
|
676
|
+
} | undefined;
|
|
677
|
+
accountAssociation: {
|
|
678
|
+
header: string;
|
|
679
|
+
payload: string;
|
|
680
|
+
signature: string;
|
|
681
|
+
};
|
|
682
|
+
miniapp?: {
|
|
683
|
+
name: string;
|
|
684
|
+
version: "1" | "next" | "0.0.0" | "0.0.1";
|
|
685
|
+
iconUrl: string;
|
|
686
|
+
homeUrl: string;
|
|
687
|
+
splashImageUrl?: string | undefined;
|
|
688
|
+
splashBackgroundColor?: string | undefined;
|
|
689
|
+
imageUrl?: string | undefined;
|
|
690
|
+
buttonTitle?: string | undefined;
|
|
691
|
+
webhookUrl?: string | undefined;
|
|
692
|
+
subtitle?: string | undefined;
|
|
693
|
+
description?: string | undefined;
|
|
694
|
+
screenshotUrls?: string[] | undefined;
|
|
695
|
+
primaryCategory?: "games" | "social" | "finance" | "utility" | "productivity" | "health-fitness" | "news-media" | "music" | "shopping" | "education" | "developer-tools" | "entertainment" | "art-creativity" | undefined;
|
|
696
|
+
tags?: string[] | undefined;
|
|
697
|
+
heroImageUrl?: string | undefined;
|
|
698
|
+
tagline?: string | undefined;
|
|
699
|
+
ogTitle?: string | undefined;
|
|
700
|
+
ogDescription?: string | undefined;
|
|
701
|
+
ogImageUrl?: string | undefined;
|
|
702
|
+
noindex?: boolean | undefined;
|
|
703
|
+
requiredChains?: ("eip155:1" | "eip155:8453" | "eip155:42161" | "eip155:421614" | "eip155:84532" | "eip155:666666666" | "eip155:100" | "eip155:10" | "eip155:11155420" | "eip155:137" | "eip155:11155111" | "eip155:7777777" | "eip155:130" | "eip155:10143" | "eip155:42220" | "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp")[] | undefined;
|
|
704
|
+
requiredCapabilities?: ("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" | "haptics.impactOccurred" | "haptics.notificationOccurred" | "haptics.selectionChanged" | "back")[] | undefined;
|
|
705
|
+
castShareUrl?: string | undefined;
|
|
706
|
+
canonicalDomain?: string | undefined;
|
|
707
|
+
} | undefined;
|
|
708
|
+
}, {
|
|
709
|
+
accountAssociation: {
|
|
710
|
+
header: string;
|
|
711
|
+
payload: string;
|
|
712
|
+
signature: string;
|
|
713
|
+
};
|
|
714
|
+
miniapp?: {
|
|
715
|
+
name: string;
|
|
716
|
+
version: "1" | "next" | "0.0.0" | "0.0.1";
|
|
717
|
+
iconUrl: string;
|
|
718
|
+
homeUrl: string;
|
|
719
|
+
splashImageUrl?: string | undefined;
|
|
720
|
+
splashBackgroundColor?: string | undefined;
|
|
721
|
+
imageUrl?: string | undefined;
|
|
722
|
+
buttonTitle?: string | undefined;
|
|
723
|
+
webhookUrl?: string | undefined;
|
|
724
|
+
subtitle?: string | undefined;
|
|
725
|
+
description?: string | undefined;
|
|
726
|
+
screenshotUrls?: string[] | undefined;
|
|
727
|
+
primaryCategory?: "games" | "social" | "finance" | "utility" | "productivity" | "health-fitness" | "news-media" | "music" | "shopping" | "education" | "developer-tools" | "entertainment" | "art-creativity" | undefined;
|
|
728
|
+
tags?: string[] | undefined;
|
|
729
|
+
heroImageUrl?: string | undefined;
|
|
730
|
+
tagline?: string | undefined;
|
|
731
|
+
ogTitle?: string | undefined;
|
|
732
|
+
ogDescription?: string | undefined;
|
|
733
|
+
ogImageUrl?: string | undefined;
|
|
734
|
+
noindex?: boolean | undefined;
|
|
735
|
+
requiredChains?: ("eip155:1" | "eip155:8453" | "eip155:42161" | "eip155:421614" | "eip155:84532" | "eip155:666666666" | "eip155:100" | "eip155:10" | "eip155:11155420" | "eip155:137" | "eip155:11155111" | "eip155:7777777" | "eip155:130" | "eip155:10143" | "eip155:42220" | "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp")[] | undefined;
|
|
736
|
+
requiredCapabilities?: ("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" | "haptics.impactOccurred" | "haptics.notificationOccurred" | "haptics.selectionChanged" | "back")[] | undefined;
|
|
737
|
+
castShareUrl?: string | undefined;
|
|
738
|
+
canonicalDomain?: string | undefined;
|
|
739
|
+
} | undefined;
|
|
740
|
+
frame?: {
|
|
741
|
+
name: string;
|
|
742
|
+
version: "1" | "next" | "0.0.0" | "0.0.1";
|
|
743
|
+
iconUrl: string;
|
|
744
|
+
homeUrl: string;
|
|
745
|
+
splashImageUrl?: string | undefined;
|
|
746
|
+
splashBackgroundColor?: string | undefined;
|
|
747
|
+
imageUrl?: string | undefined;
|
|
748
|
+
buttonTitle?: string | undefined;
|
|
749
|
+
webhookUrl?: string | undefined;
|
|
750
|
+
subtitle?: string | undefined;
|
|
751
|
+
description?: string | undefined;
|
|
752
|
+
screenshotUrls?: string[] | undefined;
|
|
753
|
+
primaryCategory?: "games" | "social" | "finance" | "utility" | "productivity" | "health-fitness" | "news-media" | "music" | "shopping" | "education" | "developer-tools" | "entertainment" | "art-creativity" | undefined;
|
|
754
|
+
tags?: string[] | undefined;
|
|
755
|
+
heroImageUrl?: string | undefined;
|
|
756
|
+
tagline?: string | undefined;
|
|
757
|
+
ogTitle?: string | undefined;
|
|
758
|
+
ogDescription?: string | undefined;
|
|
759
|
+
ogImageUrl?: string | undefined;
|
|
760
|
+
noindex?: boolean | undefined;
|
|
761
|
+
requiredChains?: ("eip155:1" | "eip155:8453" | "eip155:42161" | "eip155:421614" | "eip155:84532" | "eip155:666666666" | "eip155:100" | "eip155:10" | "eip155:11155420" | "eip155:137" | "eip155:11155111" | "eip155:7777777" | "eip155:130" | "eip155:10143" | "eip155:42220" | "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp")[] | undefined;
|
|
762
|
+
requiredCapabilities?: ("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" | "haptics.impactOccurred" | "haptics.notificationOccurred" | "haptics.selectionChanged" | "back")[] | undefined;
|
|
763
|
+
castShareUrl?: string | undefined;
|
|
764
|
+
canonicalDomain?: string | undefined;
|
|
765
|
+
} | undefined;
|
|
650
766
|
}>;
|
package/dist/schemas/manifest.js
CHANGED
|
@@ -124,4 +124,10 @@ exports.domainManifestSchema = zod_1.z
|
|
|
124
124
|
}, {
|
|
125
125
|
message: 'If both "frame" and "miniapp" are provided, they must be identical',
|
|
126
126
|
path: ['frame', 'miniapp'],
|
|
127
|
+
})
|
|
128
|
+
.transform((schema) => {
|
|
129
|
+
return {
|
|
130
|
+
...schema,
|
|
131
|
+
frame: schema.frame ?? schema.miniapp,
|
|
132
|
+
};
|
|
127
133
|
});
|
package/dist/schemas/shared.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.jsonFarcasterSignatureHeaderSchema = exports.encodedJsonFarcasterSignatureSchema = exports.aspectRatioSchema = exports.domainSchema = exports.hexColorSchema = exports.caip19TokenSchema = exports.buttonTitleSchema = exports.miniAppNameSchema = exports.secureUrlSchema = exports.createSimpleStringSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
const SPECIAL_CHARS_PATTERN = /[
|
|
5
|
+
const SPECIAL_CHARS_PATTERN = /[@#$%^&*+=/\\|~«»]/;
|
|
6
6
|
const REPEATED_PUNCTUATION_PATTERN = /(!{2,}|\?{2,}|-{2,})/;
|
|
7
7
|
// Unicode ranges for emoji detection:
|
|
8
8
|
// \u{1F300}-\u{1F9FF} - Miscellaneous Symbols, Pictographs, Emoticons, Transport, Map, and Supplemental
|
package/dist/solanaWire.js
CHANGED
|
@@ -59,7 +59,7 @@ function unwrapSolanaProviderRequest(wrappedRequestFn) {
|
|
|
59
59
|
return await wrappedRequestFn(request);
|
|
60
60
|
}
|
|
61
61
|
if (request.method === 'signAndSendTransaction') {
|
|
62
|
-
const { transaction
|
|
62
|
+
const { transaction } = request.params;
|
|
63
63
|
const params = {
|
|
64
64
|
transaction: serializeTransaction(transaction),
|
|
65
65
|
};
|
package/dist/types.d.ts
CHANGED
|
@@ -11,8 +11,8 @@ export type SetPrimaryButtonOptions = {
|
|
|
11
11
|
disabled?: boolean;
|
|
12
12
|
hidden?: boolean;
|
|
13
13
|
};
|
|
14
|
-
export * from './wallet/ethereum.ts';
|
|
15
14
|
export { DEFAULT_READY_OPTIONS, ReadyOptions } from './actions/Ready.ts';
|
|
15
|
+
export * from './wallet/ethereum.ts';
|
|
16
16
|
export type SignInOptions = SignIn.SignInOptions;
|
|
17
17
|
export type SetPrimaryButton = (options: SetPrimaryButtonOptions) => void;
|
|
18
18
|
export type { ImpactOccurred, NotificationOccurred, SelectionChanged };
|
|
@@ -31,6 +31,7 @@ export type WireMiniAppHost = {
|
|
|
31
31
|
ethProviderRequestV2: Ethereum.RpcTransport;
|
|
32
32
|
eip6963RequestProvider: () => void;
|
|
33
33
|
solanaProviderRequest?: SolanaWireRequestFn;
|
|
34
|
+
addFrame: AddMiniApp.WireAddMiniApp;
|
|
34
35
|
addMiniApp: AddMiniApp.WireAddMiniApp;
|
|
35
36
|
viewCast: ViewCast.ViewCast;
|
|
36
37
|
viewProfile: ViewProfile.ViewProfile;
|
|
@@ -60,6 +61,7 @@ export type MiniAppHost = {
|
|
|
60
61
|
*/
|
|
61
62
|
eip6963RequestProvider: () => void;
|
|
62
63
|
solanaProviderRequest?: SolanaRequestFn;
|
|
64
|
+
addFrame: AddMiniApp.AddMiniApp;
|
|
63
65
|
addMiniApp: AddMiniApp.AddMiniApp;
|
|
64
66
|
viewCast: ViewCast.ViewCast;
|
|
65
67
|
viewProfile: ViewProfile.ViewProfile;
|
package/dist/types.js
CHANGED
|
@@ -15,10 +15,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.miniAppHostCapabilityList = exports.DEFAULT_READY_OPTIONS = void 0;
|
|
18
|
-
// start backwards compat, remove in 1.0
|
|
19
|
-
__exportStar(require("./wallet/ethereum.js"), exports);
|
|
20
18
|
var Ready_ts_1 = require("./actions/Ready.js");
|
|
21
19
|
Object.defineProperty(exports, "DEFAULT_READY_OPTIONS", { enumerable: true, get: function () { return Ready_ts_1.DEFAULT_READY_OPTIONS; } });
|
|
20
|
+
// start backwards compat, remove in 1.0
|
|
21
|
+
__exportStar(require("./wallet/ethereum.js"), exports);
|
|
22
22
|
exports.miniAppHostCapabilityList = [
|
|
23
23
|
'wallet.getEthereumProvider',
|
|
24
24
|
'wallet.getSolanaProvider',
|
package/esm/actions/index.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ export * as AddMiniApp from './AddMiniApp.ts';
|
|
|
2
2
|
export * as ComposeCast from './ComposeCast.ts';
|
|
3
3
|
export * as Haptics from './Haptics.ts';
|
|
4
4
|
export * as Ready from './Ready.ts';
|
|
5
|
-
export * as SignIn from './SignIn.ts';
|
|
6
5
|
export * as SendToken from './SendToken.ts';
|
|
6
|
+
export * as SignIn from './SignIn.ts';
|
|
7
7
|
export * as SwapToken from './SwapToken.ts';
|
|
8
8
|
export * as ViewCast from './ViewCast.ts';
|
|
9
9
|
export * as ViewProfile from './ViewProfile.ts';
|
package/esm/actions/index.js
CHANGED
|
@@ -2,8 +2,8 @@ export * as AddMiniApp from "./AddMiniApp.js";
|
|
|
2
2
|
export * as ComposeCast from "./ComposeCast.js";
|
|
3
3
|
export * as Haptics from "./Haptics.js";
|
|
4
4
|
export * as Ready from "./Ready.js";
|
|
5
|
-
export * as SignIn from "./SignIn.js";
|
|
6
5
|
export * as SendToken from "./SendToken.js";
|
|
6
|
+
export * as SignIn from "./SignIn.js";
|
|
7
7
|
export * as SwapToken from "./SwapToken.js";
|
|
8
8
|
export * as ViewCast from "./ViewCast.js";
|
|
9
9
|
export * as ViewProfile from "./ViewProfile.js";
|
package/esm/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export * from './actions/index.ts';
|
|
2
|
-
export * from './wallet/index.ts';
|
|
3
2
|
export * as Back from './back.ts';
|
|
4
|
-
export * as Errors from './errors.ts';
|
|
5
3
|
export * as Context from './context.ts';
|
|
4
|
+
export * as Errors from './errors.ts';
|
|
6
5
|
export * as Manifest from './manifest.ts';
|
|
7
|
-
export * from './types.ts';
|
|
8
6
|
export * from './schemas/index.ts';
|
|
9
7
|
export * from './solana.ts';
|
|
10
8
|
export * from './solanaWire.ts';
|
|
9
|
+
export * from './types.ts';
|
|
10
|
+
export * from './wallet/index.ts';
|
package/esm/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export * from "./actions/index.js";
|
|
2
|
-
export * from "./wallet/index.js";
|
|
3
2
|
export * as Back from "./back.js";
|
|
4
|
-
export * as Errors from "./errors.js";
|
|
5
3
|
export * as Context from "./context.js";
|
|
4
|
+
export * as Errors from "./errors.js";
|
|
6
5
|
export * as Manifest from "./manifest.js";
|
|
7
|
-
export * from "./types.js";
|
|
8
6
|
export * from "./schemas/index.js";
|
|
9
7
|
export * from "./solana.js";
|
|
10
8
|
export * from "./solanaWire.js";
|
|
9
|
+
export * from "./types.js";
|
|
10
|
+
export * from "./wallet/index.js";
|
package/esm/schemas/index.d.ts
CHANGED
package/esm/schemas/index.js
CHANGED
|
@@ -133,7 +133,7 @@ export declare const domainMiniAppConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
133
133
|
castShareUrl?: string | undefined;
|
|
134
134
|
canonicalDomain?: string | undefined;
|
|
135
135
|
}>;
|
|
136
|
-
export declare const domainManifestSchema: z.ZodEffects<z.ZodObject<{
|
|
136
|
+
export declare const domainManifestSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
137
137
|
accountAssociation: z.ZodObject<{
|
|
138
138
|
header: z.ZodString;
|
|
139
139
|
payload: z.ZodString;
|
|
@@ -647,4 +647,120 @@ export declare const domainManifestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
647
647
|
castShareUrl?: string | undefined;
|
|
648
648
|
canonicalDomain?: string | undefined;
|
|
649
649
|
} | undefined;
|
|
650
|
+
}>, {
|
|
651
|
+
frame: {
|
|
652
|
+
name: string;
|
|
653
|
+
version: "1" | "next" | "0.0.0" | "0.0.1";
|
|
654
|
+
iconUrl: string;
|
|
655
|
+
homeUrl: string;
|
|
656
|
+
splashImageUrl?: string | undefined;
|
|
657
|
+
splashBackgroundColor?: string | undefined;
|
|
658
|
+
imageUrl?: string | undefined;
|
|
659
|
+
buttonTitle?: string | undefined;
|
|
660
|
+
webhookUrl?: string | undefined;
|
|
661
|
+
subtitle?: string | undefined;
|
|
662
|
+
description?: string | undefined;
|
|
663
|
+
screenshotUrls?: string[] | undefined;
|
|
664
|
+
primaryCategory?: "games" | "social" | "finance" | "utility" | "productivity" | "health-fitness" | "news-media" | "music" | "shopping" | "education" | "developer-tools" | "entertainment" | "art-creativity" | undefined;
|
|
665
|
+
tags?: string[] | undefined;
|
|
666
|
+
heroImageUrl?: string | undefined;
|
|
667
|
+
tagline?: string | undefined;
|
|
668
|
+
ogTitle?: string | undefined;
|
|
669
|
+
ogDescription?: string | undefined;
|
|
670
|
+
ogImageUrl?: string | undefined;
|
|
671
|
+
noindex?: boolean | undefined;
|
|
672
|
+
requiredChains?: ("eip155:1" | "eip155:8453" | "eip155:42161" | "eip155:421614" | "eip155:84532" | "eip155:666666666" | "eip155:100" | "eip155:10" | "eip155:11155420" | "eip155:137" | "eip155:11155111" | "eip155:7777777" | "eip155:130" | "eip155:10143" | "eip155:42220" | "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp")[] | undefined;
|
|
673
|
+
requiredCapabilities?: ("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" | "haptics.impactOccurred" | "haptics.notificationOccurred" | "haptics.selectionChanged" | "back")[] | undefined;
|
|
674
|
+
castShareUrl?: string | undefined;
|
|
675
|
+
canonicalDomain?: string | undefined;
|
|
676
|
+
} | undefined;
|
|
677
|
+
accountAssociation: {
|
|
678
|
+
header: string;
|
|
679
|
+
payload: string;
|
|
680
|
+
signature: string;
|
|
681
|
+
};
|
|
682
|
+
miniapp?: {
|
|
683
|
+
name: string;
|
|
684
|
+
version: "1" | "next" | "0.0.0" | "0.0.1";
|
|
685
|
+
iconUrl: string;
|
|
686
|
+
homeUrl: string;
|
|
687
|
+
splashImageUrl?: string | undefined;
|
|
688
|
+
splashBackgroundColor?: string | undefined;
|
|
689
|
+
imageUrl?: string | undefined;
|
|
690
|
+
buttonTitle?: string | undefined;
|
|
691
|
+
webhookUrl?: string | undefined;
|
|
692
|
+
subtitle?: string | undefined;
|
|
693
|
+
description?: string | undefined;
|
|
694
|
+
screenshotUrls?: string[] | undefined;
|
|
695
|
+
primaryCategory?: "games" | "social" | "finance" | "utility" | "productivity" | "health-fitness" | "news-media" | "music" | "shopping" | "education" | "developer-tools" | "entertainment" | "art-creativity" | undefined;
|
|
696
|
+
tags?: string[] | undefined;
|
|
697
|
+
heroImageUrl?: string | undefined;
|
|
698
|
+
tagline?: string | undefined;
|
|
699
|
+
ogTitle?: string | undefined;
|
|
700
|
+
ogDescription?: string | undefined;
|
|
701
|
+
ogImageUrl?: string | undefined;
|
|
702
|
+
noindex?: boolean | undefined;
|
|
703
|
+
requiredChains?: ("eip155:1" | "eip155:8453" | "eip155:42161" | "eip155:421614" | "eip155:84532" | "eip155:666666666" | "eip155:100" | "eip155:10" | "eip155:11155420" | "eip155:137" | "eip155:11155111" | "eip155:7777777" | "eip155:130" | "eip155:10143" | "eip155:42220" | "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp")[] | undefined;
|
|
704
|
+
requiredCapabilities?: ("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" | "haptics.impactOccurred" | "haptics.notificationOccurred" | "haptics.selectionChanged" | "back")[] | undefined;
|
|
705
|
+
castShareUrl?: string | undefined;
|
|
706
|
+
canonicalDomain?: string | undefined;
|
|
707
|
+
} | undefined;
|
|
708
|
+
}, {
|
|
709
|
+
accountAssociation: {
|
|
710
|
+
header: string;
|
|
711
|
+
payload: string;
|
|
712
|
+
signature: string;
|
|
713
|
+
};
|
|
714
|
+
miniapp?: {
|
|
715
|
+
name: string;
|
|
716
|
+
version: "1" | "next" | "0.0.0" | "0.0.1";
|
|
717
|
+
iconUrl: string;
|
|
718
|
+
homeUrl: string;
|
|
719
|
+
splashImageUrl?: string | undefined;
|
|
720
|
+
splashBackgroundColor?: string | undefined;
|
|
721
|
+
imageUrl?: string | undefined;
|
|
722
|
+
buttonTitle?: string | undefined;
|
|
723
|
+
webhookUrl?: string | undefined;
|
|
724
|
+
subtitle?: string | undefined;
|
|
725
|
+
description?: string | undefined;
|
|
726
|
+
screenshotUrls?: string[] | undefined;
|
|
727
|
+
primaryCategory?: "games" | "social" | "finance" | "utility" | "productivity" | "health-fitness" | "news-media" | "music" | "shopping" | "education" | "developer-tools" | "entertainment" | "art-creativity" | undefined;
|
|
728
|
+
tags?: string[] | undefined;
|
|
729
|
+
heroImageUrl?: string | undefined;
|
|
730
|
+
tagline?: string | undefined;
|
|
731
|
+
ogTitle?: string | undefined;
|
|
732
|
+
ogDescription?: string | undefined;
|
|
733
|
+
ogImageUrl?: string | undefined;
|
|
734
|
+
noindex?: boolean | undefined;
|
|
735
|
+
requiredChains?: ("eip155:1" | "eip155:8453" | "eip155:42161" | "eip155:421614" | "eip155:84532" | "eip155:666666666" | "eip155:100" | "eip155:10" | "eip155:11155420" | "eip155:137" | "eip155:11155111" | "eip155:7777777" | "eip155:130" | "eip155:10143" | "eip155:42220" | "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp")[] | undefined;
|
|
736
|
+
requiredCapabilities?: ("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" | "haptics.impactOccurred" | "haptics.notificationOccurred" | "haptics.selectionChanged" | "back")[] | undefined;
|
|
737
|
+
castShareUrl?: string | undefined;
|
|
738
|
+
canonicalDomain?: string | undefined;
|
|
739
|
+
} | undefined;
|
|
740
|
+
frame?: {
|
|
741
|
+
name: string;
|
|
742
|
+
version: "1" | "next" | "0.0.0" | "0.0.1";
|
|
743
|
+
iconUrl: string;
|
|
744
|
+
homeUrl: string;
|
|
745
|
+
splashImageUrl?: string | undefined;
|
|
746
|
+
splashBackgroundColor?: string | undefined;
|
|
747
|
+
imageUrl?: string | undefined;
|
|
748
|
+
buttonTitle?: string | undefined;
|
|
749
|
+
webhookUrl?: string | undefined;
|
|
750
|
+
subtitle?: string | undefined;
|
|
751
|
+
description?: string | undefined;
|
|
752
|
+
screenshotUrls?: string[] | undefined;
|
|
753
|
+
primaryCategory?: "games" | "social" | "finance" | "utility" | "productivity" | "health-fitness" | "news-media" | "music" | "shopping" | "education" | "developer-tools" | "entertainment" | "art-creativity" | undefined;
|
|
754
|
+
tags?: string[] | undefined;
|
|
755
|
+
heroImageUrl?: string | undefined;
|
|
756
|
+
tagline?: string | undefined;
|
|
757
|
+
ogTitle?: string | undefined;
|
|
758
|
+
ogDescription?: string | undefined;
|
|
759
|
+
ogImageUrl?: string | undefined;
|
|
760
|
+
noindex?: boolean | undefined;
|
|
761
|
+
requiredChains?: ("eip155:1" | "eip155:8453" | "eip155:42161" | "eip155:421614" | "eip155:84532" | "eip155:666666666" | "eip155:100" | "eip155:10" | "eip155:11155420" | "eip155:137" | "eip155:11155111" | "eip155:7777777" | "eip155:130" | "eip155:10143" | "eip155:42220" | "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp")[] | undefined;
|
|
762
|
+
requiredCapabilities?: ("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" | "haptics.impactOccurred" | "haptics.notificationOccurred" | "haptics.selectionChanged" | "back")[] | undefined;
|
|
763
|
+
castShareUrl?: string | undefined;
|
|
764
|
+
canonicalDomain?: string | undefined;
|
|
765
|
+
} | undefined;
|
|
650
766
|
}>;
|
package/esm/schemas/manifest.js
CHANGED
|
@@ -121,4 +121,10 @@ export const domainManifestSchema = z
|
|
|
121
121
|
}, {
|
|
122
122
|
message: 'If both "frame" and "miniapp" are provided, they must be identical',
|
|
123
123
|
path: ['frame', 'miniapp'],
|
|
124
|
+
})
|
|
125
|
+
.transform((schema) => {
|
|
126
|
+
return {
|
|
127
|
+
...schema,
|
|
128
|
+
frame: schema.frame ?? schema.miniapp,
|
|
129
|
+
};
|
|
124
130
|
});
|
package/esm/schemas/shared.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
const SPECIAL_CHARS_PATTERN = /[
|
|
2
|
+
const SPECIAL_CHARS_PATTERN = /[@#$%^&*+=/\\|~«»]/;
|
|
3
3
|
const REPEATED_PUNCTUATION_PATTERN = /(!{2,}|\?{2,}|-{2,})/;
|
|
4
4
|
// Unicode ranges for emoji detection:
|
|
5
5
|
// \u{1F300}-\u{1F9FF} - Miscellaneous Symbols, Pictographs, Emoticons, Transport, Map, and Supplemental
|
package/esm/solanaWire.js
CHANGED
|
@@ -55,7 +55,7 @@ export function unwrapSolanaProviderRequest(wrappedRequestFn) {
|
|
|
55
55
|
return await wrappedRequestFn(request);
|
|
56
56
|
}
|
|
57
57
|
if (request.method === 'signAndSendTransaction') {
|
|
58
|
-
const { transaction
|
|
58
|
+
const { transaction } = request.params;
|
|
59
59
|
const params = {
|
|
60
60
|
transaction: serializeTransaction(transaction),
|
|
61
61
|
};
|