Skip to content

Commit 91ec077

Browse files
authored
pkg/types/core: add UnimplementedKeystore (#1475)
1 parent 1652ea0 commit 91ec077

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

pkg/types/core/keystore.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ import (
1010
"io"
1111
"strings"
1212

13+
"google.golang.org/grpc/codes"
14+
"google.golang.org/grpc/status"
15+
1316
"github.com/smartcontractkit/chainlink-common/pkg/services"
1417
)
1518

@@ -97,3 +100,15 @@ func (c *singleAccountSigner) Sign(ctx context.Context, account string, data []b
97100
}
98101
return nil, fmt.Errorf("account not found: %s", account)
99102
}
103+
104+
var _ Keystore = &UnimplementedKeystore{}
105+
106+
type UnimplementedKeystore struct{}
107+
108+
func (u *UnimplementedKeystore) Accounts(ctx context.Context) (accounts []string, err error) {
109+
return nil, status.Errorf(codes.Unimplemented, "method Accounts not implemented")
110+
}
111+
112+
func (u *UnimplementedKeystore) Sign(ctx context.Context, account string, data []byte) (signed []byte, err error) {
113+
return nil, status.Errorf(codes.Unimplemented, "method Sign not implemented")
114+
}

0 commit comments

Comments
 (0)