Documentation ¶
Overview ¶
包trezor在go中包含有线协议包装器。
Index ¶
- Constants
- Variables
- func Name(kind uint16) string
- func Type(msg proto.Message) uint16
- type Address
- type ApplyFlags
- type ApplySettings
- func (*ApplySettings) Descriptor() ([]byte, []int)
- func (m *ApplySettings) GetHomescreen() []byte
- func (m *ApplySettings) GetLabel() string
- func (m *ApplySettings) GetLanguage() string
- func (m *ApplySettings) GetUsePassphrase() bool
- func (*ApplySettings) ProtoMessage()
- func (m *ApplySettings) Reset()
- func (m *ApplySettings) String() string
- type BackupDevice
- type ButtonAck
- type ButtonRequest
- type ButtonRequestType
- type Cancel
- type ChangePin
- type CipherKeyValue
- func (*CipherKeyValue) Descriptor() ([]byte, []int)
- func (m *CipherKeyValue) GetAddressN() []uint32
- func (m *CipherKeyValue) GetAskOnDecrypt() bool
- func (m *CipherKeyValue) GetAskOnEncrypt() bool
- func (m *CipherKeyValue) GetEncrypt() bool
- func (m *CipherKeyValue) GetIv() []byte
- func (m *CipherKeyValue) GetKey() string
- func (m *CipherKeyValue) GetValue() []byte
- func (*CipherKeyValue) ProtoMessage()
- func (m *CipherKeyValue) Reset()
- func (m *CipherKeyValue) String() string
- type CipheredKeyValue
- type ClearSession
- type CoinType
- func (*CoinType) Descriptor() ([]byte, []int)
- func (m *CoinType) GetAddressType() uint32
- func (m *CoinType) GetAddressTypeP2Sh() uint32
- func (m *CoinType) GetCoinName() string
- func (m *CoinType) GetCoinShortcut() string
- func (m *CoinType) GetForkid() uint32
- func (m *CoinType) GetMaxfeeKb() uint64
- func (m *CoinType) GetSegwit() bool
- func (m *CoinType) GetSignedMessageHeader() string
- func (m *CoinType) GetXprvMagic() uint32
- func (m *CoinType) GetXpubMagic() uint32
- func (*CoinType) ProtoMessage()
- func (m *CoinType) Reset()
- func (m *CoinType) String() string
- type DebugLinkDecision
- type DebugLinkFlashErase
- type DebugLinkGetState
- type DebugLinkLog
- type DebugLinkMemory
- type DebugLinkMemoryRead
- type DebugLinkMemoryWrite
- func (*DebugLinkMemoryWrite) Descriptor() ([]byte, []int)
- func (m *DebugLinkMemoryWrite) GetAddress() uint32
- func (m *DebugLinkMemoryWrite) GetFlash() bool
- func (m *DebugLinkMemoryWrite) GetMemory() []byte
- func (*DebugLinkMemoryWrite) ProtoMessage()
- func (m *DebugLinkMemoryWrite) Reset()
- func (m *DebugLinkMemoryWrite) String() string
- type DebugLinkState
- func (*DebugLinkState) Descriptor() ([]byte, []int)
- func (m *DebugLinkState) GetLayout() []byte
- func (m *DebugLinkState) GetMatrix() string
- func (m *DebugLinkState) GetMnemonic() string
- func (m *DebugLinkState) GetNode() *HDNodeType
- func (m *DebugLinkState) GetPassphraseProtection() bool
- func (m *DebugLinkState) GetPin() string
- func (m *DebugLinkState) GetRecoveryFakeWord() string
- func (m *DebugLinkState) GetRecoveryWordPos() uint32
- func (m *DebugLinkState) GetResetEntropy() []byte
- func (m *DebugLinkState) GetResetWord() string
- func (*DebugLinkState) ProtoMessage()
- func (m *DebugLinkState) Reset()
- func (m *DebugLinkState) String() string
- type DebugLinkStop
- type DecryptMessage
- func (*DecryptMessage) Descriptor() ([]byte, []int)
- func (m *DecryptMessage) GetAddressN() []uint32
- func (m *DecryptMessage) GetHmac() []byte
- func (m *DecryptMessage) GetMessage() []byte
- func (m *DecryptMessage) GetNonce() []byte
- func (*DecryptMessage) ProtoMessage()
- func (m *DecryptMessage) Reset()
- func (m *DecryptMessage) String() string
- type DecryptedMessage
- type ECDHSessionKey
- type EncryptMessage
- func (*EncryptMessage) Descriptor() ([]byte, []int)
- func (m *EncryptMessage) GetAddressN() []uint32
- func (m *EncryptMessage) GetCoinName() string
- func (m *EncryptMessage) GetDisplayOnly() bool
- func (m *EncryptMessage) GetMessage() []byte
- func (m *EncryptMessage) GetPubkey() []byte
- func (*EncryptMessage) ProtoMessage()
- func (m *EncryptMessage) Reset()
- func (m *EncryptMessage) String() string
- type EncryptedMessage
- func (*EncryptedMessage) Descriptor() ([]byte, []int)
- func (m *EncryptedMessage) GetHmac() []byte
- func (m *EncryptedMessage) GetMessage() []byte
- func (m *EncryptedMessage) GetNonce() []byte
- func (*EncryptedMessage) ProtoMessage()
- func (m *EncryptedMessage) Reset()
- func (m *EncryptedMessage) String() string
- type Entropy
- type EntropyAck
- type EntropyRequest
- type EstimateTxSize
- func (*EstimateTxSize) Descriptor() ([]byte, []int)
- func (m *EstimateTxSize) GetCoinName() string
- func (m *EstimateTxSize) GetInputsCount() uint32
- func (m *EstimateTxSize) GetOutputsCount() uint32
- func (*EstimateTxSize) ProtoMessage()
- func (m *EstimateTxSize) Reset()
- func (m *EstimateTxSize) String() string
- type EthereumAddress
- type EthereumGetAddress
- type EthereumMessageSignature
- func (*EthereumMessageSignature) Descriptor() ([]byte, []int)
- func (m *EthereumMessageSignature) GetAddress() []byte
- func (m *EthereumMessageSignature) GetSignature() []byte
- func (*EthereumMessageSignature) ProtoMessage()
- func (m *EthereumMessageSignature) Reset()
- func (m *EthereumMessageSignature) String() string
- type EthereumSignMessage
- type EthereumSignTx
- func (*EthereumSignTx) Descriptor() ([]byte, []int)
- func (m *EthereumSignTx) GetAddressN() []uint32
- func (m *EthereumSignTx) GetChainId() uint32
- func (m *EthereumSignTx) GetDataInitialChunk() []byte
- func (m *EthereumSignTx) GetDataLength() uint32
- func (m *EthereumSignTx) GetGasLimit() []byte
- func (m *EthereumSignTx) GetGasPrice() []byte
- func (m *EthereumSignTx) GetNonce() []byte
- func (m *EthereumSignTx) GetTo() []byte
- func (m *EthereumSignTx) GetValue() []byte
- func (*EthereumSignTx) ProtoMessage()
- func (m *EthereumSignTx) Reset()
- func (m *EthereumSignTx) String() string
- type EthereumTxAck
- type EthereumTxRequest
- func (*EthereumTxRequest) Descriptor() ([]byte, []int)
- func (m *EthereumTxRequest) GetDataLength() uint32
- func (m *EthereumTxRequest) GetSignatureR() []byte
- func (m *EthereumTxRequest) GetSignatureS() []byte
- func (m *EthereumTxRequest) GetSignatureV() uint32
- func (*EthereumTxRequest) ProtoMessage()
- func (m *EthereumTxRequest) Reset()
- func (m *EthereumTxRequest) String() string
- type EthereumVerifyMessage
- func (*EthereumVerifyMessage) Descriptor() ([]byte, []int)
- func (m *EthereumVerifyMessage) GetAddress() []byte
- func (m *EthereumVerifyMessage) GetMessage() []byte
- func (m *EthereumVerifyMessage) GetSignature() []byte
- func (*EthereumVerifyMessage) ProtoMessage()
- func (m *EthereumVerifyMessage) Reset()
- func (m *EthereumVerifyMessage) String() string
- type Failure
- type FailureType
- type Features
- func (*Features) Descriptor() ([]byte, []int)
- func (m *Features) GetBootloaderHash() []byte
- func (m *Features) GetBootloaderMode() bool
- func (m *Features) GetCoins() []*CoinType
- func (m *Features) GetDeviceId() string
- func (m *Features) GetFirmwarePresent() bool
- func (m *Features) GetFlags() uint32
- func (m *Features) GetImported() bool
- func (m *Features) GetInitialized() bool
- func (m *Features) GetLabel() string
- func (m *Features) GetLanguage() string
- func (m *Features) GetMajorVersion() uint32
- func (m *Features) GetMinorVersion() uint32
- func (m *Features) GetNeedsBackup() bool
- func (m *Features) GetPassphraseCached() bool
- func (m *Features) GetPassphraseProtection() bool
- func (m *Features) GetPatchVersion() uint32
- func (m *Features) GetPinCached() bool
- func (m *Features) GetPinProtection() bool
- func (m *Features) GetRevision() []byte
- func (m *Features) GetVendor() string
- func (*Features) ProtoMessage()
- func (m *Features) Reset()
- func (m *Features) String() string
- type FirmwareErase
- type FirmwareRequest
- type FirmwareUpload
- type GetAddress
- func (*GetAddress) Descriptor() ([]byte, []int)
- func (m *GetAddress) GetAddressN() []uint32
- func (m *GetAddress) GetCoinName() string
- func (m *GetAddress) GetMultisig() *MultisigRedeemScriptType
- func (m *GetAddress) GetScriptType() InputScriptType
- func (m *GetAddress) GetShowDisplay() bool
- func (*GetAddress) ProtoMessage()
- func (m *GetAddress) Reset()
- func (m *GetAddress) String() string
- type GetECDHSessionKey
- func (*GetECDHSessionKey) Descriptor() ([]byte, []int)
- func (m *GetECDHSessionKey) GetEcdsaCurveName() string
- func (m *GetECDHSessionKey) GetIdentity() *IdentityType
- func (m *GetECDHSessionKey) GetPeerPublicKey() []byte
- func (*GetECDHSessionKey) ProtoMessage()
- func (m *GetECDHSessionKey) Reset()
- func (m *GetECDHSessionKey) String() string
- type GetEntropy
- type GetFeatures
- type GetPublicKey
- func (*GetPublicKey) Descriptor() ([]byte, []int)
- func (m *GetPublicKey) GetAddressN() []uint32
- func (m *GetPublicKey) GetCoinName() string
- func (m *GetPublicKey) GetEcdsaCurveName() string
- func (m *GetPublicKey) GetShowDisplay() bool
- func (*GetPublicKey) ProtoMessage()
- func (m *GetPublicKey) Reset()
- func (m *GetPublicKey) String() string
- type HDNodePathType
- type HDNodeType
- func (*HDNodeType) Descriptor() ([]byte, []int)
- func (m *HDNodeType) GetChainCode() []byte
- func (m *HDNodeType) GetChildNum() uint32
- func (m *HDNodeType) GetDepth() uint32
- func (m *HDNodeType) GetFingerprint() uint32
- func (m *HDNodeType) GetPrivateKey() []byte
- func (m *HDNodeType) GetPublicKey() []byte
- func (*HDNodeType) ProtoMessage()
- func (m *HDNodeType) Reset()
- func (m *HDNodeType) String() string
- type IdentityType
- func (*IdentityType) Descriptor() ([]byte, []int)
- func (m *IdentityType) GetHost() string
- func (m *IdentityType) GetIndex() uint32
- func (m *IdentityType) GetPath() string
- func (m *IdentityType) GetPort() string
- func (m *IdentityType) GetProto() string
- func (m *IdentityType) GetUser() string
- func (*IdentityType) ProtoMessage()
- func (m *IdentityType) Reset()
- func (m *IdentityType) String() string
- type Initialize
- type InputScriptType
- type LoadDevice
- func (*LoadDevice) Descriptor() ([]byte, []int)
- func (m *LoadDevice) GetLabel() string
- func (m *LoadDevice) GetLanguage() string
- func (m *LoadDevice) GetMnemonic() string
- func (m *LoadDevice) GetNode() *HDNodeType
- func (m *LoadDevice) GetPassphraseProtection() bool
- func (m *LoadDevice) GetPin() string
- func (m *LoadDevice) GetSkipChecksum() bool
- func (m *LoadDevice) GetU2FCounter() uint32
- func (*LoadDevice) ProtoMessage()
- func (m *LoadDevice) Reset()
- func (m *LoadDevice) String() string
- type MessageSignature
- type MessageType
- type MultisigRedeemScriptType
- func (*MultisigRedeemScriptType) Descriptor() ([]byte, []int)
- func (m *MultisigRedeemScriptType) GetM() uint32
- func (m *MultisigRedeemScriptType) GetPubkeys() []*HDNodePathType
- func (m *MultisigRedeemScriptType) GetSignatures() [][]byte
- func (*MultisigRedeemScriptType) ProtoMessage()
- func (m *MultisigRedeemScriptType) Reset()
- func (m *MultisigRedeemScriptType) String() string
- type OutputScriptType
- type PassphraseAck
- type PassphraseRequest
- type PinMatrixAck
- type PinMatrixRequest
- type PinMatrixRequestType
- type Ping
- type PublicKey
- type RecoveryDevice
- func (*RecoveryDevice) Descriptor() ([]byte, []int)
- func (m *RecoveryDevice) GetDryRun() bool
- func (m *RecoveryDevice) GetEnforceWordlist() bool
- func (m *RecoveryDevice) GetLabel() string
- func (m *RecoveryDevice) GetLanguage() string
- func (m *RecoveryDevice) GetPassphraseProtection() bool
- func (m *RecoveryDevice) GetPinProtection() bool
- func (m *RecoveryDevice) GetType() uint32
- func (m *RecoveryDevice) GetU2FCounter() uint32
- func (m *RecoveryDevice) GetWordCount() uint32
- func (*RecoveryDevice) ProtoMessage()
- func (m *RecoveryDevice) Reset()
- func (m *RecoveryDevice) String() string
- type RecoveryDeviceType
- type RequestType
- type ResetDevice
- func (*ResetDevice) Descriptor() ([]byte, []int)
- func (m *ResetDevice) GetDisplayRandom() bool
- func (m *ResetDevice) GetLabel() string
- func (m *ResetDevice) GetLanguage() string
- func (m *ResetDevice) GetPassphraseProtection() bool
- func (m *ResetDevice) GetPinProtection() bool
- func (m *ResetDevice) GetSkipBackup() bool
- func (m *ResetDevice) GetStrength() uint32
- func (m *ResetDevice) GetU2FCounter() uint32
- func (*ResetDevice) ProtoMessage()
- func (m *ResetDevice) Reset()
- func (m *ResetDevice) String() string
- type SelfTest
- type SetU2FCounter
- type SignIdentity
- func (*SignIdentity) Descriptor() ([]byte, []int)
- func (m *SignIdentity) GetChallengeHidden() []byte
- func (m *SignIdentity) GetChallengeVisual() string
- func (m *SignIdentity) GetEcdsaCurveName() string
- func (m *SignIdentity) GetIdentity() *IdentityType
- func (*SignIdentity) ProtoMessage()
- func (m *SignIdentity) Reset()
- func (m *SignIdentity) String() string
- type SignMessage
- func (*SignMessage) Descriptor() ([]byte, []int)
- func (m *SignMessage) GetAddressN() []uint32
- func (m *SignMessage) GetCoinName() string
- func (m *SignMessage) GetMessage() []byte
- func (m *SignMessage) GetScriptType() InputScriptType
- func (*SignMessage) ProtoMessage()
- func (m *SignMessage) Reset()
- func (m *SignMessage) String() string
- type SignTx
- func (*SignTx) Descriptor() ([]byte, []int)
- func (m *SignTx) GetCoinName() string
- func (m *SignTx) GetInputsCount() uint32
- func (m *SignTx) GetLockTime() uint32
- func (m *SignTx) GetOutputsCount() uint32
- func (m *SignTx) GetVersion() uint32
- func (*SignTx) ProtoMessage()
- func (m *SignTx) Reset()
- func (m *SignTx) String() string
- type SignedIdentity
- func (*SignedIdentity) Descriptor() ([]byte, []int)
- func (m *SignedIdentity) GetAddress() string
- func (m *SignedIdentity) GetPublicKey() []byte
- func (m *SignedIdentity) GetSignature() []byte
- func (*SignedIdentity) ProtoMessage()
- func (m *SignedIdentity) Reset()
- func (m *SignedIdentity) String() string
- type SimpleSignTx
- func (*SimpleSignTx) Descriptor() ([]byte, []int)
- func (m *SimpleSignTx) GetCoinName() string
- func (m *SimpleSignTx) GetInputs() []*TxInputType
- func (m *SimpleSignTx) GetLockTime() uint32
- func (m *SimpleSignTx) GetOutputs() []*TxOutputType
- func (m *SimpleSignTx) GetTransactions() []*TransactionType
- func (m *SimpleSignTx) GetVersion() uint32
- func (*SimpleSignTx) ProtoMessage()
- func (m *SimpleSignTx) Reset()
- func (m *SimpleSignTx) String() string
- type Success
- type TransactionType
- func (*TransactionType) Descriptor() ([]byte, []int)
- func (m *TransactionType) GetBinOutputs() []*TxOutputBinType
- func (m *TransactionType) GetExtraData() []byte
- func (m *TransactionType) GetExtraDataLen() uint32
- func (m *TransactionType) GetInputs() []*TxInputType
- func (m *TransactionType) GetInputsCnt() uint32
- func (m *TransactionType) GetLockTime() uint32
- func (m *TransactionType) GetOutputs() []*TxOutputType
- func (m *TransactionType) GetOutputsCnt() uint32
- func (m *TransactionType) GetVersion() uint32
- func (*TransactionType) ProtoMessage()
- func (m *TransactionType) Reset()
- func (m *TransactionType) String() string
- type TxAck
- type TxInputType
- func (*TxInputType) Descriptor() ([]byte, []int)
- func (m *TxInputType) GetAddressN() []uint32
- func (m *TxInputType) GetAmount() uint64
- func (m *TxInputType) GetMultisig() *MultisigRedeemScriptType
- func (m *TxInputType) GetPrevHash() []byte
- func (m *TxInputType) GetPrevIndex() uint32
- func (m *TxInputType) GetScriptSig() []byte
- func (m *TxInputType) GetScriptType() InputScriptType
- func (m *TxInputType) GetSequence() uint32
- func (*TxInputType) ProtoMessage()
- func (m *TxInputType) Reset()
- func (m *TxInputType) String() string
- type TxOutputBinType
- type TxOutputType
- func (*TxOutputType) Descriptor() ([]byte, []int)
- func (m *TxOutputType) GetAddress() string
- func (m *TxOutputType) GetAddressN() []uint32
- func (m *TxOutputType) GetAmount() uint64
- func (m *TxOutputType) GetMultisig() *MultisigRedeemScriptType
- func (m *TxOutputType) GetOpReturnData() []byte
- func (m *TxOutputType) GetScriptType() OutputScriptType
- func (*TxOutputType) ProtoMessage()
- func (m *TxOutputType) Reset()
- func (m *TxOutputType) String() string
- type TxRequest
- func (*TxRequest) Descriptor() ([]byte, []int)
- func (m *TxRequest) GetDetails() *TxRequestDetailsType
- func (m *TxRequest) GetRequestType() RequestType
- func (m *TxRequest) GetSerialized() *TxRequestSerializedType
- func (*TxRequest) ProtoMessage()
- func (m *TxRequest) Reset()
- func (m *TxRequest) String() string
- type TxRequestDetailsType
- func (*TxRequestDetailsType) Descriptor() ([]byte, []int)
- func (m *TxRequestDetailsType) GetExtraDataLen() uint32
- func (m *TxRequestDetailsType) GetExtraDataOffset() uint32
- func (m *TxRequestDetailsType) GetRequestIndex() uint32
- func (m *TxRequestDetailsType) GetTxHash() []byte
- func (*TxRequestDetailsType) ProtoMessage()
- func (m *TxRequestDetailsType) Reset()
- func (m *TxRequestDetailsType) String() string
- type TxRequestSerializedType
- func (*TxRequestSerializedType) Descriptor() ([]byte, []int)
- func (m *TxRequestSerializedType) GetSerializedTx() []byte
- func (m *TxRequestSerializedType) GetSignature() []byte
- func (m *TxRequestSerializedType) GetSignatureIndex() uint32
- func (*TxRequestSerializedType) ProtoMessage()
- func (m *TxRequestSerializedType) Reset()
- func (m *TxRequestSerializedType) String() string
- type TxSize
- type VerifyMessage
- func (*VerifyMessage) Descriptor() ([]byte, []int)
- func (m *VerifyMessage) GetAddress() string
- func (m *VerifyMessage) GetCoinName() string
- func (m *VerifyMessage) GetMessage() []byte
- func (m *VerifyMessage) GetSignature() []byte
- func (*VerifyMessage) ProtoMessage()
- func (m *VerifyMessage) Reset()
- func (m *VerifyMessage) String() string
- type WipeDevice
- type WordAck
- type WordRequest
- type WordRequestType
Constants ¶
const Default_CoinType_AddressType uint32 = 0
const Default_CoinType_AddressTypeP2Sh uint32 = 5
const Default_CoinType_XprvMagic uint32 = 76066276
const Default_CoinType_XpubMagic uint32 = 76067358
const Default_EncryptMessage_CoinName string = "Bitcoin"
const Default_EstimateTxSize_CoinName string = "Bitcoin"
const Default_GetAddress_CoinName string = "Bitcoin"
const Default_GetPublicKey_CoinName string = "Bitcoin"
const Default_IdentityType_Index uint32 = 0
const Default_LoadDevice_Language string = "english"
const Default_RecoveryDevice_Language string = "english"
const Default_ResetDevice_Language string = "english"
const Default_ResetDevice_Strength uint32 = 256
const Default_SignMessage_CoinName string = "Bitcoin"
const Default_SignTx_CoinName string = "Bitcoin"
const Default_SignTx_LockTime uint32 = 0
const Default_SignTx_Version uint32 = 1
const Default_SimpleSignTx_CoinName string = "Bitcoin"
const Default_SimpleSignTx_LockTime uint32 = 0
const Default_SimpleSignTx_Version uint32 = 1
const Default_TxInputType_Sequence uint32 = 4294967295
const Default_VerifyMessage_CoinName string = "Bitcoin"
Variables ¶
var ButtonRequestType_name = map[int32]string{
1: "ButtonRequest_Other",
2: "ButtonRequest_FeeOverThreshold",
3: "ButtonRequest_ConfirmOutput",
4: "ButtonRequest_ResetDevice",
5: "ButtonRequest_ConfirmWord",
6: "ButtonRequest_WipeDevice",
7: "ButtonRequest_ProtectCall",
8: "ButtonRequest_SignTx",
9: "ButtonRequest_FirmwareCheck",
10: "ButtonRequest_Address",
11: "ButtonRequest_PublicKey",
}
var ButtonRequestType_value = map[string]int32{
"ButtonRequest_Other": 1,
"ButtonRequest_FeeOverThreshold": 2,
"ButtonRequest_ConfirmOutput": 3,
"ButtonRequest_ResetDevice": 4,
"ButtonRequest_ConfirmWord": 5,
"ButtonRequest_WipeDevice": 6,
"ButtonRequest_ProtectCall": 7,
"ButtonRequest_SignTx": 8,
"ButtonRequest_FirmwareCheck": 9,
"ButtonRequest_Address": 10,
"ButtonRequest_PublicKey": 11,
}
var E_WireBootloader = &proto.ExtensionDesc{ ExtendedType: (*google_protobuf.EnumValueOptions)(nil), ExtensionType: (*bool)(nil), Field: 50007, Name: "wire_bootloader", Tag: "varint,50007,opt,name=wire_bootloader,json=wireBootloader", Filename: "types.proto", }
var E_WireDebugIn = &proto.ExtensionDesc{ ExtendedType: (*google_protobuf.EnumValueOptions)(nil), ExtensionType: (*bool)(nil), Field: 50004, Name: "wire_debug_in", Tag: "varint,50004,opt,name=wire_debug_in,json=wireDebugIn", Filename: "types.proto", }
var E_WireDebugOut = &proto.ExtensionDesc{ ExtendedType: (*google_protobuf.EnumValueOptions)(nil), ExtensionType: (*bool)(nil), Field: 50005, Name: "wire_debug_out", Tag: "varint,50005,opt,name=wire_debug_out,json=wireDebugOut", Filename: "types.proto", }
var E_WireIn = &proto.ExtensionDesc{ ExtendedType: (*google_protobuf.EnumValueOptions)(nil), ExtensionType: (*bool)(nil), Field: 50002, Name: "wire_in", Tag: "varint,50002,opt,name=wire_in,json=wireIn", Filename: "types.proto", }
var E_WireOut = &proto.ExtensionDesc{ ExtendedType: (*google_protobuf.EnumValueOptions)(nil), ExtensionType: (*bool)(nil), Field: 50003, Name: "wire_out", Tag: "varint,50003,opt,name=wire_out,json=wireOut", Filename: "types.proto", }
var E_WireTiny = &proto.ExtensionDesc{ ExtendedType: (*google_protobuf.EnumValueOptions)(nil), ExtensionType: (*bool)(nil), Field: 50006, Name: "wire_tiny", Tag: "varint,50006,opt,name=wire_tiny,json=wireTiny", Filename: "types.proto", }
var FailureType_name = map[int32]string{
1: "Failure_UnexpectedMessage",
2: "Failure_ButtonExpected",
3: "Failure_DataError",
4: "Failure_ActionCancelled",
5: "Failure_PinExpected",
6: "Failure_PinCancelled",
7: "Failure_PinInvalid",
8: "Failure_InvalidSignature",
9: "Failure_ProcessError",
10: "Failure_NotEnoughFunds",
11: "Failure_NotInitialized",
99: "Failure_FirmwareError",
}
var FailureType_value = map[string]int32{
"Failure_UnexpectedMessage": 1,
"Failure_ButtonExpected": 2,
"Failure_DataError": 3,
"Failure_ActionCancelled": 4,
"Failure_PinExpected": 5,
"Failure_PinCancelled": 6,
"Failure_PinInvalid": 7,
"Failure_InvalidSignature": 8,
"Failure_ProcessError": 9,
"Failure_NotEnoughFunds": 10,
"Failure_NotInitialized": 11,
"Failure_FirmwareError": 99,
}
var InputScriptType_name = map[int32]string{
0: "SPENDADDRESS",
1: "SPENDMULTISIG",
2: "EXTERNAL",
3: "SPENDWITNESS",
4: "SPENDP2SHWITNESS",
}
var InputScriptType_value = map[string]int32{
"SPENDADDRESS": 0,
"SPENDMULTISIG": 1,
"EXTERNAL": 2,
"SPENDWITNESS": 3,
"SPENDP2SHWITNESS": 4,
}
var MessageType_name = map[int32]string{
0: "MessageType_Initialize",
1: "MessageType_Ping",
2: "MessageType_Success",
3: "MessageType_Failure",
4: "MessageType_ChangePin",
5: "MessageType_WipeDevice",
6: "MessageType_FirmwareErase",
7: "MessageType_FirmwareUpload",
8: "MessageType_FirmwareRequest",
9: "MessageType_GetEntropy",
10: "MessageType_Entropy",
11: "MessageType_GetPublicKey",
12: "MessageType_PublicKey",
13: "MessageType_LoadDevice",
14: "MessageType_ResetDevice",
15: "MessageType_SignTx",
16: "MessageType_SimpleSignTx",
17: "MessageType_Features",
18: "MessageType_PinMatrixRequest",
19: "MessageType_PinMatrixAck",
20: "MessageType_Cancel",
21: "MessageType_TxRequest",
22: "MessageType_TxAck",
23: "MessageType_CipherKeyValue",
24: "MessageType_ClearSession",
25: "MessageType_ApplySettings",
26: "MessageType_ButtonRequest",
27: "MessageType_ButtonAck",
28: "MessageType_ApplyFlags",
29: "MessageType_GetAddress",
30: "MessageType_Address",
32: "MessageType_SelfTest",
34: "MessageType_BackupDevice",
35: "MessageType_EntropyRequest",
36: "MessageType_EntropyAck",
38: "MessageType_SignMessage",
39: "MessageType_VerifyMessage",
40: "MessageType_MessageSignature",
41: "MessageType_PassphraseRequest",
42: "MessageType_PassphraseAck",
43: "MessageType_EstimateTxSize",
44: "MessageType_TxSize",
45: "MessageType_RecoveryDevice",
46: "MessageType_WordRequest",
47: "MessageType_WordAck",
48: "MessageType_CipheredKeyValue",
49: "MessageType_EncryptMessage",
50: "MessageType_EncryptedMessage",
51: "MessageType_DecryptMessage",
52: "MessageType_DecryptedMessage",
53: "MessageType_SignIdentity",
54: "MessageType_SignedIdentity",
55: "MessageType_GetFeatures",
56: "MessageType_EthereumGetAddress",
57: "MessageType_EthereumAddress",
58: "MessageType_EthereumSignTx",
59: "MessageType_EthereumTxRequest",
60: "MessageType_EthereumTxAck",
61: "MessageType_GetECDHSessionKey",
62: "MessageType_ECDHSessionKey",
63: "MessageType_SetU2FCounter",
64: "MessageType_EthereumSignMessage",
65: "MessageType_EthereumVerifyMessage",
66: "MessageType_EthereumMessageSignature",
100: "MessageType_DebugLinkDecision",
101: "MessageType_DebugLinkGetState",
102: "MessageType_DebugLinkState",
103: "MessageType_DebugLinkStop",
104: "MessageType_DebugLinkLog",
110: "MessageType_DebugLinkMemoryRead",
111: "MessageType_DebugLinkMemory",
112: "MessageType_DebugLinkMemoryWrite",
113: "MessageType_DebugLinkFlashErase",
}
var MessageType_value = map[string]int32{
"MessageType_Initialize": 0,
"MessageType_Ping": 1,
"MessageType_Success": 2,
"MessageType_Failure": 3,
"MessageType_ChangePin": 4,
"MessageType_WipeDevice": 5,
"MessageType_FirmwareErase": 6,
"MessageType_FirmwareUpload": 7,
"MessageType_FirmwareRequest": 8,
"MessageType_GetEntropy": 9,
"MessageType_Entropy": 10,
"MessageType_GetPublicKey": 11,
"MessageType_PublicKey": 12,
"MessageType_LoadDevice": 13,
"MessageType_ResetDevice": 14,
"MessageType_SignTx": 15,
"MessageType_SimpleSignTx": 16,
"MessageType_Features": 17,
"MessageType_PinMatrixRequest": 18,
"MessageType_PinMatrixAck": 19,
"MessageType_Cancel": 20,
"MessageType_TxRequest": 21,
"MessageType_TxAck": 22,
"MessageType_CipherKeyValue": 23,
"MessageType_ClearSession": 24,
"MessageType_ApplySettings": 25,
"MessageType_ButtonRequest": 26,
"MessageType_ButtonAck": 27,
"MessageType_ApplyFlags": 28,
"MessageType_GetAddress": 29,
"MessageType_Address": 30,
"MessageType_SelfTest": 32,
"MessageType_BackupDevice": 34,
"MessageType_EntropyRequest": 35,
"MessageType_EntropyAck": 36,
"MessageType_SignMessage": 38,
"MessageType_VerifyMessage": 39,
"MessageType_MessageSignature": 40,
"MessageType_PassphraseRequest": 41,
"MessageType_PassphraseAck": 42,
"MessageType_EstimateTxSize": 43,
"MessageType_TxSize": 44,
"MessageType_RecoveryDevice": 45,
"MessageType_WordRequest": 46,
"MessageType_WordAck": 47,
"MessageType_CipheredKeyValue": 48,
"MessageType_EncryptMessage": 49,
"MessageType_EncryptedMessage": 50,
"MessageType_DecryptMessage": 51,
"MessageType_DecryptedMessage": 52,
"MessageType_SignIdentity": 53,
"MessageType_SignedIdentity": 54,
"MessageType_GetFeatures": 55,
"MessageType_EthereumGetAddress": 56,
"MessageType_EthereumAddress": 57,
"MessageType_EthereumSignTx": 58,
"MessageType_EthereumTxRequest": 59,
"MessageType_EthereumTxAck": 60,
"MessageType_GetECDHSessionKey": 61,
"MessageType_ECDHSessionKey": 62,
"MessageType_SetU2FCounter": 63,
"MessageType_EthereumSignMessage": 64,
"MessageType_EthereumVerifyMessage": 65,
"MessageType_EthereumMessageSignature": 66,
"MessageType_DebugLinkDecision": 100,
"MessageType_DebugLinkGetState": 101,
"MessageType_DebugLinkState": 102,
"MessageType_DebugLinkStop": 103,
"MessageType_DebugLinkLog": 104,
"MessageType_DebugLinkMemoryRead": 110,
"MessageType_DebugLinkMemory": 111,
"MessageType_DebugLinkMemoryWrite": 112,
"MessageType_DebugLinkFlashErase": 113,
}
var OutputScriptType_name = map[int32]string{
0: "PAYTOADDRESS",
1: "PAYTOSCRIPTHASH",
2: "PAYTOMULTISIG",
3: "PAYTOOPRETURN",
4: "PAYTOWITNESS",
5: "PAYTOP2SHWITNESS",
}
var OutputScriptType_value = map[string]int32{
"PAYTOADDRESS": 0,
"PAYTOSCRIPTHASH": 1,
"PAYTOMULTISIG": 2,
"PAYTOOPRETURN": 3,
"PAYTOWITNESS": 4,
"PAYTOP2SHWITNESS": 5,
}
var PinMatrixRequestType_name = map[int32]string{
1: "PinMatrixRequestType_Current",
2: "PinMatrixRequestType_NewFirst",
3: "PinMatrixRequestType_NewSecond",
}
var PinMatrixRequestType_value = map[string]int32{
"PinMatrixRequestType_Current": 1,
"PinMatrixRequestType_NewFirst": 2,
"PinMatrixRequestType_NewSecond": 3,
}
var RecoveryDeviceType_name = map[int32]string{
0: "RecoveryDeviceType_ScrambledWords",
1: "RecoveryDeviceType_Matrix",
}
var RecoveryDeviceType_value = map[string]int32{
"RecoveryDeviceType_ScrambledWords": 0,
"RecoveryDeviceType_Matrix": 1,
}
var RequestType_name = map[int32]string{
0: "TXINPUT",
1: "TXOUTPUT",
2: "TXMETA",
3: "TXFINISHED",
4: "TXEXTRADATA",
}
var RequestType_value = map[string]int32{
"TXINPUT": 0,
"TXOUTPUT": 1,
"TXMETA": 2,
"TXFINISHED": 3,
"TXEXTRADATA": 4,
}
var WordRequestType_name = map[int32]string{
0: "WordRequestType_Plain",
1: "WordRequestType_Matrix9",
2: "WordRequestType_Matrix6",
}
var WordRequestType_value = map[string]int32{
"WordRequestType_Plain": 0,
"WordRequestType_Matrix9": 1,
"WordRequestType_Matrix6": 2,
}
Functions ¶
Types ¶
type Address ¶
type Address struct { Address *string `protobuf:"bytes,1,req,name=address" json:"address,omitempty"` XXX_unrecognized []byte `json:"-"` }
* 响应:包含从设备专用种子派生的地址 @prev获取地址
func (*Address) Descriptor ¶
func (*Address) GetAddress ¶
func (*Address) ProtoMessage ¶
func (*Address) ProtoMessage()
type ApplyFlags ¶
type ApplyFlags struct { Flags *uint32 `protobuf:"varint,1,opt,name=flags" json:"flags,omitempty"` XXX_unrecognized []byte `json:"-"` }
* 请求:设置设备的标志 下一个成功 下一次失败
func (*ApplyFlags) Descriptor ¶
func (*ApplyFlags) Descriptor() ([]byte, []int)
func (*ApplyFlags) GetFlags ¶
func (m *ApplyFlags) GetFlags() uint32
func (*ApplyFlags) ProtoMessage ¶
func (*ApplyFlags) ProtoMessage()
func (*ApplyFlags) Reset ¶
func (m *ApplyFlags) Reset()
func (*ApplyFlags) String ¶
func (m *ApplyFlags) String() string
type ApplySettings ¶
type ApplySettings struct { Language *string `protobuf:"bytes,1,opt,name=language" json:"language,omitempty"` Label *string `protobuf:"bytes,2,opt,name=label" json:"label,omitempty"` UsePassphrase *bool `protobuf:"varint,3,opt,name=use_passphrase,json=usePassphrase" json:"use_passphrase,omitempty"` Homescreen []byte `protobuf:"bytes,4,opt,name=homescreen" json:"homescreen,omitempty"` XXX_unrecognized []byte `json:"-"` }
* 请求:更改设备的语言和/或标签 下一个成功 下一次失败 @下一步按钮请求 @下一个PinMatrixRequest
func (*ApplySettings) Descriptor ¶
func (*ApplySettings) Descriptor() ([]byte, []int)
func (*ApplySettings) GetHomescreen ¶
func (m *ApplySettings) GetHomescreen() []byte
func (*ApplySettings) GetLabel ¶
func (m *ApplySettings) GetLabel() string
func (*ApplySettings) GetLanguage ¶
func (m *ApplySettings) GetLanguage() string
func (*ApplySettings) GetUsePassphrase ¶
func (m *ApplySettings) GetUsePassphrase() bool
func (*ApplySettings) ProtoMessage ¶
func (*ApplySettings) ProtoMessage()
func (*ApplySettings) Reset ¶
func (m *ApplySettings) Reset()
func (*ApplySettings) String ¶
func (m *ApplySettings) String() string
type BackupDevice ¶
type BackupDevice struct {
XXX_unrecognized []byte `json:"-"`
}
* 请求:如果未使用resetdevice备份设备种子,请执行备份 @下一步按钮请求
func (*BackupDevice) Descriptor ¶
func (*BackupDevice) Descriptor() ([]byte, []int)
func (*BackupDevice) ProtoMessage ¶
func (*BackupDevice) ProtoMessage()
func (*BackupDevice) Reset ¶
func (m *BackupDevice) Reset()
func (*BackupDevice) String ¶
func (m *BackupDevice) String() string
type ButtonAck ¶
type ButtonAck struct {
XXX_unrecognized []byte `json:"-"`
}
* 请求:计算机同意等待硬件按钮按下 @prev按钮请求
func (*ButtonAck) Descriptor ¶
func (*ButtonAck) ProtoMessage ¶
func (*ButtonAck) ProtoMessage()
type ButtonRequest ¶
type ButtonRequest struct { Code *ButtonRequestType `protobuf:"varint,1,opt,name=code,enum=ButtonRequestType" json:"code,omitempty"` Data *string `protobuf:"bytes,2,opt,name=data" json:"data,omitempty"` XXX_unrecognized []byte `json:"-"` }
* 响应:设备正在等待按下硬件按钮。 下一钮 下次取消
func (*ButtonRequest) Descriptor ¶
func (*ButtonRequest) Descriptor() ([]byte, []int)
func (*ButtonRequest) GetCode ¶
func (m *ButtonRequest) GetCode() ButtonRequestType
func (*ButtonRequest) GetData ¶
func (m *ButtonRequest) GetData() string
func (*ButtonRequest) ProtoMessage ¶
func (*ButtonRequest) ProtoMessage()
func (*ButtonRequest) Reset ¶
func (m *ButtonRequest) Reset()
func (*ButtonRequest) String ¶
func (m *ButtonRequest) String() string
type ButtonRequestType ¶
type ButtonRequestType int32
* 按钮请求类型 @已在buttonRequest中使用
const ( ButtonRequestType_ButtonRequest_Other ButtonRequestType = 1 ButtonRequestType_ButtonRequest_FeeOverThreshold ButtonRequestType = 2 ButtonRequestType_ButtonRequest_ConfirmOutput ButtonRequestType = 3 ButtonRequestType_ButtonRequest_ResetDevice ButtonRequestType = 4 ButtonRequestType_ButtonRequest_ConfirmWord ButtonRequestType = 5 ButtonRequestType_ButtonRequest_WipeDevice ButtonRequestType = 6 ButtonRequestType_ButtonRequest_ProtectCall ButtonRequestType = 7 ButtonRequestType_ButtonRequest_SignTx ButtonRequestType = 8 ButtonRequestType_ButtonRequest_FirmwareCheck ButtonRequestType = 9 ButtonRequestType_ButtonRequest_Address ButtonRequestType = 10 ButtonRequestType_ButtonRequest_PublicKey ButtonRequestType = 11 )
func (ButtonRequestType) Enum ¶
func (x ButtonRequestType) Enum() *ButtonRequestType
func (ButtonRequestType) EnumDescriptor ¶
func (ButtonRequestType) EnumDescriptor() ([]byte, []int)
func (ButtonRequestType) String ¶
func (x ButtonRequestType) String() string
func (*ButtonRequestType) UnmarshalJSON ¶
func (x *ButtonRequestType) UnmarshalJSON(data []byte) error
type Cancel ¶
type Cancel struct {
XXX_unrecognized []byte `json:"-"`
}
* 请求:中止上次需要用户交互的操作 @prev按钮请求 @上一个PinMatrixRequest @prev密码请求
func (*Cancel) Descriptor ¶
func (*Cancel) ProtoMessage ¶
func (*Cancel) ProtoMessage()
type ChangePin ¶
type ChangePin struct { Remove *bool `protobuf:"varint,1,opt,name=remove" json:"remove,omitempty"` XXX_unrecognized []byte `json:"-"` }
* 请求:启动用于设置/更改/删除PIN的工作流 @下一步按钮请求 @下一个PinMatrixRequest
func (*ChangePin) Descriptor ¶
func (*ChangePin) ProtoMessage ¶
func (*ChangePin) ProtoMessage()
type CipherKeyValue ¶
type CipherKeyValue struct { AddressN []uint32 `protobuf:"varint,1,rep,name=address_n,json=addressN" json:"address_n,omitempty"` Key *string `protobuf:"bytes,2,opt,name=key" json:"key,omitempty"` Value []byte `protobuf:"bytes,3,opt,name=value" json:"value,omitempty"` Encrypt *bool `protobuf:"varint,4,opt,name=encrypt" json:"encrypt,omitempty"` AskOnEncrypt *bool `protobuf:"varint,5,opt,name=ask_on_encrypt,json=askOnEncrypt" json:"ask_on_encrypt,omitempty"` AskOnDecrypt *bool `protobuf:"varint,6,opt,name=ask_on_decrypt,json=askOnDecrypt" json:"ask_on_decrypt,omitempty"` Iv []byte `protobuf:"bytes,7,opt,name=iv" json:"iv,omitempty"` XXX_unrecognized []byte `json:"-"` }
* 请求:要求设备加密或解密给定密钥的值 @下一个密码键值 下一次失败
func (*CipherKeyValue) Descriptor ¶
func (*CipherKeyValue) Descriptor() ([]byte, []int)
func (*CipherKeyValue) GetAddressN ¶
func (m *CipherKeyValue) GetAddressN() []uint32
func (*CipherKeyValue) GetAskOnDecrypt ¶
func (m *CipherKeyValue) GetAskOnDecrypt() bool
func (*CipherKeyValue) GetAskOnEncrypt ¶
func (m *CipherKeyValue) GetAskOnEncrypt() bool
func (*CipherKeyValue) GetEncrypt ¶
func (m *CipherKeyValue) GetEncrypt() bool
func (*CipherKeyValue) GetIv ¶
func (m *CipherKeyValue) GetIv() []byte
func (*CipherKeyValue) GetKey ¶
func (m *CipherKeyValue) GetKey() string
func (*CipherKeyValue) GetValue ¶
func (m *CipherKeyValue) GetValue() []byte
func (*CipherKeyValue) ProtoMessage ¶
func (*CipherKeyValue) ProtoMessage()
func (*CipherKeyValue) Reset ¶
func (m *CipherKeyValue) Reset()
func (*CipherKeyValue) String ¶
func (m *CipherKeyValue) String() string
type CipheredKeyValue ¶
type CipheredKeyValue struct { Value []byte `protobuf:"bytes,1,opt,name=value" json:"value,omitempty"` XXX_unrecognized []byte `json:"-"` }
* 响应:返回加密/解密值 @上一个密码键值
func (*CipheredKeyValue) Descriptor ¶
func (*CipheredKeyValue) Descriptor() ([]byte, []int)
func (*CipheredKeyValue) GetValue ¶
func (m *CipheredKeyValue) GetValue() []byte
func (*CipheredKeyValue) ProtoMessage ¶
func (*CipheredKeyValue) ProtoMessage()
func (*CipheredKeyValue) Reset ¶
func (m *CipheredKeyValue) Reset()
func (*CipheredKeyValue) String ¶
func (m *CipheredKeyValue) String() string
type ClearSession ¶
type ClearSession struct {
XXX_unrecognized []byte `json:"-"`
}
* 请求:清除会话(删除缓存的pin、密码短语等)。 下一个成功
func (*ClearSession) Descriptor ¶
func (*ClearSession) Descriptor() ([]byte, []int)
func (*ClearSession) ProtoMessage ¶
func (*ClearSession) ProtoMessage()
func (*ClearSession) Reset ¶
func (m *ClearSession) Reset()
func (*ClearSession) String ¶
func (m *ClearSession) String() string
type CoinType ¶
type CoinType struct { CoinName *string `protobuf:"bytes,1,opt,name=coin_name,json=coinName" json:"coin_name,omitempty"` CoinShortcut *string `protobuf:"bytes,2,opt,name=coin_shortcut,json=coinShortcut" json:"coin_shortcut,omitempty"` AddressType *uint32 `protobuf:"varint,3,opt,name=address_type,json=addressType,def=0" json:"address_type,omitempty"` MaxfeeKb *uint64 `protobuf:"varint,4,opt,name=maxfee_kb,json=maxfeeKb" json:"maxfee_kb,omitempty"` AddressTypeP2Sh *uint32 `protobuf:"varint,5,opt,name=address_type_p2sh,json=addressTypeP2sh,def=5" json:"address_type_p2sh,omitempty"` SignedMessageHeader *string `protobuf:"bytes,8,opt,name=signed_message_header,json=signedMessageHeader" json:"signed_message_header,omitempty"` XpubMagic *uint32 `protobuf:"varint,9,opt,name=xpub_magic,json=xpubMagic,def=76067358" json:"xpub_magic,omitempty"` XprvMagic *uint32 `protobuf:"varint,10,opt,name=xprv_magic,json=xprvMagic,def=76066276" json:"xprv_magic,omitempty"` Segwit *bool `protobuf:"varint,11,opt,name=segwit" json:"segwit,omitempty"` Forkid *uint32 `protobuf:"varint,12,opt,name=forkid" json:"forkid,omitempty"` XXX_unrecognized []byte `json:"-"` }
* 代表硬币的结构 @在功能中使用了
func (*CoinType) Descriptor ¶
func (*CoinType) GetAddressType ¶
func (*CoinType) GetAddressTypeP2Sh ¶
func (*CoinType) GetCoinName ¶
func (*CoinType) GetCoinShortcut ¶
func (*CoinType) GetMaxfeeKb ¶
func (*CoinType) GetSignedMessageHeader ¶
func (*CoinType) GetXprvMagic ¶
func (*CoinType) GetXpubMagic ¶
func (*CoinType) ProtoMessage ¶
func (*CoinType) ProtoMessage()
type DebugLinkDecision ¶
type DebugLinkDecision struct { YesNo *bool `protobuf:"varint,1,req,name=yes_no,json=yesNo" json:"yes_no,omitempty"` XXX_unrecognized []byte `json:"-"` }
* 请求:“按下”设备上的按钮 下一个成功
func (*DebugLinkDecision) Descriptor ¶
func (*DebugLinkDecision) Descriptor() ([]byte, []int)
func (*DebugLinkDecision) GetYesNo ¶
func (m *DebugLinkDecision) GetYesNo() bool
func (*DebugLinkDecision) ProtoMessage ¶
func (*DebugLinkDecision) ProtoMessage()
func (*DebugLinkDecision) Reset ¶
func (m *DebugLinkDecision) Reset()
func (*DebugLinkDecision) String ¶
func (m *DebugLinkDecision) String() string
type DebugLinkFlashErase ¶
type DebugLinkFlashErase struct { Sector *uint32 `protobuf:"varint,1,opt,name=sector" json:"sector,omitempty"` XXX_unrecognized []byte `json:"-"` }
* 请求:清除设备上的闪存块 警告:写入错误位置可能会导致设备无法修复地损坏。
func (*DebugLinkFlashErase) Descriptor ¶
func (*DebugLinkFlashErase) Descriptor() ([]byte, []int)
func (*DebugLinkFlashErase) GetSector ¶
func (m *DebugLinkFlashErase) GetSector() uint32
func (*DebugLinkFlashErase) ProtoMessage ¶
func (*DebugLinkFlashErase) ProtoMessage()
func (*DebugLinkFlashErase) Reset ¶
func (m *DebugLinkFlashErase) Reset()
func (*DebugLinkFlashErase) String ¶
func (m *DebugLinkFlashErase) String() string
type DebugLinkGetState ¶
type DebugLinkGetState struct {
XXX_unrecognized []byte `json:"-"`
}
* 请求:计算机请求设备状态 @下一个debuglinkstate
func (*DebugLinkGetState) Descriptor ¶
func (*DebugLinkGetState) Descriptor() ([]byte, []int)
func (*DebugLinkGetState) ProtoMessage ¶
func (*DebugLinkGetState) ProtoMessage()
func (*DebugLinkGetState) Reset ¶
func (m *DebugLinkGetState) Reset()
func (*DebugLinkGetState) String ¶
func (m *DebugLinkGetState) String() string
type DebugLinkLog ¶
type DebugLinkLog struct { Level *uint32 `protobuf:"varint,1,opt,name=level" json:"level,omitempty"` Bucket *string `protobuf:"bytes,2,opt,name=bucket" json:"bucket,omitempty"` Text *string `protobuf:"bytes,3,opt,name=text" json:"text,omitempty"` XXX_unrecognized []byte `json:"-"` }
* 响应:设备希望主机记录事件
func (*DebugLinkLog) Descriptor ¶
func (*DebugLinkLog) Descriptor() ([]byte, []int)
func (*DebugLinkLog) GetBucket ¶
func (m *DebugLinkLog) GetBucket() string
func (*DebugLinkLog) GetLevel ¶
func (m *DebugLinkLog) GetLevel() uint32
func (*DebugLinkLog) GetText ¶
func (m *DebugLinkLog) GetText() string
func (*DebugLinkLog) ProtoMessage ¶
func (*DebugLinkLog) ProtoMessage()
func (*DebugLinkLog) Reset ¶
func (m *DebugLinkLog) Reset()
func (*DebugLinkLog) String ¶
func (m *DebugLinkLog) String() string
type DebugLinkMemory ¶
type DebugLinkMemory struct { Memory []byte `protobuf:"bytes,1,opt,name=memory" json:"memory,omitempty"` XXX_unrecognized []byte `json:"-"` }
* 响应:设备将内存发送回 @prev debuglinkmemoryread(上一个debuglinkmemoryread)
func (*DebugLinkMemory) Descriptor ¶
func (*DebugLinkMemory) Descriptor() ([]byte, []int)
func (*DebugLinkMemory) GetMemory ¶
func (m *DebugLinkMemory) GetMemory() []byte
func (*DebugLinkMemory) ProtoMessage ¶
func (*DebugLinkMemory) ProtoMessage()
func (*DebugLinkMemory) Reset ¶
func (m *DebugLinkMemory) Reset()
func (*DebugLinkMemory) String ¶
func (m *DebugLinkMemory) String() string
type DebugLinkMemoryRead ¶
type DebugLinkMemoryRead struct { Address *uint32 `protobuf:"varint,1,opt,name=address" json:"address,omitempty"` Length *uint32 `protobuf:"varint,2,opt,name=length" json:"length,omitempty"` XXX_unrecognized []byte `json:"-"` }
* 请求:从设备读取内存 @下一个debuglinkmemory
func (*DebugLinkMemoryRead) Descriptor ¶
func (*DebugLinkMemoryRead) Descriptor() ([]byte, []int)
func (*DebugLinkMemoryRead) GetAddress ¶
func (m *DebugLinkMemoryRead) GetAddress() uint32
func (*DebugLinkMemoryRead) GetLength ¶
func (m *DebugLinkMemoryRead) GetLength() uint32
func (*DebugLinkMemoryRead) ProtoMessage ¶
func (*DebugLinkMemoryRead) ProtoMessage()
func (*DebugLinkMemoryRead) Reset ¶
func (m *DebugLinkMemoryRead) Reset()
func (*DebugLinkMemoryRead) String ¶
func (m *DebugLinkMemoryRead) String() string
type DebugLinkMemoryWrite ¶
type DebugLinkMemoryWrite struct { Address *uint32 `protobuf:"varint,1,opt,name=address" json:"address,omitempty"` Memory []byte `protobuf:"bytes,2,opt,name=memory" json:"memory,omitempty"` Flash *bool `protobuf:"varint,3,opt,name=flash" json:"flash,omitempty"` XXX_unrecognized []byte `json:"-"` }
* 请求:将内存写入设备。 警告:写入错误位置可能会导致设备无法修复地损坏。
func (*DebugLinkMemoryWrite) Descriptor ¶
func (*DebugLinkMemoryWrite) Descriptor() ([]byte, []int)
func (*DebugLinkMemoryWrite) GetAddress ¶
func (m *DebugLinkMemoryWrite) GetAddress() uint32
func (*DebugLinkMemoryWrite) GetFlash ¶
func (m *DebugLinkMemoryWrite) GetFlash() bool
func (*DebugLinkMemoryWrite) GetMemory ¶
func (m *DebugLinkMemoryWrite) GetMemory() []byte
func (*DebugLinkMemoryWrite) ProtoMessage ¶
func (*DebugLinkMemoryWrite) ProtoMessage()
func (*DebugLinkMemoryWrite) Reset ¶
func (m *DebugLinkMemoryWrite) Reset()
func (*DebugLinkMemoryWrite) String ¶
func (m *DebugLinkMemoryWrite) String() string
type DebugLinkState ¶
type DebugLinkState struct { Layout []byte `protobuf:"bytes,1,opt,name=layout" json:"layout,omitempty"` Pin *string `protobuf:"bytes,2,opt,name=pin" json:"pin,omitempty"` Matrix *string `protobuf:"bytes,3,opt,name=matrix" json:"matrix,omitempty"` Mnemonic *string `protobuf:"bytes,4,opt,name=mnemonic" json:"mnemonic,omitempty"` Node *HDNodeType `protobuf:"bytes,5,opt,name=node" json:"node,omitempty"` PassphraseProtection *bool `protobuf:"varint,6,opt,name=passphrase_protection,json=passphraseProtection" json:"passphrase_protection,omitempty"` ResetWord *string `protobuf:"bytes,7,opt,name=reset_word,json=resetWord" json:"reset_word,omitempty"` ResetEntropy []byte `protobuf:"bytes,8,opt,name=reset_entropy,json=resetEntropy" json:"reset_entropy,omitempty"` RecoveryFakeWord *string `protobuf:"bytes,9,opt,name=recovery_fake_word,json=recoveryFakeWord" json:"recovery_fake_word,omitempty"` RecoveryWordPos *uint32 `protobuf:"varint,10,opt,name=recovery_word_pos,json=recoveryWordPos" json:"recovery_word_pos,omitempty"` XXX_unrecognized []byte `json:"-"` }
* 响应:设备当前状态 @prev调试获取状态
func (*DebugLinkState) Descriptor ¶
func (*DebugLinkState) Descriptor() ([]byte, []int)
func (*DebugLinkState) GetLayout ¶
func (m *DebugLinkState) GetLayout() []byte
func (*DebugLinkState) GetMatrix ¶
func (m *DebugLinkState) GetMatrix() string
func (*DebugLinkState) GetMnemonic ¶
func (m *DebugLinkState) GetMnemonic() string
func (*DebugLinkState) GetNode ¶
func (m *DebugLinkState) GetNode() *HDNodeType
func (*DebugLinkState) GetPassphraseProtection ¶
func (m *DebugLinkState) GetPassphraseProtection() bool
func (*DebugLinkState) GetPin ¶
func (m *DebugLinkState) GetPin() string
func (*DebugLinkState) GetRecoveryFakeWord ¶
func (m *DebugLinkState) GetRecoveryFakeWord() string
func (*DebugLinkState) GetRecoveryWordPos ¶
func (m *DebugLinkState) GetRecoveryWordPos() uint32
func (*DebugLinkState) GetResetEntropy ¶
func (m *DebugLinkState) GetResetEntropy() []byte
func (*DebugLinkState) GetResetWord ¶
func (m *DebugLinkState) GetResetWord() string
func (*DebugLinkState) ProtoMessage ¶
func (*DebugLinkState) ProtoMessage()
func (*DebugLinkState) Reset ¶
func (m *DebugLinkState) Reset()
func (*DebugLinkState) String ¶
func (m *DebugLinkState) String() string
type DebugLinkStop ¶
type DebugLinkStop struct {
XXX_unrecognized []byte `json:"-"`
}
*
func (*DebugLinkStop) Descriptor ¶
func (*DebugLinkStop) Descriptor() ([]byte, []int)
func (*DebugLinkStop) ProtoMessage ¶
func (*DebugLinkStop) ProtoMessage()
func (*DebugLinkStop) Reset ¶
func (m *DebugLinkStop) Reset()
func (*DebugLinkStop) String ¶
func (m *DebugLinkStop) String() string
type DecryptMessage ¶
type DecryptMessage struct { AddressN []uint32 `protobuf:"varint,1,rep,name=address_n,json=addressN" json:"address_n,omitempty"` Nonce []byte `protobuf:"bytes,2,opt,name=nonce" json:"nonce,omitempty"` Message []byte `protobuf:"bytes,3,opt,name=message" json:"message,omitempty"` Hmac []byte `protobuf:"bytes,4,opt,name=hmac" json:"hmac,omitempty"` XXX_unrecognized []byte `json:"-"` }
* 请求:要求设备解密消息 下一个成功 下一次失败
func (*DecryptMessage) Descriptor ¶
func (*DecryptMessage) Descriptor() ([]byte, []int)
func (*DecryptMessage) GetAddressN ¶
func (m *DecryptMessage) GetAddressN() []uint32
func (*DecryptMessage) GetHmac ¶
func (m *DecryptMessage) GetHmac() []byte
func (*DecryptMessage) GetMessage ¶
func (m *DecryptMessage) GetMessage() []byte
func (*DecryptMessage) GetNonce ¶
func (m *DecryptMessage) GetNonce() []byte
func (*DecryptMessage) ProtoMessage ¶
func (*DecryptMessage) ProtoMessage()
func (*DecryptMessage) Reset ¶
func (m *DecryptMessage) Reset()
func (*DecryptMessage) String ¶
func (m *DecryptMessage) String() string
type DecryptedMessage ¶
type DecryptedMessage struct { Message []byte `protobuf:"bytes,1,opt,name=message" json:"message,omitempty"` Address *string `protobuf:"bytes,2,opt,name=address" json:"address,omitempty"` XXX_unrecognized []byte `json:"-"` }
* 响应:解密的消息 @prev解密邮件
func (*DecryptedMessage) Descriptor ¶
func (*DecryptedMessage) Descriptor() ([]byte, []int)
func (*DecryptedMessage) GetAddress ¶
func (m *DecryptedMessage) GetAddress() string
func (*DecryptedMessage) GetMessage ¶
func (m *DecryptedMessage) GetMessage() []byte
func (*DecryptedMessage) ProtoMessage ¶
func (*DecryptedMessage) ProtoMessage()
func (*DecryptedMessage) Reset ¶
func (m *DecryptedMessage) Reset()
func (*DecryptedMessage) String ¶
func (m *DecryptedMessage) String() string
type ECDHSessionKey ¶
type ECDHSessionKey struct { SessionKey []byte `protobuf:"bytes,1,opt,name=session_key,json=sessionKey" json:"session_key,omitempty"` XXX_unrecognized []byte `json:"-"` }
* 响应:设备提供ECDH会话密钥 @prev getecdhsessionkey
func (*ECDHSessionKey) Descriptor ¶
func (*ECDHSessionKey) Descriptor() ([]byte, []int)
func (*ECDHSessionKey) GetSessionKey ¶
func (m *ECDHSessionKey) GetSessionKey() []byte
func (*ECDHSessionKey) ProtoMessage ¶
func (*ECDHSessionKey) ProtoMessage()
func (*ECDHSessionKey) Reset ¶
func (m *ECDHSessionKey) Reset()
func (*ECDHSessionKey) String ¶
func (m *ECDHSessionKey) String() string
type EncryptMessage ¶
type EncryptMessage struct { Pubkey []byte `protobuf:"bytes,1,opt,name=pubkey" json:"pubkey,omitempty"` Message []byte `protobuf:"bytes,2,opt,name=message" json:"message,omitempty"` DisplayOnly *bool `protobuf:"varint,3,opt,name=display_only,json=displayOnly" json:"display_only,omitempty"` AddressN []uint32 `protobuf:"varint,4,rep,name=address_n,json=addressN" json:"address_n,omitempty"` CoinName *string `protobuf:"bytes,5,opt,name=coin_name,json=coinName,def=Bitcoin" json:"coin_name,omitempty"` XXX_unrecognized []byte `json:"-"` }
* 请求:要求设备加密消息 @下一个加密邮件 下一次失败
func (*EncryptMessage) Descriptor ¶
func (*EncryptMessage) Descriptor() ([]byte, []int)
func (*EncryptMessage) GetAddressN ¶
func (m *EncryptMessage) GetAddressN() []uint32
func (*EncryptMessage) GetCoinName ¶
func (m *EncryptMessage) GetCoinName() string
func (*EncryptMessage) GetDisplayOnly ¶
func (m *EncryptMessage) GetDisplayOnly() bool
func (*EncryptMessage) GetMessage ¶
func (m *EncryptMessage) GetMessage() []byte
func (*EncryptMessage) GetPubkey ¶
func (m *EncryptMessage) GetPubkey() []byte
func (*EncryptMessage) ProtoMessage ¶
func (*EncryptMessage) ProtoMessage()
func (*EncryptMessage) Reset ¶
func (m *EncryptMessage) Reset()
func (*EncryptMessage) String ¶
func (m *EncryptMessage) String() string
type EncryptedMessage ¶
type EncryptedMessage struct { Nonce []byte `protobuf:"bytes,1,opt,name=nonce" json:"nonce,omitempty"` Message []byte `protobuf:"bytes,2,opt,name=message" json:"message,omitempty"` Hmac []byte `protobuf:"bytes,3,opt,name=hmac" json:"hmac,omitempty"` XXX_unrecognized []byte `json:"-"` }
* 响应:加密邮件 @prev加密消息
func (*EncryptedMessage) Descriptor ¶
func (*EncryptedMessage) Descriptor() ([]byte, []int)
func (*EncryptedMessage) GetHmac ¶
func (m *EncryptedMessage) GetHmac() []byte
func (*EncryptedMessage) GetMessage ¶
func (m *EncryptedMessage) GetMessage() []byte
func (*EncryptedMessage) GetNonce ¶
func (m *EncryptedMessage) GetNonce() []byte
func (*EncryptedMessage) ProtoMessage ¶
func (*EncryptedMessage) ProtoMessage()
func (*EncryptedMessage) Reset ¶
func (m *EncryptedMessage) Reset()
func (*EncryptedMessage) String ¶
func (m *EncryptedMessage) String() string
type Entropy ¶
type Entropy struct { Entropy []byte `protobuf:"bytes,1,req,name=entropy" json:"entropy,omitempty"` XXX_unrecognized []byte `json:"-"` }
* 响应:用内部RNG生成的随机数据回复 @prev get熵
func (*Entropy) Descriptor ¶
func (*Entropy) GetEntropy ¶
func (*Entropy) ProtoMessage ¶
func (*Entropy) ProtoMessage()
type EntropyAck ¶
type EntropyAck struct { Entropy []byte `protobuf:"bytes,1,opt,name=entropy" json:"entropy,omitempty"` XXX_unrecognized []byte `json:"-"` }
* 请求:为种子生成函数提供额外的熵 @prev entropy请求 @下一步按钮请求
func (*EntropyAck) Descriptor ¶
func (*EntropyAck) Descriptor() ([]byte, []int)
func (*EntropyAck) GetEntropy ¶
func (m *EntropyAck) GetEntropy() []byte
func (*EntropyAck) ProtoMessage ¶
func (*EntropyAck) ProtoMessage()
func (*EntropyAck) Reset ¶
func (m *EntropyAck) Reset()
func (*EntropyAck) String ¶
func (m *EntropyAck) String() string
type EntropyRequest ¶
type EntropyRequest struct {
XXX_unrecognized []byte `json:"-"`
}
* 回答:要求主机提供额外的熵 @上一个重置设备 @下一个entropack
func (*EntropyRequest) Descriptor ¶
func (*EntropyRequest) Descriptor() ([]byte, []int)
func (*EntropyRequest) ProtoMessage ¶
func (*EntropyRequest) ProtoMessage()
func (*EntropyRequest) Reset ¶
func (m *EntropyRequest) Reset()
func (*EntropyRequest) String ¶
func (m *EntropyRequest) String() string
type EstimateTxSize ¶
type EstimateTxSize struct { OutputsCount *uint32 `protobuf:"varint,1,req,name=outputs_count,json=outputsCount" json:"outputs_count,omitempty"` InputsCount *uint32 `protobuf:"varint,2,req,name=inputs_count,json=inputsCount" json:"inputs_count,omitempty"` CoinName *string `protobuf:"bytes,3,opt,name=coin_name,json=coinName,def=Bitcoin" json:"coin_name,omitempty"` XXX_unrecognized []byte `json:"-"` }
* 请求:事务的估计大小 它的行为与signtx完全相同,这意味着它可以使用txrequest请求 此调用是非阻塞的(除了可能的密码请求以解锁种子) “下一个TXSIZE” 下一次失败
func (*EstimateTxSize) Descriptor ¶
func (*EstimateTxSize) Descriptor() ([]byte, []int)
func (*EstimateTxSize) GetCoinName ¶
func (m *EstimateTxSize) GetCoinName() string
func (*EstimateTxSize) GetInputsCount ¶
func (m *EstimateTxSize) GetInputsCount() uint32
func (*EstimateTxSize) GetOutputsCount ¶
func (m *EstimateTxSize) GetOutputsCount() uint32
func (*EstimateTxSize) ProtoMessage ¶
func (*EstimateTxSize) ProtoMessage()
func (*EstimateTxSize) Reset ¶
func (m *EstimateTxSize) Reset()
func (*EstimateTxSize) String ¶
func (m *EstimateTxSize) String() string
type EthereumAddress ¶
type EthereumAddress struct { Address []byte `protobuf:"bytes,1,req,name=address" json:"address,omitempty"` XXX_unrecognized []byte `json:"-"` }
* 响应:包含从设备专用种子派生的以太坊地址 @prev以太坊详细地址
func (*EthereumAddress) Descriptor ¶
func (*EthereumAddress) Descriptor() ([]byte, []int)
func (*EthereumAddress) GetAddress ¶
func (m *EthereumAddress) GetAddress() []byte
func (*EthereumAddress) ProtoMessage ¶
func (*EthereumAddress) ProtoMessage()
func (*EthereumAddress) Reset ¶
func (m *EthereumAddress) Reset()
func (*EthereumAddress) String ¶
func (m *EthereumAddress) String() string
type EthereumGetAddress ¶
type EthereumGetAddress struct { AddressN []uint32 `protobuf:"varint,1,rep,name=address_n,json=addressN" json:"address_n,omitempty"` ShowDisplay *bool `protobuf:"varint,2,opt,name=show_display,json=showDisplay" json:"show_display,omitempty"` XXX_unrecognized []byte `json:"-"` }
* 请求:向设备询问与地址路径对应的以太坊地址 @下一个密码请求 @下一个Ethereumaddress 下一次失败
func (*EthereumGetAddress) Descriptor ¶
func (*EthereumGetAddress) Descriptor() ([]byte, []int)
func (*EthereumGetAddress) GetAddressN ¶
func (m *EthereumGetAddress) GetAddressN() []uint32
func (*EthereumGetAddress) GetShowDisplay ¶
func (m *EthereumGetAddress) GetShowDisplay() bool
func (*EthereumGetAddress) ProtoMessage ¶
func (*EthereumGetAddress) ProtoMessage()
func (*EthereumGetAddress) Reset ¶
func (m *EthereumGetAddress) Reset()
func (*EthereumGetAddress) String ¶
func (m *EthereumGetAddress) String() string
type EthereumMessageSignature ¶
type EthereumMessageSignature struct { Address []byte `protobuf:"bytes,1,opt,name=address" json:"address,omitempty"` Signature []byte `protobuf:"bytes,2,opt,name=signature" json:"signature,omitempty"` XXX_unrecognized []byte `json:"-"` }
* 响应:签名消息 @prev以太坊消息
func (*EthereumMessageSignature) Descriptor ¶
func (*EthereumMessageSignature) Descriptor() ([]byte, []int)
func (*EthereumMessageSignature) GetAddress ¶
func (m *EthereumMessageSignature) GetAddress() []byte
func (*EthereumMessageSignature) GetSignature ¶
func (m *EthereumMessageSignature) GetSignature() []byte
func (*EthereumMessageSignature) ProtoMessage ¶
func (*EthereumMessageSignature) ProtoMessage()
func (*EthereumMessageSignature) Reset ¶
func (m *EthereumMessageSignature) Reset()
func (*EthereumMessageSignature) String ¶
func (m *EthereumMessageSignature) String() string
type EthereumSignMessage ¶
type EthereumSignMessage struct { AddressN []uint32 `protobuf:"varint,1,rep,name=address_n,json=addressN" json:"address_n,omitempty"` Message []byte `protobuf:"bytes,2,req,name=message" json:"message,omitempty"` XXX_unrecognized []byte `json:"-"` }
* 请求:要求设备签署消息 @下一个以太坊推荐签名 下一次失败
func (*EthereumSignMessage) Descriptor ¶
func (*EthereumSignMessage) Descriptor() ([]byte, []int)
func (*EthereumSignMessage) GetAddressN ¶
func (m *EthereumSignMessage) GetAddressN() []uint32
func (*EthereumSignMessage) GetMessage ¶
func (m *EthereumSignMessage) GetMessage() []byte
func (*EthereumSignMessage) ProtoMessage ¶
func (*EthereumSignMessage) ProtoMessage()
func (*EthereumSignMessage) Reset ¶
func (m *EthereumSignMessage) Reset()
func (*EthereumSignMessage) String ¶
func (m *EthereumSignMessage) String() string
type EthereumSignTx ¶
type EthereumSignTx struct { AddressN []uint32 `protobuf:"varint,1,rep,name=address_n,json=addressN" json:"address_n,omitempty"` Nonce []byte `protobuf:"bytes,2,opt,name=nonce" json:"nonce,omitempty"` GasPrice []byte `protobuf:"bytes,3,opt,name=gas_price,json=gasPrice" json:"gas_price,omitempty"` GasLimit []byte `protobuf:"bytes,4,opt,name=gas_limit,json=gasLimit" json:"gas_limit,omitempty"` To []byte `protobuf:"bytes,5,opt,name=to" json:"to,omitempty"` Value []byte `protobuf:"bytes,6,opt,name=value" json:"value,omitempty"` DataInitialChunk []byte `protobuf:"bytes,7,opt,name=data_initial_chunk,json=dataInitialChunk" json:"data_initial_chunk,omitempty"` DataLength *uint32 `protobuf:"varint,8,opt,name=data_length,json=dataLength" json:"data_length,omitempty"` ChainId *uint32 `protobuf:"varint,9,opt,name=chain_id,json=chainId" json:"chain_id,omitempty"` XXX_unrecognized []byte `json:"-"` }
* 请求:请求设备签署事务 从协议的角度来看,所有字段都是可选的。如果缺少,则每个字段默认为值“0”。 注意:第一个最多1024字节的数据必须作为此消息的一部分进行传输。 @下一个密码请求 @下一个PinMatrixRequest @下一个以太坊MtxRequest 下一次失败
func (*EthereumSignTx) Descriptor ¶
func (*EthereumSignTx) Descriptor() ([]byte, []int)
func (*EthereumSignTx) GetAddressN ¶
func (m *EthereumSignTx) GetAddressN() []uint32
func (*EthereumSignTx) GetChainId ¶
func (m *EthereumSignTx) GetChainId() uint32
func (*EthereumSignTx) GetDataInitialChunk ¶
func (m *EthereumSignTx) GetDataInitialChunk() []byte
func (*EthereumSignTx) GetDataLength ¶
func (m *EthereumSignTx) GetDataLength() uint32
func (*EthereumSignTx) GetGasLimit ¶
func (m *EthereumSignTx) GetGasLimit() []byte
func (*EthereumSignTx) GetGasPrice ¶
func (m *EthereumSignTx) GetGasPrice() []byte
func (*EthereumSignTx) GetNonce ¶
func (m *EthereumSignTx) GetNonce() []byte
func (*EthereumSignTx) GetTo ¶
func (m *EthereumSignTx) GetTo() []byte
func (*EthereumSignTx) GetValue ¶
func (m *EthereumSignTx) GetValue() []byte
func (*EthereumSignTx) ProtoMessage ¶
func (*EthereumSignTx) ProtoMessage()
func (*EthereumSignTx) Reset ¶
func (m *EthereumSignTx) Reset()
func (*EthereumSignTx) String ¶
func (m *EthereumSignTx) String() string
type EthereumTxAck ¶
type EthereumTxAck struct { DataChunk []byte `protobuf:"bytes,1,opt,name=data_chunk,json=dataChunk" json:"data_chunk,omitempty"` XXX_unrecognized []byte `json:"-"` }
* 请求:事务有效负载数据。 @上一个以太坊请求 @下一个以太坊MtxRequest
func (*EthereumTxAck) Descriptor ¶
func (*EthereumTxAck) Descriptor() ([]byte, []int)
func (*EthereumTxAck) GetDataChunk ¶
func (m *EthereumTxAck) GetDataChunk() []byte
func (*EthereumTxAck) ProtoMessage ¶
func (*EthereumTxAck) ProtoMessage()
func (*EthereumTxAck) Reset ¶
func (m *EthereumTxAck) Reset()
func (*EthereumTxAck) String ¶
func (m *EthereumTxAck) String() string
type EthereumTxRequest ¶
type EthereumTxRequest struct { DataLength *uint32 `protobuf:"varint,1,opt,name=data_length,json=dataLength" json:"data_length,omitempty"` SignatureV *uint32 `protobuf:"varint,2,opt,name=signature_v,json=signatureV" json:"signature_v,omitempty"` SignatureR []byte `protobuf:"bytes,3,opt,name=signature_r,json=signatureR" json:"signature_r,omitempty"` SignatureS []byte `protobuf:"bytes,4,opt,name=signature_s,json=signatureS" json:"signature_s,omitempty"` XXX_unrecognized []byte `json:"-"` }
* 响应:设备从事务负载请求更多数据,或返回签名。 如果设置了数据长度,设备将等待更多字节的有效负载。 否则,签名字段包含计算出的事务签名。所有三个字段都将显示。 @prev以太坊GNTX @下一个以太坊
func (*EthereumTxRequest) Descriptor ¶
func (*EthereumTxRequest) Descriptor() ([]byte, []int)
func (*EthereumTxRequest) GetDataLength ¶
func (m *EthereumTxRequest) GetDataLength() uint32
func (*EthereumTxRequest) GetSignatureR ¶
func (m *EthereumTxRequest) GetSignatureR() []byte
func (*EthereumTxRequest) GetSignatureS ¶
func (m *EthereumTxRequest) GetSignatureS() []byte
func (*EthereumTxRequest) GetSignatureV ¶
func (m *EthereumTxRequest) GetSignatureV() uint32
func (*EthereumTxRequest) ProtoMessage ¶
func (*EthereumTxRequest) ProtoMessage()
func (*EthereumTxRequest) Reset ¶
func (m *EthereumTxRequest) Reset()
func (*EthereumTxRequest) String ¶
func (m *EthereumTxRequest) String() string
type EthereumVerifyMessage ¶
type EthereumVerifyMessage struct { Address []byte `protobuf:"bytes,1,opt,name=address" json:"address,omitempty"` Signature []byte `protobuf:"bytes,2,opt,name=signature" json:"signature,omitempty"` Message []byte `protobuf:"bytes,3,opt,name=message" json:"message,omitempty"` XXX_unrecognized []byte `json:"-"` }
* 请求:请求设备验证消息 下一个成功 下一次失败
func (*EthereumVerifyMessage) Descriptor ¶
func (*EthereumVerifyMessage) Descriptor() ([]byte, []int)
func (*EthereumVerifyMessage) GetAddress ¶
func (m *EthereumVerifyMessage) GetAddress() []byte
func (*EthereumVerifyMessage) GetMessage ¶
func (m *EthereumVerifyMessage) GetMessage() []byte
func (*EthereumVerifyMessage) GetSignature ¶
func (m *EthereumVerifyMessage) GetSignature() []byte
func (*EthereumVerifyMessage) ProtoMessage ¶
func (*EthereumVerifyMessage) ProtoMessage()
func (*EthereumVerifyMessage) Reset ¶
func (m *EthereumVerifyMessage) Reset()
func (*EthereumVerifyMessage) String ¶
func (m *EthereumVerifyMessage) String() string
type Failure ¶
type Failure struct { Code *FailureType `protobuf:"varint,1,opt,name=code,enum=FailureType" json:"code,omitempty"` Message *string `protobuf:"bytes,2,opt,name=message" json:"message,omitempty"` XXX_unrecognized []byte `json:"-"` }
* 响应:上一个请求失败
func (*Failure) Descriptor ¶
func (*Failure) GetCode ¶
func (m *Failure) GetCode() FailureType
func (*Failure) GetMessage ¶
func (*Failure) ProtoMessage ¶
func (*Failure) ProtoMessage()
type FailureType ¶
type FailureType int32
* 故障消息返回的故障类型 @失败时使用了
const ( FailureType_Failure_UnexpectedMessage FailureType = 1 FailureType_Failure_ButtonExpected FailureType = 2 FailureType_Failure_DataError FailureType = 3 FailureType_Failure_ActionCancelled FailureType = 4 FailureType_Failure_PinExpected FailureType = 5 FailureType_Failure_PinCancelled FailureType = 6 FailureType_Failure_PinInvalid FailureType = 7 FailureType_Failure_InvalidSignature FailureType = 8 FailureType_Failure_ProcessError FailureType = 9 FailureType_Failure_NotEnoughFunds FailureType = 10 FailureType_Failure_NotInitialized FailureType = 11 FailureType_Failure_FirmwareError FailureType = 99 )
func (FailureType) Enum ¶
func (x FailureType) Enum() *FailureType
func (FailureType) EnumDescriptor ¶
func (FailureType) EnumDescriptor() ([]byte, []int)
func (FailureType) String ¶
func (x FailureType) String() string
func (*FailureType) UnmarshalJSON ¶
func (x *FailureType) UnmarshalJSON(data []byte) error
type Features ¶
type Features struct { Vendor *string `protobuf:"bytes,1,opt,name=vendor" json:"vendor,omitempty"` MajorVersion *uint32 `protobuf:"varint,2,opt,name=major_version,json=majorVersion" json:"major_version,omitempty"` MinorVersion *uint32 `protobuf:"varint,3,opt,name=minor_version,json=minorVersion" json:"minor_version,omitempty"` PatchVersion *uint32 `protobuf:"varint,4,opt,name=patch_version,json=patchVersion" json:"patch_version,omitempty"` BootloaderMode *bool `protobuf:"varint,5,opt,name=bootloader_mode,json=bootloaderMode" json:"bootloader_mode,omitempty"` DeviceId *string `protobuf:"bytes,6,opt,name=device_id,json=deviceId" json:"device_id,omitempty"` PinProtection *bool `protobuf:"varint,7,opt,name=pin_protection,json=pinProtection" json:"pin_protection,omitempty"` PassphraseProtection *bool `protobuf:"varint,8,opt,name=passphrase_protection,json=passphraseProtection" json:"passphrase_protection,omitempty"` Language *string `protobuf:"bytes,9,opt,name=language" json:"language,omitempty"` Label *string `protobuf:"bytes,10,opt,name=label" json:"label,omitempty"` Coins []*CoinType `protobuf:"bytes,11,rep,name=coins" json:"coins,omitempty"` Initialized *bool `protobuf:"varint,12,opt,name=initialized" json:"initialized,omitempty"` Revision []byte `protobuf:"bytes,13,opt,name=revision" json:"revision,omitempty"` BootloaderHash []byte `protobuf:"bytes,14,opt,name=bootloader_hash,json=bootloaderHash" json:"bootloader_hash,omitempty"` Imported *bool `protobuf:"varint,15,opt,name=imported" json:"imported,omitempty"` PinCached *bool `protobuf:"varint,16,opt,name=pin_cached,json=pinCached" json:"pin_cached,omitempty"` PassphraseCached *bool `protobuf:"varint,17,opt,name=passphrase_cached,json=passphraseCached" json:"passphrase_cached,omitempty"` FirmwarePresent *bool `protobuf:"varint,18,opt,name=firmware_present,json=firmwarePresent" json:"firmware_present,omitempty"` NeedsBackup *bool `protobuf:"varint,19,opt,name=needs_backup,json=needsBackup" json:"needs_backup,omitempty"` Flags *uint32 `protobuf:"varint,20,opt,name=flags" json:"flags,omitempty"` XXX_unrecognized []byte `json:"-"` }
* 响应:报告有关设备的各种信息 @prev初始化 @上一个获取功能
func (*Features) Descriptor ¶
func (*Features) GetBootloaderHash ¶
func (*Features) GetBootloaderMode ¶
func (*Features) GetDeviceId ¶
func (*Features) GetFirmwarePresent ¶
func (*Features) GetImported ¶
func (*Features) GetInitialized ¶
func (*Features) GetLanguage ¶
func (*Features) GetMajorVersion ¶
func (*Features) GetMinorVersion ¶
func (*Features) GetNeedsBackup ¶
func (*Features) GetPassphraseCached ¶
func (*Features) GetPassphraseProtection ¶
func (*Features) GetPatchVersion ¶
func (*Features) GetPinCached ¶
func (*Features) GetPinProtection ¶
func (*Features) GetRevision ¶
func (*Features) ProtoMessage ¶
func (*Features) ProtoMessage()
type FirmwareErase ¶
type FirmwareErase struct { Length *uint32 `protobuf:"varint,1,opt,name=length" json:"length,omitempty"` XXX_unrecognized []byte `json:"-"` }
* 请求:要求设备删除其固件(以便可以通过firmwareupload进行更换) 下一个成功 @下一个固件请求 下一次失败
func (*FirmwareErase) Descriptor ¶
func (*FirmwareErase) Descriptor() ([]byte, []int)
func (*FirmwareErase) GetLength ¶
func (m *FirmwareErase) GetLength() uint32
func (*FirmwareErase) ProtoMessage ¶
func (*FirmwareErase) ProtoMessage()
func (*FirmwareErase) Reset ¶
func (m *FirmwareErase) Reset()
func (*FirmwareErase) String ¶
func (m *FirmwareErase) String() string
type FirmwareRequest ¶
type FirmwareRequest struct { Offset *uint32 `protobuf:"varint,1,opt,name=offset" json:"offset,omitempty"` Length *uint32 `protobuf:"varint,2,opt,name=length" json:"length,omitempty"` XXX_unrecognized []byte `json:"-"` }
* 响应:请求固件块 @下一个firmwareupload
func (*FirmwareRequest) Descriptor ¶
func (*FirmwareRequest) Descriptor() ([]byte, []int)
func (*FirmwareRequest) GetLength ¶
func (m *FirmwareRequest) GetLength() uint32
func (*FirmwareRequest) GetOffset ¶
func (m *FirmwareRequest) GetOffset() uint32
func (*FirmwareRequest) ProtoMessage ¶
func (*FirmwareRequest) ProtoMessage()
func (*FirmwareRequest) Reset ¶
func (m *FirmwareRequest) Reset()
func (*FirmwareRequest) String ¶
func (m *FirmwareRequest) String() string
type FirmwareUpload ¶
type FirmwareUpload struct { Payload []byte `protobuf:"bytes,1,req,name=payload" json:"payload,omitempty"` Hash []byte `protobuf:"bytes,2,opt,name=hash" json:"hash,omitempty"` XXX_unrecognized []byte `json:"-"` }
* 请求:以二进制形式向设备发送固件 下一个成功 下一次失败
func (*FirmwareUpload) Descriptor ¶
func (*FirmwareUpload) Descriptor() ([]byte, []int)
func (*FirmwareUpload) GetHash ¶
func (m *FirmwareUpload) GetHash() []byte
func (*FirmwareUpload) GetPayload ¶
func (m *FirmwareUpload) GetPayload() []byte
func (*FirmwareUpload) ProtoMessage ¶
func (*FirmwareUpload) ProtoMessage()
func (*FirmwareUpload) Reset ¶
func (m *FirmwareUpload) Reset()
func (*FirmwareUpload) String ¶
func (m *FirmwareUpload) String() string
type GetAddress ¶
type GetAddress struct { AddressN []uint32 `protobuf:"varint,1,rep,name=address_n,json=addressN" json:"address_n,omitempty"` CoinName *string `protobuf:"bytes,2,opt,name=coin_name,json=coinName,def=Bitcoin" json:"coin_name,omitempty"` ShowDisplay *bool `protobuf:"varint,3,opt,name=show_display,json=showDisplay" json:"show_display,omitempty"` Multisig *MultisigRedeemScriptType `protobuf:"bytes,4,opt,name=multisig" json:"multisig,omitempty"` ScriptType *InputScriptType `protobuf:"varint,5,opt,name=script_type,json=scriptType,enum=InputScriptType,def=0" json:"script_type,omitempty"` XXX_unrecognized []byte `json:"-"` }
* 请求:向设备询问与地址路径相对应的地址 @下一个密码请求 下一个地址 下一次失败
func (*GetAddress) Descriptor ¶
func (*GetAddress) Descriptor() ([]byte, []int)
func (*GetAddress) GetAddressN ¶
func (m *GetAddress) GetAddressN() []uint32
func (*GetAddress) GetCoinName ¶
func (m *GetAddress) GetCoinName() string
func (*GetAddress) GetMultisig ¶
func (m *GetAddress) GetMultisig() *MultisigRedeemScriptType
func (*GetAddress) GetScriptType ¶
func (m *GetAddress) GetScriptType() InputScriptType
func (*GetAddress) GetShowDisplay ¶
func (m *GetAddress) GetShowDisplay() bool
func (*GetAddress) ProtoMessage ¶
func (*GetAddress) ProtoMessage()
func (*GetAddress) Reset ¶
func (m *GetAddress) Reset()
func (*GetAddress) String ¶
func (m *GetAddress) String() string
type GetECDHSessionKey ¶
type GetECDHSessionKey struct { Identity *IdentityType `protobuf:"bytes,1,opt,name=identity" json:"identity,omitempty"` PeerPublicKey []byte `protobuf:"bytes,2,opt,name=peer_public_key,json=peerPublicKey" json:"peer_public_key,omitempty"` EcdsaCurveName *string `protobuf:"bytes,3,opt,name=ecdsa_curve_name,json=ecdsaCurveName" json:"ecdsa_curve_name,omitempty"` XXX_unrecognized []byte `json:"-"` }
* 请求:请求设备生成ECDH会话密钥 @下一个ecdhsessionkey 下一次失败
func (*GetECDHSessionKey) Descriptor ¶
func (*GetECDHSessionKey) Descriptor() ([]byte, []int)
func (*GetECDHSessionKey) GetEcdsaCurveName ¶
func (m *GetECDHSessionKey) GetEcdsaCurveName() string
func (*GetECDHSessionKey) GetIdentity ¶
func (m *GetECDHSessionKey) GetIdentity() *IdentityType
func (*GetECDHSessionKey) GetPeerPublicKey ¶
func (m *GetECDHSessionKey) GetPeerPublicKey() []byte
func (*GetECDHSessionKey) ProtoMessage ¶
func (*GetECDHSessionKey) ProtoMessage()
func (*GetECDHSessionKey) Reset ¶
func (m *GetECDHSessionKey) Reset()
func (*GetECDHSessionKey) String ¶
func (m *GetECDHSessionKey) String() string
type GetEntropy ¶
type GetEntropy struct { Size *uint32 `protobuf:"varint,1,req,name=size" json:"size,omitempty"` XXX_unrecognized []byte `json:"-"` }
* 请求:请求硬件RNG生成的随机数据样本。可用于测试。 @下一步按钮请求 @下一个熵 下一次失败
func (*GetEntropy) Descriptor ¶
func (*GetEntropy) Descriptor() ([]byte, []int)
func (*GetEntropy) GetSize ¶
func (m *GetEntropy) GetSize() uint32
func (*GetEntropy) ProtoMessage ¶
func (*GetEntropy) ProtoMessage()
func (*GetEntropy) Reset ¶
func (m *GetEntropy) Reset()
func (*GetEntropy) String ¶
func (m *GetEntropy) String() string
type GetFeatures ¶
type GetFeatures struct {
XXX_unrecognized []byte `json:"-"`
}
* 请求:询问设备详细信息(无设备重置) 下一个特征
func (*GetFeatures) Descriptor ¶
func (*GetFeatures) Descriptor() ([]byte, []int)
func (*GetFeatures) ProtoMessage ¶
func (*GetFeatures) ProtoMessage()
func (*GetFeatures) Reset ¶
func (m *GetFeatures) Reset()
func (*GetFeatures) String ¶
func (m *GetFeatures) String() string
type GetPublicKey ¶
type GetPublicKey struct { AddressN []uint32 `protobuf:"varint,1,rep,name=address_n,json=addressN" json:"address_n,omitempty"` EcdsaCurveName *string `protobuf:"bytes,2,opt,name=ecdsa_curve_name,json=ecdsaCurveName" json:"ecdsa_curve_name,omitempty"` ShowDisplay *bool `protobuf:"varint,3,opt,name=show_display,json=showDisplay" json:"show_display,omitempty"` CoinName *string `protobuf:"bytes,4,opt,name=coin_name,json=coinName,def=Bitcoin" json:"coin_name,omitempty"` XXX_unrecognized []byte `json:"-"` }
* 请求:请求设备提供与地址路径相对应的公钥 @下一个密码请求 下一个公钥 下一次失败
func (*GetPublicKey) Descriptor ¶
func (*GetPublicKey) Descriptor() ([]byte, []int)
func (*GetPublicKey) GetAddressN ¶
func (m *GetPublicKey) GetAddressN() []uint32
func (*GetPublicKey) GetCoinName ¶
func (m *GetPublicKey) GetCoinName() string
func (*GetPublicKey) GetEcdsaCurveName ¶
func (m *GetPublicKey) GetEcdsaCurveName() string
func (*GetPublicKey) GetShowDisplay ¶
func (m *GetPublicKey) GetShowDisplay() bool
func (*GetPublicKey) ProtoMessage ¶
func (*GetPublicKey) ProtoMessage()
func (*GetPublicKey) Reset ¶
func (m *GetPublicKey) Reset()
func (*GetPublicKey) String ¶
func (m *GetPublicKey) String() string
type HDNodePathType ¶
type HDNodePathType struct { Node *HDNodeType `protobuf:"bytes,1,req,name=node" json:"node,omitempty"` AddressN []uint32 `protobuf:"varint,2,rep,name=address_n,json=addressN" json:"address_n,omitempty"` XXX_unrecognized []byte `json:"-"` }
func (*HDNodePathType) Descriptor ¶
func (*HDNodePathType) Descriptor() ([]byte, []int)
func (*HDNodePathType) GetAddressN ¶
func (m *HDNodePathType) GetAddressN() []uint32
func (*HDNodePathType) GetNode ¶
func (m *HDNodePathType) GetNode() *HDNodeType
func (*HDNodePathType) ProtoMessage ¶
func (*HDNodePathType) ProtoMessage()
func (*HDNodePathType) Reset ¶
func (m *HDNodePathType) Reset()
func (*HDNodePathType) String ¶
func (m *HDNodePathType) String() string
type HDNodeType ¶
type HDNodeType struct { Depth *uint32 `protobuf:"varint,1,req,name=depth" json:"depth,omitempty"` Fingerprint *uint32 `protobuf:"varint,2,req,name=fingerprint" json:"fingerprint,omitempty"` ChildNum *uint32 `protobuf:"varint,3,req,name=child_num,json=childNum" json:"child_num,omitempty"` ChainCode []byte `protobuf:"bytes,4,req,name=chain_code,json=chainCode" json:"chain_code,omitempty"` PrivateKey []byte `protobuf:"bytes,5,opt,name=private_key,json=privateKey" json:"private_key,omitempty"` PublicKey []byte `protobuf:"bytes,6,opt,name=public_key,json=publicKey" json:"public_key,omitempty"` XXX_unrecognized []byte `json:"-"` }
* 表示bip32(层次确定性)节点的结构 用于将私钥导入设备并将公钥导出设备 @在PublicKey中使用了 @在装载设备中使用 @在debuglinkstate中使用了_ @已在存储中使用
func (*HDNodeType) Descriptor ¶
func (*HDNodeType) Descriptor() ([]byte, []int)
func (*HDNodeType) GetChainCode ¶
func (m *HDNodeType) GetChainCode() []byte
func (*HDNodeType) GetChildNum ¶
func (m *HDNodeType) GetChildNum() uint32
func (*HDNodeType) GetDepth ¶
func (m *HDNodeType) GetDepth() uint32
func (*HDNodeType) GetFingerprint ¶
func (m *HDNodeType) GetFingerprint() uint32
func (*HDNodeType) GetPrivateKey ¶
func (m *HDNodeType) GetPrivateKey() []byte
func (*HDNodeType) GetPublicKey ¶
func (m *HDNodeType) GetPublicKey() []byte
func (*HDNodeType) ProtoMessage ¶
func (*HDNodeType) ProtoMessage()
func (*HDNodeType) Reset ¶
func (m *HDNodeType) Reset()
func (*HDNodeType) String ¶
func (m *HDNodeType) String() string
type IdentityType ¶
type IdentityType struct { Proto *string `protobuf:"bytes,1,opt,name=proto" json:"proto,omitempty"` User *string `protobuf:"bytes,2,opt,name=user" json:"user,omitempty"` Host *string `protobuf:"bytes,3,opt,name=host" json:"host,omitempty"` Port *string `protobuf:"bytes,4,opt,name=port" json:"port,omitempty"` Path *string `protobuf:"bytes,5,opt,name=path" json:"path,omitempty"` Index *uint32 `protobuf:"varint,6,opt,name=index,def=0" json:"index,omitempty"` XXX_unrecognized []byte `json:"-"` }
* 表示身份数据的结构 @在IdentityType中使用了\u
func (*IdentityType) Descriptor ¶
func (*IdentityType) Descriptor() ([]byte, []int)
func (*IdentityType) GetHost ¶
func (m *IdentityType) GetHost() string
func (*IdentityType) GetIndex ¶
func (m *IdentityType) GetIndex() uint32
func (*IdentityType) GetPath ¶
func (m *IdentityType) GetPath() string
func (*IdentityType) GetPort ¶
func (m *IdentityType) GetPort() string
func (*IdentityType) GetProto ¶
func (m *IdentityType) GetProto() string
func (*IdentityType) GetUser ¶
func (m *IdentityType) GetUser() string
func (*IdentityType) ProtoMessage ¶
func (*IdentityType) ProtoMessage()
func (*IdentityType) Reset ¶
func (m *IdentityType) Reset()
func (*IdentityType) String ¶
func (m *IdentityType) String() string
type Initialize ¶
type Initialize struct {
XXX_unrecognized []byte `json:"-"`
}
* 请求:将设备重置为默认状态并询问设备详细信息 下一个特征
func (*Initialize) Descriptor ¶
func (*Initialize) Descriptor() ([]byte, []int)
func (*Initialize) ProtoMessage ¶
func (*Initialize) ProtoMessage()
func (*Initialize) Reset ¶
func (m *Initialize) Reset()
func (*Initialize) String ¶
func (m *Initialize) String() string
type InputScriptType ¶
type InputScriptType int32
* 将用于事务输出的脚本类型 @已在txinputType中使用
const ( InputScriptType_SPENDADDRESS InputScriptType = 0 InputScriptType_SPENDMULTISIG InputScriptType = 1 InputScriptType_EXTERNAL InputScriptType = 2 InputScriptType_SPENDWITNESS InputScriptType = 3 InputScriptType_SPENDP2SHWITNESS InputScriptType = 4 )
const Default_GetAddress_ScriptType InputScriptType = InputScriptType_SPENDADDRESS
const Default_SignMessage_ScriptType InputScriptType = InputScriptType_SPENDADDRESS
const Default_TxInputType_ScriptType InputScriptType = InputScriptType_SPENDADDRESS
func (InputScriptType) Enum ¶
func (x InputScriptType) Enum() *InputScriptType
func (InputScriptType) EnumDescriptor ¶
func (InputScriptType) EnumDescriptor() ([]byte, []int)
func (InputScriptType) String ¶
func (x InputScriptType) String() string
func (*InputScriptType) UnmarshalJSON ¶
func (x *InputScriptType) UnmarshalJSON(data []byte) error
type LoadDevice ¶
type LoadDevice struct { Mnemonic *string `protobuf:"bytes,1,opt,name=mnemonic" json:"mnemonic,omitempty"` Node *HDNodeType `protobuf:"bytes,2,opt,name=node" json:"node,omitempty"` Pin *string `protobuf:"bytes,3,opt,name=pin" json:"pin,omitempty"` PassphraseProtection *bool `protobuf:"varint,4,opt,name=passphrase_protection,json=passphraseProtection" json:"passphrase_protection,omitempty"` Language *string `protobuf:"bytes,5,opt,name=language,def=english" json:"language,omitempty"` Label *string `protobuf:"bytes,6,opt,name=label" json:"label,omitempty"` SkipChecksum *bool `protobuf:"varint,7,opt,name=skip_checksum,json=skipChecksum" json:"skip_checksum,omitempty"` U2FCounter *uint32 `protobuf:"varint,8,opt,name=u2f_counter,json=u2fCounter" json:"u2f_counter,omitempty"` XXX_unrecognized []byte `json:"-"` }
* 请求:从计算机加载种子和相关的内部设置 @下一步按钮请求 下一个成功 下一次失败
func (*LoadDevice) Descriptor ¶
func (*LoadDevice) Descriptor() ([]byte, []int)
func (*LoadDevice) GetLabel ¶
func (m *LoadDevice) GetLabel() string
func (*LoadDevice) GetLanguage ¶
func (m *LoadDevice) GetLanguage() string
func (*LoadDevice) GetMnemonic ¶
func (m *LoadDevice) GetMnemonic() string
func (*LoadDevice) GetNode ¶
func (m *LoadDevice) GetNode() *HDNodeType
func (*LoadDevice) GetPassphraseProtection ¶
func (m *LoadDevice) GetPassphraseProtection() bool
func (*LoadDevice) GetPin ¶
func (m *LoadDevice) GetPin() string
func (*LoadDevice) GetSkipChecksum ¶
func (m *LoadDevice) GetSkipChecksum() bool
func (*LoadDevice) GetU2FCounter ¶
func (m *LoadDevice) GetU2FCounter() uint32
func (*LoadDevice) ProtoMessage ¶
func (*LoadDevice) ProtoMessage()
func (*LoadDevice) Reset ¶
func (m *LoadDevice) Reset()
func (*LoadDevice) String ¶
func (m *LoadDevice) String() string
type MessageSignature ¶
type MessageSignature struct { Address *string `protobuf:"bytes,1,opt,name=address" json:"address,omitempty"` Signature []byte `protobuf:"bytes,2,opt,name=signature" json:"signature,omitempty"` XXX_unrecognized []byte `json:"-"` }
* 响应:签名消息 @上一条标志消息
func (*MessageSignature) Descriptor ¶
func (*MessageSignature) Descriptor() ([]byte, []int)
func (*MessageSignature) GetAddress ¶
func (m *MessageSignature) GetAddress() string
func (*MessageSignature) GetSignature ¶
func (m *MessageSignature) GetSignature() []byte
func (*MessageSignature) ProtoMessage ¶
func (*MessageSignature) ProtoMessage()
func (*MessageSignature) Reset ¶
func (m *MessageSignature) Reset()
func (*MessageSignature) String ¶
func (m *MessageSignature) String() string
type MessageType ¶
type MessageType int32
* trezor线标识符(uint)和protobuf消息之间的映射
const ( MessageType_MessageType_Initialize MessageType = 0 MessageType_MessageType_Ping MessageType = 1 MessageType_MessageType_Success MessageType = 2 MessageType_MessageType_Failure MessageType = 3 MessageType_MessageType_ChangePin MessageType = 4 MessageType_MessageType_WipeDevice MessageType = 5 MessageType_MessageType_FirmwareErase MessageType = 6 MessageType_MessageType_FirmwareUpload MessageType = 7 MessageType_MessageType_FirmwareRequest MessageType = 8 MessageType_MessageType_GetEntropy MessageType = 9 MessageType_MessageType_Entropy MessageType = 10 MessageType_MessageType_GetPublicKey MessageType = 11 MessageType_MessageType_PublicKey MessageType = 12 MessageType_MessageType_LoadDevice MessageType = 13 MessageType_MessageType_ResetDevice MessageType = 14 MessageType_MessageType_SignTx MessageType = 15 MessageType_MessageType_SimpleSignTx MessageType = 16 MessageType_MessageType_Features MessageType = 17 MessageType_MessageType_PinMatrixRequest MessageType = 18 MessageType_MessageType_PinMatrixAck MessageType = 19 MessageType_MessageType_Cancel MessageType = 20 MessageType_MessageType_TxRequest MessageType = 21 MessageType_MessageType_TxAck MessageType = 22 MessageType_MessageType_CipherKeyValue MessageType = 23 MessageType_MessageType_ClearSession MessageType = 24 MessageType_MessageType_ApplySettings MessageType = 25 MessageType_MessageType_ButtonRequest MessageType = 26 MessageType_MessageType_ButtonAck MessageType = 27 MessageType_MessageType_ApplyFlags MessageType = 28 MessageType_MessageType_GetAddress MessageType = 29 MessageType_MessageType_Address MessageType = 30 MessageType_MessageType_SelfTest MessageType = 32 MessageType_MessageType_BackupDevice MessageType = 34 MessageType_MessageType_EntropyRequest MessageType = 35 MessageType_MessageType_EntropyAck MessageType = 36 MessageType_MessageType_SignMessage MessageType = 38 MessageType_MessageType_VerifyMessage MessageType = 39 MessageType_MessageType_MessageSignature MessageType = 40 MessageType_MessageType_PassphraseRequest MessageType = 41 MessageType_MessageType_PassphraseAck MessageType = 42 MessageType_MessageType_EstimateTxSize MessageType = 43 MessageType_MessageType_TxSize MessageType = 44 MessageType_MessageType_RecoveryDevice MessageType = 45 MessageType_MessageType_WordRequest MessageType = 46 MessageType_MessageType_WordAck MessageType = 47 MessageType_MessageType_CipheredKeyValue MessageType = 48 MessageType_MessageType_EncryptMessage MessageType = 49 MessageType_MessageType_EncryptedMessage MessageType = 50 MessageType_MessageType_DecryptMessage MessageType = 51 MessageType_MessageType_DecryptedMessage MessageType = 52 MessageType_MessageType_SignIdentity MessageType = 53 MessageType_MessageType_SignedIdentity MessageType = 54 MessageType_MessageType_GetFeatures MessageType = 55 MessageType_MessageType_EthereumGetAddress MessageType = 56 MessageType_MessageType_EthereumAddress MessageType = 57 MessageType_MessageType_EthereumSignTx MessageType = 58 MessageType_MessageType_EthereumTxRequest MessageType = 59 MessageType_MessageType_EthereumTxAck MessageType = 60 MessageType_MessageType_GetECDHSessionKey MessageType = 61 MessageType_MessageType_ECDHSessionKey MessageType = 62 MessageType_MessageType_SetU2FCounter MessageType = 63 MessageType_MessageType_EthereumSignMessage MessageType = 64 MessageType_MessageType_EthereumVerifyMessage MessageType = 65 MessageType_MessageType_EthereumMessageSignature MessageType = 66 MessageType_MessageType_DebugLinkDecision MessageType = 100 MessageType_MessageType_DebugLinkGetState MessageType = 101 MessageType_MessageType_DebugLinkState MessageType = 102 MessageType_MessageType_DebugLinkStop MessageType = 103 MessageType_MessageType_DebugLinkLog MessageType = 104 MessageType_MessageType_DebugLinkMemoryRead MessageType = 110 MessageType_MessageType_DebugLinkMemory MessageType = 111 MessageType_MessageType_DebugLinkMemoryWrite MessageType = 112 MessageType_MessageType_DebugLinkFlashErase MessageType = 113 )
func (MessageType) Enum ¶
func (x MessageType) Enum() *MessageType
func (MessageType) EnumDescriptor ¶
func (MessageType) EnumDescriptor() ([]byte, []int)
func (MessageType) String ¶
func (x MessageType) String() string
func (*MessageType) UnmarshalJSON ¶
func (x *MessageType) UnmarshalJSON(data []byte) error
type MultisigRedeemScriptType ¶
type MultisigRedeemScriptType struct { Pubkeys []*HDNodePathType `protobuf:"bytes,1,rep,name=pubkeys" json:"pubkeys,omitempty"` Signatures [][]byte `protobuf:"bytes,2,rep,name=signatures" json:"signatures,omitempty"` M *uint32 `protobuf:"varint,3,opt,name=m" json:"m,omitempty"` XXX_unrecognized []byte `json:"-"` }
* 输入中使用的兑现脚本类型 @已在txinputType中使用
func (*MultisigRedeemScriptType) Descriptor ¶
func (*MultisigRedeemScriptType) Descriptor() ([]byte, []int)
func (*MultisigRedeemScriptType) GetM ¶
func (m *MultisigRedeemScriptType) GetM() uint32
func (*MultisigRedeemScriptType) GetPubkeys ¶
func (m *MultisigRedeemScriptType) GetPubkeys() []*HDNodePathType
func (*MultisigRedeemScriptType) GetSignatures ¶
func (m *MultisigRedeemScriptType) GetSignatures() [][]byte
func (*MultisigRedeemScriptType) ProtoMessage ¶
func (*MultisigRedeemScriptType) ProtoMessage()
func (*MultisigRedeemScriptType) Reset ¶
func (m *MultisigRedeemScriptType) Reset()
func (*MultisigRedeemScriptType) String ¶
func (m *MultisigRedeemScriptType) String() string
type OutputScriptType ¶
type OutputScriptType int32
* 将用于事务输出的脚本类型 @在txoutputtype中使用了_
const ( OutputScriptType_PAYTOADDRESS OutputScriptType = 0 OutputScriptType_PAYTOSCRIPTHASH OutputScriptType = 1 OutputScriptType_PAYTOMULTISIG OutputScriptType = 2 OutputScriptType_PAYTOOPRETURN OutputScriptType = 3 OutputScriptType_PAYTOWITNESS OutputScriptType = 4 OutputScriptType_PAYTOP2SHWITNESS OutputScriptType = 5 )
func (OutputScriptType) Enum ¶
func (x OutputScriptType) Enum() *OutputScriptType
func (OutputScriptType) EnumDescriptor ¶
func (OutputScriptType) EnumDescriptor() ([]byte, []int)
func (OutputScriptType) String ¶
func (x OutputScriptType) String() string
func (*OutputScriptType) UnmarshalJSON ¶
func (x *OutputScriptType) UnmarshalJSON(data []byte) error
type PassphraseAck ¶
type PassphraseAck struct { Passphrase *string `protobuf:"bytes,1,req,name=passphrase" json:"passphrase,omitempty"` XXX_unrecognized []byte `json:"-"` }
* 请求:返回密码短语 @prev密码请求
func (*PassphraseAck) Descriptor ¶
func (*PassphraseAck) Descriptor() ([]byte, []int)
func (*PassphraseAck) GetPassphrase ¶
func (m *PassphraseAck) GetPassphrase() string
func (*PassphraseAck) ProtoMessage ¶
func (*PassphraseAck) ProtoMessage()
func (*PassphraseAck) Reset ¶
func (m *PassphraseAck) Reset()
func (*PassphraseAck) String ¶
func (m *PassphraseAck) String() string
type PassphraseRequest ¶
type PassphraseRequest struct {
XXX_unrecognized []byte `json:"-"`
}
* 响应:设备等待加密密码短语 @下一个密码检查 下次取消
func (*PassphraseRequest) Descriptor ¶
func (*PassphraseRequest) Descriptor() ([]byte, []int)
func (*PassphraseRequest) ProtoMessage ¶
func (*PassphraseRequest) ProtoMessage()
func (*PassphraseRequest) Reset ¶
func (m *PassphraseRequest) Reset()
func (*PassphraseRequest) String ¶
func (m *PassphraseRequest) String() string
type PinMatrixAck ¶
type PinMatrixAck struct { Pin *string `protobuf:"bytes,1,req,name=pin" json:"pin,omitempty"` XXX_unrecognized []byte `json:"-"` }
* 请求:计算机用编码的PIN响应 @上一个PinMatrixRequest
func (*PinMatrixAck) Descriptor ¶
func (*PinMatrixAck) Descriptor() ([]byte, []int)
func (*PinMatrixAck) GetPin ¶
func (m *PinMatrixAck) GetPin() string
func (*PinMatrixAck) ProtoMessage ¶
func (*PinMatrixAck) ProtoMessage()
func (*PinMatrixAck) Reset ¶
func (m *PinMatrixAck) Reset()
func (*PinMatrixAck) String ¶
func (m *PinMatrixAck) String() string
type PinMatrixRequest ¶
type PinMatrixRequest struct { Type *PinMatrixRequestType `protobuf:"varint,1,opt,name=type,enum=PinMatrixRequestType" json:"type,omitempty"` XXX_unrecognized []byte `json:"-"` }
* 回答:设备要求计算机显示管脚矩阵,并等待使用此矩阵方案编码的管脚。 @下一个Pinmatrixack 下次取消
func (*PinMatrixRequest) Descriptor ¶
func (*PinMatrixRequest) Descriptor() ([]byte, []int)
func (*PinMatrixRequest) GetType ¶
func (m *PinMatrixRequest) GetType() PinMatrixRequestType
func (*PinMatrixRequest) ProtoMessage ¶
func (*PinMatrixRequest) ProtoMessage()
func (*PinMatrixRequest) Reset ¶
func (m *PinMatrixRequest) Reset()
func (*PinMatrixRequest) String ¶
func (m *PinMatrixRequest) String() string
type PinMatrixRequestType ¶
type PinMatrixRequestType int32
* PIN请求类型 @在PinMatrixRequest中使用了_
const ( PinMatrixRequestType_PinMatrixRequestType_Current PinMatrixRequestType = 1 PinMatrixRequestType_PinMatrixRequestType_NewFirst PinMatrixRequestType = 2 PinMatrixRequestType_PinMatrixRequestType_NewSecond PinMatrixRequestType = 3 )
func (PinMatrixRequestType) Enum ¶
func (x PinMatrixRequestType) Enum() *PinMatrixRequestType
func (PinMatrixRequestType) EnumDescriptor ¶
func (PinMatrixRequestType) EnumDescriptor() ([]byte, []int)
func (PinMatrixRequestType) String ¶
func (x PinMatrixRequestType) String() string
func (*PinMatrixRequestType) UnmarshalJSON ¶
func (x *PinMatrixRequestType) UnmarshalJSON(data []byte) error
type Ping ¶
type Ping struct { Message *string `protobuf:"bytes,1,opt,name=message" json:"message,omitempty"` ButtonProtection *bool `protobuf:"varint,2,opt,name=button_protection,json=buttonProtection" json:"button_protection,omitempty"` PinProtection *bool `protobuf:"varint,3,opt,name=pin_protection,json=pinProtection" json:"pin_protection,omitempty"` PassphraseProtection *bool `protobuf:"varint,4,opt,name=passphrase_protection,json=passphraseProtection" json:"passphrase_protection,omitempty"` XXX_unrecognized []byte `json:"-"` }
* 请求:测试设备是否处于活动状态,设备发送成功响应的消息。 下一个成功
func (*Ping) Descriptor ¶
func (*Ping) GetButtonProtection ¶
func (*Ping) GetMessage ¶
func (*Ping) GetPassphraseProtection ¶
func (*Ping) GetPinProtection ¶
func (*Ping) ProtoMessage ¶
func (*Ping) ProtoMessage()
type PublicKey ¶
type PublicKey struct { Node *HDNodeType `protobuf:"bytes,1,req,name=node" json:"node,omitempty"` Xpub *string `protobuf:"bytes,2,opt,name=xpub" json:"xpub,omitempty"` XXX_unrecognized []byte `json:"-"` }
* 响应:包含从设备专用种子派生的公钥 @prev获取公共密钥
func (*PublicKey) Descriptor ¶
func (*PublicKey) GetNode ¶
func (m *PublicKey) GetNode() *HDNodeType
func (*PublicKey) ProtoMessage ¶
func (*PublicKey) ProtoMessage()
type RecoveryDevice ¶
type RecoveryDevice struct { WordCount *uint32 `protobuf:"varint,1,opt,name=word_count,json=wordCount" json:"word_count,omitempty"` PassphraseProtection *bool `protobuf:"varint,2,opt,name=passphrase_protection,json=passphraseProtection" json:"passphrase_protection,omitempty"` PinProtection *bool `protobuf:"varint,3,opt,name=pin_protection,json=pinProtection" json:"pin_protection,omitempty"` Language *string `protobuf:"bytes,4,opt,name=language,def=english" json:"language,omitempty"` Label *string `protobuf:"bytes,5,opt,name=label" json:"label,omitempty"` EnforceWordlist *bool `protobuf:"varint,6,opt,name=enforce_wordlist,json=enforceWordlist" json:"enforce_wordlist,omitempty"` //7为未使用的回收方法保留 Type *uint32 `protobuf:"varint,8,opt,name=type" json:"type,omitempty"` U2FCounter *uint32 `protobuf:"varint,9,opt,name=u2f_counter,json=u2fCounter" json:"u2f_counter,omitempty"` DryRun *bool `protobuf:"varint,10,opt,name=dry_run,json=dryRun" json:"dry_run,omitempty"` XXX_unrecognized []byte `json:"-"` }
* 请求:启动恢复工作流,要求用户输入特定的助记词 用于安全恢复设备,即使在不受信任的计算机上。 @下一个字请求
func (*RecoveryDevice) Descriptor ¶
func (*RecoveryDevice) Descriptor() ([]byte, []int)
func (*RecoveryDevice) GetDryRun ¶
func (m *RecoveryDevice) GetDryRun() bool
func (*RecoveryDevice) GetEnforceWordlist ¶
func (m *RecoveryDevice) GetEnforceWordlist() bool
func (*RecoveryDevice) GetLabel ¶
func (m *RecoveryDevice) GetLabel() string
func (*RecoveryDevice) GetLanguage ¶
func (m *RecoveryDevice) GetLanguage() string
func (*RecoveryDevice) GetPassphraseProtection ¶
func (m *RecoveryDevice) GetPassphraseProtection() bool
func (*RecoveryDevice) GetPinProtection ¶
func (m *RecoveryDevice) GetPinProtection() bool
func (*RecoveryDevice) GetType ¶
func (m *RecoveryDevice) GetType() uint32
func (*RecoveryDevice) GetU2FCounter ¶
func (m *RecoveryDevice) GetU2FCounter() uint32
func (*RecoveryDevice) GetWordCount ¶
func (m *RecoveryDevice) GetWordCount() uint32
func (*RecoveryDevice) ProtoMessage ¶
func (*RecoveryDevice) ProtoMessage()
func (*RecoveryDevice) Reset ¶
func (m *RecoveryDevice) Reset()
func (*RecoveryDevice) String ¶
func (m *RecoveryDevice) String() string
type RecoveryDeviceType ¶
type RecoveryDeviceType int32
* 恢复程序的类型。这些应该用作位掩码,例如, `recoverydevicetype _craskdwords recoverydevicetype _matrix` 列出主机支持的每个方法。
注意,每个实现都必须支持加扰的dword 为了向后兼容性,没有办法不支持它。
@在恢复设备中使用了
const ( //扩展此字段时使用2的幂 RecoveryDeviceType_RecoveryDeviceType_ScrambledWords RecoveryDeviceType = 0 RecoveryDeviceType_RecoveryDeviceType_Matrix RecoveryDeviceType = 1 )
func (RecoveryDeviceType) Enum ¶
func (x RecoveryDeviceType) Enum() *RecoveryDeviceType
func (RecoveryDeviceType) EnumDescriptor ¶
func (RecoveryDeviceType) EnumDescriptor() ([]byte, []int)
func (RecoveryDeviceType) String ¶
func (x RecoveryDeviceType) String() string
func (*RecoveryDeviceType) UnmarshalJSON ¶
func (x *RecoveryDeviceType) UnmarshalJSON(data []byte) error
type RequestType ¶
type RequestType int32
* 交易签名流程所需的信息类型 @已在txrequest中使用
const ( RequestType_TXINPUT RequestType = 0 RequestType_TXOUTPUT RequestType = 1 RequestType_TXMETA RequestType = 2 RequestType_TXFINISHED RequestType = 3 RequestType_TXEXTRADATA RequestType = 4 )
func (RequestType) Enum ¶
func (x RequestType) Enum() *RequestType
func (RequestType) EnumDescriptor ¶
func (RequestType) EnumDescriptor() ([]byte, []int)
func (RequestType) String ¶
func (x RequestType) String() string
func (*RequestType) UnmarshalJSON ¶
func (x *RequestType) UnmarshalJSON(data []byte) error
type ResetDevice ¶
type ResetDevice struct { DisplayRandom *bool `protobuf:"varint,1,opt,name=display_random,json=displayRandom" json:"display_random,omitempty"` Strength *uint32 `protobuf:"varint,2,opt,name=strength,def=256" json:"strength,omitempty"` PassphraseProtection *bool `protobuf:"varint,3,opt,name=passphrase_protection,json=passphraseProtection" json:"passphrase_protection,omitempty"` PinProtection *bool `protobuf:"varint,4,opt,name=pin_protection,json=pinProtection" json:"pin_protection,omitempty"` Language *string `protobuf:"bytes,5,opt,name=language,def=english" json:"language,omitempty"` Label *string `protobuf:"bytes,6,opt,name=label" json:"label,omitempty"` U2FCounter *uint32 `protobuf:"varint,7,opt,name=u2f_counter,json=u2fCounter" json:"u2f_counter,omitempty"` SkipBackup *bool `protobuf:"varint,8,opt,name=skip_backup,json=skipBackup" json:"skip_backup,omitempty"` XXX_unrecognized []byte `json:"-"` }
* 请求:要求设备进行涉及用户交互的初始化 @下一项请求 下一次失败
func (*ResetDevice) Descriptor ¶
func (*ResetDevice) Descriptor() ([]byte, []int)
func (*ResetDevice) GetDisplayRandom ¶
func (m *ResetDevice) GetDisplayRandom() bool
func (*ResetDevice) GetLabel ¶
func (m *ResetDevice) GetLabel() string
func (*ResetDevice) GetLanguage ¶
func (m *ResetDevice) GetLanguage() string
func (*ResetDevice) GetPassphraseProtection ¶
func (m *ResetDevice) GetPassphraseProtection() bool
func (*ResetDevice) GetPinProtection ¶
func (m *ResetDevice) GetPinProtection() bool
func (*ResetDevice) GetSkipBackup ¶
func (m *ResetDevice) GetSkipBackup() bool
func (*ResetDevice) GetStrength ¶
func (m *ResetDevice) GetStrength() uint32
func (*ResetDevice) GetU2FCounter ¶
func (m *ResetDevice) GetU2FCounter() uint32
func (*ResetDevice) ProtoMessage ¶
func (*ResetDevice) ProtoMessage()
func (*ResetDevice) Reset ¶
func (m *ResetDevice) Reset()
func (*ResetDevice) String ¶
func (m *ResetDevice) String() string
type SelfTest ¶
type SelfTest struct { Payload []byte `protobuf:"bytes,1,opt,name=payload" json:"payload,omitempty"` XXX_unrecognized []byte `json:"-"` }
* 请求:执行设备自检 下一个成功 下一次失败
func (*SelfTest) Descriptor ¶
func (*SelfTest) GetPayload ¶
func (*SelfTest) ProtoMessage ¶
func (*SelfTest) ProtoMessage()
type SetU2FCounter ¶
type SetU2FCounter struct { U2FCounter *uint32 `protobuf:"varint,1,opt,name=u2f_counter,json=u2fCounter" json:"u2f_counter,omitempty"` XXX_unrecognized []byte `json:"-"` }
* 请求:设置U2F计数器 下一个成功
func (*SetU2FCounter) Descriptor ¶
func (*SetU2FCounter) Descriptor() ([]byte, []int)
func (*SetU2FCounter) GetU2FCounter ¶
func (m *SetU2FCounter) GetU2FCounter() uint32
func (*SetU2FCounter) ProtoMessage ¶
func (*SetU2FCounter) ProtoMessage()
func (*SetU2FCounter) Reset ¶
func (m *SetU2FCounter) Reset()
func (*SetU2FCounter) String ¶
func (m *SetU2FCounter) String() string
type SignIdentity ¶
type SignIdentity struct { Identity *IdentityType `protobuf:"bytes,1,opt,name=identity" json:"identity,omitempty"` ChallengeHidden []byte `protobuf:"bytes,2,opt,name=challenge_hidden,json=challengeHidden" json:"challenge_hidden,omitempty"` ChallengeVisual *string `protobuf:"bytes,3,opt,name=challenge_visual,json=challengeVisual" json:"challenge_visual,omitempty"` EcdsaCurveName *string `protobuf:"bytes,4,opt,name=ecdsa_curve_name,json=ecdsaCurveName" json:"ecdsa_curve_name,omitempty"` XXX_unrecognized []byte `json:"-"` }
* 请求:请求设备签名身份 @下一个签名的实体 下一次失败
func (*SignIdentity) Descriptor ¶
func (*SignIdentity) Descriptor() ([]byte, []int)
func (*SignIdentity) GetChallengeHidden ¶
func (m *SignIdentity) GetChallengeHidden() []byte
func (*SignIdentity) GetChallengeVisual ¶
func (m *SignIdentity) GetChallengeVisual() string
func (*SignIdentity) GetEcdsaCurveName ¶
func (m *SignIdentity) GetEcdsaCurveName() string
func (*SignIdentity) GetIdentity ¶
func (m *SignIdentity) GetIdentity() *IdentityType
func (*SignIdentity) ProtoMessage ¶
func (*SignIdentity) ProtoMessage()
func (*SignIdentity) Reset ¶
func (m *SignIdentity) Reset()
func (*SignIdentity) String ¶
func (m *SignIdentity) String() string
type SignMessage ¶
type SignMessage struct { AddressN []uint32 `protobuf:"varint,1,rep,name=address_n,json=addressN" json:"address_n,omitempty"` Message []byte `protobuf:"bytes,2,req,name=message" json:"message,omitempty"` CoinName *string `protobuf:"bytes,3,opt,name=coin_name,json=coinName,def=Bitcoin" json:"coin_name,omitempty"` ScriptType *InputScriptType `protobuf:"varint,4,opt,name=script_type,json=scriptType,enum=InputScriptType,def=0" json:"script_type,omitempty"` XXX_unrecognized []byte `json:"-"` }
* 请求:要求设备签署消息 @下一个消息签名 下一次失败
func (*SignMessage) Descriptor ¶
func (*SignMessage) Descriptor() ([]byte, []int)
func (*SignMessage) GetAddressN ¶
func (m *SignMessage) GetAddressN() []uint32
func (*SignMessage) GetCoinName ¶
func (m *SignMessage) GetCoinName() string
func (*SignMessage) GetMessage ¶
func (m *SignMessage) GetMessage() []byte
func (*SignMessage) GetScriptType ¶
func (m *SignMessage) GetScriptType() InputScriptType
func (*SignMessage) ProtoMessage ¶
func (*SignMessage) ProtoMessage()
func (*SignMessage) Reset ¶
func (m *SignMessage) Reset()
func (*SignMessage) String ¶
func (m *SignMessage) String() string
type SignTx ¶
type SignTx struct { OutputsCount *uint32 `protobuf:"varint,1,req,name=outputs_count,json=outputsCount" json:"outputs_count,omitempty"` InputsCount *uint32 `protobuf:"varint,2,req,name=inputs_count,json=inputsCount" json:"inputs_count,omitempty"` CoinName *string `protobuf:"bytes,3,opt,name=coin_name,json=coinName,def=Bitcoin" json:"coin_name,omitempty"` Version *uint32 `protobuf:"varint,4,opt,name=version,def=1" json:"version,omitempty"` LockTime *uint32 `protobuf:"varint,5,opt,name=lock_time,json=lockTime,def=0" json:"lock_time,omitempty"` XXX_unrecognized []byte `json:"-"` }
* 请求:请求设备签署事务 @下一个密码请求 @下一个PinMatrixRequest 下一个TXT请求 下一次失败
func (*SignTx) Descriptor ¶
func (*SignTx) GetCoinName ¶
func (*SignTx) GetInputsCount ¶
func (*SignTx) GetLockTime ¶
func (*SignTx) GetOutputsCount ¶
func (*SignTx) GetVersion ¶
func (*SignTx) ProtoMessage ¶
func (*SignTx) ProtoMessage()
type SignedIdentity ¶
type SignedIdentity struct { Address *string `protobuf:"bytes,1,opt,name=address" json:"address,omitempty"` PublicKey []byte `protobuf:"bytes,2,opt,name=public_key,json=publicKey" json:"public_key,omitempty"` Signature []byte `protobuf:"bytes,3,opt,name=signature" json:"signature,omitempty"` XXX_unrecognized []byte `json:"-"` }
* 响应:设备提供签名标识 @上一个签名标识
func (*SignedIdentity) Descriptor ¶
func (*SignedIdentity) Descriptor() ([]byte, []int)
func (*SignedIdentity) GetAddress ¶
func (m *SignedIdentity) GetAddress() string
func (*SignedIdentity) GetPublicKey ¶
func (m *SignedIdentity) GetPublicKey() []byte
func (*SignedIdentity) GetSignature ¶
func (m *SignedIdentity) GetSignature() []byte
func (*SignedIdentity) ProtoMessage ¶
func (*SignedIdentity) ProtoMessage()
func (*SignedIdentity) Reset ¶
func (m *SignedIdentity) Reset()
func (*SignedIdentity) String ¶
func (m *SignedIdentity) String() string
type SimpleSignTx ¶
type SimpleSignTx struct { Inputs []*TxInputType `protobuf:"bytes,1,rep,name=inputs" json:"inputs,omitempty"` Outputs []*TxOutputType `protobuf:"bytes,2,rep,name=outputs" json:"outputs,omitempty"` Transactions []*TransactionType `protobuf:"bytes,3,rep,name=transactions" json:"transactions,omitempty"` CoinName *string `protobuf:"bytes,4,opt,name=coin_name,json=coinName,def=Bitcoin" json:"coin_name,omitempty"` Version *uint32 `protobuf:"varint,5,opt,name=version,def=1" json:"version,omitempty"` LockTime *uint32 `protobuf:"varint,6,opt,name=lock_time,json=lockTime,def=0" json:"lock_time,omitempty"` XXX_unrecognized []byte `json:"-"` }
* 请求:简化事务签名 此方法不支持流式处理,因此在输入和输出数量上存在硬件限制。 如果成功,将使用txrequest消息返回结果。 @下一个密码请求 @下一个PinMatrixRequest 下一个TXT请求 下一次失败
func (*SimpleSignTx) Descriptor ¶
func (*SimpleSignTx) Descriptor() ([]byte, []int)
func (*SimpleSignTx) GetCoinName ¶
func (m *SimpleSignTx) GetCoinName() string
func (*SimpleSignTx) GetInputs ¶
func (m *SimpleSignTx) GetInputs() []*TxInputType
func (*SimpleSignTx) GetLockTime ¶
func (m *SimpleSignTx) GetLockTime() uint32
func (*SimpleSignTx) GetOutputs ¶
func (m *SimpleSignTx) GetOutputs() []*TxOutputType
func (*SimpleSignTx) GetTransactions ¶
func (m *SimpleSignTx) GetTransactions() []*TransactionType
func (*SimpleSignTx) GetVersion ¶
func (m *SimpleSignTx) GetVersion() uint32
func (*SimpleSignTx) ProtoMessage ¶
func (*SimpleSignTx) ProtoMessage()
func (*SimpleSignTx) Reset ¶
func (m *SimpleSignTx) Reset()
func (*SimpleSignTx) String ¶
func (m *SimpleSignTx) String() string
type Success ¶
type Success struct { Message *string `protobuf:"bytes,1,opt,name=message" json:"message,omitempty"` XXX_unrecognized []byte `json:"-"` }
* 响应:上一个请求成功
func (*Success) Descriptor ¶
func (*Success) GetMessage ¶
func (*Success) ProtoMessage ¶
func (*Success) ProtoMessage()
type TransactionType ¶
type TransactionType struct { Version *uint32 `protobuf:"varint,1,opt,name=version" json:"version,omitempty"` Inputs []*TxInputType `protobuf:"bytes,2,rep,name=inputs" json:"inputs,omitempty"` BinOutputs []*TxOutputBinType `protobuf:"bytes,3,rep,name=bin_outputs,json=binOutputs" json:"bin_outputs,omitempty"` Outputs []*TxOutputType `protobuf:"bytes,5,rep,name=outputs" json:"outputs,omitempty"` LockTime *uint32 `protobuf:"varint,4,opt,name=lock_time,json=lockTime" json:"lock_time,omitempty"` InputsCnt *uint32 `protobuf:"varint,6,opt,name=inputs_cnt,json=inputsCnt" json:"inputs_cnt,omitempty"` OutputsCnt *uint32 `protobuf:"varint,7,opt,name=outputs_cnt,json=outputsCnt" json:"outputs_cnt,omitempty"` ExtraData []byte `protobuf:"bytes,8,opt,name=extra_data,json=extraData" json:"extra_data,omitempty"` ExtraDataLen *uint32 `protobuf:"varint,9,opt,name=extra_data_len,json=extraDataLen" json:"extra_data_len,omitempty"` XXX_unrecognized []byte `json:"-"` }
* 表示事务的结构 @在simplesigntx中使用了
func (*TransactionType) Descriptor ¶
func (*TransactionType) Descriptor() ([]byte, []int)
func (*TransactionType) GetBinOutputs ¶
func (m *TransactionType) GetBinOutputs() []*TxOutputBinType
func (*TransactionType) GetExtraData ¶
func (m *TransactionType) GetExtraData() []byte
func (*TransactionType) GetExtraDataLen ¶
func (m *TransactionType) GetExtraDataLen() uint32
func (*TransactionType) GetInputs ¶
func (m *TransactionType) GetInputs() []*TxInputType
func (*TransactionType) GetInputsCnt ¶
func (m *TransactionType) GetInputsCnt() uint32
func (*TransactionType) GetLockTime ¶
func (m *TransactionType) GetLockTime() uint32
func (*TransactionType) GetOutputs ¶
func (m *TransactionType) GetOutputs() []*TxOutputType
func (*TransactionType) GetOutputsCnt ¶
func (m *TransactionType) GetOutputsCnt() uint32
func (*TransactionType) GetVersion ¶
func (m *TransactionType) GetVersion() uint32
func (*TransactionType) ProtoMessage ¶
func (*TransactionType) ProtoMessage()
func (*TransactionType) Reset ¶
func (m *TransactionType) Reset()
func (*TransactionType) String ¶
func (m *TransactionType) String() string
type TxAck ¶
type TxAck struct { Tx *TransactionType `protobuf:"bytes,1,opt,name=tx" json:"tx,omitempty"` XXX_unrecognized []byte `json:"-"` }
* 请求:报告的事务数据 @前置请求 下一个TXT请求
func (*TxAck) Descriptor ¶
func (*TxAck) GetTx ¶
func (m *TxAck) GetTx() *TransactionType
func (*TxAck) ProtoMessage ¶
func (*TxAck) ProtoMessage()
type TxInputType ¶
type TxInputType struct { AddressN []uint32 `protobuf:"varint,1,rep,name=address_n,json=addressN" json:"address_n,omitempty"` PrevHash []byte `protobuf:"bytes,2,req,name=prev_hash,json=prevHash" json:"prev_hash,omitempty"` PrevIndex *uint32 `protobuf:"varint,3,req,name=prev_index,json=prevIndex" json:"prev_index,omitempty"` ScriptSig []byte `protobuf:"bytes,4,opt,name=script_sig,json=scriptSig" json:"script_sig,omitempty"` Sequence *uint32 `protobuf:"varint,5,opt,name=sequence,def=4294967295" json:"sequence,omitempty"` ScriptType *InputScriptType `protobuf:"varint,6,opt,name=script_type,json=scriptType,enum=InputScriptType,def=0" json:"script_type,omitempty"` Multisig *MultisigRedeemScriptType `protobuf:"bytes,7,opt,name=multisig" json:"multisig,omitempty"` Amount *uint64 `protobuf:"varint,8,opt,name=amount" json:"amount,omitempty"` XXX_unrecognized []byte `json:"-"` }
* 表示事务输入的结构 @在simplesigntx中使用了 @已在TransactionType中使用
func (*TxInputType) Descriptor ¶
func (*TxInputType) Descriptor() ([]byte, []int)
func (*TxInputType) GetAddressN ¶
func (m *TxInputType) GetAddressN() []uint32
func (*TxInputType) GetAmount ¶
func (m *TxInputType) GetAmount() uint64
func (*TxInputType) GetMultisig ¶
func (m *TxInputType) GetMultisig() *MultisigRedeemScriptType
func (*TxInputType) GetPrevHash ¶
func (m *TxInputType) GetPrevHash() []byte
func (*TxInputType) GetPrevIndex ¶
func (m *TxInputType) GetPrevIndex() uint32
func (*TxInputType) GetScriptSig ¶
func (m *TxInputType) GetScriptSig() []byte
func (*TxInputType) GetScriptType ¶
func (m *TxInputType) GetScriptType() InputScriptType
func (*TxInputType) GetSequence ¶
func (m *TxInputType) GetSequence() uint32
func (*TxInputType) ProtoMessage ¶
func (*TxInputType) ProtoMessage()
func (*TxInputType) Reset ¶
func (m *TxInputType) Reset()
func (*TxInputType) String ¶
func (m *TxInputType) String() string
type TxOutputBinType ¶
type TxOutputBinType struct { Amount *uint64 `protobuf:"varint,1,req,name=amount" json:"amount,omitempty"` ScriptPubkey []byte `protobuf:"bytes,2,req,name=script_pubkey,json=scriptPubkey" json:"script_pubkey,omitempty"` XXX_unrecognized []byte `json:"-"` }
* 表示已编译事务输出的结构 @已在TransactionType中使用
func (*TxOutputBinType) Descriptor ¶
func (*TxOutputBinType) Descriptor() ([]byte, []int)
func (*TxOutputBinType) GetAmount ¶
func (m *TxOutputBinType) GetAmount() uint64
func (*TxOutputBinType) GetScriptPubkey ¶
func (m *TxOutputBinType) GetScriptPubkey() []byte
func (*TxOutputBinType) ProtoMessage ¶
func (*TxOutputBinType) ProtoMessage()
func (*TxOutputBinType) Reset ¶
func (m *TxOutputBinType) Reset()
func (*TxOutputBinType) String ¶
func (m *TxOutputBinType) String() string
type TxOutputType ¶
type TxOutputType struct { Address *string `protobuf:"bytes,1,opt,name=address" json:"address,omitempty"` AddressN []uint32 `protobuf:"varint,2,rep,name=address_n,json=addressN" json:"address_n,omitempty"` Amount *uint64 `protobuf:"varint,3,req,name=amount" json:"amount,omitempty"` ScriptType *OutputScriptType `protobuf:"varint,4,req,name=script_type,json=scriptType,enum=OutputScriptType" json:"script_type,omitempty"` Multisig *MultisigRedeemScriptType `protobuf:"bytes,5,opt,name=multisig" json:"multisig,omitempty"` OpReturnData []byte `protobuf:"bytes,6,opt,name=op_return_data,json=opReturnData" json:"op_return_data,omitempty"` XXX_unrecognized []byte `json:"-"` }
* 表示事务输出的结构 @在simplesigntx中使用了 @已在TransactionType中使用
func (*TxOutputType) Descriptor ¶
func (*TxOutputType) Descriptor() ([]byte, []int)
func (*TxOutputType) GetAddress ¶
func (m *TxOutputType) GetAddress() string
func (*TxOutputType) GetAddressN ¶
func (m *TxOutputType) GetAddressN() []uint32
func (*TxOutputType) GetAmount ¶
func (m *TxOutputType) GetAmount() uint64
func (*TxOutputType) GetMultisig ¶
func (m *TxOutputType) GetMultisig() *MultisigRedeemScriptType
func (*TxOutputType) GetOpReturnData ¶
func (m *TxOutputType) GetOpReturnData() []byte
func (*TxOutputType) GetScriptType ¶
func (m *TxOutputType) GetScriptType() OutputScriptType
func (*TxOutputType) ProtoMessage ¶
func (*TxOutputType) ProtoMessage()
func (*TxOutputType) Reset ¶
func (m *TxOutputType) Reset()
func (*TxOutputType) String ¶
func (m *TxOutputType) String() string
type TxRequest ¶
type TxRequest struct { RequestType *RequestType `protobuf:"varint,1,opt,name=request_type,json=requestType,enum=RequestType" json:"request_type,omitempty"` Details *TxRequestDetailsType `protobuf:"bytes,2,opt,name=details" json:"details,omitempty"` Serialized *TxRequestSerializedType `protobuf:"bytes,3,opt,name=serialized" json:"serialized,omitempty"` XXX_unrecognized []byte `json:"-"` }
* 响应:设备请求签署事务的信息或返回最后一个结果 如果设置了请求_索引,则设备等待txack消息(根据请求_类型填写字段) 如果设置了签名索引,“签名”包含签名索引输入的签名输入 预兆信号 @上一个simplesigntx 普雷克
func (*TxRequest) Descriptor ¶
func (*TxRequest) GetDetails ¶
func (m *TxRequest) GetDetails() *TxRequestDetailsType
func (*TxRequest) GetRequestType ¶
func (m *TxRequest) GetRequestType() RequestType
func (*TxRequest) GetSerialized ¶
func (m *TxRequest) GetSerialized() *TxRequestSerializedType
func (*TxRequest) ProtoMessage ¶
func (*TxRequest) ProtoMessage()
type TxRequestDetailsType ¶
type TxRequestDetailsType struct { RequestIndex *uint32 `protobuf:"varint,1,opt,name=request_index,json=requestIndex" json:"request_index,omitempty"` TxHash []byte `protobuf:"bytes,2,opt,name=tx_hash,json=txHash" json:"tx_hash,omitempty"` ExtraDataLen *uint32 `protobuf:"varint,3,opt,name=extra_data_len,json=extraDataLen" json:"extra_data_len,omitempty"` ExtraDataOffset *uint32 `protobuf:"varint,4,opt,name=extra_data_offset,json=extraDataOffset" json:"extra_data_offset,omitempty"` XXX_unrecognized []byte `json:"-"` }
* 表示请求详细信息的结构 @已在txrequest中使用
func (*TxRequestDetailsType) Descriptor ¶
func (*TxRequestDetailsType) Descriptor() ([]byte, []int)
func (*TxRequestDetailsType) GetExtraDataLen ¶
func (m *TxRequestDetailsType) GetExtraDataLen() uint32
func (*TxRequestDetailsType) GetExtraDataOffset ¶
func (m *TxRequestDetailsType) GetExtraDataOffset() uint32
func (*TxRequestDetailsType) GetRequestIndex ¶
func (m *TxRequestDetailsType) GetRequestIndex() uint32
func (*TxRequestDetailsType) GetTxHash ¶
func (m *TxRequestDetailsType) GetTxHash() []byte
func (*TxRequestDetailsType) ProtoMessage ¶
func (*TxRequestDetailsType) ProtoMessage()
func (*TxRequestDetailsType) Reset ¶
func (m *TxRequestDetailsType) Reset()
func (*TxRequestDetailsType) String ¶
func (m *TxRequestDetailsType) String() string
type TxRequestSerializedType ¶
type TxRequestSerializedType struct { SignatureIndex *uint32 `protobuf:"varint,1,opt,name=signature_index,json=signatureIndex" json:"signature_index,omitempty"` Signature []byte `protobuf:"bytes,2,opt,name=signature" json:"signature,omitempty"` SerializedTx []byte `protobuf:"bytes,3,opt,name=serialized_tx,json=serializedTx" json:"serialized_tx,omitempty"` XXX_unrecognized []byte `json:"-"` }
*
@已在txrequest中使用
func (*TxRequestSerializedType) Descriptor ¶
func (*TxRequestSerializedType) Descriptor() ([]byte, []int)
func (*TxRequestSerializedType) GetSerializedTx ¶
func (m *TxRequestSerializedType) GetSerializedTx() []byte
func (*TxRequestSerializedType) GetSignature ¶
func (m *TxRequestSerializedType) GetSignature() []byte
func (*TxRequestSerializedType) GetSignatureIndex ¶
func (m *TxRequestSerializedType) GetSignatureIndex() uint32
func (*TxRequestSerializedType) ProtoMessage ¶
func (*TxRequestSerializedType) ProtoMessage()
func (*TxRequestSerializedType) Reset ¶
func (m *TxRequestSerializedType) Reset()
func (*TxRequestSerializedType) String ¶
func (m *TxRequestSerializedType) String() string
type TxSize ¶
type TxSize struct { TxSize *uint32 `protobuf:"varint,1,opt,name=tx_size,json=txSize" json:"tx_size,omitempty"` XXX_unrecognized []byte `json:"-"` }
* 响应:事务的估计大小 @上一个估计X大小
func (*TxSize) Descriptor ¶
func (*TxSize) ProtoMessage ¶
func (*TxSize) ProtoMessage()
type VerifyMessage ¶
type VerifyMessage struct { Address *string `protobuf:"bytes,1,opt,name=address" json:"address,omitempty"` Signature []byte `protobuf:"bytes,2,opt,name=signature" json:"signature,omitempty"` Message []byte `protobuf:"bytes,3,opt,name=message" json:"message,omitempty"` CoinName *string `protobuf:"bytes,4,opt,name=coin_name,json=coinName,def=Bitcoin" json:"coin_name,omitempty"` XXX_unrecognized []byte `json:"-"` }
* 请求:请求设备验证消息 下一个成功 下一次失败
func (*VerifyMessage) Descriptor ¶
func (*VerifyMessage) Descriptor() ([]byte, []int)
func (*VerifyMessage) GetAddress ¶
func (m *VerifyMessage) GetAddress() string
func (*VerifyMessage) GetCoinName ¶
func (m *VerifyMessage) GetCoinName() string
func (*VerifyMessage) GetMessage ¶
func (m *VerifyMessage) GetMessage() []byte
func (*VerifyMessage) GetSignature ¶
func (m *VerifyMessage) GetSignature() []byte
func (*VerifyMessage) ProtoMessage ¶
func (*VerifyMessage) ProtoMessage()
func (*VerifyMessage) Reset ¶
func (m *VerifyMessage) Reset()
func (*VerifyMessage) String ¶
func (m *VerifyMessage) String() string
type WipeDevice ¶
type WipeDevice struct {
XXX_unrecognized []byte `json:"-"`
}
* 请求:请求设备擦除所有敏感数据和设置 @下一步按钮请求
func (*WipeDevice) Descriptor ¶
func (*WipeDevice) Descriptor() ([]byte, []int)
func (*WipeDevice) ProtoMessage ¶
func (*WipeDevice) ProtoMessage()
func (*WipeDevice) Reset ¶
func (m *WipeDevice) Reset()
func (*WipeDevice) String ¶
func (m *WipeDevice) String() string
type WordAck ¶
type WordAck struct { Word *string `protobuf:"bytes,1,req,name=word" json:"word,omitempty"` XXX_unrecognized []byte `json:"-"` }
* 请求:计算机用助记符中的单词答复 @上一个字请求 @下一个字请求 下一个成功 下一次失败
func (*WordAck) Descriptor ¶
func (*WordAck) ProtoMessage ¶
func (*WordAck) ProtoMessage()
type WordRequest ¶
type WordRequest struct { Type *WordRequestType `protobuf:"varint,1,opt,name=type,enum=WordRequestType" json:"type,omitempty"` XXX_unrecognized []byte `json:"-"` }
* 响应:设备正在等待用户输入助记符的单词 它的位置只显示在设备的内部显示器上。 @预防恢复设备
func (*WordRequest) Descriptor ¶
func (*WordRequest) Descriptor() ([]byte, []int)
func (*WordRequest) GetType ¶
func (m *WordRequest) GetType() WordRequestType
func (*WordRequest) ProtoMessage ¶
func (*WordRequest) ProtoMessage()
func (*WordRequest) Reset ¶
func (m *WordRequest) Reset()
func (*WordRequest) String ¶
func (m *WordRequest) String() string
type WordRequestType ¶
type WordRequestType int32
* 恢复字请求类型 @在WordRequest中使用了
const ( WordRequestType_WordRequestType_Plain WordRequestType = 0 WordRequestType_WordRequestType_Matrix9 WordRequestType = 1 WordRequestType_WordRequestType_Matrix6 WordRequestType = 2 )
func (WordRequestType) Enum ¶
func (x WordRequestType) Enum() *WordRequestType
func (WordRequestType) EnumDescriptor ¶
func (WordRequestType) EnumDescriptor() ([]byte, []int)
func (WordRequestType) String ¶
func (x WordRequestType) String() string
func (*WordRequestType) UnmarshalJSON ¶
func (x *WordRequestType) UnmarshalJSON(data []byte) error