github.com/fibonacci-chain/fbc@v0.0.0-20231124064014-c7636198c1e9/libs/cosmos-sdk/x/auth/spec/04_keepers.md (about)

     1  <!--
     2  order: 5
     3  -->
     4  
     5  # Keepers
     6  
     7  The auth module only exposes one keeper, the account keeper, which can be used to read and write accounts.
     8  
     9  ## Account Keeper
    10  
    11  Presently only one fully-permissioned account keeper is exposed, which has the ability to both read and write
    12  all fields of all accounts, and to iterate over all stored accounts.
    13  
    14  ```go
    15  type AccountKeeper interface {
    16    // Return a new account with the next account number and the specified address. Does not save the new account to the store.
    17    NewAccountWithAddress(AccAddress) Account
    18  
    19    // Return a new account with the next account number. Does not save the new account to the store.
    20    NewAccount(Account) Account
    21  
    22    // Retrieve an account from the store
    23    GetAccount(AccAddress) Account
    24  
    25    // Set an account in the store
    26    SetAccount(Account)
    27  
    28    // Remove an account from the store
    29    RemoveAccount(Account)
    30  
    31    // Iterate over all accounts, calling the provided function. Stop iteraiton when it returns false.
    32    IterateAccounts(func(Account) (bool))
    33  
    34    // Fetch the public key of an account at a specified address
    35    GetPubKey(AccAddress) PubKey
    36  
    37    // Fetch the sequence of an account at a specified address
    38    GetSequence(AccAddress) uint64
    39  
    40    // Fetch the next account number, and increment the internal counter
    41    GetNextAccountNumber() uint64
    42  }
    43  ```