Content pfp
Content
@
0 reply
0 recast
0 reaction

Andrei O. pfp
Andrei O.
@andrei0x309
Want to be able to verify farcaster frames with /airstack inside web workers and serverless functions? You can use this pkg I made: https://www.npmjs.com/package/airstack-frame-verify-web-light is ~7kb vs SDK which is ~5MB. Is perfect for constrained environments.
1 reply
0 recast
11 reactions

Samuel ใƒ„ pfp
Samuel ใƒ„
@samuellhuber.eth
๐Ÿ˜ I usually just call the APIs directly by now Most SDK arenโ€™t worth importing for one function and then just add the types as I need them for that function to verify API response at runtime
1 reply
0 recast
1 reaction

Andrei O. pfp
Andrei O.
@andrei0x309
I agree if you have time to make your own susbet of API calls, it is a good aproch especially if you use less then 20/100 of what is provided. Some SDKs are optimized, great SDKs have few or 0 deps. The issue is that most farcaster products out there use either core, hub-web, or hub-node from farcaster monorepo, those are poorly optimized for serverless, you need to reimplement some of the logic if you want to use it in a constrained environment... For example, farcaster libraries offer both viem, and ethers options, but ethers is underdeveloped in fc libs, and under the hood, the encode params in ethers instance is using viem instead of ethers, so you end up using all deps, I mean is ok for servers, less for frontends, but even more so for serverless functions.
1 reply
1 recast
2 reactions

Samuel ใƒ„ pfp
Samuel ใƒ„
@samuellhuber.eth
Most FC libraries are as hacky as the whole ecosystem and thatโ€™s fine, will improve over time
0 reply
0 recast
1 reaction