tron library
Subpath library: package:era_connect/tron.dart — the tron chain module
plus the shared request/scan plumbing, without the rest of the SDK.
Classes
- AnimatedUr
- Frame source for rendering a UR as an animated QR.
- AnimatedUrOptions
- Options for AnimatedUr.
- ChainContext
- Resolved SDK configuration handed to every chain module.
- EraConnectConfig
- SDK configuration. Everything is optional; the SDK performs NO network I/O ever.
- ExpectedReply
- Optional expectations when parsing a reply standalone (outside SignRequest.scanner).
- ScanComplete
- The scan is complete; ur is the assembled UR.
- ScanDuplicate
- A frame already seen this session (camera framerate re-reads).
- ScanFeedResult
- One outcome of feeding a frame to UrScanner.receivePart.
- ScanProgress
- The frame was consumed; the scan is not complete yet.
- ScanRejected
- The frame was turned away; see rejection.
- ScanRejection
- Why a scanned frame was turned away.
- SignedTronTx
-
The two halves of a signed Tron network
Transactionframe. -
SignRequest<
TResult> - A built sign request: the UR to display plus everything needed to consume the reply. The request id is minted at CONSTRUCTION so the same object that renders the QR also validates the echo — a reply carrying a different id (from an earlier, cancelled flow re-presented to the camera) is refused instead of accepted.
- TronChain
-
Tron signing rides the structured
keystone-sign-request(6101) envelope — a gzip-compressed protobuf inside CBOR{1: gzip(protobuf), 2: origin}. The registry's generictron-sign-request(5101) is NOT accepted by the device and gets no response; do not emit it. - TronLatestBlock
- A live now-block anchor for a Tron transaction.
- TronSignatureResult
-
A parsed
keystone-sign-resultreply. - TronSignDisplay
- On-device display metadata for a Tron sign request.
- TronSignRequestProps
- Inputs for TronChain.generateSignRequest.
-
TypedUrScanner<
TResult> - A scanner whose completed UR parses into a typed result (a chain signature).
- Ur
- An immutable Uniform Resource: a registry type string plus its CBOR payload.
- UrScanner
- Accumulates camera frames into a UR. Synchronous and non-throwing on the feed path (safe to call from camera callbacks); malformed frames come back as typed rejections, never exceptions.
- UrScannerOptions
- Options for UrScanner.
Constants
- defaultFragmentLength → const int
- Default payload bytes per animated-QR fragment.
- defaultOrigin → const String
- The origin shown on the device when the config does not name one.
Functions
-
resolveContext(
[EraConnectConfig? config]) → ChainContext - Resolve a (possibly absent) config into the context chain modules consume.
-
splitSignedTronTx(
String rawTxHex) → SignedTronTx -
Split a signed Tron network
Transactionframe ({1: raw_data, 2: signature*}) from the reply'srawTxhex. Top-level fields must be length-delimited — anything else is not a transaction frame.
Exceptions / Errors
- EraSdkError
- Every error thrown by this SDK.