mtrust_urp_types 6.3.0 copy "mtrust_urp_types: ^6.3.0" to clipboard
mtrust_urp_types: ^6.3.0 copied to clipboard

Protobuf type definitions for the M-Trust URP protocol, shared by the M-Trust reader SDKs, device firmware and backend services.

example/README.md

mtrust_urp_types example #

Generated protobuf types for the M-Trust URP protocol. They are normally used through a reader SDK such as mtrust_urp_core rather than directly.

import 'package:mtrust_urp_types/wrapper.pb.dart';
import 'package:mtrust_urp_types/sec.pb.dart';

void main() {
  // Address a command at an IMZ reader from a mobile host.
  final target = UrpDeviceIdentifier(
    deviceClass: UrpDeviceClass.urpReader,
    deviceType: UrpDeviceType.urpImz,
  );

  // Build a device command and serialise it for the wire.
  final command = UrpSecCommandWrapper(
    deviceCommand: UrpSecDeviceCommand(command: UrpSecCommand.urpSecPrime),
  );
  final bytes = command.writeToBuffer();

  // Parse a response coming back from the device.
  final measurement = UrpSecSecureMeasurement.fromBuffer(bytes);
  print(measurement.measurement.readerSn);
  print(target.deviceType);
}
1
likes
140
points
460
downloads

Documentation

API reference

Publisher

verified publishermtrust.io

Weekly Downloads

Protobuf type definitions for the M-Trust URP protocol, shared by the M-Trust reader SDKs, device firmware and backend services.

Homepage

License

Apache-2.0 (license)

Dependencies

fixnum, protobuf

More

Packages that depend on mtrust_urp_types