- **Account**: A valid [BIP-32](https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki) compliant key.
- **Multiaccount**: An account from which multiple Accounts can be derived.
## Abstract
This specification describes how an application can use the Status Keycard to -
1. Create Multiaccounts
2. Store Multiaccounts
3. Use Multiaccounts for transaction or message signing
4. Derive Accounts from Multiaccounts
More documentation on the Status Keycard can be found [here](https://keycard.tech/docs/)
## Motivation
The Status Keycard is a hardware wallet that can be used to store and sign transactions.
For the purpose of the Status App, this specification describes how the Keycard SHOULD be used to store and sign transactions.
## Usage
### Endpoints
#### 1. Initialize Keycard (`/init-keycard`)
To initialize the keycard for use with the application.
The keycard is locked with a 6 digit pin.
#### Request wire format
```json
{
"pin": 6_digit_pin
}
```
#### Response wire format
```json
{
"password": password_to_unlock_keycard,
"puk": 12_digit_recovery_code,
"pin": provided_pin,
}
```
The keycard MUST be initialized before it can be used with the application.
The application SHOULD provide a way to recover the keycard in case the pin is forgotten.
### 2. Get Application Info (`/get-application-info`)
To fetch if the keycard is ready to be used by the application.
#### Request wire format
The requester MAY add a `pairing` field to filter through the generated keys
```json
{
"pairing": \<shared_secret\>/\<pairing_index\>/\<256_bit_salt\> OR null
}
```
#### Response wire format
##### If the keycard is not initialized yet
```json
{
"initialized?": false
}
```
##### If the keycard is initialized
```json
{
"free-pairing-slots": number,
"app-version": major_version.minor_version,
"secure-channel-pub-key": valid_bip32_key,,
"key-uid": unique_id_of_the_default_key,
"instance-uid": unique_instance_id,
"paired?": bool,
"has-master-key?": bool,
"initialized?" true
}
```
### 3. Pairing the Keycard to the Client device (`/pair`)
To establish a secure communication channel described [here](https://keycard.tech/docs/apdu/opensecurechannel.html), the keycard and the client device need to be paired.