-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
starknet-tee for generating keypair (pubKey, privateKey) #2034
base: develop
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @PedroRosalba! Welcome to the ai16z community. Thanks for submitting your first pull request; your efforts are helping us accelerate towards AGI. We'll review it shortly. You are now a ai16z contributor!
hey, how do I fix this workflow error? I couldn't understand it well |
You need to branch from the Some notes on the PR. With the Starknet Plugin already available, all you need to do to support TEE key derivation is import the TEE Plugin to Starknet plugin then create a function that will allow you to retrieve the wallet. Solana and the EVM Plugin do it this way. EVM Plugin: 92f2564 Though, I am about to add a new PR soon to fix the key derivation for Solana today. |
What do you mean by "retrieve the wallet"? Honestly I don't understand really well what this keypairUtils is doing. What is the function of this file in the plugin? Sorry it's just that I need to understand these things better to implement. Also, can you give some explanation on how to do testing on the plugin? |
See if makes sense now? Also just for a quick clarification, to request the changes to go to develop branch, I need to open a brand new pull request right? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perhaps use elizaLogger instead of console.log
great code btw
const stringParsed = uint8Parsed.toString(); | ||
|
||
const privateKey = starknet.starknetKeccak(stringParsed).toString(); | ||
const publicKey = starknet.ec.starkCurve.getStarkKey(privateKey); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting, so I'm not familiar with Starknet, but could you walk me through this process. Everything looks good, but I wanna be able to document this as well so devs understand what is going on. Also, take a look at #2039 bc I made some changes to clarify the derive key functionality & you'll have to update a small part to the code.
This is the doc on how to use the TEE Plugin currently. https://elizaos.github.io/eliza/docs/advanced/eliza-in-tee/ |
pedrorosalba@pedrorosalba-TECRA-Z50-C:~/eliza$ git branch
docs packages/client-lens packages/core packages/plugin-0g packages/plugin-flow packages/plugin-fuel packages/plugin-goat packages/plugin-rabbi-trader packages/plugin-solana-agentkit Packages: +1349 -544 hey! so... I was trying to pnpm install the develop branch to test out my plugin but it is not working as you can see... how can I test my plugins? |
Relates to
Risks
Background
What does this PR do?
This PR creates starknet Keypair generation in Trusted Execution Environment.
What kind of change is this?
Adding a new feature to the TEE plugin on eliza
Documentation changes needed?
Yes, add the dependency "Starknet"
Testing
Where should a reviewer start?
Detailed testing steps