Using your Embedded Wallet
The content provides detailed instructions on using the Sequence WaaS SDK for wallet management and transactions.
Once the user has been authenticated, you can now utilize common web3 functions to interact with the blockchain - completely seamlessly.
- Get Wallet Address: Access the wallet linked to the user’s authenticated account. This wallet serves as the gateway to all account functions.
- Sign Messages: Signing a message using the embedded wallet.
- Send Transactions: After a user has been authenticated, use the WaaS SDK to send transactions using crafted EVM calldata.
Get Wallet Address
Each user’s wallet address is unique, cannot be changed, and is 42 characters long, starting with 0x
:
Sign Messages
Wallets can sign messages, which can be validated both onchain and offchain:
Send Transactions
All wallets can send transactions right after creation. No extra steps are required to create the wallet, as all users have a wallet by default.
At any point when sending a transaction that requires a fee on a network, you can follow the Fee Options walkthrough for how to send a fee object alongside your transaction or cover gas fees for your users found here.
Raw transaction
- Immediate Transactions: Wallets are ready to send transactions immediately upon creation.
- Raw Transactions: Specify transaction parameters such as recipient, value, and data. Gas limits and nonce are managed automatically.
- Network Requirements: Transactions require specifying a
chainId
for the intended network., for example1
for Ethereum mainnet,42161
for Arbitrum, etc.
Error Handling: Use isSentTransactionResponse
to verify transactions before execution to prevent failures. WaaS checks that a transaction won’t fail before it runs. If it does fail, you’ll get an error message instead of a transaction receipt. See more in transaction receipts.
Send ERC20 Tokens
Helper methods are available for common operations, such as sending ERC20 tokens. This automatically handles the data
field of the transaction:
Send ERC721 Tokens
Sending ERC721 tokens has a helper method. This automatically handles the data
field of the transaction:
Send ERC1155 Tokens
Sending ERC1155 tokens is also supported:
Call any Contract
Use callContract
to interact with any contract method, either through a function signature or ABI, supporting both named and positional arguments.
Function Signature
Providing a function signature is the easiest way to call a contract method, as it doesn’t require an ABI. The function signature can be provided with named parameters or positional parameters.
Named Arguments
Positional Arguments
Notice that passing a named function signature with positional arguments is allowed.
ABI
Providing an ABI is more verbose, but allows for more flexibility, as a single ABI can be used to call multiple methods. ABIs support named arguments and positional arguments.
Transaction Permissions:
- Email Accounts: Transactions are enabled after the current session is confirmed via a link sent to the email or phone.
- Social Login Accounts: Accounts like Google and Facebook can transact immediately after sign-in.
- For more details, see session management validation.
Was this page helpful?