z:<tid>:secrets at runtime. There’s no set-credentials function — the tenant SDK writes the key straight into the map with the map-entry-set control call, on the authenticated tee:tenant/contracts path (not an agent call).
map-entry-setwrites the value intoz:<tid>:secrets. It is a control-plane write, so it bypasses the map’swritersACL — the key lands even though the map is read/write-restricted to the contract alone (see Create tenant KV maps).- At call time your contract reads it back with
kv_store::get("secrets", "duffel_api_key")inside the TDX enclave.