forked from Consensys/quorum
-
Notifications
You must be signed in to change notification settings - Fork 0
/
creator.go
25 lines (19 loc) · 798 Bytes
/
creator.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package account
import (
"context"
"github.com/ethereum/go-ethereum/accounts"
)
type creator struct {
service Service
}
// NewCreator creates an implementation of CreatorService that simply acts as a delegate to service. This method
// exists to allow for only the CreatorService methods to be exposed as APIs with the plugin delegate API framework.
func NewCreator(service Service) CreatorService {
return &creator{service: service}
}
func (a *creator) NewAccount(ctx context.Context, newAccountConfig interface{}) (accounts.Account, error) {
return a.service.NewAccount(ctx, newAccountConfig)
}
func (a *creator) ImportRawKey(ctx context.Context, rawKey string, newAccountConfig interface{}) (accounts.Account, error) {
return a.service.ImportRawKey(ctx, rawKey, newAccountConfig)
}