Update client to add command for 'Perform Privacy Operation'
This commit is contained in:
@@ -147,6 +147,14 @@ class EthAppClient:
|
||||
return self._exchange_async(self._cmd_builder.get_eth2_public_addr(display,
|
||||
bip32_path))
|
||||
|
||||
def perform_privacy_operation(self,
|
||||
display: bool = True,
|
||||
bip32_path: str = "m/44'/60'/0'/0/0",
|
||||
pubkey: bytes = bytes()):
|
||||
return self._exchange(self._cmd_builder.perform_privacy_operation(display,
|
||||
bip32_path,
|
||||
pubkey))
|
||||
|
||||
def provide_domain_name(self, challenge: int, name: str, addr: bytes) -> RAPDU:
|
||||
payload = format_tlv(DomainNameTag.STRUCTURE_TYPE, 3) # TrustedDomainName
|
||||
payload += format_tlv(DomainNameTag.STRUCTURE_VERSION, 1)
|
||||
|
||||
@@ -17,6 +17,7 @@ class InsType(IntEnum):
|
||||
PROVIDE_ERC20_TOKEN_INFORMATION = 0x0a
|
||||
PROVIDE_NFT_INFORMATION = 0x14
|
||||
SET_PLUGIN = 0x16
|
||||
PERFORM_PRIVACY_OPERATION = 0x18
|
||||
EIP712_SEND_STRUCT_DEF = 0x1a
|
||||
EIP712_SEND_STRUCT_IMPL = 0x1c
|
||||
EIP712_SEND_FILTERING = 0x1e
|
||||
@@ -260,6 +261,16 @@ class CommandBuilder:
|
||||
0x00,
|
||||
payload)
|
||||
|
||||
def perform_privacy_operation(self,
|
||||
display: bool,
|
||||
bip32_path: str,
|
||||
pubkey: bytes) -> bytes:
|
||||
payload = pack_derivation_path(bip32_path)
|
||||
return self._serialize(InsType.PERFORM_PRIVACY_OPERATION,
|
||||
int(display),
|
||||
0x01 if pubkey else 0x00,
|
||||
payload + pubkey)
|
||||
|
||||
def set_plugin(self,
|
||||
type_: int,
|
||||
version: int,
|
||||
|
||||
Reference in New Issue
Block a user