Payload class

Keys Create — payload

Constructors

Payload({required KeyType keyType, String? derivationPath, String? keyId, bool? internal, String? mnemonic, String? label, String? contextId, Ext? ext})
const
Payload.fromJson(Map<String, dynamic> json)
Read this payload from a decoded JSON object.
factory

Properties

contextId → String?
Scope to file the key under. Absence is the most restrictive reading, not a wildcard — see KeyRecord.contextId.
final
derivationPath → String?
Hierarchical-deterministic path to derive at. Where the custodian derives from a seed, supplying the path makes the key reproducible from that seed; omitting it leaves the choice to the custodian. MUST NOT be combined with internal: true, which derives from no seed and records no path — a request carrying both is contradictory and the maintainer SHOULD reject it.
final
ext → Ext?
Ecosystem-defined extension members per SPEC.md §4.5.1.
final
hashCode → int
The hash code for this object.
no setterinherited
internal → bool?
Absent is the same as false, and this member deliberately declares no JSON Schema default: a declared default is materialised by generated bindings, so an absent internal would reappear as an explicit false on re-serialisation and break round-trip idempotence for every existing request document. Request a key generated from the maintainer's CSPRNG rather than derived from a seed. Such a key is reproducible from nothing: it is not recoverable from a recovery phrase, and a maintainer offering it SHOULD exclude it from backup and export. A consumer asks for this when the key's value lies in being unexportable — the maintainer can sign with it and nothing can take it away — and accepts that losing the maintainer's storage destroys it permanently. A maintainer that cannot mint such a key MUST reject the request rather than silently return a derived one, because the consumer's whole reason for asking is a property the derived key does not have. Consumers MUST confirm the outcome by reading origin on the returned record, which is internal iff the request was honoured; a maintainer that ignored an unrecognised member returns derived, and that difference is the consumer's only reliable signal.
final
keyId → String?
Durable identifier to give the new key. Where the maintainer derives from a seed it MAY default this to derivationPath, which is what makes the member optional for an ordinary create. It is not optional in practice for internal: true: such a key has no derivation path to be named after, so a maintainer that offers internal keys and receives no keyId has nothing to call the key and SHOULD reject the request. A maintainer MUST reject a keyId that collides with an existing key rather than overwrite it.
final
keyType → KeyType
Algorithm to generate.
final
label → String?
Optional human-readable label for the resulting record.
final
mnemonic → String?
BIP-39 phrase to derive from instead of the custodian's own seed. Supplying it makes this an import of externally-generated seed material wearing create's clothes: the phrase reconstitutes the key anywhere, so it is secret-bearing in exactly the way the rest of this payload is not. A custodian MUST refuse it on any transport that is not end-to-end confidential, for the reason keys/import refuses its cleartext carrier, and MUST NOT log or echo it.
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
toJson() → Map<String, dynamic>
Serialize to a JSON-encodable map, omitting absent members.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited