github.com/gnolang/gno@v0.0.0-20240520182011-228e9d0192ce/tm2/pkg/sdk/auth/types.go (about)

     1  package auth
     2  
     3  import (
     4  	"github.com/gnolang/gno/tm2/pkg/crypto"
     5  	"github.com/gnolang/gno/tm2/pkg/sdk"
     6  	"github.com/gnolang/gno/tm2/pkg/std"
     7  )
     8  
     9  // AccountKeeper manages access to accounts.
    10  type AccountKeeperI interface {
    11  	NewAccountWithAddress(ctx sdk.Context, addr crypto.Address) std.Account
    12  	GetAccount(ctx sdk.Context, addr crypto.Address) std.Account
    13  	GetAllAccounts(ctx sdk.Context) []std.Account
    14  	SetAccount(ctx sdk.Context, acc std.Account)
    15  	IterateAccounts(ctx sdk.Context, process func(std.Account) bool)
    16  }
    17  
    18  var _ AccountKeeperI = AccountKeeper{}
    19  
    20  // Limited interface only needed for auth.
    21  type BankKeeperI interface {
    22  	SendCoins(ctx sdk.Context, fromAddr crypto.Address, toAddr crypto.Address, amt std.Coins) error
    23  }