package Ġjp . co . sor am its u . feature _ staking _ api . domain . api Ċ Ċ import Ġjp . co . sor am its u . common . data . network . runtime . binding . Account Info Ċ import Ġjp . co . sor am its u . core . model . Node Ċ import Ġjp . co . sor am its u . fe ar less _ utils . runtime . AccountId Ċ import Ġjp . co . sor am its u . feature _ staking _ api . domain . model . E ra Index Ċ import Ġjp . co . sor am its u . feature _ staking _ api . domain . model . Exposure Ċ import Ġjp . co . sor am its u . feature _ staking _ api . domain . model . Reward Destination Ċ import Ġjp . co . sor am its u . feature _ staking _ api . domain . model . Sl ashing Spans Ċ import Ġjp . co . sor am its u . feature _ staking _ api . domain . model . St aking Ledger Ċ import Ġjp . co . sor am its u . feature _ staking _ api . domain . model . St aking State Ċ import Ġjp . co . sor am its u . feature _ staking _ api . domain . model . St aking Story Ċ import Ġjp . co . sor am its u . feature _ staking _ api . domain . model . Validator Prefs Ċ import Ġkotlinx . coroutines . flow . Flow Ċ import Ġkotlinx . coroutines . flow . first Ċ import Ġjava . math . BigInteger Ċ Ċ interface ĠSt aking Repository Ġ{ ĊĊĠĠĠ Ġsuspend Ġfun Ġcurrent Session Index (): ĠBigInteger ĊĊĠĠĠ Ġsuspend Ġfun Ġcurrent Slot (): ĠBigInteger ĊĊĠĠĠ Ġsuspend Ġfun Ġgenesis Slot (): ĠBigInteger ĊĊĠĠĠ Ġsuspend Ġfun Ġera Start Session Index ( current E ra : ĠBigInteger ): ĠE ra Index ĊĊĠĠĠ Ġsuspend Ġfun Ġsession Length (): ĠBigInteger ĊĊĠĠĠ Ġsuspend Ġfun Ġera Length (): ĠBigInteger ĊĊĠĠĠ Ġsuspend Ġfun Ġblock Creation Time (): ĠBigInteger ĊĊĠĠĠ Ġfun Ġst aking Available Flow (): ĠFlow < Boolean > ĊĊĠĠĠ Ġsuspend Ġfun ĠgetTotal Iss u ance (): ĠBigInteger ĊĊĠĠĠ Ġsuspend Ġfun Ġget Active E ra Index (): ĠE ra Index ĊĊĠĠĠ Ġsuspend Ġfun ĠgetCurrent E ra Index (): ĠE ra Index ĊĊĠĠĠ Ġsuspend Ġfun Ġget History Depth (): ĠBigInteger ĊĊĠĠĠ Ġsuspend Ġfun Ġobserve Active E ra Index ( network Type : ĠNode . Network Type ): ĠFlow < E ra Index > ĊĊĠĠĠ Ġsuspend Ġfun Ġget Elect ed Validators Exposure ( era Index : ĠE ra Index ): ĠAccount Id Map < Exposure > ĊĊĠĠĠ Ġsuspend Ġfun Ġget Validator Prefs ( account Ids Hex : ĠList < String >): ĠAccount Id Map < Validator Prefs ?> ĊĊĠĠĠ Ġsuspend Ġfun Ġget Sl ashes ( account Ids Hex : ĠList < String >): ĠAccount Id Map < Boolean > ĊĊĠĠĠ Ġsuspend Ġfun Ġget Sl ashing Span ( accountId : ĠAccount Id ): ĠSl ashing Spans ? ĊĊĠĠĠ Ġfun Ġst aking State Flow ( account Address : ĠString ): ĠFlow < St aking State > ĊĊĠĠĠ Ġfun Ġst aking St ories Flow (): ĠFlow < List < St aking Story >> ĊĊĠĠĠ Ġsuspend Ġfun Ġledger Flow ( staking State : ĠSt aking State . St ash ): ĠFlow < St aking Ledger > ĊĊĠĠĠ Ġsuspend Ġfun Ġledger ( address : ĠString ): ĠSt aking Ledger ? ĊĊĠĠĠ Ġsuspend Ġfun Ġget Reward Destination ( staking State : ĠSt aking State . St ash ): ĠRew ard Destination ĊĊĠĠĠ Ġsuspend Ġfun Ġget Controller Account Info ( staking State : ĠSt aking State . St ash ): ĠAccount Info ĊĊĠĠĠ Ġsuspend Ġfun Ġminimum Nom inator Bond (): ĠBigInteger ĊĊĠĠĠ Ġsuspend Ġfun Ġmax Nom in ators (): ĠBigInteger ? ĊĊĠĠĠ Ġsuspend Ġfun Ġnom in ators Count (): ĠBigInteger ? ĊĊĠĠĠ Ġval Ġelect ed Ex pos ures In Active E ra : ĠFlow < Map < String , ĠEx posure >> Ċ } Ċ Ċ suspend Ġfun ĠSt aking Repository . getActive Elect ed Validators Ex pos ures () Ġ= Ġelect ed Ex pos ures In Active E ra . first () Ċ Ċ suspend Ġfun ĠSt aking Repository . h istorical E ras (): ĠList < BigInteger > Ġ{ ĊĠĠĠ Ġval Ġactive E ra Ġ= Ġget Active E ra Index (). toInt () ĊĠĠĠ Ġval Ġcurrent E ra Ġ= ĠgetCurrent E ra Index (). toInt () ĊĠĠĠ Ġval Ġhistory Depth Ġ= Ġget History Depth (). toInt () ĊĊĠĠĠ Ġval Ġhistorical Range Ġ= Ġ( current E ra Ġ- Ġhistory Depth ) Ġuntil Ġactive E ra ĊĊĠĠĠ Ġreturn Ġhistorical Range . map ( Int :: to BigInteger ) Ċ } Ċ