./wallet
contains a react app with embedded wallet integration +walletTransport
that allows it to act as a wallet..dapp
contains a react demo dapp that uses@0xsequence/cross-app-embedded-wallet-connector
wagmi connector to use communicate to and use./wallet
with user permission.
The cross-app embedded wallet implements a communication flow between dApps and the wallet application:
- The dApp communicates with the wallet through the cross-app embedded wallet connector for Wagmi
- The connector uses a ProviderTransport to handle communication
- Messages are sent between the ProviderTransport and WalletTransport
- The Wallet component handles three main functionalities:
- User Authentication
- Transaction Signing
- Message Signing
The wallet can be opened and send messages back to the dApp through the transport layer, enabling secure cross-application communication.
The wallet application requires the following environment variables to be set:
VITE_PROJECT_ACCESS_KEY
: Sequence project access keyVITE_WAAS_CONFIG_KEY
: WaaS (Wallet-as-a-Service) configuration key from sequence.buildVITE_GOOGLE_CLIENT_ID
: Google OAuth client ID for social authenticationVITE_APPLE_CLIENT_ID
: Apple client IDVITE_APPLE_REDIRECT_URI
: Apple redirect URI
VITE_PROJECT_NAME
: Display name for the wallet applicationVITE_PROJECT_LOGO
: URL to the main logo imageVITE_PROJECT_SMALL_LOGO
: URL to a smaller version of the logo, also used for favicon
Create a .env
file in the ./wallet
directory and copy these variables from .env.example
, replacing the values as needed for your configuration.