Updated protobuf files

pull/1/head
slush 11 years ago
parent 29bd7a10f8
commit 0af7a672f0

@ -11,7 +11,7 @@ from google.protobuf import descriptor_pb2
DESCRIPTOR = descriptor.FileDescriptor(
name='bitkey.proto',
package='',
serialized_pb='\n\x0c\x62itkey.proto\" \n\nInitialize\x12\x12\n\nsession_id\x18\x01 \x02(\x0c\"\xdc\x01\n\x08\x46\x65\x61tures\x12\x12\n\nsession_id\x18\x01 \x01(\x0c\x12\x0e\n\x06vendor\x18\x02 \x01(\t\x12\x15\n\rmajor_version\x18\x03 \x01(\r\x12\x15\n\rminor_version\x18\x04 \x01(\r\x12\x0f\n\x07has_otp\x18\x05 \x01(\x08\x12\x0f\n\x07has_spv\x18\x06 \x01(\x08\x12\x0b\n\x03pin\x18\x07 \x01(\x08\x12\x18\n\x04\x61lgo\x18\x08 \x01(\x0e\x32\n.Algorithm\x12\"\n\x0e\x61lgo_available\x18\t \x03(\x0e\x32\n.Algorithm\x12\x11\n\tmaxfee_kb\x18\n \x01(\x04\"\x17\n\x04Ping\x12\x0f\n\x07message\x18\x01 \x01(\t\"#\n\x11\x44\x65\x62ugLinkDecision\x12\x0e\n\x06yes_no\x18\x01 \x02(\x08\"K\n\x11\x44\x65\x62ugLinkGetState\x12\x0e\n\x06layout\x18\x01 \x01(\x08\x12\x0b\n\x03otp\x18\x02 \x01(\x08\x12\x0b\n\x03pin\x18\x03 \x01(\x08\x12\x0c\n\x04seed\x18\x04 \x01(\x08\"Z\n\x0e\x44\x65\x62ugLinkState\x12\x0e\n\x06layout\x18\x01 \x01(\x0c\x12\x14\n\x03otp\x18\x02 \x01(\x0b\x32\x07.OtpAck\x12\x14\n\x03pin\x18\x03 \x01(\x0b\x32\x07.PinAck\x12\x0c\n\x04seed\x18\x04 \x01(\t\"\x1a\n\x07Success\x12\x0f\n\x07message\x18\x01 \x01(\t\"(\n\x07\x46\x61ilure\x12\x0c\n\x04\x63ode\x18\x01 \x01(\x05\x12\x0f\n\x07message\x18\x02 \x01(\t\"\t\n\x07GetUUID\"\x14\n\x04UUID\x12\x0c\n\x04UUID\x18\x01 \x02(\x0c\"\x0f\n\rButtonRequest\"\x0b\n\tButtonAck\"\x0e\n\x0c\x42uttonCancel\"\x1d\n\nOtpRequest\x12\x0f\n\x07message\x18\x01 \x01(\t\"\x15\n\x06OtpAck\x12\x0b\n\x03otp\x18\x01 \x02(\t\"\x0b\n\tOtpCancel\"\x1d\n\nPinRequest\x12\x0f\n\x07message\x18\x01 \x01(\t\"\x15\n\x06PinAck\x12\x0b\n\x03pin\x18\x01 \x02(\t\"\x0b\n\tPinCancel\"\x1a\n\nGetEntropy\x12\x0c\n\x04size\x18\x01 \x02(\r\"\x1a\n\x07\x45ntropy\x12\x0f\n\x07\x65ntropy\x18\x01 \x02(\x0c\" \n\x0bSetMaxFeeKb\x12\x11\n\tmaxfee_kb\x18\x01 \x02(\x04\"\x14\n\x12GetMasterPublicKey\"\x1e\n\x0fMasterPublicKey\x12\x0b\n\x03key\x18\x01 \x02(\x0c\"\x1f\n\nGetAddress\x12\x11\n\taddress_n\x18\x01 \x03(\r\"\x1a\n\x07\x41\x64\x64ress\x12\x0f\n\x07\x61\x64\x64ress\x18\x01 \x02(\t\"M\n\nLoadDevice\x12\x0c\n\x04seed\x18\x01 \x02(\t\x12\x11\n\x03otp\x18\x02 \x01(\x08:\x04true\x12\x0b\n\x03pin\x18\x03 \x01(\t\x12\x11\n\x03spv\x18\x04 \x01(\x08:\x04true\"\x1d\n\x0bResetDevice\x12\x0e\n\x06random\x18\x07 \x01(\x0c\"E\n\x06SignTx\x12\x15\n\routputs_count\x18\x03 \x02(\r\x12\x14\n\x0cinputs_count\x18\x05 \x02(\r\x12\x0e\n\x06random\x18\x06 \x01(\x0c\"\x86\x01\n\tTxRequest\x12\x15\n\rrequest_index\x18\x01 \x01(\x05\x12\"\n\x0crequest_type\x18\x02 \x01(\x0e\x32\x0c.RequestType\x12\x14\n\x0csigned_index\x18\x03 \x01(\x05\x12\x11\n\tsignature\x18\x04 \x01(\x0c\x12\x15\n\rserialized_tx\x18\x05 \x01(\x0c\"v\n\x07TxInput\x12\r\n\x05index\x18\x01 \x02(\r\x12\x11\n\taddress_n\x18\x02 \x03(\r\x12\x0e\n\x06\x61mount\x18\x03 \x02(\x04\x12\x11\n\tprev_hash\x18\x04 \x02(\x0c\x12\x12\n\nprev_index\x18\x05 \x02(\r\x12\x12\n\nscript_sig\x18\x06 \x01(\x0c\"\x84\x01\n\x08TxOutput\x12\r\n\x05index\x18\x01 \x02(\r\x12\x0f\n\x07\x61\x64\x64ress\x18\x02 \x02(\t\x12\x11\n\taddress_n\x18\x03 \x03(\r\x12\x0e\n\x06\x61mount\x18\x04 \x02(\x04\x12 \n\x0bscript_type\x18\x05 \x02(\x0e\x32\x0b.ScriptType\x12\x13\n\x0bscript_args\x18\x06 \x03(\x0c*$\n\tAlgorithm\x12\t\n\x05\x42IP32\x10\x00\x12\x0c\n\x08\x45LECTRUM\x10\x01*3\n\nScriptType\x12\x10\n\x0cPAYTOADDRESS\x10\x00\x12\x13\n\x0fPAYTOSCRIPTHASH\x10\x01*(\n\x0bRequestType\x12\x0b\n\x07TXINPUT\x10\x00\x12\x0c\n\x08TXOUTPUT\x10\x01')
serialized_pb='\n\x0c\x62itkey.proto\" \n\nInitialize\x12\x12\n\nsession_id\x18\x01 \x02(\x0c\"\xdc\x01\n\x08\x46\x65\x61tures\x12\x12\n\nsession_id\x18\x01 \x01(\x0c\x12\x0e\n\x06vendor\x18\x02 \x01(\t\x12\x15\n\rmajor_version\x18\x03 \x01(\r\x12\x15\n\rminor_version\x18\x04 \x01(\r\x12\x0f\n\x07has_otp\x18\x05 \x01(\x08\x12\x0f\n\x07has_spv\x18\x06 \x01(\x08\x12\x0b\n\x03pin\x18\x07 \x01(\x08\x12\x18\n\x04\x61lgo\x18\x08 \x01(\x0e\x32\n.Algorithm\x12\"\n\x0e\x61lgo_available\x18\t \x03(\x0e\x32\n.Algorithm\x12\x11\n\tmaxfee_kb\x18\n \x01(\x04\"\x17\n\x04Ping\x12\x0f\n\x07message\x18\x01 \x01(\t\"#\n\x11\x44\x65\x62ugLinkDecision\x12\x0e\n\x06yes_no\x18\x01 \x02(\x08\"K\n\x11\x44\x65\x62ugLinkGetState\x12\x0e\n\x06layout\x18\x01 \x01(\x08\x12\x0b\n\x03otp\x18\x02 \x01(\x08\x12\x0b\n\x03pin\x18\x03 \x01(\x08\x12\x0c\n\x04seed\x18\x04 \x01(\x08\"Z\n\x0e\x44\x65\x62ugLinkState\x12\x0e\n\x06layout\x18\x01 \x01(\x0c\x12\x14\n\x03otp\x18\x02 \x01(\x0b\x32\x07.OtpAck\x12\x14\n\x03pin\x18\x03 \x01(\x0b\x32\x07.PinAck\x12\x0c\n\x04seed\x18\x04 \x01(\t\"\x1a\n\x07Success\x12\x0f\n\x07message\x18\x01 \x01(\t\"(\n\x07\x46\x61ilure\x12\x0c\n\x04\x63ode\x18\x01 \x01(\x05\x12\x0f\n\x07message\x18\x02 \x01(\t\"\t\n\x07GetUUID\"\x14\n\x04UUID\x12\x0c\n\x04UUID\x18\x01 \x02(\x0c\"\x0f\n\rButtonRequest\"\x0b\n\tButtonAck\"\x0e\n\x0c\x42uttonCancel\"\x1d\n\nOtpRequest\x12\x0f\n\x07message\x18\x01 \x01(\t\"\x15\n\x06OtpAck\x12\x0b\n\x03otp\x18\x01 \x02(\t\"\x0b\n\tOtpCancel\"\x1d\n\nPinRequest\x12\x0f\n\x07message\x18\x01 \x01(\t\"\x15\n\x06PinAck\x12\x0b\n\x03pin\x18\x01 \x02(\t\"\x0b\n\tPinCancel\"\x1a\n\nGetEntropy\x12\x0c\n\x04size\x18\x01 \x02(\r\"\x1a\n\x07\x45ntropy\x12\x0f\n\x07\x65ntropy\x18\x01 \x02(\x0c\" \n\x0bSetMaxFeeKb\x12\x11\n\tmaxfee_kb\x18\x01 \x02(\x04\"\x14\n\x12GetMasterPublicKey\"\x1e\n\x0fMasterPublicKey\x12\x0b\n\x03key\x18\x01 \x02(\x0c\"\x1f\n\nGetAddress\x12\x11\n\taddress_n\x18\x01 \x03(\r\"\x1a\n\x07\x41\x64\x64ress\x12\x0f\n\x07\x61\x64\x64ress\x18\x01 \x02(\t\"n\n\nLoadDevice\x12\x1f\n\x04\x61lgo\x18\x01 \x01(\x0e\x32\n.Algorithm:\x05\x42IP32\x12\x0c\n\x04seed\x18\x02 \x02(\t\x12\x11\n\x03otp\x18\x03 \x01(\x08:\x04true\x12\x0b\n\x03pin\x18\x04 \x01(\x0c\x12\x11\n\x03spv\x18\x05 \x01(\x08:\x04true\"\x1d\n\x0bResetDevice\x12\x0e\n\x06random\x18\x07 \x01(\x0c\"E\n\x06SignTx\x12\x15\n\routputs_count\x18\x03 \x02(\r\x12\x14\n\x0cinputs_count\x18\x05 \x02(\r\x12\x0e\n\x06random\x18\x06 \x01(\x0c\"\x86\x01\n\tTxRequest\x12\x15\n\rrequest_index\x18\x01 \x01(\x05\x12\"\n\x0crequest_type\x18\x02 \x01(\x0e\x32\x0c.RequestType\x12\x14\n\x0csigned_index\x18\x03 \x01(\x05\x12\x11\n\tsignature\x18\x04 \x01(\x0c\x12\x15\n\rserialized_tx\x18\x05 \x01(\x0c\"v\n\x07TxInput\x12\r\n\x05index\x18\x01 \x02(\r\x12\x11\n\taddress_n\x18\x02 \x03(\r\x12\x0e\n\x06\x61mount\x18\x03 \x02(\x04\x12\x11\n\tprev_hash\x18\x04 \x02(\x0c\x12\x12\n\nprev_index\x18\x05 \x02(\r\x12\x12\n\nscript_sig\x18\x06 \x01(\x0c\"\x84\x01\n\x08TxOutput\x12\r\n\x05index\x18\x01 \x02(\r\x12\x0f\n\x07\x61\x64\x64ress\x18\x02 \x02(\t\x12\x11\n\taddress_n\x18\x03 \x03(\r\x12\x0e\n\x06\x61mount\x18\x04 \x02(\x04\x12 \n\x0bscript_type\x18\x05 \x02(\x0e\x32\x0b.ScriptType\x12\x13\n\x0bscript_args\x18\x06 \x03(\x0c*$\n\tAlgorithm\x12\t\n\x05\x42IP32\x10\x00\x12\x0c\n\x08\x45LECTRUM\x10\x01*3\n\nScriptType\x12\x10\n\x0cPAYTOADDRESS\x10\x00\x12\x13\n\x0fPAYTOSCRIPTHASH\x10\x01*(\n\x0bRequestType\x12\x0b\n\x07TXINPUT\x10\x00\x12\x0c\n\x08TXOUTPUT\x10\x01')
_ALGORITHM = descriptor.EnumDescriptor(
name='Algorithm',
@ -30,8 +30,8 @@ _ALGORITHM = descriptor.EnumDescriptor(
],
containing_type=None,
options=None,
serialized_start=1565,
serialized_end=1601,
serialized_start=1598,
serialized_end=1634,
)
@ -52,8 +52,8 @@ _SCRIPTTYPE = descriptor.EnumDescriptor(
],
containing_type=None,
options=None,
serialized_start=1603,
serialized_end=1654,
serialized_start=1636,
serialized_end=1687,
)
@ -74,8 +74,8 @@ _REQUESTTYPE = descriptor.EnumDescriptor(
],
containing_type=None,
options=None,
serialized_start=1656,
serialized_end=1696,
serialized_start=1689,
serialized_end=1729,
)
@ -887,29 +887,36 @@ _LOADDEVICE = descriptor.Descriptor(
containing_type=None,
fields=[
descriptor.FieldDescriptor(
name='seed', full_name='LoadDevice.seed', index=0,
number=1, type=9, cpp_type=9, label=2,
name='algo', full_name='LoadDevice.algo', index=0,
number=1, type=14, cpp_type=8, label=1,
has_default_value=True, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='seed', full_name='LoadDevice.seed', index=1,
number=2, type=9, cpp_type=9, label=2,
has_default_value=False, default_value=unicode("", "utf-8"),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='otp', full_name='LoadDevice.otp', index=1,
number=2, type=8, cpp_type=7, label=1,
name='otp', full_name='LoadDevice.otp', index=2,
number=3, type=8, cpp_type=7, label=1,
has_default_value=True, default_value=True,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='pin', full_name='LoadDevice.pin', index=2,
number=3, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=unicode("", "utf-8"),
name='pin', full_name='LoadDevice.pin', index=3,
number=4, type=12, cpp_type=9, label=1,
has_default_value=False, default_value="",
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
descriptor.FieldDescriptor(
name='spv', full_name='LoadDevice.spv', index=3,
number=4, type=8, cpp_type=7, label=1,
name='spv', full_name='LoadDevice.spv', index=4,
number=5, type=8, cpp_type=7, label=1,
has_default_value=True, default_value=True,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
@ -924,7 +931,7 @@ _LOADDEVICE = descriptor.Descriptor(
is_extendable=False,
extension_ranges=[],
serialized_start=992,
serialized_end=1069,
serialized_end=1102,
)
@ -951,8 +958,8 @@ _RESETDEVICE = descriptor.Descriptor(
options=None,
is_extendable=False,
extension_ranges=[],
serialized_start=1071,
serialized_end=1100,
serialized_start=1104,
serialized_end=1133,
)
@ -993,8 +1000,8 @@ _SIGNTX = descriptor.Descriptor(
options=None,
is_extendable=False,
extension_ranges=[],
serialized_start=1102,
serialized_end=1171,
serialized_start=1135,
serialized_end=1204,
)
@ -1049,8 +1056,8 @@ _TXREQUEST = descriptor.Descriptor(
options=None,
is_extendable=False,
extension_ranges=[],
serialized_start=1174,
serialized_end=1308,
serialized_start=1207,
serialized_end=1341,
)
@ -1112,8 +1119,8 @@ _TXINPUT = descriptor.Descriptor(
options=None,
is_extendable=False,
extension_ranges=[],
serialized_start=1310,
serialized_end=1428,
serialized_start=1343,
serialized_end=1461,
)
@ -1175,14 +1182,15 @@ _TXOUTPUT = descriptor.Descriptor(
options=None,
is_extendable=False,
extension_ranges=[],
serialized_start=1431,
serialized_end=1563,
serialized_start=1464,
serialized_end=1596,
)
_FEATURES.fields_by_name['algo'].enum_type = _ALGORITHM
_FEATURES.fields_by_name['algo_available'].enum_type = _ALGORITHM
_DEBUGLINKSTATE.fields_by_name['otp'].message_type = _OTPACK
_DEBUGLINKSTATE.fields_by_name['pin'].message_type = _PINACK
_LOADDEVICE.fields_by_name['algo'].enum_type = _ALGORITHM
_TXREQUEST.fields_by_name['request_type'].enum_type = _REQUESTTYPE
_TXOUTPUT.fields_by_name['script_type'].enum_type = _SCRIPTTYPE
DESCRIPTOR.message_types_by_name['Initialize'] = _INITIALIZE

@ -199,10 +199,11 @@ message Address {
//
// Response: Success, OtpRequest, PinRequest, Failure
message LoadDevice {
required string seed = 1; // Seed encoded as a mnemonic (12 english words)
optional bool otp = 2 [default=true]; // Enable OTP for important actions?
optional string pin = 3; // Set PIN protection for important actions
optional bool spv = 4 [default=true]; // Enable SPV verification for transaction inputs (if available on device)
optional Algorithm algo = 1 [default=BIP32]; // Choose address generation algorithm
required string seed = 2; // Seed encoded as a mnemonic (12 english words)
optional bool otp = 3 [default=true]; // Enable OTP for important actions?
optional bytes pin = 4; // Set PIN protection for important actions
optional bool spv = 5 [default=true]; // Enable SPV verification for transaction inputs (if available on device)
}
// Request device to do full-reset, to generate new seed

Loading…
Cancel
Save