-
Notifications
You must be signed in to change notification settings - Fork 10
/
callgate.py
32 lines (22 loc) · 950 Bytes
/
callgate.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# SPDX-FileCopyrightText: © 2020 Foundation Devices, Inc. <[email protected]>
# SPDX-License-Identifier: GPL-3.0-or-later
#
# SPDX-FileCopyrightText: 2018 Coinkite, Inc. <coldcardwallet.com>
# SPDX-License-Identifier: GPL-3.0-only
#
# (c) Copyright 2018 by Coinkite Inc. This file is part of Coldcard <coldcardwallet.com>
# and is covered by GPLv3 license found in COPYING.
#
# callgate.py - Wrapper around system.dispatch() methods
from se_commands import *
import common
def fill_random(buf):
common.system.dispatch(CMD_GET_RANDOM_BYTES, buf, 0)
def get_is_bricked():
# see if we are a brick?
return common.system.dispatch(CMD_IS_BRICKED, None, 0) != 0
def get_anti_phishing_words(pin_buf):
return common.system.dispatch(CMD_GET_ANTI_PHISHING_WORDS, pin_buf, len(pin_buf))
def get_supply_chain_validation_words(buf):
return common.system.dispatch(CMD_GET_SUPPLY_CHAIN_VALIDATION_WORDS, buf, len(buf))
# EOF