  Given a set-theoretic solution $(X,r)$ of the Yang--Baxter equation, we
denote by $M=M(X,r)$ the structure monoid and by $A=A(X,r)$, respectively
$A'=A'(X,r)$, the left, respectively right, derived structure monoid of
$(X,r)$. It is shown that there exist a left action of $M$ on $A$ and a right
action of $M$ on $A'$ and 1-cocycles $\pi$ and $\pi'$ of $M$ with coefficients
in $A$ and in $A'$ with respect to these actions respectively. We investigate
when the 1-cocycles are injective, surjective or bijective. In case $X$ is
finite, it turns out that $\pi$ is bijective if and only if $(X,r)$ is left
non-degenerate, and $\pi'$ is bijective if and only if $(X,r)$ is right
non-degenerate. In case $(X,r) $ is left non-degenerate, in particular $\pi$ is
bijective, we define a semi-truss structure on $M(X,r)$ and then we show that
this naturally induces a set-theoretic solution $(\bar M, \bar r)$ on the least
cancellative image $\bar M= M(X,r)/\eta$ of $M(X,r)$. In case $X$ is naturally
embedded in $M(X,r)/\eta$, for example when $(X,r)$ is irretractable, then
$\bar r$ is an extension of $r$. It also is shown that non-degenerate
irretractable solutions necessarily are bijective.
