github.com/Finschia/finschia-sdk@v0.49.1/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  // AccountKeeperI is the interface contract that x/auth's keeper implements.
    16  type AccountKeeperI interface {
    17  	// Return a new account with the next account number and the specified address. Does not save the new account to the store.
    18  	NewAccountWithAddress(sdk.Context, sdk.AccAddress) types.AccountI
    19  
    20  	// Return a new account with the next account number. Does not save the new account to the store.
    21  	NewAccount(sdk.Context, types.AccountI) types.AccountI
    22  
    23  	// Check if an account exists in the store.
    24  	HasAccount(sdk.Context, sdk.AccAddress) bool
    25  
    26  	// Retrieve an account from the store.
    27  	GetAccount(sdk.Context, sdk.AccAddress) types.AccountI
    28  
    29  	// Set an account in the store.
    30  	SetAccount(sdk.Context, types.AccountI)
    31  
    32  	// Remove an account from the store.
    33  	RemoveAccount(sdk.Context, types.AccountI)
    34  
    35  	// Iterate over all accounts, calling the provided function. Stop iteration when it returns true.
    36  	IterateAccounts(sdk.Context, func(types.AccountI) bool)
    37  
    38  	// Fetch the public key of an account at a specified address
    39  	GetPubKey(sdk.Context, sdk.AccAddress) (crypto.PubKey, error)
    40  
    41  	// Fetch the sequence of an account at a specified address.
    42  	GetSequence(sdk.Context, sdk.AccAddress) (uint64, error)
    43  
    44  	// Fetch the next account number, and increment the internal counter.
    45  	GetNextAccountNumber(sdk.Context) uint64
    46  }
    47  ```