package Ġorg . kin . sdk . base . storage Ċ Ċ import Ġorg . kin . sdk . base . models . Invoice List Ċ import Ġorg . kin . sdk . base . models . Kin Account Ċ import Ġorg . kin . sdk . base . models . Kin Balance Ċ import Ġorg . kin . sdk . base . models . Qu ark Amount Ċ import Ġorg . kin . sdk . base . stell ar . models . Kin Transaction Ċ import Ġorg . kin . sdk . base . stell ar . models . Kin Transactions Ċ import Ġorg . kin . sdk . base . tools . Optional Ċ import Ġorg . kin . sdk . base . tools . Promise Ċ Ċ interface ĠStorage Ġ{ ĊĠĠĠ Ġfun Ġadd Account ( account : ĠKin Account ): ĠBoolean ĊĠĠĠ Ġfun Ġupdate Account ( account : ĠKin Account ): ĠBoolean ĊĠĠĠ Ġfun Ġremove Account ( accountId : ĠKin Account . Id ): ĠBoolean ĊĠĠĠ Ġfun Ġget Account ( accountId : ĠKin Account . Id ): ĠKin Account ? ĊĊĠĠĠ Ġfun Ġadvance Sequence ( id : ĠKin Account . Id ): ĠKin Account ? ĊĊĠĠĠ Ġfun ĠgetAll Account Ids (): ĠList < Kin Account . Id > ĊĊĠĠĠ Ġfun Ġput Transactions ( key : ĠKin Account . Id , Ġtransactions : ĠKin Transactions ) ĊĠĠĠ Ġfun Ġremove All Transactions ( key : ĠKin Account . Id ): ĠBoolean ĊĊĠĠĠ Ġfun Ġremove All In voices ( account : ĠKin Account . Id ): ĠBoolean ĊĊĠĠĠ Ġfun Ġremove Service Config (): ĠBoolean ĊĊĠĠĠ Ġfun Ġget Transactions ( key : ĠKin Account . Id ): ĠKin Transactions ? ĊĊĠĠĠ Ġfun Ġget OrCreate CID (): ĠString ĊĊĊĠĠĠ Ġ// ĠTODO : ĠReplace Ġall Ġsync Ġfunctions Ġwith ĠPromise s ĊĊĠĠĠ Ġfun Ġget Stored Transactions ( accountId : ĠKin Account . Id ): ĠPromise < Kin Transactions ?> ĊĊĠĠĠ Ġfun Ġstore Transactions ( ĊĠĠĠĠĠĠĠ ĠaccountId : ĠKin Account . Id , ĊĠĠĠĠĠĠĠ Ġtransactions : ĠList < Kin Transaction > ĊĠĠĠ Ġ): ĠPromise < List < Kin Transaction >> ĊĊĠĠĠ Ġfun Ġupsert New Transactions In Storage ( ĊĠĠĠĠĠĠĠ ĠaccountId : ĠKin Account . Id , ĊĠĠĠĠĠĠĠ Ġnew Transactions : ĠList < Kin Transaction > ĊĠĠĠ Ġ): ĠPromise < List < Kin Transaction >> ĊĊĠĠĠ Ġfun Ġupsert Old Transactions In Storage ( ĊĠĠĠĠĠĠĠ ĠaccountId : ĠKin Account . Id , ĊĠĠĠĠĠĠĠ Ġold Transactions : ĠList < Kin Transaction > ĊĠĠĠ Ġ): ĠPromise < List < Kin Transaction >> ĊĊĠĠĠ Ġfun Ġinsert New Transaction In Storage ( ĊĠĠĠĠĠĠĠ ĠaccountId : ĠKin Account . Id , ĊĠĠĠĠĠĠĠ Ġnew Transaction : ĠKin Transaction ĊĠĠĠ Ġ): ĠPromise < List < Kin Transaction >> ĊĊĠĠĠ Ġfun Ġadd Invoice Lists ( ĊĠĠĠĠĠĠĠ ĠaccountId : ĠKin Account . Id , ĊĠĠĠĠĠĠĠ Ġinvoice Lists : ĠList < Invoice List > ĊĠĠĠ Ġ): ĠPromise < List < Invoice List >> ĊĊĠĠĠ Ġfun Ġget Invoice Lists Map For AccountId ( ĊĠĠĠĠĠĠĠ Ġaccount : ĠKin Account . Id ĊĠĠĠ Ġ): ĠPromise < Map < Invoice List . Id , ĠInvoice List >> ĊĊĠĠĠ Ġfun Ġget Stored Account ( accountId : ĠKin Account . Id ): ĠPromise < Optional < Kin Account >> ĊĊĠĠĠ Ġfun Ġupdate Account In Storage ( account : ĠKin Account ): ĠPromise < Kin Account > ĊĊĠĠĠ Ġfun Ġupdate Account Balance ( ĊĠĠĠĠĠĠĠ ĠaccountId : ĠKin Account . Id , ĊĠĠĠĠĠĠĠ Ġbalance : ĠKin Balance ĊĠĠĠ Ġ): ĠPromise < Optional < Kin Account >> ĊĊĠĠĠ Ġfun Ġset Min Fee ( min Fee : ĠQu ark Amount ): ĠPromise < Optional < Qu ark Amount >> ĊĊĠĠĠ Ġfun Ġget Min Fee (): ĠPromise < Optional < Qu ark Amount >> ĊĊĠĠĠ Ġfun Ġdelete All Storage ( accountId : ĠKin Account . Id ): ĠPromise < Boolean > ĊĊĠĠĠ Ġfun Ġdelete All Storage (): ĠPromise < Boolean > ĊĊĠĠĠ Ġfun Ġset Min ApiVersion ( apiVersion : ĠInt ): ĠPromise < Int > ĊĊĠĠĠ Ġfun Ġget Min ApiVersion (): ĠPromise < Optional < Int >> Ċ } Ċ