starknet-tee for generating keypair (pubKey, privateKey)
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
hey, how do I fix this workflow error? I couldn't understand it well
hey, how do I fix this workflow error? I couldn't understand it well
You need to branch from the develop branch.
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: https://github.com/elizaOS/eliza/commit/92f25647162b3c35f31368d3082095baf0c165c7 Solana Plugin: https://github.com/elizaOS/eliza/blob/main/packages/plugin-solana/src/keypairUtils.ts
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?
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?
This is the doc on how to use the TEE Plugin currently. https://elizaos.github.io/eliza/docs/advanced/eliza-in-tee/ This has all you need to get started and test your solution live with the TEE Simulator then I can talk to you after on testing on real TEE Cloud
pedrorosalba@pedrorosalba-TECRA-Z50-C:~/eliza$ git branch
- develop main pedrorosalba@pedrorosalba-TECRA-Z50-C:~/eliza$ pnpm install --no-frozen-lockfile Scope: all 82 workspace projects packages/adapter-redis | WARN deprecated @types/[email protected] packages/client-discord | WARN deprecated @discordjs/[email protected] packages/client-slack | WARN deprecated @slack/[email protected] packages/core | WARN deprecated @types/[email protected] packages/plugin-node | WARN deprecated @cliqz/[email protected] packages/plugin-story | WARN deprecated @pinata/[email protected] packages/plugin-trustdb | WARN deprecated @types/[email protected] WARN 37 deprecated subdependencies found: @cliqz/[email protected], @cliqz/[email protected], @cliqz/[email protected], @confio/[email protected], @humanwhocodes/[email protected], @humanwhocodes/[email protected], @motionone/[email protected], @pythnetwork/[email protected], @simplewebauthn/[email protected], @substrate/[email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected] WARN Issues with peer dependencies found client └─┬ @react-spring/web 9.7.5 ├── ✕ unmet peer react@"^16.8.0 || ^17.0.0 || ^18.0.0": found 19.0.0 ├── ✕ unmet peer react-dom@"^16.8.0 || ^17.0.0 || ^18.0.0": found 19.0.0 ├─┬ @react-spring/animated 9.7.5 │ ├── ✕ unmet peer react@"^16.8.0 || ^17.0.0 || ^18.0.0": found 19.0.0 │ └─┬ @react-spring/shared 9.7.5 │ └── ✕ unmet peer react@"^16.8.0 || ^17.0.0 || ^18.0.0": found 19.0.0 └─┬ @react-spring/core 9.7.5 └── ✕ unmet peer react@"^16.8.0 || ^17.0.0 || ^18.0.0": found 19.0.0
docs ├─┬ typedoc 0.26.11 │ └── ✕ unmet peer typescript@"4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x || 5.6.x": found 5.7.3 └─┬ @docusaurus/preset-classic 3.6.3 └─┬ @docusaurus/theme-search-algolia 3.6.3 └─┬ @docsearch/react 3.8.2 └── ✕ unmet peer @types/react@">= 16.8.0 < 19.0.0": found 19.0.4
packages/client-lens └─┬ @lens-protocol/client 2.2.0 └─┬ @lens-protocol/gated-content 0.5.1 └─┬ @lit-protocol/node-client 2.1.62 ├─┬ @lit-protocol/auth-browser 2.1.62 │ └─┬ @walletconnect/ethereum-provider 2.17.3 │ └─┬ @walletconnect/modal 2.7.0 │ ├─┬ @walletconnect/modal-core 2.7.0 │ │ └─┬ valtio 1.11.2 │ │ ├── ✕ missing peer react@>=16.8 │ │ └─┬ use-sync-external-store 1.2.0 │ │ └── ✕ missing peer react@"^16.8.0 || ^17.0.0 || ^18.0.0" │ └─┬ @walletconnect/modal-ui 2.7.0 │ └─┬ @walletconnect/modal-core 2.7.0 │ └── ✕ missing peer react@>=16.8 └─┬ @walletconnect/ethereum-provider 2.17.3 └── ✕ missing peer react@>=16.8 Peer dependencies that should be installed: react@">=16.8.0 <17.0.0 || >=17.0.0 <18.0.0 || >=18.0.0 <19.0.0"
packages/core ├─┬ ai 3.4.33 │ └─┬ @ai-sdk/vue 0.0.59 │ └─┬ @ai-sdk/ui-utils 0.0.50 │ └─┬ zod-to-json-schema 3.24.1 │ └── ✕ unmet peer zod@^3.24.1: found 3.23.8 └─┬ @vitest/coverage-v8 2.1.5 └── ✕ unmet peer [email protected]: found 2.1.8
packages/plugin-0g └─┬ @0glabs/0g-ts-sdk 0.2.1 └── ✕ unmet peer [email protected]: found 6.13.4
packages/plugin-flow └─┬ @onflow/fcl 1.13.1 └─┬ @onflow/fcl-wc 5.5.1 └─┬ @walletconnect/modal 2.7.0 └─┬ @walletconnect/modal-core 2.7.0 └─┬ valtio 1.11.2 └─┬ use-sync-external-store 1.2.0 └── ✕ unmet peer react@"^16.8.0 || ^17.0.0 || ^18.0.0": found 19.0.0
packages/plugin-fuel └─┬ fuels 0.97.2 └─┬ @fuel-ts/recipes 0.97.2 └─┬ @fuel-ts/utils 0.97.2 └── ✕ unmet peer vitest@~2.0.5: found 2.1.4
packages/plugin-goat └─┬ @goat-sdk/adapter-vercel-ai 0.2.0 └── ✕ unmet peer [email protected]: found 4.0.30
packages/plugin-rabbi-trader ├─┬ @goat-sdk/wallet-viem 0.1.3 │ └── ✕ unmet peer @goat-sdk/[email protected]: found 0.3.8 └─┬ @goat-sdk/plugin-coingecko 0.1.4 └── ✕ unmet peer @goat-sdk/[email protected]: found 0.3.8
packages/plugin-solana-agentkit └─┬ solana-agent-kit 1.3.7 ├─┬ @onsol/tldparser 0.6.7 │ ├── ✕ unmet peer borsh@^0.7.0: found 2.0.0 │ └── ✕ unmet peer [email protected]: found 6.0.3 └─┬ @tiplink/api 0.3.1 └─┬ @solana/spl-token 0.3.11 └─┬ @solana/spl-token-metadata 0.1.6 └─┬ @solana/codecs 2.0.0-rc.1 ├── ✕ unmet peer typescript@>=5: found 4.9.5 in @tiplink/api ├─┬ @solana/codecs-core 2.0.0-rc.1 │ ├── ✕ unmet peer typescript@>=5: found 4.9.5 in @tiplink/api │ └─┬ @solana/errors 2.0.0-rc.1 │ └── ✕ unmet peer typescript@>=5: found 4.9.5 in @tiplink/api ├─┬ @solana/codecs-numbers 2.0.0-rc.1 │ └── ✕ unmet peer typescript@>=5: found 4.9.5 in @tiplink/api ├─┬ @solana/codecs-strings 2.0.0-rc.1 │ └── ✕ unmet peer typescript@>=5: found 4.9.5 in @tiplink/api ├─┬ @solana/codecs-data-structures 2.0.0-rc.1 │ └── ✕ unmet peer typescript@>=5: found 4.9.5 in @tiplink/api └─┬ @solana/options 2.0.0-rc.1 └── ✕ unmet peer typescript@>=5: found 4.9.5 in @tiplink/api
Packages: +1349 -544 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------------------------------------------- ERR_PNPM_ENOTDIR ENOTDIR: not a directory, rename '/home/pedrorosalba/eliza/client/node_modules/vite_tmp_23168' -> '/home/pedrorosalba/eliza/client/node_modules/vite' Progress: resolved 4426, reused 1249, downloaded 0, added 140 pedrorosalba@pedrorosalba-TECRA-Z50-C:~/eliza$
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?
Hello,
We are changing our plugin development strategy to be more scalable. We have moved the plugins out into their own repos and we're looking for people to either maintain those or own them on their own Github.
Please make your code changes to this repo: https://github.com/elizaos-plugins/plugin-starknet
If you'd like to be a maintainer, file an issue in the plugin repo and join our Discord https://discord.gg/elizaos to coordinate.
If you'd like to control the plugin on your own Github, please add an issue to the plugin repo pointing to your repo, and add a modification to the registry. Submit a PR to edit the registry here: https://github.com/elizaos-plugins/registry
Closing this PR for now. Let us know if you have any questions.