BOLOS TEE
bolos_wallet.h
Go to the documentation of this file.
1 /*
2 *******************************************************************************
3 * BOLOS TEE
4 * (c) 2016 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 
31 #ifndef __BOLOS_WALLET_H__
32 #define __BOLOS_WALLET_H__
33 
35 #define BLS_WALLET_STATE_INITIALIZED (1 << 0)
36 
37 #define BLS_WALLET_STATE_LOCKED (1 << 1)
38 
39 #define BLS_WALLET_UNLOCK_INAPP (1 << 2)
40 
42 #define BLS_WALLET_DERIVE_PRIVATE (1 << 0)
43 
44 #define BLS_WALLET_DERIVE_PUBLIC (1 << 1)
45 
51 int bls_wallet_get_state(void);
52 
77 int bls_wallet_derive(uint8_t details,
78  const uint32_t WIDE* path, size_t pathLength,
79  uint8_t *chainCode,
80  bls_ecfp_private_key_t *privateKey,
81  bls_ecfp_public_key_t *publicKey);
82 
105  char WIDE* address, size_t addressLength,
106  bool compressed);
107 
121 int bls_wallet_call(uint8_t *apdu);
122 
134 int bls_wallet_approve_sign(bool status);
135 
136 
137 #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:144
Definition: bolos_crypto_platform_tee.h:148
int bls_wallet_approve_sign(bool status)
Approve a signature before calling the Ledger Wallet application.