Wallet Design Reference
Transaction Endpoint Integration on all blockchains
There are several user interfaces that you’ll probably want to design if you’re working with the Blowfish transaction(s) endpoints. Each design is a different transaction signature confirmation page that you will show users when they are signing a transaction. We recommend starting with this list of transaction confirmation pages:
- Standard no warnings (98% of cases)
- 1 or more non-critical warnings
- 1 or more critical warnings. This will only be accessed after clicking through a block screen
- Block screen
- Blowfish simulation failure or no response from Blowfish API
- Transaction revert
Example standard and non-critical warning confirmation pages:
Example Block Screen & critical warning confirmation page
Many of these 6 screens will have a lot of repeated information with just small changes differentiating them. The largest UI changes will be as a result of the data that the Blowfish API returns in a few specific fields:
- action - will determine the screen to show
- warnings: “message” - will determine how to explain the warning to your user
- humanReadableDiff - will determine what to show the user from simulation results
Transaction Confirmation Screen Design Constraints
Blowfish action:
BLOCK
-> Show the user a block screen instead of the signing UI since this is highly likely to be a malicious transaction. We suggest still having a greyed out link allowing the user to proceed if they really think they know better.WARN
-> Show the user the signing UI including any warnings returned from the APINONE
-> Show the signing UI without modification
Blowfish warning message:
-
English only
- Current length min: 47
- Current length max: 187
-
All 30 languages
- Current length min: 47
- Current length max: 552
-
Examples:
- "You are allowing this website to withdraw funds from your account in the future"
- "This is a bulk approval request. Approvals allow someone else to move your assets on your behalf."
- "Domain found on blocklists maintained by: {blocklists}. This website is very likely to be a scam."
- "This transaction changes the owner of your SPL tokens. This allows the new owner to transfer the tokens without your permission."
-
How often is a warning message returned: Currently less than 1% of the time
-
How many warning messages can you receive per transaction?
- 99% of transactions will return 0 warnings
- Maximum warnings are currently not bounded, but is very rare to get more than 2
- We recommend showing up to 2 of the highest severity warnings to users
humanReadableDiff (all 30 languages):
-
English only
- Current length min: 23
- Current length max: 71
-
All 30 language
- Current length min: 23
- Current length max: 200
-
Lines of text max: 1
-
Examples:
- "Send 1.5 ETH"
- "Receive 0.05657 SOL"
- "Receive PudgyPenguins #7238"
- "Unapprove from transferring up to 0.00132 USDC"
- "Approve to transfer up to 1000 USDT"
-
How often will a humanReadableDiff be returned by the API: Over 99% of transactions
If you have any questions after reading this guide, please don’t hesitate to reach out to your point of contact at Blowfish. They are happy to help clarify.
Message Endpoint Integration on EVM blockchains
The response from the message endpoint resembles that of the transaction endpoint, featuring key fields such as action
, warnings
, and humanReadableDiff
. Additionally, the rawInfo
field provided by Blowfish contains detailed information about the simulation result.
For instance, in simulating a message for an NFT transfer, the humanReadableText
can be paired with the NFT image, alongside valuable data like the asset's price.
In this example the user is asked to trade their NFT in exchange for nothing:
When simulating a message for an ERC20 token transfer, the simulation can include the token’s image, its verification status, and details about the protocol with which the user is interacting, providing a comprehensive overview.
In this example the user is asked to trade their WETH for a small amount of USDC:
Updated 10 months ago