Versions in this module Expand all Collapse all v1 v1.0.3 Aug 26, 2026 Changes in this version + const Channel + const ChunkAdd + const ChunkInit + const ChunkLast + const DefaultChunkSize + const ErrMsgInvalidChannel + const ErrMsgInvalidTag + const ErrMsgPacketSize + const ErrMsgWrongSequenceIdx + const MinPacketSize + const PacketSize + const TagValue + const UsagePageLedgerNanoS + const VendorLedger + var ErrInvalidChannel = errors.New(ErrMsgInvalidChannel) + var ErrInvalidTag = errors.New(ErrMsgInvalidTag) + var ErrPacketSize = errors.New(ErrMsgPacketSize) + var ErrWrongSequenceIdx = errors.New(ErrMsgWrongSequenceIdx) + var File_zemu_proto protoreflect.FileDescriptor + func BuildChunkedAPDU(cla, ins, p1, p2 byte, data []byte) []byte + func DeserializePacket(channel uint16, packet []byte, sequenceIdx uint16) ([]byte, uint16, bool, error) + func ErrorMessage(errorCode uint16) string + func PrepareChunks(bip44PathBytes []byte, transaction []byte) [][]byte + func ProcessChunks(device LedgerDevice, chunks [][]byte, cla, instruction, p2 byte, ...) ([]byte, error) + func ProcessChunksSimple(device LedgerDevice, chunks [][]byte, cla, instruction, p2 byte) ([]byte, error) + func RegisterZemuCommandServer(s *grpc.Server, srv ZemuCommandServer) + func SerializePacket(channel uint16, command []byte, packetSize int, sequenceIdx uint16) ([]byte, int, error) + func UnwrapResponseAPDU(channel uint16, pipe <-chan []byte, packetSize int) ([]byte, error) + func WrapCommandAPDU(channel uint16, command []byte, packetSize int) ([]byte, error) + type ErrorHandler func(error, []byte, byte) error + type ExchangeReply struct + Reply []byte + func (*ExchangeReply) Descriptor() ([]byte, []int) + func (*ExchangeReply) ProtoMessage() + func (x *ExchangeReply) GetReply() []byte + func (x *ExchangeReply) ProtoReflect() protoreflect.Message + func (x *ExchangeReply) Reset() + func (x *ExchangeReply) String() string + type ExchangeRequest struct + Command []byte + func (*ExchangeRequest) Descriptor() ([]byte, []int) + func (*ExchangeRequest) ProtoMessage() + func (x *ExchangeRequest) GetCommand() []byte + func (x *ExchangeRequest) ProtoReflect() protoreflect.Message + func (x *ExchangeRequest) Reset() + func (x *ExchangeRequest) String() string + type LedgerAdmin interface + Connect func(deviceIndex int) (LedgerDevice, error) + CountDevices func() int + ListDevices func() ([]string, error) + func NewLedgerAdmin() LedgerAdmin + type LedgerAdminHID struct + func (admin *LedgerAdminHID) Connect(requiredIndex int) (LedgerDevice, error) + func (admin *LedgerAdminHID) CountDevices() int + func (admin *LedgerAdminHID) ListDevices() ([]string, error) + type LedgerDevice interface + Close func() error + Exchange func(command []byte) ([]byte, error) + ExchangeNoCheck func(command []byte) ([]byte, uint16, error) + type LedgerDeviceHID struct + func (ledger *LedgerDeviceHID) Close() error + func (ledger *LedgerDeviceHID) Exchange(command []byte) ([]byte, error) + func (ledger *LedgerDeviceHID) ExchangeNoCheck(command []byte) ([]byte, uint16, error) + func (ledger *LedgerDeviceHID) Read() <-chan []byte + type UnimplementedZemuCommandServer struct + func (*UnimplementedZemuCommandServer) Exchange(context.Context, *ExchangeRequest) (*ExchangeReply, error) + type ZemuCommandClient interface + Exchange func(ctx context.Context, in *ExchangeRequest, opts ...grpc.CallOption) (*ExchangeReply, error) + func NewZemuCommandClient(cc grpc.ClientConnInterface) ZemuCommandClient + type ZemuCommandServer interface + Exchange func(context.Context, *ExchangeRequest) (*ExchangeReply, error)