According to Peirce, your sense of reality and of self are both grounded in the experience of difference between belief and external fact. Your acquaintance with facts about the external world is in turn based largely on the ‘testimony’ of others.
In an early essay (EP1:19-20), Peirce gave an explanation of how self-consciousness arises while a child is beginning to use language:
he begins to find that what these people about him say is the very best evidence of fact. So much so, that testimony is even a stronger mark of fact than the facts themselves, or rather than what must now be thought of as the appearances themselves. (I may remark, by the way, that this remains so through life; testimony will convince a man that he himself is mad.) A child hears it said that the stove is hot. But it is not, he says; and, indeed, that central body is not touching it, and only what that touches is hot or cold. But he touches it, and finds the testimony confirmed in a striking way. Thus, he becomes aware of ignorance, and it is necessary to suppose a self in which this ignorance can inhere. So testimony gives the first dawning of self-consciousness.
In Peirce’s own example, it is clearly the collision of bodily experience with expectation that leads directly to the ‘dawning of self-consciousness’, and such surprises can certainly occur without requiring language or ‘testimony’ to set up the expectation. However, ‘testimony’ – whether explicit or implicit – does play a major role in forming the Lebenswelt of anticipatory systems who rely on language as much as humans do; and for them, a heightened consciousness of self does arise from the experience of difference between between private expectation or belief and public or consensual testimony, when the latter is confirmed and the former falsified by direct experience. In the primal innocence which does not distinguish between public and private, our thoughts are not our own; but in the world of social experience, we begin to think of our feelings, beliefs, memories and private thoughts – even our ‘experiences’ – as belonging to an inner world, while reality belongs mainly to a world external to that, simply because we know it to be quite independent of our impressions of it. In other words, it doesn’t go away if we stop believing in it, and offers at least some resistance to our efforts to change it.
The main distinction between the Inner and the Outer Worlds is that inner objects promptly take any modifications we wish, while outer objects are hard facts that no man can make to be other than they are. Yet tremendous as this distinction is, it is after all only relative. Inner objects do offer a certain degree of resistance and outer objects are susceptible of being modified in some measure by sufficient exertion intelligently directed.
— EP2:151 (Harvard Lecture 2, 1903)
By symbolic means, the consensual reality is represented to the interpretant person-sign as external to the consensual as well as the individual mind. But ‘the very origin of the conception of reality shows that this conception essentially involves the notion of a COMMUNITY, without definite limits, and capable of a definite increase of knowledge’ (EP1:52). Consensual reality is the ideal and public product of the reality monitoring process indefinitely prolonged. Along the way, facts individually experienced take on public (propositional) forms as testimony.