VaultEntry class
VaultEntry
Constructors
-
VaultEntry({required String id, required String contextId, required List<
SiteTarget?> targets, required String label, required SecretKind secretKind, List<String> ? tags, String? notes, String? favicon, List<String> ? selectors, List<String> ? customFieldNames, List<AttachmentRef> ? attachments, String? expiresAt, String? breachedAt, String? passwordChangedAt, required String createdAt, String? createdBy, required String updatedAt, String? updatedBy, String? lastUsedAt, required int version, String? principalDid, Ext? ext}) -
const
-
VaultEntry.fromJson(Map<
String, dynamic> json) -
Read this payload from a decoded JSON object.
factory
Properties
-
attachments
→ List<
AttachmentRef> ? -
References to encrypted blobs associated with the entry (recovery codes, PEM files,
screenshots of authenticator setup). The blobs themselves are fetched via a
separate mechanism the maintainer documents; metadata view exposes only the
descriptor.
final
- breachedAt → String?
-
Set by the maintainer (via HIBP integration or equivalent) when the password
material associated with this entry is known to appear in a public breach.
Consumers SHOULD surface this prominently. Cleared when the user rotates the
password and the new password is not in any known breach.
final
- contextId → String
-
Identifier of the trust context (persona) the entry belongs to. Opaque string
interpreted by the vault maintainer; corresponds to a single ContextRecord on the
VTA side.
final
- createdAt → String
-
final
- createdBy → String?
-
VID of the consumer that originally created the entry.
final
-
customFieldNames
→ List<
String> ? -
Names of additional fields the user has attached (e.g. ["security-question-1",
"account-number"]). The VALUES live in the secret payload and are only delivered by
vault/release/0.1. Exposing names in metadata lets the consumer render the right
form layout before requesting release.
final
- expiresAt → String?
-
Optional time after which the credential is no longer expected to be valid (e.g. an
OAuth refresh token's known expiry, a time-limited API token, an enterprise
password rotation policy). Maintainers MAY surface this in the consumer UI as a
warning.
final
- ext → Ext?
-
Ecosystem-defined extension members per SPEC.md §4.5.1. Reverse-DNS-namespaced;
consumers MUST ignore unrecognized namespaces.
final
- favicon → String?
-
Optional URI of an icon to display in the consumer UI. Maintainers MAY fetch and
cache; consumers SHOULD treat as untrusted content and fetch via a sandboxed
pipeline.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
Opaque vault-maintainer-assigned identifier for the entry. ULID/UUID/base32 are
common; the wire spec only requires non-empty string equality.
final
- label → String
-
Human-readable display name (e.g. "Work GitHub", "Personal bank — checking").
Bounded on the wire at 256 characters; a maintainer MAY enforce a shorter limit.
final
- lastUsedAt → String?
-
Most recent time the entry was used (either released or proxy-login performed).
Maintainers MAY return this with reduced precision (e.g. hour-floored) when
releasing to a less-trusted consumer.
final
- notes → String?
-
Non-sensitive notes the user attached to the entry. Visible in metadata view
(suitable for support contact, account number, expiry policy memos). SENSITIVE
notes belong in the secret payload as a
secureNotesfield — those are only released by vault/release/0.1.final - passwordChangedAt → String?
-
Set whenever the password component of the secret payload is rotated. Maintainers
MUST update this on every secret-material change for entries of kind
password(or any kind that carries a password component). Used by consumers to surface rotation-overdue warnings.final - principalDid → String?
-
Optional cached DID the entry will act AS for DID-shaped flows — mirrors the
didfield of the entry's secret payload whensecretKindcarries one (didSelfIssued,didcommPeer). Absent for kinds that have no DID concept (password,passkey,oauthTokens,bearerToken,sshKey,custom). MAINTAINER-DERIVED, NOT CONSUMER-SUPPLIED: the maintainer MUST recompute this from the canonical secret at every upsert / secret rotation; a producer-supplied value onvault/upsert/0.1MUST be ignored (no error, but no honour). Read-only on the wire, present in metadata views so consumers can drive RP-side flows (e.g. fetch/auth/challengekeyed on the principal DID before requesting a proxy-login) without releasing the secret.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- secretKind → SecretKind
-
Discriminator for the kind of secret this entry holds. The secret material itself
is NEVER returned in metadata views; the kind is exposed so consumers can render an
appropriate UI affordance and so policy decisions can route by kind.
final
-
selectors
→ List<
String> ? -
Opaque maintainer-defined selector strings fed to the policy engine when this entry
is requested (e.g. "recent_uv_required", "network_class=corp", "step_up_push").
Consumers MUST treat selectors as opaque; they exist for policy authoring on the
maintainer side.
final
-
User-defined tags for organisation and filtering (e.g. ["family", "finance"]).
Maintainers MAY enforce a maximum count; the wire spec does not.
final
-
targets
→ List<
SiteTarget?> -
One or more binding targets — web origins, mobile app identifiers, and/or DIDs —
that this credential applies to. A request from any matching target uses this
entry. A typical entry for a service that exists as both a website and mobile apps
will list a web origin, an iOS bundle id, and an Android package id; passkeys for
that service typically list only the origin (because iOS Associated Domains and
Android Asset Links bind apps to the domain at the OS level).
final
- updatedAt → String
-
final
- updatedBy → String?
-
VID of the consumer that last modified the entry.
final
- version → int
-
Monotonic version counter incremented on every mutation. Used by consumers for
optimistic-concurrency checks on vault/upsert and as the seq baseline for
vault/sync.
final
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