BOLOS TEE
bolos_wallet.h
Go to the documentation of this file.
1 /*
2 *******************************************************************************
3 * BOLOS TEE
4 * (c) 2016, 2017 Ledger
5 *
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 ********************************************************************************/
18 
33 #ifndef __BOLOS_WALLET_H__
34 #define __BOLOS_WALLET_H__
35 
37 #define BLS_WALLET_STATE_INITIALIZED (1 << 0)
38 
39 #define BLS_WALLET_STATE_LOCKED (1 << 1)
40 
41 #define BLS_WALLET_UNLOCK_INAPP (1 << 2)
42 
44 #define BLS_WALLET_DERIVE_PRIVATE (1 << 0)
45 
46 #define BLS_WALLET_DERIVE_PUBLIC (1 << 1)
47 
53 int bls_wallet_get_state(void);
54 
79 int bls_wallet_derive(uint8_t details,
80  const uint32_t WIDE* path, size_t pathLength,
81  uint8_t *chainCode,
82  bls_ecfp_private_key_t *privateKey,
83  bls_ecfp_public_key_t *publicKey);
84 
107  char WIDE* address, size_t addressLength,
108  bool compressed);
109 
123 int bls_wallet_call(uint8_t *apdu);
124 
136 int bls_wallet_approve_sign(bool status);
137 
138 
139 #endif // __BOLOS_WALLET_H__
int bls_wallet_call(uint8_t *apdu)
Call the Ledger Wallet application.
int bls_wallet_derive(uint8_t details, const uint32_t WIDE *path, size_t pathLength, uint8_t *chainCode, bls_ecfp_private_key_t *privateKey, bls_ecfp_public_key_t *publicKey)
Derive a Bitcoin wallet key using BIP 32.
int bls_wallet_get_address(bls_ecfp_public_key_t *publicKey, char WIDE *address, size_t addressLength, bool compressed)
Get the Bitcoin address associated to a given public key.
int bls_wallet_get_state(void)
Return the current state of the Bitcoin wallet.
Definition: bolos_crypto_platform_tee.h:149
Definition: bolos_crypto_platform_tee.h:153
int bls_wallet_approve_sign(bool status)
Approve a signature before calling the Ledger Wallet application.