Skip to content
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

Add Enclave Wallet Functionality #820

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dirtycajunrice
Copy link
Contributor

@dirtycajunrice dirtycajunrice commented Dec 19, 2024

Changes

How this PR will be tested

  • Open the dashboard and click X. Result: A modal should appear.
  • Call the /foo/bar API. Result: Returns 200 with "baz" in the response body.

Output

(Example: Screenshot/GIF for UI changes, cURL output for API changes)


PR-Codex overview

This PR introduces support for EnclaveWallet functionality across various modules, enhancing transaction handling and account management by incorporating new types and parameters related to the enclave wallet.

Detailed summary

  • Added MemoryStorage class for async storage implementation.
  • Updated SendTransactionData to include enclave parameter.
  • Enhanced doSimulateTransaction to accept enclave parameters.
  • Introduced EnclaveWalletParams interface and related methods in get-enclave-wallet.
  • Modified getAccount to handle enclave parameters.
  • Updated transaction queuing to include enclave wallet support.
  • Adjusted schemas to accommodate enclave wallet headers.
  • Enhanced transaction insertion logic to utilize enclave parameters.
  • Updated worker tasks to process transactions with enclave wallet details.
  • Refined Fastify route to parse and handle enclave headers.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Copy link
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@dirtycajunrice dirtycajunrice marked this pull request as ready for review December 19, 2024 13:04
@dirtycajunrice dirtycajunrice changed the title add-enclave-functionality Add Enclave Wallet Functionality Dec 19, 2024
import { EnclaveWallet } from "thirdweb/dist/types/wallets/in-app/core/wallet/enclave-wallet";
import { getUserStatus } from "thirdweb/dist/types/wallets/in-app/core/actions/get-enclave-user-status";
import type { Ecosystem } from "thirdweb/dist/types/wallets/in-app/core/wallet/types";
import { ClientScopedStorage } from "thirdweb/dist/types/wallets/in-app/core/authentication/client-scoped-storage";
Copy link
Member

Choose a reason for hiding this comment

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

was there no way to just use inAppWallet() / ecosytemWallet for this?

can't really access these internal things like that. Might be worth exposing some of these if you need them, but probably with a bit higher level api

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Restating from internal for posterity: I have made the changes to use the preferred functions, however storage within the current design causes unintended results because it is not a browser environment, and will need to be addressed

@dirtycajunrice dirtycajunrice force-pushed the 12-19-add-enclave-functionality branch from 50a87c6 to cfccfc7 Compare December 19, 2024 23:58
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