import type { DcApiCredential, DcApiProtocol } from '../types'; import type { ParsedSelection } from './index'; /** * The credential database the Multipaz matcher reads (`CredentialDatabase.cpp`): * * ``` * { * "protocols": [tstr], * "credentials": [{ * "title": tstr, "subtitle": tstr, "bitmap": bstr, * "protocols": [tstr], ; optional, overrides the top level * "mdoc": { "documentId": tstr, "docType": tstr, * "issuerIdentifiers": [bstr], "readerIdentifiers": [bstr], ; optional * "namespaces": { ns: { element: [display, value, matchValue] } } }, * "sdjwt": { "documentId": tstr, "vct": tstr, * "issuerIdentifiers": [bstr], "readerIdentifiers": [bstr], ; optional * "claims": { "a.b.c": [display, value, matchValue] } } * }] * } * ``` * * `title`, `subtitle` and `bitmap` are read unconditionally, so they are always written. The * identifiers are only written when there are any, which is also what tells the matcher a credential * is not gated on its reader. */ export declare function encodeMultipazCredentials(credentials: DcApiCredential[], protocols: DcApiProtocol[]): Uint8Array; /** * The matcher builds one picker entry per credential in a combination, with ids of the form * ` ` (`Combination::addToCredmanPicker`), so a picked set * arrives as one id per slot. Document ids can contain spaces, the first two fields cannot. * * The entries name a protocol, not a request. The matcher walks the requests in order, adds the * combinations of the first one the registered credentials can satisfy and stops (`matcher.cpp`), * but it only hands the protocol on: the set id is ` ` and the entry metadata * is left empty. So every request with that protocol is a candidate. Of those, the one the matcher * answered is the first the picked credentials satisfy, since the ones before it were not * satisfiable at all. */ export declare function parseMultipazSelection(entryIds: string[], protocols: string[]): ParsedSelection; //# sourceMappingURL=multipaz.d.ts.map