User experience 

Use case diagram 

When the user receives a new B.CHAIN card, no Hierarchical Deterministic (HD) wallet is implemented inside yet. Therefore, the two possible operations for the user from the App are either creating or restoring a wallet at this stage.

User receives a new B.CHAIN card
When user receives new B.CHAIN card, he can create a HD Wallet, or restore previously owned HD Wallet

When a HD wallet is successfully implemented on the card, the App may offer the following options to the user:

B.CHAIN card contains a HD wallet
User can: sign transaction, wipe card, add crypto, change PIN code

A user experience for each of these use cases is proposed in the next sections. The App provider may decide to adapt the flow to achieve a tailored experience.

Create a new wallet 

In the App, the user can choose to create a new crypto wallet with the option to secure its private keys in the B.CHAIN cold storage. The App developers can preconfigure the Cardholder Verification Methods (CVM) or leave the decision to the user in the interface. Depending on the desired CVM, the App prompts the user to define a PIN code and/or enroll her fingerprints on the card with the sleeve to authorize further operations. The App generates and displays a BIP39 mnemonic phrase and instructs the user to write it down on a paper for a potential recovery. After verifying the user has properly saved the mnemonic phrase, the App is expected to send the corresponding binary seed to the card. The B.CHAIN SDK is called to pair with the card, set the PIN and load the seed to instantiate a HD wallet. The App prompts the user to tap her card on the phone while applying her fingerprint on the sensor to authorize the operation. If the fingerprint verification on the card is successful, the HD wallet is implemented.

Diagram: User chooses in the App to create a new wallet to be secured by B.CHAIN → App prompts the user to select the desired B.CHAIN holder verification methods (fingerprint or PIN or both) → App prompts the user to create B.CHAIN PIN* → App prompts the user to enroll 2 fingerprints* on B.CHAIN with the sleeve → App generates the BIP39 mnemonic phrase for the new wallet and instructs the user to save it on paper. → App requests B.CHAIN SDK to pair with the card, set the PIN*, load the seed and create a HD wallet. → App prompts the user to tap her card and apply fingerprint* → B.CHAIN SDK connects and pairs with the card. A secure channel is established. → B.CHAIN sets the PIN* and instantiates a HD wallet from the seed following BIP32 standard. The seed is saved in B.CHAIN cold storage.
*This authentication factor might be optional; it depends on desired cardholder verification methods
Private keys are securely computed and stored in the B.CHAIN cold storage, they will never leave it.

Sign a transaction 

The App initiates transactions depending on user intentions such as sending a payment or interacting with a Web3 decentralized application. The App formats and hashes the transaction for the required blockchain before requesting B.CHAIN SDK to perform a signature of it. Depending on the CVM, the App prompts the user to enter a PIN code and/or apply her fingerprint on the card to authorize the operation. The user taps the card to the back of her phone and the B.CHAIN SDK returns the expected signature if the user authentication was successful. The App can then broadcast the transaction on the network.

Diagram flow: App creates a blockchain transaction and calculates its hash → App requests B.CHAIN SDK to sign the transaction hash from a BIP32 Path → App prompts the user to enter her B.CHAIN PIN* → App prompts the user to tap her card and apply fingerprint* → B.CHAIN returns the transaction hash signature → App broadcasts the signed transaction to the blockchain; end of diagram flow. Note: * This authentication factor might be optional; it depends on desired cardholder verification methods.

Add a new cryptocurrency 

The App may support various cryptocurrencies and offers the user to add a new asset to her wallet. If the user selects such option, the App requests the B.CHAIN SDK to get a public key by specifying the desired BIP32 path. Cardholder authentication is requested (i.e. enter PIN and/or apply fingerprint on the card sensor) and the user taps her card on the phone. The card returns a public key compressed or not and with or without the chain code if the cardholder verification was successful.

Change PIN 

If the PIN is made available as a Cardholder Verification Method, the user may decide in the App to select the option to change its value. In that case, the App prompts the user to enter a new PIN value and requests a cardholder authentication such as entering PIN and/or applying finger on the card sensor. The user taps her card on the phone and the PIN value update is effective if the authentication was successful.

Restore a wallet 

If the card is lost or stolen, the user needs to acquire a new B.CHAIN card to perform the recovery of her crypto wallet. The user experience is close to the one described for creating a wallet, except the user needs to enter the BIP39 mnemonic phrase saved during the former creation of the wallet instead of generating a new one.

Diagram flow: User chooses in the App to restore a wallet → App prompts the user to select the desired B.CHAIN holder verification methods (fingerprint or PIN or both) → App prompts the user to create B.CHAIN PIN* → App prompts the user to enroll 2 fingerprints* on B.CHAIN with the sleeve → App prompts the user to enter the BIP39 mnemonic phrase of the wallet to be restored → App requests B.CHAIN SDK to pair with the card, set the PIN*, load the seed and create a HD wallet. → App prompts the user to tap her card and apply fingerprint* → B.CHAIN SDK connects and pairs with the card. A secure channel is established. → B.CHAIN sets the PIN* and instantiates a HD wallet from the seed following BIP32 standard. The seed is saved in B.CHAIN cold storage.; end of diagram flow. Note: *This authentication factor might be optional; it depends on desired cardholder verification methods

Wipe the card 

Wiping a card is an irreversible operation. The user might decide to decommission the card if it is not needed anymore before disposing of it. This operation will delete the seed, keys and fingerprints stored in the card. In a wiped state, the card cannot be used again to create or restore a wallet.

To wipe the card, the user selects this option in the App interface. The App prompts the user to enter a PIN code and apply her fingerprint on the card to authorize the operation. The user taps the card on the phone and B.CHAIN SDK requests the deletion of all data in the cold storage. If the cardholder authentication is successful, the wipe is performed and a status is returned to the App.

Diagram flow: User chooses in the App to wipe the B.CHAIN card → App requests B.CHAIN SDK to wipe the card → App prompts the user to enter her B.CHAIN PIN → App prompts the user to tap her card and apply fingerprint → B.CHAIN deletes all data in the cold storage → App receives the confirmation the card was successfully wiped; end of diagram flow.