const res = await fetch('https://api.trusset.org/customers/api/kyc-records/recipient-key', { headers: { 'X-API-Key': 'trusset_your_key_here' }});const { data } = await res.json();if (!data.recipientKey) { throw new Error('No record key registered. Run trusset-kyc keygen and register the public key.');}
Returns the record key registered for your instance, the keys it replaced, and how many records are waiting to be opened. The record key is the public half of an X25519 key pair your local tool creates. Every KYC source seals its records to it. See Sealed KYC records.Only the public key is held here. The private half stays in the keystore of your tool, and no endpoint accepts it.
Response Fields
object
Show child attributes
object
The key in use, or null when none is registered.
Show child attributes
string
The first 16 hex characters of the SHA-256 hash of the raw public key. Envelope headers name the key by this ID.
string
The X25519 public key, 64 lowercase hex characters.
string
The first 32 hex characters of the same hash, in 8 groups of 4. Compare it with trusset-kyc key show on your own machine to check that the right key is registered. Read your fingerprint to a source from trusset-kyc key show, never from this response: it comes from Trusset, and the source checks the invite, which also comes from Trusset, against what you read out.
string
When it was registered, ISO 8601.
array
Up to 50 keys of the instance, newest first, the key in use included. Each is { keyId, fingerprint, createdAt, retiredAt }. retiredAt is null for the key in use.
integer
Records in status RECEIVED, which your tool has not opened yet.
const res = await fetch('https://api.trusset.org/customers/api/kyc-records/recipient-key', { headers: { 'X-API-Key': 'trusset_your_key_here' }});const { data } = await res.json();if (!data.recipientKey) { throw new Error('No record key registered. Run trusset-kyc keygen and register the public key.');}
const res = await fetch('https://api.trusset.org/customers/api/kyc-records/recipient-key', { headers: { 'X-API-Key': 'trusset_your_key_here' }});const { data } = await res.json();if (!data.recipientKey) { throw new Error('No record key registered. Run trusset-kyc keygen and register the public key.');}