package Ġsite . glob ex . dash kit . managers Ċ Ċ import Ġsite . glob ex . bitcoin core . core . I Storage Ċ import Ġsite . glob ex . bitcoin core . managers . I Un spent Output Provider Ċ import Ġsite . glob ex . bitcoin core . storage . Un spent Output Ċ Ċ class ĠConf irmed Un spent Output Provider ( private Ġval Ġstorage : ĠI Storage , Ġprivate Ġval Ġconfirm ations Threshold : ĠInt ) Ġ: ĠI Un spent Output Provider Ġ{ ĊĠĠĠ Ġoverride Ġfun Ġget Un spent Outputs (): ĠList < Un spent Output > Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġlast Block Height Ġ= Ġstorage . last Block ()?. height Ġ?: Ġ 0 ĊĊĠĠĠĠĠĠĠ Ġreturn Ġstorage . getUn spent Outputs (). filter Ġ{ Ġis Output Confirmed ( it , Ġlast Block Height ) Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġis Output Confirmed ( un spent Output : ĠUn spent Output , Ġlast Block Height : ĠInt ): ĠBoolean Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġblock Ġ= Ġun spent Output . block Ġ?: Ġreturn Ġfalse ĊĊĠĠĠĠĠĠĠ Ġreturn Ġblock . height Ġ<= Ġlast Block Height Ġ- Ġconfirm ations Threshold Ġ+ Ġ 1 ĊĠĠĠ Ġ} Ċ } Ċ