Skip to content

Comments

Add example of "current action ipfs cid" with SIWS and custom condition logic#91

Merged
glitch003 merged 7 commits intomasterfrom
feature/siws-encryption-lit-action-logic-example
Feb 24, 2025
Merged

Add example of "current action ipfs cid" with SIWS and custom condition logic#91
glitch003 merged 7 commits intomasterfrom
feature/siws-encryption-lit-action-logic-example

Conversation

@glitch003
Copy link
Contributor

This adds an example that uses SIWS to auth a user, with any custom JS logic in the lit action. We use a single access control condition that simply checks that :currentIpfsCid == generatedIpfsCid. Therefore, you're trusting the logic of the Lit Action itself to check whatever conditions you want.

In this example, we just set this additional check to "true", but a dev would implement their own checks here. Therefore, this example gets the dev to a spot where everything works, they have an authed solana wallet address, and they can just write the extra JS they need to check anything they want using the solana wallet. They can check balances, run contract calls, hit things with fetch() or use solana RPC.

I created this for Beacon to help them get their custom solana access control conditions working.

@glitch003 glitch003 merged commit 6711f59 into master Feb 24, 2025
1 check failed
@glitch003 glitch003 deleted the feature/siws-encryption-lit-action-logic-example branch February 24, 2025 23:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant