Skip to content

feat: add zama sdk example#255

Open
zeljkoX wants to merge 2 commits intomainfrom
zama-sdk-improvements
Open

feat: add zama sdk example#255
zeljkoX wants to merge 2 commits intomainfrom
zama-sdk-improvements

Conversation

@zeljkoX
Copy link
Copy Markdown
Collaborator

@zeljkoX zeljkoX commented Apr 27, 2026

Summary

This PR will introduce implementation of Zama SDK Generic Signer and an example on how to use new Zama SDK with OpenZeppelin Relayer.

Testing Process

Checklist

  • Add a reference to related issues in the PR description.
  • Add unit tests if applicable.
  • Add the changeset file. (run npx changeset add)

@zeljkoX zeljkoX requested a review from a team as a code owner April 27, 2026 11:37
Copy link
Copy Markdown
Contributor

@tirumerla tirumerla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

couple nits, lgtm

Comment on lines +133 to +136
const resolvedPrimaryType = primaryType ?? Object.keys(structTypes)[0];
if (!resolvedPrimaryType) {
throw new Error('signTypedData: typedData has no user-defined struct type');
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add any additional validation to check structTypes length before to guard against upstream changes blindly signing the wrong struct

const readCount = async (): Promise<Hex> => {
const encrypted = await signer.readContract({
address: contractAddress,
abi: counterAbi as never,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Can we do strict casting here and drop never?

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.

2 participants