github.com/Consensys/quorum@v21.1.0+incompatible/plugin/account/service.go (about)

     1  package account
     2  
     3  import (
     4  	"context"
     5  	"time"
     6  
     7  	"github.com/ethereum/go-ethereum/accounts"
     8  )
     9  
    10  type Service interface {
    11  	Status(ctx context.Context) (string, error)
    12  	Open(ctx context.Context, passphrase string) error
    13  	Close(ctx context.Context) error
    14  	Accounts(ctx context.Context) []accounts.Account
    15  	Contains(ctx context.Context, account accounts.Account) bool
    16  	Sign(ctx context.Context, account accounts.Account, toSign []byte) ([]byte, error)
    17  	UnlockAndSign(ctx context.Context, account accounts.Account, toSign []byte, passphrase string) ([]byte, error)
    18  	TimedUnlock(ctx context.Context, account accounts.Account, password string, duration time.Duration) error
    19  	Lock(ctx context.Context, account accounts.Account) error
    20  	CreatorService
    21  }
    22  
    23  type CreatorService interface {
    24  	NewAccount(ctx context.Context, newAccountConfig interface{}) (accounts.Account, error)
    25  	ImportRawKey(ctx context.Context, rawKey string, newAccountConfig interface{}) (accounts.Account, error)
    26  }