@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/src/schemas/shared.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod'
|
|
2
2
|
|
|
3
|
-
const SPECIAL_CHARS_PATTERN = /[
|
|
3
|
+
const SPECIAL_CHARS_PATTERN = /[@#$%^&*+=/\\|~«»]/
|
|
4
4
|
const REPEATED_PUNCTUATION_PATTERN = /(!{2,}|\?{2,}|-{2,})/
|
|
5
5
|
|
|
6
6
|
// Unicode ranges for emoji detection:
|
|
@@ -14,7 +14,10 @@ const EMOJI_PATTERN =
|
|
|
14
14
|
export const createSimpleStringSchema = ({
|
|
15
15
|
max,
|
|
16
16
|
noSpaces,
|
|
17
|
-
}: {
|
|
17
|
+
}: {
|
|
18
|
+
max?: number
|
|
19
|
+
noSpaces?: boolean
|
|
20
|
+
} = {}) => {
|
|
18
21
|
const stringValidations = noSpaces
|
|
19
22
|
? z
|
|
20
23
|
.string()
|
package/src/solana.ts
CHANGED
|
@@ -70,9 +70,7 @@ export const createSolanaWalletProvider = (
|
|
|
70
70
|
request({ method: 'signMessage', params: { message: msg } }),
|
|
71
71
|
signTransaction: <T extends SolanaCombinedTransaction>(transaction: T) =>
|
|
72
72
|
request({ method: 'signTransaction', params: { transaction } }),
|
|
73
|
-
signAndSendTransaction: (input: {
|
|
74
|
-
transaction: SolanaCombinedTransaction
|
|
75
|
-
}) =>
|
|
73
|
+
signAndSendTransaction: (input: { transaction: SolanaCombinedTransaction }) =>
|
|
76
74
|
request({
|
|
77
75
|
method: 'signAndSendTransaction',
|
|
78
76
|
params: input,
|
package/src/solanaWire.ts
CHANGED
|
@@ -95,7 +95,7 @@ export function unwrapSolanaProviderRequest(
|
|
|
95
95
|
return await wrappedRequestFn(request)
|
|
96
96
|
}
|
|
97
97
|
if (request.method === 'signAndSendTransaction') {
|
|
98
|
-
const { transaction
|
|
98
|
+
const { transaction } = request.params
|
|
99
99
|
const params = {
|
|
100
100
|
transaction: serializeTransaction(transaction),
|
|
101
101
|
}
|
package/src/types.ts
CHANGED
|
@@ -34,9 +34,9 @@ export type SetPrimaryButtonOptions = {
|
|
|
34
34
|
hidden?: boolean
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
+
export { DEFAULT_READY_OPTIONS, ReadyOptions } from './actions/Ready.ts'
|
|
37
38
|
// start backwards compat, remove in 1.0
|
|
38
39
|
export * from './wallet/ethereum.ts'
|
|
39
|
-
export { DEFAULT_READY_OPTIONS, ReadyOptions } from './actions/Ready.ts'
|
|
40
40
|
export type SignInOptions = SignIn.SignInOptions
|
|
41
41
|
// end backwards compat
|
|
42
42
|
|
|
@@ -84,6 +84,7 @@ export type WireMiniAppHost = {
|
|
|
84
84
|
ethProviderRequestV2: Ethereum.RpcTransport
|
|
85
85
|
eip6963RequestProvider: () => void
|
|
86
86
|
solanaProviderRequest?: SolanaWireRequestFn
|
|
87
|
+
addFrame: AddMiniApp.WireAddMiniApp
|
|
87
88
|
addMiniApp: AddMiniApp.WireAddMiniApp
|
|
88
89
|
viewCast: ViewCast.ViewCast
|
|
89
90
|
viewProfile: ViewProfile.ViewProfile
|
|
@@ -116,6 +117,7 @@ export type MiniAppHost = {
|
|
|
116
117
|
*/
|
|
117
118
|
eip6963RequestProvider: () => void
|
|
118
119
|
solanaProviderRequest?: SolanaRequestFn
|
|
120
|
+
addFrame: AddMiniApp.AddMiniApp
|
|
119
121
|
addMiniApp: AddMiniApp.AddMiniApp
|
|
120
122
|
viewCast: ViewCast.ViewCast
|
|
121
123
|
viewProfile: ViewProfile.ViewProfile
|