BleAction

Data object representing a BLE action to build payload structure for BLE protocol operations.

Unlike WebSocket which builds URLs, BLE operations work over an already established connection and simply need to construct a ByteArray payload with an opcode and data sequence.

The typical BLE payload structure: Length (2 bytes) Action (1 byte) Data (N bytes)

Properties

Link copied to clipboard
abstract val actionCode: Byte

Action type identifier e.g., 0x01 = keygen, 0x02 = sign, 0x03 = refresh, etc.

Link copied to clipboard
abstract val algorithmCode: Byte

Algorithm identifier 0x01 = ECDSA, 0x02 = EdDSA

Link copied to clipboard
abstract val opCode: Byte

Operation code that identifies the action type

Link copied to clipboard
abstract val protocolCode: Byte

Protocol variant identifier 0x01 = Duo, 0x02 = Trio

Functions

Link copied to clipboard

Builds just the header portion of the BLE payload

Link copied to clipboard

Builds the complete BLE payload with opcode and data