CallBinding class final
The inputs a call's signature is bound to (ADR 0006 §4). The audience is the envelope's, not the call's.
Dart-side argument errors (ArgumentError: a digest that is not 32 bytes, an HMAC type given a non-HMAC algorithm) are thrown by the constructors, before any bridge call. Everything the Rust side refuses is a CoseException.
Constructors
-
CallBinding({required String method, required String route, List<
String> pathParams = const [], String? query, required Uint8List contractSha, String? idempotencyKey, String? ifMatch, String? payloadType, List<String> ? payloadAccept}) -
contractShais the op's contract digest, 32 bytes; throws ArgumentError otherwise.pathParamsis copied.
Properties
- contractSha → Uint8List
-
The op contract digest (32 bytes).
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- idempotencyKey → String?
-
The
Idempotency-Keythe request will carry, bound exactly as sent.final - ifMatch → String?
-
The
If-Matchthe request will carry, bound exactly as sent.final - method → String
-
HTTP method, e.g.
POST.final -
pathParams
→ List<
String> -
REST path parameter values in template order; empty for RPC.
final
-
payloadAccept
→ List<
String> ? -
The media types the call reads its answer in, in order of preference.
nullis justapplication/cbor. An answer sealed under any other type is CoseRejected. When it is not just CBOR the request must also carryCratestack-Payload-Accept(ClientEnvelope.selectorHeaders).final - payloadType → String?
-
The media type the request payload is encoded as, and sealed under
(bound in the AAD).
nullisapplication/cbor. For compact wire keys (docs/design/compact-wire-keys.md§5.1) it isapplication/vnd.cratestack.compact+cbor.final - query → String?
-
The query string in any spelling; it is canonicalised before it binds.
final
- route → String
-
The RPC
op_id, or the REST route template.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited