The Buddha explains how one can verify that they are a stream-enterer by reflecting on the five perilous animosities, the four factors of stream-entry, and clearly seeing with wisdom the noble principle of dependent co-arising.

Pañcaverabhaya sutta - Five Perilous Animosities

At Sāvatthi.

Then, the householder Anāthapiṇḍika approached the Blessed One. Having approached, he paid homage to the Blessed One and sat down to one side. While he was sitting there, the Blessed One said this to him:

"Householder, when the five perilous animosities have subsided for a disciple of the noble ones, they are endowed with the four factors of stream-entry, and they have clearly seen and thoroughly penetrated with wisdom the noble principle, they may, if they wish, declare of themselves: 'I am one finished with rebirth in hell, finished with animal rebirth, finished with the ghost realm, done with states of misery, bad destinations and states of suffering. I am a stream-enterer, not liable to states of suffering, fixed in destiny, bound for full awakening.'

What are the five perilous animosities that have subsided?

1 Householder, one who kills living beings, dependent on killing living beings, generates [volitions of] peril and animosity concerning this life, peril and animosity concerning the next life, and they personally experience suffering and mental distress. But for one who has abstained from killing living beings, that peril and animosity has subsided.

2 Householder, one who takes what is not given, dependent on taking what is not given, generates peril and animosity concerning this life, peril and animosity concerning the next life, and they personally experience suffering and mental distress. But for one who has abstained from taking what is not given, that peril and animosity has subsided.

3 Householder, one who engages in sexual misconduct, dependent on engaging in sexual misconduct, generates peril and animosity concerning this life, peril and animosity concerning the next life, and they personally experience suffering and mental distress. But for one who has abstained from sexual misconduct, that peril and animosity has subsided.

4 Householder, one who speaks falsely, dependent on speaking falsely, generates peril and animosity concerning this life, peril and animosity concerning the next life, and they personally experience suffering and mental distress. But for one who has abstained from speaking falsely, that peril and animosity has subsided.

5 Householder, one who indulges in spirits, alcoholic beverages, and drugs that are a basis for a state of negligence, dependent on the state of negligence, generates peril and animosity concerning this life, peril and animosity concerning the next life, and they personally experience suffering and mental distress. But for one who has abstained from dwelling in negligence, that peril and animosity has subsided.

What are the four factors of stream-entry that one is endowed with?

1 Here, householder, a disciple of the noble ones is endowed with unwavering confidence in the Buddha: 'The Blessed One is an Arahant, the Fully Awakened One, accomplished in true knowledge and conduct, the Well-Gone One, knower of the world, the unsurpassed trainer of tameable persons, the teacher of gods and human beings, the Buddha, the Blessed One.'

2 Here, householder, they are endowed with unwavering confidence in the Dhamma: 'The Dhamma is well proclaimed by the Blessed One, directly visible, immediate, inviting verification, leading onward, to be personally experienced by the wise.'

3 Here, householder, they are endowed with unwavering confidence in the Saṅgha: 'The community of the Blessed One's disciples is practicing the good way, practicing the upright way, practicing the true way, practicing the proper way; that is, the four pairs of persons, the eight types of individuals—this community of the Blessed One's disciples is worthy of gifts, worthy of hospitality, worthy of offerings, worthy of reverential salutation, the unsurpassed field of merit for the world.'

4 They are endowed with virtues that are dear to the noble ones—unbroken, unblemished, not patchy, untarnished, liberating, praised by the wise, not clung to, leading to collectedness.

And what is the noble principle that has been clearly seen and thoroughly penetrated with wisdom? Here, householder, a disciple of the noble ones carefully and wisely attends to dependent co-arising: 'When this exists, that comes to be; when this does not exist, that does not come to be. From the arising of this, that arises; with the ending of this, that ceases.'

That is, dependent on ignorance, bhikkhus, volitional formations [arise]; dependent on volitional formations, consciousness arises; dependent on consciousness, name and form arise; dependent on name and form, the six sense bases arise; dependent on the six sense bases, contact arises; dependent on contact, sensation arises; dependent on sensation, craving arises; dependent on craving, clinging arises; dependent on clinging, existence arises; dependent on existence, birth arises; dependent on birth, aging and death, sorrow, lamentation, pain, displeasure, and despair arise. Thus is the arising of this whole mass of suffering. With the complete fading away and ending of ignorance comes ending of volitional formations; with the ending of volitional formations, ending of consciousness; with the ending of consciousness, ending of name and form; with the ending of name and form, ending of the six sense bases; with the ending of the six sense bases, ending of contact; with the ending of contact, ending of sensation; with the ending of sensation, ending of craving; with the ending of craving, ending of clinging; with the ending of clinging, ending of existence; with the ending of existence, ending of birth; with the ending of birth, aging and death, sorrow, lamentation, pain, displeasure, and despair cease. Thus is the ending of this whole mass of suffering. This is the noble principle that has been clearly seen and thoroughly penetrated with wisdom.

Householder, when the five perilous animosities have subsided for a disciple of the noble ones, they are endowed with the four factors of stream-entry, and they have clearly seen and thoroughly penetrated with wisdom the noble principle, they may, if they wish, declare of themselves: 'I am one finished with rebirth in hell, finished with animal rebirth, finished with the ghost realm, done with states of misery, bad destinations and states of suffering. I am a stream-enterer, not liable to states of suffering, fixed in destiny, bound for full awakening.'"