import { type IdentifierContinuityResult } from './types.js'; /** A custodian's signed statement that one party held one identifier over one interval. * * The interval is half-open, `[bound_from, bound_until)`, and a `null` `bound_until` is * open-ended. Extra members are allowed and ARE part of the signed body: a record carrying * a `record_type` or a `nonce` signs over them too. */ export interface IdentifierBindingRecord { readonly identifier_kind: string; readonly identifier: string; readonly controller: string; readonly bound_from: string; readonly bound_until: string | null; readonly custodian: string; readonly signature: string; readonly [key: string]: unknown; } /** A custodian's signed statement that an identifier was RETAINED over an interval, meaning * it was not available to anyone else even though no binding covered it. * * This is what closes a gap. An interval the identifier was held by nobody is an interval * anyone could have taken it, and the holder being the pinned holder today says nothing * about what happened in between. The interval is half-open, `[retained_from, * retained_until)`. */ export interface IdentifierRetentionRecord { readonly identifier_kind: string; readonly identifier: string; readonly retained_from: string; readonly retained_until: string; readonly custodian: string; readonly signature: string; readonly [key: string]: unknown; } /** Members dropped from a binding record before canonicalizing its signed body. The record * id is a digest OF the body and the signature is OVER the body, so neither can be inside * it. */ export declare const IDENTIFIER_BINDING_UNSIGNED_FIELDS: readonly ['binding_id', 'signature']; /** Members dropped from a retention record before canonicalizing its signed body. */ export declare const IDENTIFIER_RETENTION_UNSIGNED_FIELDS: readonly ['retention_id', 'signature']; /** The exact bytes a custodian signature is taken over: RFC 8785 JCS over the record with * `unsignedFields` removed. * * JCS, not the SDK's legacy `canonicalize`. The two are NOT interchangeable here, because a * binding record's `bound_until` is meaningfully `null` for an open-ended interval and the * legacy form strips null members, which would make an open-ended binding and a binding * with no end field sign to the same bytes. */ export declare function identifierRecordSignedBytes(record: Readonly>, unsignedFields: readonly string[]): string; /** The dependency scope grant, `extid::`. Says the grant's recovery or * verification path depends on this identifier at all. */ export declare function identifierDependencyScopeGrant(kind: string, identifier: string): string; /** The controller-pin scope grant, `extid:::controller:`. Says which * party the grant was written against. */ export declare function identifierControllerPinScopeGrant(kind: string, identifier: string, controller: string): string; /** Read the controller pins a grant's scope carries for one identifier. Empty means the * grant names the identifier and says nothing about who holds it. */ export declare function parseIdentifierControllerPins(grants: readonly string[], kind: string, identifier: string): readonly string[]; export interface IdentifierContinuityInput { /** What kind of identifier this is, for example `mail-domain`. Standing is resolved per * kind, because the party with standing to say who holds a mail domain is not the party * with standing to say who holds a phone number. */ readonly identifierKind: string; /** The identifier the action IN FACT relies on, whether or not the grant declares it. */ readonly identifier: string; /** Every scope grant the presented delegation carries. */ readonly grantedScopes: readonly string[]; /** `issued_at` of the presented delegation. Continuity is measured from here, not from an * arbitrary earlier point: what matters is whether the identifier was continuously the * pinned party's since the grant was written. */ readonly grantIssuedAt: string; /** The instant asked about, as an RFC 3339 string. Supplied, never read from a clock. */ readonly at: string; readonly bindings: readonly IdentifierBindingRecord[]; readonly retentions: readonly IdentifierRetentionRecord[]; /** Which custodian this caller resolves for an identifier kind. Returning `null` means the * caller resolves none, and then no record of that kind is acceptable. Resolution is by * KIND and never from the `custodian` member the record asserts about itself: a valid * signature establishes who signed, not that they had standing. */ readonly resolveCustodianStanding: (identifierKind: string) => string | null | undefined; /** The Ed25519 public key for a custodian identifier. */ readonly resolveCustodianKey: (custodian: string) => string | null | undefined; } /** Decide whether the identifier this authority path depends on is still held by the party * the grant pinned, and whether it has been continuously so since issuance. * * Four ordered steps: * * 1. Is the dependency declared in the grant at all. A verifier that never modelled the * identifier has no record to invalidate when control of it moves, so an undeclared * dependency is `not_established` on the coverage limb rather than a silent admit. * 2. Does the grant pin who controls it. An unpinned dependency is CAND-07 v2's unpinned * limb again: the grant names a string and says nothing about who holds it. * 3. Who holds it at `at`, according to records from a custodian this caller resolves for * that kind. No accepted record covering the instant is a lapse. Two accepted records * naming different holders is an unresolved conflict between accepted sources, and the * holder is reported as `null` rather than guessed. * 4. Continuity since issuance. Every interval from `grantIssuedAt` to `at` must be either * bound to the established holder or covered by an accepted retention record. A * retention record that exists but comes from a party without standing is named * separately from there being no retention record at all, because the two call for * different fixes. * * Never returns an artifact verdict and never makes any delegation invalid. PROPOSED. */ export declare function evaluateIdentifierContinuity(input: IdentifierContinuityInput): IdentifierContinuityResult; //# sourceMappingURL=identifier.d.ts.map