mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-09 15:37:56 -05:00
Implement ChangeWalletPassword API Endpoint (#7273)
* allow changing wallet password * wallet change password logic * tests for wallet password changes * more unit tests Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
This commit is contained in:
438
proto/validator/accounts/v2/web_api.pb.go
generated
438
proto/validator/accounts/v2/web_api.pb.go
generated
@@ -851,6 +851,61 @@ func (m *NodeConnectionResponse) GetDepositContractAddress() []byte {
|
||||
return nil
|
||||
}
|
||||
|
||||
type ChangePasswordRequest struct {
|
||||
Password string `protobuf:"bytes,1,opt,name=password,proto3" json:"password,omitempty"`
|
||||
PasswordConfirmation string `protobuf:"bytes,2,opt,name=password_confirmation,json=passwordConfirmation,proto3" json:"password_confirmation,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *ChangePasswordRequest) Reset() { *m = ChangePasswordRequest{} }
|
||||
func (m *ChangePasswordRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*ChangePasswordRequest) ProtoMessage() {}
|
||||
func (*ChangePasswordRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_8a5153635bfe042e, []int{12}
|
||||
}
|
||||
func (m *ChangePasswordRequest) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
}
|
||||
func (m *ChangePasswordRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
if deterministic {
|
||||
return xxx_messageInfo_ChangePasswordRequest.Marshal(b, m, deterministic)
|
||||
} else {
|
||||
b = b[:cap(b)]
|
||||
n, err := m.MarshalToSizedBuffer(b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return b[:n], nil
|
||||
}
|
||||
}
|
||||
func (m *ChangePasswordRequest) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_ChangePasswordRequest.Merge(m, src)
|
||||
}
|
||||
func (m *ChangePasswordRequest) XXX_Size() int {
|
||||
return m.Size()
|
||||
}
|
||||
func (m *ChangePasswordRequest) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_ChangePasswordRequest.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_ChangePasswordRequest proto.InternalMessageInfo
|
||||
|
||||
func (m *ChangePasswordRequest) GetPassword() string {
|
||||
if m != nil {
|
||||
return m.Password
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *ChangePasswordRequest) GetPasswordConfirmation() string {
|
||||
if m != nil {
|
||||
return m.PasswordConfirmation
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterEnum("ethereum.validator.accounts.v2.CreateWalletRequest_KeymanagerKind", CreateWalletRequest_KeymanagerKind_name, CreateWalletRequest_KeymanagerKind_value)
|
||||
proto.RegisterType((*CreateWalletRequest)(nil), "ethereum.validator.accounts.v2.CreateWalletRequest")
|
||||
@@ -867,6 +922,7 @@ func init() {
|
||||
proto.RegisterType((*AuthRequest)(nil), "ethereum.validator.accounts.v2.AuthRequest")
|
||||
proto.RegisterType((*AuthResponse)(nil), "ethereum.validator.accounts.v2.AuthResponse")
|
||||
proto.RegisterType((*NodeConnectionResponse)(nil), "ethereum.validator.accounts.v2.NodeConnectionResponse")
|
||||
proto.RegisterType((*ChangePasswordRequest)(nil), "ethereum.validator.accounts.v2.ChangePasswordRequest")
|
||||
}
|
||||
|
||||
func init() {
|
||||
@@ -874,87 +930,92 @@ func init() {
|
||||
}
|
||||
|
||||
var fileDescriptor_8a5153635bfe042e = []byte{
|
||||
// 1280 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0x4f, 0x6f, 0x1b, 0x45,
|
||||
0x14, 0x67, 0x6c, 0x27, 0x71, 0x9e, 0xdd, 0xd4, 0x9d, 0xa4, 0xa9, 0x71, 0x4b, 0xe2, 0xae, 0xa0,
|
||||
0x75, 0xff, 0xd9, 0xc8, 0xa5, 0xa5, 0xca, 0x05, 0xa5, 0x8e, 0x55, 0xaa, 0xf4, 0x9f, 0x96, 0x08,
|
||||
0x24, 0x38, 0xac, 0x26, 0xbb, 0xaf, 0xce, 0x28, 0xde, 0xd9, 0x65, 0x77, 0x9c, 0xd6, 0xd7, 0x8a,
|
||||
0x03, 0x17, 0x2e, 0x70, 0x40, 0x88, 0x5b, 0xbf, 0x41, 0x0f, 0xc0, 0x57, 0xe0, 0x08, 0xe2, 0xc2,
|
||||
0x0d, 0x54, 0xf1, 0x41, 0xd0, 0xce, 0xcc, 0xae, 0xed, 0xc8, 0xc1, 0x09, 0x88, 0xd3, 0xee, 0xbc,
|
||||
0xf7, 0x9b, 0xf7, 0x7e, 0xf3, 0xe6, 0xfd, 0x19, 0xb8, 0x12, 0x46, 0x81, 0x0c, 0x5a, 0x07, 0xac,
|
||||
0xcf, 0x3d, 0x26, 0x83, 0xa8, 0xc5, 0x5c, 0x37, 0x18, 0x08, 0x19, 0xb7, 0x0e, 0xda, 0xad, 0x67,
|
||||
0xb8, 0xeb, 0xb0, 0x90, 0x37, 0x15, 0x86, 0xae, 0xa1, 0xdc, 0xc3, 0x08, 0x07, 0x7e, 0x33, 0x43,
|
||||
0x37, 0x53, 0x74, 0xf3, 0xa0, 0x5d, 0xbb, 0xd0, 0x0b, 0x82, 0x5e, 0x1f, 0x5b, 0x2c, 0xe4, 0x2d,
|
||||
0x26, 0x44, 0x20, 0x99, 0xe4, 0x81, 0x88, 0xf5, 0xee, 0xda, 0x79, 0xa3, 0x55, 0xab, 0xdd, 0xc1,
|
||||
0xd3, 0x16, 0xfa, 0xa1, 0x1c, 0x6a, 0xa5, 0xf5, 0x43, 0x01, 0x96, 0x3b, 0x11, 0x32, 0x89, 0x9f,
|
||||
0xb0, 0x7e, 0x1f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fd,
|
||||
0xc6, 0x55, 0x52, 0xcf, 0x37, 0x4a, 0xed, 0x07, 0xff, 0xd1, 0x71, 0x53, 0x7f, 0xe2, 0xae, 0x90,
|
||||
0xd1, 0xd0, 0x4e, 0x8d, 0xd7, 0x36, 0xa0, 0x3c, 0xae, 0xa0, 0x15, 0xc8, 0xef, 0xe3, 0xd0, 0xc4,
|
||||
0x24, 0xf9, 0xa5, 0x2b, 0x30, 0x77, 0xc0, 0xfa, 0x03, 0x34, 0x77, 0xad, 0x17, 0x1b, 0xb9, 0x3b,
|
||||
0xc4, 0xfa, 0x14, 0xce, 0xea, 0xce, 0x60, 0x2a, 0x32, 0x0b, 0xf0, 0x26, 0x2c, 0x18, 0x66, 0xca,
|
||||
0x50, 0xa9, 0x7d, 0x79, 0x16, 0xf9, 0xd4, 0x42, 0xba, 0xcf, 0xda, 0x82, 0xe5, 0x07, 0x3c, 0x96,
|
||||
0x69, 0xad, 0xa7, 0x39, 0x7a, 0x03, 0x96, 0x7b, 0x28, 0x1d, 0x0f, 0xc3, 0x20, 0xe6, 0xd2, 0x91,
|
||||
0xcf, 0x1d, 0x8f, 0x49, 0xa6, 0xbc, 0x14, 0xed, 0x4a, 0x0f, 0xe5, 0x96, 0xd6, 0xec, 0x3c, 0xdf,
|
||||
0x62, 0x92, 0x59, 0x9f, 0xc1, 0xca, 0xa4, 0x15, 0x43, 0xb0, 0x03, 0xc5, 0xac, 0xb1, 0xe8, 0xf0,
|
||||
0x1e, 0x9b, 0x61, 0xb6, 0xd1, 0x7a, 0x45, 0x60, 0xc1, 0x48, 0x69, 0x1b, 0xce, 0x9a, 0x6d, 0x5c,
|
||||
0xf4, 0x9c, 0x70, 0xb0, 0xdb, 0xe7, 0xae, 0x93, 0x06, 0xb2, 0x6c, 0x2f, 0x8f, 0x94, 0x4f, 0x94,
|
||||
0x6e, 0x1b, 0x87, 0x49, 0x87, 0x33, 0xb6, 0x1c, 0xc1, 0xfc, 0x34, 0xbe, 0x25, 0x23, 0x7b, 0xc4,
|
||||
0x7c, 0x4c, 0x2a, 0xe9, 0xf0, 0x51, 0xf3, 0xca, 0xe0, 0x29, 0x6f, 0xfc, 0x9c, 0x49, 0xc7, 0xf5,
|
||||
0x30, 0xe2, 0x07, 0x6a, 0x80, 0x8c, 0x97, 0xd1, 0xd2, 0x48, 0xac, 0xaa, 0x68, 0x1b, 0x96, 0xb2,
|
||||
0xcb, 0xca, 0xaa, 0x7e, 0x44, 0x57, 0x47, 0xa3, 0x6c, 0x43, 0x98, 0xb2, 0x8c, 0x69, 0x15, 0x16,
|
||||
0xb8, 0xf0, 0xb8, 0x8b, 0x71, 0x35, 0x57, 0xcf, 0x37, 0x0a, 0x76, 0xba, 0xb4, 0xae, 0x40, 0x69,
|
||||
0x73, 0x20, 0xf7, 0x52, 0x4b, 0x35, 0x28, 0x66, 0x5d, 0xd5, 0x54, 0x61, 0xba, 0xb6, 0x1e, 0x43,
|
||||
0x59, 0x43, 0xcd, 0x05, 0xac, 0xc0, 0x9c, 0x0c, 0xf6, 0x51, 0x18, 0xa0, 0x5e, 0xd0, 0x2b, 0x50,
|
||||
0x51, 0x3f, 0x0e, 0x3e, 0x0f, 0x79, 0xa4, 0x58, 0xab, 0xa8, 0x14, 0xec, 0xd3, 0x4a, 0xde, 0xcd,
|
||||
0xc4, 0xd6, 0x1f, 0x04, 0x56, 0x1f, 0x05, 0x1e, 0x76, 0x02, 0x21, 0xd0, 0x4d, 0x44, 0x99, 0xed,
|
||||
0x77, 0x61, 0x65, 0x17, 0x99, 0x1b, 0x08, 0x47, 0x04, 0x1e, 0x3a, 0x28, 0xbc, 0x30, 0xe0, 0x26,
|
||||
0x15, 0x17, 0x6d, 0xaa, 0x75, 0xc9, 0xde, 0xae, 0xd1, 0xd0, 0x0b, 0xb0, 0xe8, 0x6a, 0x3b, 0xe8,
|
||||
0x29, 0x87, 0x45, 0x7b, 0x24, 0x48, 0x02, 0x10, 0x0f, 0x85, 0xcb, 0x45, 0x4f, 0x05, 0xbf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 0x91, 0xae, 0x4f, 0x92,
|
||||
0x48, 0x67, 0x60, 0xab, 0x67, 0x36, 0xb6, 0x5f, 0xe5, 0xa0, 0x98, 0x3d, 0x9f, 0xbe, 0x24, 0x70,
|
||||
0x6a, 0xa2, 0x7f, 0x1f, 0xc9, 0xec, 0xd6, 0xf1, 0xd2, 0xed, 0xd0, 0x18, 0xb0, 0x1a, 0x8a, 0x96,
|
||||
0x65, 0xbd, 0x35, 0x49, 0x2b, 0x7b, 0x30, 0x8f, 0x52, 0xe8, 0x3b, 0x02, 0xe5, 0xf1, 0x46, 0x3d,
|
||||
0x3b, 0xc1, 0xa7, 0x0c, 0x87, 0xda, 0x7b, 0x27, 0xdb, 0x64, 0x58, 0xae, 0x29, 0x96, 0x55, 0xba,
|
||||
0x3a, 0x9d, 0x65, 0xfb, 0x25, 0x81, 0xf9, 0x0f, 0x91, 0xf5, 0xe5, 0x1e, 0xfd, 0x96, 0xc0, 0xb9,
|
||||
0x7b, 0x28, 0xef, 0x66, 0x1d, 0x64, 0xd4, 0x7d, 0x8e, 0x8c, 0xdd, 0xed, 0x59, 0xa4, 0xa6, 0x77,
|
||||
0x31, 0xeb, 0xba, 0xa2, 0x75, 0x89, 0xbe, 0x3d, 0x49, 0x6b, 0x4f, 0x31, 0x69, 0xa9, 0xce, 0xe6,
|
||||
0x66, 0xbb, 0xda, 0x5f, 0xe7, 0xa0, 0x90, 0x34, 0x58, 0xfa, 0x82, 0xc0, 0xdc, 0x83, 0xa0, 0xc7,
|
||||
0x05, 0xbd, 0x36, 0x73, 0xa2, 0x8d, 0x7a, 0x77, 0xed, 0xfa, 0xf1, 0xc0, 0x93, 0x21, 0xb3, 0x96,
|
||||
0x27, 0xb9, 0xf5, 0x13, 0xbf, 0xc9, 0x75, 0x7e, 0x41, 0x60, 0xfe, 0x23, 0xde, 0x13, 0x83, 0xf0,
|
||||
0xff, 0x64, 0xb1, 0xae, 0x58, 0xbc, 0x69, 0x1d, 0x2a, 0xbd, 0x58, 0x39, 0xde, 0x20, 0x57, 0xef,
|
||||
0x96, 0x7f, 0x7e, 0xbd, 0x46, 0x7e, 0x79, 0xbd, 0x46, 0xfe, 0x7c, 0xbd, 0x46, 0x76, 0xe7, 0xd5,
|
||||
0xc5, 0xdc, 0xfc, 0x3b, 0x00, 0x00, 0xff, 0xff, 0x4d, 0x4c, 0x28, 0x55, 0xc1, 0x0d, 0x00, 0x00,
|
||||
// 1346 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0x4d, 0x8f, 0x1b, 0x45,
|
||||
0x13, 0x7e, 0xdb, 0xf6, 0xee, 0x7a, 0xcb, 0x8e, 0xe3, 0xf4, 0x7e, 0xc4, 0xaf, 0x93, 0x77, 0xd7,
|
||||
0x19, 0xbd, 0x64, 0x9d, 0x2f, 0x1b, 0x39, 0x24, 0x44, 0x7b, 0x41, 0x1b, 0xaf, 0x15, 0xa2, 0xcd,
|
||||
0x97, 0x86, 0x15, 0x48, 0x70, 0x18, 0xf5, 0xce, 0x54, 0xec, 0xd1, 0x7a, 0x7a, 0xcc, 0x4c, 0x7b,
|
||||
0x13, 0x5f, 0x23, 0x0e, 0x5c, 0xe0, 0x00, 0x07, 0x84, 0xb8, 0xe5, 0x1f, 0xe4, 0x00, 0xfc, 0x05,
|
||||
0x8e, 0x48, 0x5c, 0xb8, 0x81, 0x56, 0xfc, 0x10, 0x34, 0xdd, 0x3d, 0x63, 0xcf, 0xca, 0x8b, 0xbd,
|
||||
0x20, 0x4e, 0x9e, 0xae, 0xaa, 0xae, 0x7a, 0xfa, 0xe9, 0xfa, 0x68, 0xc3, 0xb5, 0x41, 0xe0, 0x0b,
|
||||
0xbf, 0x79, 0xc4, 0xfa, 0xae, 0xc3, 0x84, 0x1f, 0x34, 0x99, 0x6d, 0xfb, 0x43, 0x2e, 0xc2, 0xe6,
|
||||
0x51, 0xab, 0xf9, 0x02, 0x0f, 0x2c, 0x36, 0x70, 0x1b, 0xd2, 0x86, 0x6e, 0xa0, 0xe8, 0x61, 0x80,
|
||||
0x43, 0xaf, 0x91, 0x58, 0x37, 0x62, 0xeb, 0xc6, 0x51, 0xab, 0x7a, 0xb9, 0xeb, 0xfb, 0xdd, 0x3e,
|
||||
0x36, 0xd9, 0xc0, 0x6d, 0x32, 0xce, 0x7d, 0xc1, 0x84, 0xeb, 0xf3, 0x50, 0xed, 0xae, 0x5e, 0xd2,
|
||||
0x5a, 0xb9, 0x3a, 0x18, 0x3e, 0x6f, 0xa2, 0x37, 0x10, 0x23, 0xa5, 0x34, 0xbe, 0xcf, 0xc1, 0x4a,
|
||||
0x3b, 0x40, 0x26, 0xf0, 0x23, 0xd6, 0xef, 0xa3, 0x30, 0xf1, 0xd3, 0x21, 0x86, 0x82, 0x6e, 0x42,
|
||||
0xe1, 0x85, 0x14, 0x58, 0x03, 0x26, 0x7a, 0x15, 0x52, 0x23, 0xf5, 0x65, 0x13, 0x94, 0xe8, 0x19,
|
||||
0x13, 0x3d, 0x7a, 0x00, 0x70, 0x88, 0x23, 0x8f, 0x71, 0xd6, 0xc5, 0xa0, 0x92, 0xa9, 0x91, 0x7a,
|
||||
0xa9, 0x75, 0xbf, 0xf1, 0xd7, 0x40, 0x1b, 0x53, 0x22, 0x35, 0xf6, 0x12, 0x2f, 0x7b, 0x2e, 0x77,
|
||||
0xcc, 0x09, 0xaf, 0x74, 0x0b, 0xce, 0x27, 0x20, 0xc2, 0xf0, 0x85, 0x1f, 0x38, 0x95, 0xac, 0x04,
|
||||
0x52, 0x8a, 0x81, 0x28, 0x29, 0xad, 0x42, 0xde, 0xe3, 0xe8, 0xf9, 0xdc, 0xb5, 0x2b, 0x39, 0x69,
|
||||
0x91, 0xac, 0xe9, 0x15, 0x28, 0xf2, 0xa1, 0x67, 0xc5, 0x30, 0x2a, 0x0b, 0x35, 0x52, 0xcf, 0x99,
|
||||
0x05, 0x3e, 0xf4, 0x76, 0xb4, 0x88, 0xde, 0x02, 0x7a, 0x88, 0xa3, 0x50, 0xf8, 0x01, 0x86, 0x96,
|
||||
0xeb, 0x0d, 0xfc, 0x40, 0xa0, 0x53, 0x59, 0xac, 0x65, 0xeb, 0xcb, 0xe6, 0x85, 0x44, 0xf3, 0x50,
|
||||
0x2b, 0xd2, 0xe6, 0x09, 0xb2, 0x25, 0x19, 0x77, 0x6c, 0x9e, 0x80, 0xdb, 0x84, 0x42, 0x80, 0x9e,
|
||||
0x2f, 0xd0, 0x62, 0x8e, 0x13, 0x54, 0xf2, 0x8a, 0x4a, 0x25, 0xda, 0x71, 0x9c, 0x80, 0x5e, 0x85,
|
||||
0xf3, 0xda, 0xc0, 0x0e, 0x34, 0xdf, 0xcb, 0xd2, 0xe8, 0x9c, 0x12, 0xb7, 0x03, 0x45, 0xf9, 0xd8,
|
||||
0xee, 0x10, 0x47, 0xca, 0x0e, 0x26, 0xed, 0xf6, 0x70, 0x24, 0xed, 0x6e, 0x00, 0x8d, 0xfd, 0xb1,
|
||||
0xb1, 0xcb, 0x82, 0x34, 0xd5, 0x1e, 0xda, 0x4c, 0x3b, 0x35, 0xee, 0x40, 0x29, 0x7d, 0x03, 0xb4,
|
||||
0x00, 0x4b, 0xbb, 0x1d, 0xf3, 0xe1, 0x87, 0x9d, 0xdd, 0xf2, 0x7f, 0x28, 0xc0, 0xe2, 0xee, 0x43,
|
||||
0xb3, 0xd3, 0xde, 0x2f, 0x93, 0xe8, 0xdb, 0xec, 0x3c, 0x7e, 0xba, 0xdf, 0x29, 0x67, 0x8c, 0x1f,
|
||||
0x09, 0x5c, 0xec, 0x38, 0xae, 0x50, 0x77, 0xd9, 0xf6, 0xf9, 0x73, 0xb7, 0x3b, 0x91, 0x3b, 0x93,
|
||||
0x07, 0x26, 0xf3, 0x1c, 0x38, 0x33, 0xe7, 0x81, 0xb3, 0xf3, 0x1f, 0x38, 0x37, 0xfd, 0xc0, 0x77,
|
||||
0xa1, 0xf2, 0x00, 0x39, 0x06, 0x4c, 0xe0, 0x63, 0x9d, 0x23, 0x26, 0x86, 0x03, 0x9f, 0x87, 0x98,
|
||||
0xca, 0x23, 0x92, 0xce, 0x23, 0xe3, 0xd7, 0x0c, 0x94, 0xe2, 0xcc, 0xd5, 0xe6, 0x33, 0x8b, 0xa4,
|
||||
0x0f, 0x17, 0xc6, 0xe9, 0x6c, 0xd9, 0x92, 0x25, 0x79, 0xd4, 0x42, 0xeb, 0xbd, 0x59, 0xb5, 0x92,
|
||||
0x8e, 0x35, 0x51, 0x26, 0x9a, 0xec, 0xf2, 0xe1, 0x09, 0x49, 0xf5, 0x07, 0x02, 0xe5, 0x93, 0x66,
|
||||
0xf4, 0x39, 0x2c, 0xa9, 0xb8, 0x61, 0x85, 0xd4, 0xb2, 0xf5, 0x42, 0xeb, 0xd1, 0x3f, 0x0c, 0xdc,
|
||||
0x50, 0x3f, 0x61, 0x87, 0x8b, 0x60, 0x64, 0xc6, 0xce, 0xab, 0xdb, 0x50, 0x9c, 0x54, 0xd0, 0x32,
|
||||
0x64, 0x0f, 0x71, 0xa4, 0x39, 0x89, 0x3e, 0xe9, 0x2a, 0x2c, 0x1c, 0xb1, 0xfe, 0x10, 0xf5, 0x5d,
|
||||
0xab, 0xc5, 0x76, 0xe6, 0x1e, 0x31, 0x3e, 0x86, 0x35, 0xd5, 0x19, 0x74, 0x45, 0x26, 0x04, 0xef,
|
||||
0xc0, 0x92, 0x46, 0x26, 0x1d, 0x15, 0x5a, 0x5b, 0xb3, 0xc0, 0xc7, 0x1e, 0xe2, 0x7d, 0xc6, 0x2e,
|
||||
0xac, 0x3c, 0x72, 0x43, 0x11, 0xd7, 0x7a, 0x9c, 0xa3, 0xb7, 0x60, 0xa5, 0x8b, 0xc2, 0x72, 0x70,
|
||||
0xe0, 0x87, 0xae, 0xb0, 0xc4, 0x4b, 0xcb, 0x61, 0x82, 0xc9, 0x28, 0x79, 0xb3, 0xdc, 0x45, 0xb1,
|
||||
0xab, 0x34, 0xfb, 0x2f, 0x77, 0x99, 0x60, 0xc6, 0x27, 0xb0, 0x9a, 0xf6, 0xa2, 0x01, 0xb6, 0x21,
|
||||
0x9f, 0x34, 0x16, 0x45, 0xef, 0xdc, 0x08, 0x93, 0x8d, 0xc6, 0x1b, 0x02, 0x4b, 0x5a, 0x4a, 0x5b,
|
||||
0xb0, 0xa6, 0xb7, 0xb9, 0xbc, 0x6b, 0x0d, 0x86, 0x07, 0x7d, 0xd7, 0xb6, 0x62, 0x22, 0x8b, 0xe6,
|
||||
0xca, 0x58, 0xf9, 0x4c, 0xea, 0xf6, 0x70, 0x14, 0x75, 0x38, 0xed, 0xcb, 0xe2, 0xcc, 0x8b, 0xf9,
|
||||
0x2d, 0x68, 0xd9, 0x13, 0xe6, 0x61, 0x54, 0x49, 0x27, 0x8f, 0x9a, 0x95, 0x0e, 0xcf, 0x39, 0x93,
|
||||
0xe7, 0x8c, 0x3a, 0xae, 0x83, 0x81, 0x7b, 0x24, 0x07, 0xc8, 0x64, 0x19, 0x95, 0xc6, 0x62, 0x59,
|
||||
0x45, 0x7b, 0x50, 0x4a, 0x2e, 0x2b, 0xa9, 0xfa, 0x31, 0x5c, 0xc5, 0x46, 0xd1, 0x84, 0x41, 0x8c,
|
||||
0x32, 0xa4, 0x15, 0x58, 0x72, 0xb9, 0xe3, 0xda, 0x18, 0x56, 0x32, 0xb5, 0x6c, 0x3d, 0x67, 0xc6,
|
||||
0x4b, 0xe3, 0x1a, 0x14, 0x76, 0x86, 0xa2, 0x17, 0x7b, 0xaa, 0x42, 0x3e, 0xe9, 0xaa, 0xba, 0x0a,
|
||||
0xe3, 0xb5, 0xf1, 0x14, 0x8a, 0xca, 0x54, 0x5f, 0xc0, 0x2a, 0x2c, 0x08, 0xff, 0x10, 0xb9, 0x36,
|
||||
0x54, 0x0b, 0x7a, 0x0d, 0xca, 0xf2, 0xc3, 0xc2, 0x97, 0x03, 0x37, 0x90, 0xa8, 0x25, 0x2b, 0x39,
|
||||
0xf3, 0xbc, 0x94, 0x77, 0x12, 0xb1, 0xf1, 0x1b, 0x81, 0xf5, 0x27, 0xbe, 0x83, 0x6d, 0x9f, 0x73,
|
||||
0xb4, 0x23, 0x51, 0xe2, 0xfb, 0x6d, 0x58, 0x3d, 0x40, 0x66, 0xfb, 0xdc, 0xe2, 0xbe, 0x83, 0x16,
|
||||
0x72, 0x67, 0xe0, 0xbb, 0x3a, 0x15, 0x97, 0x4d, 0xaa, 0x74, 0xd1, 0xde, 0x8e, 0xd6, 0xd0, 0xcb,
|
||||
0xb0, 0x6c, 0x2b, 0x3f, 0xe8, 0xc8, 0x80, 0x79, 0x73, 0x2c, 0x88, 0x08, 0x08, 0x47, 0xdc, 0x76,
|
||||
0x79, 0x57, 0x92, 0x9f, 0x37, 0xe3, 0x65, 0x74, 0x83, 0x5d, 0xe4, 0x18, 0xba, 0xa1, 0x25, 0x5c,
|
||||
0x0f, 0x25, 0xe7, 0x39, 0xb3, 0xa0, 0x65, 0xfb, 0xae, 0x87, 0xf4, 0x1e, 0x54, 0xe2, 0x1b, 0xb4,
|
||||
0x7d, 0x2e, 0x02, 0x66, 0x0b, 0xd9, 0x5e, 0x31, 0x54, 0x23, 0xad, 0x68, 0xae, 0x6b, 0x7d, 0x5b,
|
||||
0xab, 0x77, 0x94, 0xd6, 0xe8, 0xc1, 0x5a, 0xbb, 0xc7, 0x78, 0x17, 0xe3, 0x89, 0x34, 0x07, 0xcf,
|
||||
0xf4, 0x36, 0xac, 0xc5, 0xdf, 0xaa, 0x6f, 0x05, 0xde, 0x98, 0xc6, 0x65, 0x73, 0x35, 0x56, 0xb6,
|
||||
0x27, 0x74, 0xad, 0xe3, 0x05, 0x58, 0x54, 0xdd, 0x83, 0x7e, 0x47, 0xa0, 0x38, 0x39, 0xed, 0xe9,
|
||||
0xed, 0xbf, 0xf1, 0x36, 0xa8, 0x36, 0xce, 0xd6, 0xab, 0x8c, 0xab, 0xaf, 0x7e, 0xf9, 0xe3, 0xeb,
|
||||
0x4c, 0xcd, 0xb8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||||
0x46, 0xcd, 0xae, 0xb8, 0x29, 0x73, 0xb1, 0xfa, 0xce, 0xd9, 0x36, 0x69, 0x94, 0x1b, 0x12, 0x65,
|
||||
0x85, 0xae, 0x4f, 0x47, 0xd9, 0x7a, 0x4d, 0x60, 0xf1, 0x7d, 0x64, 0x7d, 0xd1, 0xa3, 0xdf, 0x10,
|
||||
0xb8, 0xf8, 0x00, 0xc5, 0xfd, 0xa4, 0x79, 0x8e, 0x1b, 0xef, 0xa9, 0xdc, 0xdd, 0x9d, 0x05, 0x6a,
|
||||
0x7a, 0x03, 0x37, 0x6e, 0x4a, 0x58, 0x57, 0xe9, 0xff, 0xd3, 0xb0, 0x7a, 0x12, 0x49, 0x53, 0x36,
|
||||
0x75, 0x3b, 0xd9, 0xd5, 0xfa, 0x2a, 0x03, 0xb9, 0x68, 0xb6, 0xd0, 0x57, 0x04, 0x16, 0x1e, 0xf9,
|
||||
0x5d, 0x97, 0xd3, 0x1b, 0x33, 0x87, 0xf9, 0x78, 0x6c, 0x55, 0x6f, 0xce, 0x67, 0x9c, 0xa6, 0xcc,
|
||||
0x58, 0x49, 0x63, 0xeb, 0x47, 0x71, 0xa3, 0xeb, 0xfc, 0x8c, 0xc0, 0xe2, 0x07, 0x6e, 0x97, 0x0f,
|
||||
0x07, 0xff, 0x26, 0x8a, 0x4d, 0x89, 0xe2, 0xbf, 0xc6, 0x89, 0x5e, 0x10, 0xca, 0xc0, 0xdb, 0xe4,
|
||||
0xfa, 0xfd, 0xe2, 0x4f, 0xc7, 0x1b, 0xe4, 0xe7, 0xe3, 0x0d, 0xf2, 0xfb, 0xf1, 0x06, 0x39, 0x58,
|
||||
0x94, 0x17, 0x73, 0xfb, 0xcf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xde, 0xef, 0xe9, 0xb0, 0xbc, 0x0e,
|
||||
0x00, 0x00,
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
@@ -973,6 +1034,7 @@ type WalletClient interface {
|
||||
EditConfig(ctx context.Context, in *EditWalletConfigRequest, opts ...grpc.CallOption) (*WalletResponse, error)
|
||||
WalletConfig(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*WalletResponse, error)
|
||||
GenerateMnemonic(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*GenerateMnemonicResponse, error)
|
||||
ChangePassword(ctx context.Context, in *ChangePasswordRequest, opts ...grpc.CallOption) (*types.Empty, error)
|
||||
}
|
||||
|
||||
type walletClient struct {
|
||||
@@ -1019,12 +1081,22 @@ func (c *walletClient) GenerateMnemonic(ctx context.Context, in *types.Empty, op
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *walletClient) ChangePassword(ctx context.Context, in *ChangePasswordRequest, opts ...grpc.CallOption) (*types.Empty, error) {
|
||||
out := new(types.Empty)
|
||||
err := c.cc.Invoke(ctx, "/ethereum.validator.accounts.v2.Wallet/ChangePassword", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// WalletServer is the server API for Wallet service.
|
||||
type WalletServer interface {
|
||||
CreateWallet(context.Context, *CreateWalletRequest) (*WalletResponse, error)
|
||||
EditConfig(context.Context, *EditWalletConfigRequest) (*WalletResponse, error)
|
||||
WalletConfig(context.Context, *types.Empty) (*WalletResponse, error)
|
||||
GenerateMnemonic(context.Context, *types.Empty) (*GenerateMnemonicResponse, error)
|
||||
ChangePassword(context.Context, *ChangePasswordRequest) (*types.Empty, error)
|
||||
}
|
||||
|
||||
// UnimplementedWalletServer can be embedded to have forward compatible implementations.
|
||||
@@ -1043,6 +1115,9 @@ func (*UnimplementedWalletServer) WalletConfig(ctx context.Context, req *types.E
|
||||
func (*UnimplementedWalletServer) GenerateMnemonic(ctx context.Context, req *types.Empty) (*GenerateMnemonicResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GenerateMnemonic not implemented")
|
||||
}
|
||||
func (*UnimplementedWalletServer) ChangePassword(ctx context.Context, req *ChangePasswordRequest) (*types.Empty, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ChangePassword not implemented")
|
||||
}
|
||||
|
||||
func RegisterWalletServer(s *grpc.Server, srv WalletServer) {
|
||||
s.RegisterService(&_Wallet_serviceDesc, srv)
|
||||
@@ -1120,6 +1195,24 @@ func _Wallet_GenerateMnemonic_Handler(srv interface{}, ctx context.Context, dec
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Wallet_ChangePassword_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ChangePasswordRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(WalletServer).ChangePassword(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/ethereum.validator.accounts.v2.Wallet/ChangePassword",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(WalletServer).ChangePassword(ctx, req.(*ChangePasswordRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _Wallet_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "ethereum.validator.accounts.v2.Wallet",
|
||||
HandlerType: (*WalletServer)(nil),
|
||||
@@ -1140,6 +1233,10 @@ var _Wallet_serviceDesc = grpc.ServiceDesc{
|
||||
MethodName: "GenerateMnemonic",
|
||||
Handler: _Wallet_GenerateMnemonic_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ChangePassword",
|
||||
Handler: _Wallet_ChangePassword_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "proto/validator/accounts/v2/web_api.proto",
|
||||
@@ -2081,6 +2178,47 @@ func (m *NodeConnectionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func (m *ChangePasswordRequest) Marshal() (dAtA []byte, err error) {
|
||||
size := m.Size()
|
||||
dAtA = make([]byte, size)
|
||||
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return dAtA[:n], nil
|
||||
}
|
||||
|
||||
func (m *ChangePasswordRequest) MarshalTo(dAtA []byte) (int, error) {
|
||||
size := m.Size()
|
||||
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||
}
|
||||
|
||||
func (m *ChangePasswordRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
i := len(dAtA)
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if m.XXX_unrecognized != nil {
|
||||
i -= len(m.XXX_unrecognized)
|
||||
copy(dAtA[i:], m.XXX_unrecognized)
|
||||
}
|
||||
if len(m.PasswordConfirmation) > 0 {
|
||||
i -= len(m.PasswordConfirmation)
|
||||
copy(dAtA[i:], m.PasswordConfirmation)
|
||||
i = encodeVarintWebApi(dAtA, i, uint64(len(m.PasswordConfirmation)))
|
||||
i--
|
||||
dAtA[i] = 0x12
|
||||
}
|
||||
if len(m.Password) > 0 {
|
||||
i -= len(m.Password)
|
||||
copy(dAtA[i:], m.Password)
|
||||
i = encodeVarintWebApi(dAtA, i, uint64(len(m.Password)))
|
||||
i--
|
||||
dAtA[i] = 0xa
|
||||
}
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func encodeVarintWebApi(dAtA []byte, offset int, v uint64) int {
|
||||
offset -= sovWebApi(v)
|
||||
base := offset
|
||||
@@ -2398,6 +2536,26 @@ func (m *NodeConnectionResponse) Size() (n int) {
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *ChangePasswordRequest) Size() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
}
|
||||
var l int
|
||||
_ = l
|
||||
l = len(m.Password)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovWebApi(uint64(l))
|
||||
}
|
||||
l = len(m.PasswordConfirmation)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovWebApi(uint64(l))
|
||||
}
|
||||
if m.XXX_unrecognized != nil {
|
||||
n += len(m.XXX_unrecognized)
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
func sovWebApi(x uint64) (n int) {
|
||||
return (math_bits.Len64(x|1) + 6) / 7
|
||||
}
|
||||
@@ -4325,6 +4483,124 @@ func (m *NodeConnectionResponse) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (m *ChangePasswordRequest) Unmarshal(dAtA []byte) error {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
for iNdEx < l {
|
||||
preIndex := iNdEx
|
||||
var wire uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowWebApi
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
wire |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
fieldNum := int32(wire >> 3)
|
||||
wireType := int(wire & 0x7)
|
||||
if wireType == 4 {
|
||||
return fmt.Errorf("proto: ChangePasswordRequest: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: ChangePasswordRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Password", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowWebApi
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return ErrInvalidLengthWebApi
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthWebApi
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Password = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 2:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field PasswordConfirmation", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowWebApi
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return ErrInvalidLengthWebApi
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthWebApi
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.PasswordConfirmation = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipWebApi(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthWebApi
|
||||
}
|
||||
if (iNdEx + skippy) < 0 {
|
||||
return ErrInvalidLengthWebApi
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
|
||||
if iNdEx > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func skipWebApi(dAtA []byte) (n int, err error) {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
|
||||
@@ -27,6 +27,12 @@ service Wallet {
|
||||
get: "/v2/validator/mnemonic/generate"
|
||||
};
|
||||
}
|
||||
rpc ChangePassword(ChangePasswordRequest) returns (google.protobuf.Empty) {
|
||||
option (google.api.http) = {
|
||||
post: "/v2/validator/wallet/password/edit",
|
||||
body: "*"
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
service Accounts {
|
||||
@@ -174,3 +180,8 @@ message NodeConnectionResponse {
|
||||
// Address of the validator deposit contract in the eth1 chain.
|
||||
bytes deposit_contract_address = 5;
|
||||
}
|
||||
|
||||
message ChangePasswordRequest {
|
||||
string password = 1;
|
||||
string password_confirmation = 2;
|
||||
}
|
||||
249
proto/validator/accounts/v2_gateway/web_api.pb.go
generated
249
proto/validator/accounts/v2_gateway/web_api.pb.go
generated
@@ -745,6 +745,53 @@ func (m *NodeConnectionResponse) GetDepositContractAddress() []byte {
|
||||
return nil
|
||||
}
|
||||
|
||||
type ChangePasswordRequest struct {
|
||||
Password string `protobuf:"bytes,1,opt,name=password,proto3" json:"password,omitempty"`
|
||||
PasswordConfirmation string `protobuf:"bytes,2,opt,name=password_confirmation,json=passwordConfirmation,proto3" json:"password_confirmation,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *ChangePasswordRequest) Reset() { *m = ChangePasswordRequest{} }
|
||||
func (m *ChangePasswordRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*ChangePasswordRequest) ProtoMessage() {}
|
||||
func (*ChangePasswordRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_8a5153635bfe042e, []int{12}
|
||||
}
|
||||
|
||||
func (m *ChangePasswordRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_ChangePasswordRequest.Unmarshal(m, b)
|
||||
}
|
||||
func (m *ChangePasswordRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_ChangePasswordRequest.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (m *ChangePasswordRequest) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_ChangePasswordRequest.Merge(m, src)
|
||||
}
|
||||
func (m *ChangePasswordRequest) XXX_Size() int {
|
||||
return xxx_messageInfo_ChangePasswordRequest.Size(m)
|
||||
}
|
||||
func (m *ChangePasswordRequest) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_ChangePasswordRequest.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_ChangePasswordRequest proto.InternalMessageInfo
|
||||
|
||||
func (m *ChangePasswordRequest) GetPassword() string {
|
||||
if m != nil {
|
||||
return m.Password
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *ChangePasswordRequest) GetPasswordConfirmation() string {
|
||||
if m != nil {
|
||||
return m.PasswordConfirmation
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterEnum("ethereum.validator.accounts.v2.CreateWalletRequest_KeymanagerKind", CreateWalletRequest_KeymanagerKind_name, CreateWalletRequest_KeymanagerKind_value)
|
||||
proto.RegisterType((*CreateWalletRequest)(nil), "ethereum.validator.accounts.v2.CreateWalletRequest")
|
||||
@@ -761,6 +808,7 @@ func init() {
|
||||
proto.RegisterType((*AuthRequest)(nil), "ethereum.validator.accounts.v2.AuthRequest")
|
||||
proto.RegisterType((*AuthResponse)(nil), "ethereum.validator.accounts.v2.AuthResponse")
|
||||
proto.RegisterType((*NodeConnectionResponse)(nil), "ethereum.validator.accounts.v2.NodeConnectionResponse")
|
||||
proto.RegisterType((*ChangePasswordRequest)(nil), "ethereum.validator.accounts.v2.ChangePasswordRequest")
|
||||
}
|
||||
|
||||
func init() {
|
||||
@@ -768,87 +816,90 @@ func init() {
|
||||
}
|
||||
|
||||
var fileDescriptor_8a5153635bfe042e = []byte{
|
||||
// 1265 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xcf, 0x6f, 0x1b, 0xc5,
|
||||
0x17, 0xff, 0xae, 0xed, 0x24, 0xce, 0xb3, 0x9b, 0xba, 0x93, 0x34, 0xdd, 0xaf, 0x5b, 0x1a, 0x77,
|
||||
0x05, 0xad, 0xfb, 0xcb, 0x46, 0x2e, 0x2d, 0x55, 0x2e, 0x28, 0x75, 0xac, 0x52, 0xa5, 0xbf, 0xb4,
|
||||
0x44, 0x20, 0xc1, 0x61, 0x35, 0xd9, 0x7d, 0x75, 0x46, 0xf1, 0xce, 0x2c, 0xbb, 0xe3, 0xb4, 0xbe,
|
||||
0x56, 0x1c, 0xb8, 0x70, 0x81, 0x03, 0x42, 0xdc, 0xfa, 0x1f, 0xf4, 0x00, 0xfc, 0x1d, 0x88, 0x0b,
|
||||
0x37, 0x2e, 0xfc, 0x21, 0x68, 0x67, 0x66, 0xd7, 0x76, 0xe4, 0xe0, 0x04, 0xc4, 0x69, 0x77, 0xde,
|
||||
0xfb, 0xcc, 0x7b, 0x9f, 0x79, 0xf3, 0x7e, 0x0c, 0x5c, 0x8f, 0x62, 0x21, 0x45, 0xfb, 0x90, 0x0e,
|
||||
0x58, 0x40, 0xa5, 0x88, 0xdb, 0xd4, 0xf7, 0xc5, 0x90, 0xcb, 0xa4, 0x7d, 0xd8, 0x69, 0xbf, 0xc4,
|
||||
0x3d, 0x8f, 0x46, 0xac, 0xa5, 0x30, 0xe4, 0x32, 0xca, 0x7d, 0x8c, 0x71, 0x18, 0xb6, 0x72, 0x74,
|
||||
0x2b, 0x43, 0xb7, 0x0e, 0x3b, 0xf5, 0x4b, 0x7d, 0x21, 0xfa, 0x03, 0x6c, 0xd3, 0x88, 0xb5, 0x29,
|
||||
0xe7, 0x42, 0x52, 0xc9, 0x04, 0x4f, 0xf4, 0xee, 0xfa, 0x45, 0xa3, 0x55, 0xab, 0xbd, 0xe1, 0x8b,
|
||||
0x36, 0x86, 0x91, 0x1c, 0x69, 0xa5, 0xf3, 0x53, 0x09, 0x56, 0xbb, 0x31, 0x52, 0x89, 0x9f, 0xd1,
|
||||
0xc1, 0x00, 0xa5, 0x8b, 0x5f, 0x0e, 0x31, 0x91, 0x64, 0x03, 0x2a, 0x2f, 0x95, 0xc0, 0x8b, 0xa8,
|
||||
0xdc, 0xb7, 0xad, 0x86, 0xd5, 0x5c, 0x76, 0x41, 0x8b, 0x9e, 0x53, 0xb9, 0x4f, 0xf6, 0x00, 0x0e,
|
||||
0x70, 0x14, 0x52, 0x4e, 0xfb, 0x18, 0xdb, 0x85, 0x86, 0xd5, 0x5c, 0xe9, 0x3c, 0x68, 0xfd, 0x3d,
|
||||
0xd1, 0xd6, 0x0c, 0x4f, 0xad, 0x9d, 0xdc, 0xca, 0x0e, 0xe3, 0x81, 0x3b, 0x61, 0x95, 0x5c, 0x83,
|
||||
0xb3, 0x39, 0x89, 0x24, 0x79, 0x29, 0xe2, 0xc0, 0x2e, 0x2a, 0x22, 0x2b, 0x19, 0x11, 0x2d, 0x25,
|
||||
0x75, 0x28, 0x87, 0x1c, 0x43, 0xc1, 0x99, 0x6f, 0x97, 0x14, 0x22, 0x5f, 0x93, 0x2b, 0x50, 0xe5,
|
||||
0xc3, 0xd0, 0xcb, 0x68, 0xd8, 0x0b, 0x0d, 0xab, 0x59, 0x72, 0x2b, 0x7c, 0x18, 0x6e, 0x19, 0x11,
|
||||
0xb9, 0x0d, 0xe4, 0x00, 0x47, 0x89, 0x14, 0x31, 0x26, 0x1e, 0x0b, 0x23, 0x11, 0x4b, 0x0c, 0xec,
|
||||
0xc5, 0x46, 0xb1, 0xb9, 0xec, 0x9e, 0xcb, 0x35, 0x8f, 0x8c, 0x62, 0x1a, 0x9e, 0x33, 0x5b, 0x52,
|
||||
0x7e, 0xc7, 0xf0, 0x9c, 0xdc, 0x06, 0x54, 0x62, 0x0c, 0x85, 0x44, 0x8f, 0x06, 0x41, 0x6c, 0x97,
|
||||
0x75, 0x28, 0xb5, 0x68, 0x2b, 0x08, 0x62, 0x72, 0x15, 0xce, 0x1a, 0x80, 0x1f, 0x9b, 0x78, 0x2f,
|
||||
0x2b, 0xd0, 0x19, 0x2d, 0xee, 0xc6, 0x3a, 0xe4, 0x63, 0xdc, 0x01, 0x8e, 0x34, 0x0e, 0x26, 0x71,
|
||||
0x3b, 0x38, 0x52, 0xb8, 0x9b, 0x40, 0x32, 0x7b, 0x74, 0x6c, 0xb2, 0xa2, 0xa0, 0xc6, 0x42, 0x97,
|
||||
0x1a, 0xa3, 0xce, 0x5d, 0x58, 0x99, 0xbe, 0x01, 0x52, 0x81, 0xa5, 0xed, 0x9e, 0xfb, 0xe8, 0xd3,
|
||||
0xde, 0x76, 0xed, 0x7f, 0x04, 0x60, 0x71, 0xfb, 0x91, 0xdb, 0xeb, 0xee, 0xd6, 0xac, 0xf4, 0xdf,
|
||||
0xed, 0x3d, 0x79, 0xb6, 0xdb, 0xab, 0x15, 0x9c, 0x5f, 0x2c, 0xb8, 0xd0, 0x0b, 0x98, 0xd4, 0x77,
|
||||
0xd9, 0x15, 0xfc, 0x05, 0xeb, 0x4f, 0xe4, 0xce, 0xe4, 0x81, 0xad, 0x93, 0x1c, 0xb8, 0x70, 0xc2,
|
||||
0x03, 0x17, 0x4f, 0x7e, 0xe0, 0xd2, 0xec, 0x03, 0xdf, 0x03, 0xfb, 0x21, 0x72, 0x8c, 0xa9, 0xc4,
|
||||
0x27, 0x26, 0x47, 0x5c, 0x4c, 0x22, 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0xa6, 0xad, 0x18, 0x82, 0x5d, 0x28, 0xe7, 0x8d, 0x45, 0x87, 0xf7, 0xc4,
|
||||
0x0c, 0xf3, 0x8d, 0xce, 0x5b, 0x0b, 0x96, 0x8c, 0x94, 0x74, 0xe0, 0xbc, 0xd9, 0xc6, 0x78, 0xdf,
|
||||
0x8b, 0x86, 0x7b, 0x03, 0xe6, 0x7b, 0x59, 0x20, 0xab, 0xee, 0xea, 0x58, 0xf9, 0x5c, 0xe9, 0x76,
|
||||
0x70, 0x94, 0x76, 0x38, 0x63, 0xcb, 0xe3, 0x34, 0xcc, 0xe2, 0x5b, 0x31, 0xb2, 0xa7, 0x34, 0xc4,
|
||||
0xb4, 0x92, 0x8e, 0x1e, 0xb5, 0xa8, 0x0c, 0x9e, 0x09, 0x26, 0xcf, 0x99, 0x76, 0xdc, 0x00, 0x63,
|
||||
0x76, 0xa8, 0x06, 0xc8, 0x64, 0x19, 0xad, 0x8c, 0xc5, 0xaa, 0x8a, 0x76, 0x60, 0x25, 0xbf, 0xac,
|
||||
0xbc, 0xea, 0xc7, 0x74, 0x75, 0x34, 0xaa, 0x2e, 0x44, 0x19, 0xcb, 0x84, 0xd8, 0xb0, 0xc4, 0x78,
|
||||
0xc0, 0x7c, 0x4c, 0xec, 0x42, 0xa3, 0xd8, 0x2c, 0xb9, 0xd9, 0xd2, 0xb9, 0x0e, 0x95, 0xad, 0xa1,
|
||||
0xdc, 0xcf, 0x2c, 0xd5, 0xa1, 0x9c, 0x77, 0x55, 0x53, 0x85, 0xd9, 0xda, 0x79, 0x06, 0x55, 0x0d,
|
||||
0x35, 0x17, 0xb0, 0x06, 0x0b, 0x52, 0x1c, 0x20, 0x37, 0x40, 0xbd, 0x20, 0xd7, 0xa1, 0xa6, 0x7e,
|
||||
0x3c, 0x7c, 0x15, 0xb1, 0x58, 0xb1, 0x56, 0x51, 0x29, 0xb9, 0x67, 0x95, 0xbc, 0x97, 0x8b, 0x9d,
|
||||
0x3f, 0x2c, 0x58, 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 0x3f, 0xdf,
|
||||
0xd5, 0xf9, 0xb6, 0x00, 0xa5, 0xb4, 0xc1, 0x92, 0xd7, 0x16, 0x2c, 0x3c, 0x16, 0x7d, 0xc6, 0xc9,
|
||||
0xcd, 0xb9, 0x13, 0x6d, 0xdc, 0xbb, 0xeb, 0xb7, 0x4e, 0x06, 0x9e, 0x0e, 0x99, 0xb3, 0x3a, 0xcd,
|
||||
0x6d, 0x90, 0xfa, 0x4d, 0xaf, 0xf3, 0x2b, 0x0b, 0x16, 0x3f, 0x61, 0x7d, 0x3e, 0x8c, 0xfe, 0x4b,
|
||||
0x16, 0x1b, 0x8a, 0xc5, 0xff, 0x9d, 0x23, 0xa5, 0x97, 0x28, 0xc7, 0x9b, 0xd6, 0x8d, 0xbd, 0x45,
|
||||
0x75, 0x15, 0x77, 0xfe, 0x0a, 0x00, 0x00, 0xff, 0xff, 0x0c, 0xb7, 0x90, 0x4f, 0xb3, 0x0d, 0x00,
|
||||
0x00,
|
||||
// 1328 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0x4d, 0x6f, 0xdb, 0x46,
|
||||
0x13, 0x7e, 0x29, 0xc9, 0xb6, 0x3c, 0x52, 0x14, 0x65, 0xfd, 0x11, 0xbd, 0x4a, 0xde, 0x58, 0x21,
|
||||
0xde, 0xc6, 0xca, 0x97, 0x54, 0x28, 0x4d, 0x1a, 0xf8, 0x52, 0x38, 0xb2, 0x90, 0x06, 0xce, 0x17,
|
||||
0x58, 0xa3, 0x05, 0xda, 0x03, 0xb1, 0x26, 0x27, 0x14, 0x61, 0x71, 0xc9, 0x92, 0x2b, 0x27, 0xba,
|
||||
0x06, 0x3d, 0xf4, 0xd2, 0x1e, 0xda, 0x43, 0x51, 0xf4, 0x96, 0x7f, 0x90, 0x43, 0xdb, 0x1f, 0xd2,
|
||||
0x4b, 0x6f, 0x05, 0x8a, 0xfe, 0x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f, 0x41, 0x44, 0xd1, 0x4b, 0x3f, 0xb4, 0x1b, 0x45, 0x01, 0xa4, 0x96, 0x00,
|
||||
0x91, 0x52, 0xd2, 0x84, 0xb2, 0xc7, 0xd0, 0xf3, 0x99, 0x6b, 0x35, 0x4a, 0xc2, 0x22, 0x5d, 0x93,
|
||||
0xab, 0x50, 0x65, 0x63, 0xcf, 0x4c, 0x60, 0x34, 0x96, 0x5a, 0x5a, 0xbb, 0x64, 0x54, 0xd8, 0xd8,
|
||||
0xdb, 0x55, 0x22, 0x72, 0x1b, 0xc8, 0x11, 0x4e, 0x22, 0xee, 0x87, 0x18, 0x99, 0xae, 0x17, 0xf8,
|
||||
0x21, 0x47, 0xbb, 0xb1, 0xdc, 0x2a, 0xb6, 0x57, 0x8d, 0x0b, 0xa9, 0xe6, 0x91, 0x52, 0xe4, 0xcd,
|
||||
0x53, 0x64, 0x2b, 0x22, 0x6e, 0x66, 0x9e, 0x82, 0xdb, 0x82, 0x4a, 0x88, 0x9e, 0xcf, 0xd1, 0xa4,
|
||||
0xb6, 0x1d, 0x36, 0xca, 0x92, 0x4a, 0x29, 0xda, 0xb5, 0xed, 0x90, 0x5c, 0x83, 0xf3, 0xca, 0xc0,
|
||||
0x0a, 0x15, 0xdf, 0xab, 0xc2, 0xe8, 0x9c, 0x14, 0xf7, 0x43, 0x49, 0x79, 0x66, 0x77, 0x84, 0x13,
|
||||
0x69, 0x07, 0xd3, 0x76, 0xfb, 0x38, 0x11, 0x76, 0x37, 0x81, 0x24, 0xfe, 0x68, 0xe6, 0xb2, 0x22,
|
||||
0x4c, 0x95, 0x87, 0x3e, 0x55, 0x4e, 0xf5, 0xbb, 0x50, 0xcb, 0xdf, 0x00, 0xa9, 0xc0, 0xca, 0xde,
|
||||
0xc0, 0x78, 0xf4, 0xf1, 0x60, 0xaf, 0xfe, 0x1f, 0x02, 0xb0, 0xbc, 0xf7, 0xc8, 0x18, 0xf4, 0x0f,
|
||||
0xea, 0x5a, 0xfc, 0x6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xd6, 0xf5, 0x99, 0x97, 0x92,
|
||||
0x24, 0x7a, 0x72, 0x2d, 0xbd, 0xb7, 0x05, 0x28, 0xa7, 0x2f, 0xc7, 0x2f, 0x35, 0x38, 0x97, 0x1b,
|
||||
0x5d, 0xa7, 0x52, 0x75, 0x77, 0xb1, 0xfc, 0x3f, 0x31, 0x01, 0xf5, 0xb6, 0x00, 0xa7, 0xeb, 0xff,
|
||||
0xcb, 0x83, 0x4b, 0xff, 0x2b, 0x64, 0x39, 0xfd, 0xbd, 0x06, 0xd5, 0xe9, 0x19, 0x35, 0xbf, 0xe2,
|
||||
0x66, 0xcc, 0xc5, 0xe6, 0x7b, 0x67, 0xdb, 0xa4, 0x50, 0x5e, 0x11, 0x28, 0x1b, 0x64, 0x73, 0x36,
|
||||
0xca, 0xde, 0x1b, 0x0d, 0x96, 0x3f, 0x44, 0x3a, 0xe2, 0x43, 0xf2, 0x9d, 0x06, 0x17, 0x1f, 0x22,
|
||||
0x7f, 0x90, 0x36, 0xcf, 0xac, 0xf1, 0x9e, 0xca, 0xdd, 0xbd, 0x79, 0xa0, 0x66, 0x37, 0x70, 0xfd,
|
||||
0x96, 0x80, 0x75, 0x8d, 0xfc, 0x3f, 0x0f, 0x6b, 0x28, 0x90, 0x74, 0x45, 0x53, 0xb7, 0xd2, 0x5d,
|
||||
0xbd, 0x6f, 0x0a, 0x50, 0x8a, 0x67, 0x0b, 0x79, 0xad, 0xc1, 0xd2, 0x63, 0xdf, 0x71, 0x19, 0xb9,
|
||||
0x39, 0x77, 0x98, 0x67, 0x63, 0xab, 0x79, 0x6b, 0x31, 0xe3, 0x3c, 0x65, 0xfa, 0x5a, 0x1e, 0xdb,
|
||||
0x28, 0x8e, 0x1b, 0x5f, 0xe7, 0x17, 0x1a, 0x2c, 0x7f, 0xe4, 0x3a, 0x6c, 0x1c, 0xfc, 0x9b, 0x28,
|
||||
0xb6, 0x04, 0x8a, 0xff, 0xea, 0x27, 0x7a, 0x41, 0x24, 0x02, 0xef, 0x68, 0x37, 0x0e, 0x97, 0xc5,
|
||||
0x55, 0xdc, 0xf9, 0x33, 0x00, 0x00, 0xff, 0xff, 0x8f, 0xa2, 0xc4, 0x63, 0xae, 0x0e, 0x00, 0x00,
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
@@ -867,6 +918,7 @@ type WalletClient interface {
|
||||
EditConfig(ctx context.Context, in *EditWalletConfigRequest, opts ...grpc.CallOption) (*WalletResponse, error)
|
||||
WalletConfig(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*WalletResponse, error)
|
||||
GenerateMnemonic(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*GenerateMnemonicResponse, error)
|
||||
ChangePassword(ctx context.Context, in *ChangePasswordRequest, opts ...grpc.CallOption) (*empty.Empty, error)
|
||||
}
|
||||
|
||||
type walletClient struct {
|
||||
@@ -913,12 +965,22 @@ func (c *walletClient) GenerateMnemonic(ctx context.Context, in *empty.Empty, op
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *walletClient) ChangePassword(ctx context.Context, in *ChangePasswordRequest, opts ...grpc.CallOption) (*empty.Empty, error) {
|
||||
out := new(empty.Empty)
|
||||
err := c.cc.Invoke(ctx, "/ethereum.validator.accounts.v2.Wallet/ChangePassword", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// WalletServer is the server API for Wallet service.
|
||||
type WalletServer interface {
|
||||
CreateWallet(context.Context, *CreateWalletRequest) (*WalletResponse, error)
|
||||
EditConfig(context.Context, *EditWalletConfigRequest) (*WalletResponse, error)
|
||||
WalletConfig(context.Context, *empty.Empty) (*WalletResponse, error)
|
||||
GenerateMnemonic(context.Context, *empty.Empty) (*GenerateMnemonicResponse, error)
|
||||
ChangePassword(context.Context, *ChangePasswordRequest) (*empty.Empty, error)
|
||||
}
|
||||
|
||||
// UnimplementedWalletServer can be embedded to have forward compatible implementations.
|
||||
@@ -937,6 +999,9 @@ func (*UnimplementedWalletServer) WalletConfig(ctx context.Context, req *empty.E
|
||||
func (*UnimplementedWalletServer) GenerateMnemonic(ctx context.Context, req *empty.Empty) (*GenerateMnemonicResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GenerateMnemonic not implemented")
|
||||
}
|
||||
func (*UnimplementedWalletServer) ChangePassword(ctx context.Context, req *ChangePasswordRequest) (*empty.Empty, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ChangePassword not implemented")
|
||||
}
|
||||
|
||||
func RegisterWalletServer(s *grpc.Server, srv WalletServer) {
|
||||
s.RegisterService(&_Wallet_serviceDesc, srv)
|
||||
@@ -1014,6 +1079,24 @@ func _Wallet_GenerateMnemonic_Handler(srv interface{}, ctx context.Context, dec
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Wallet_ChangePassword_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ChangePasswordRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(WalletServer).ChangePassword(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/ethereum.validator.accounts.v2.Wallet/ChangePassword",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(WalletServer).ChangePassword(ctx, req.(*ChangePasswordRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _Wallet_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "ethereum.validator.accounts.v2.Wallet",
|
||||
HandlerType: (*WalletServer)(nil),
|
||||
@@ -1034,6 +1117,10 @@ var _Wallet_serviceDesc = grpc.ServiceDesc{
|
||||
MethodName: "GenerateMnemonic",
|
||||
Handler: _Wallet_GenerateMnemonic_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ChangePassword",
|
||||
Handler: _Wallet_ChangePassword_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "proto/validator/accounts/v2/web_api.proto",
|
||||
|
||||
@@ -136,6 +136,40 @@ func local_request_Wallet_GenerateMnemonic_0(ctx context.Context, marshaler runt
|
||||
|
||||
}
|
||||
|
||||
func request_Wallet_ChangePassword_0(ctx context.Context, marshaler runtime.Marshaler, client WalletClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq ChangePasswordRequest
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
newReader, berr := utilities.IOReaderFactory(req.Body)
|
||||
if berr != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
||||
}
|
||||
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
msg, err := client.ChangePassword(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func local_request_Wallet_ChangePassword_0(ctx context.Context, marshaler runtime.Marshaler, server WalletServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq ChangePasswordRequest
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
newReader, berr := utilities.IOReaderFactory(req.Body)
|
||||
if berr != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
||||
}
|
||||
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
msg, err := server.ChangePassword(ctx, &protoReq)
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func request_Accounts_CreateAccount_0(ctx context.Context, marshaler runtime.Marshaler, client AccountsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq empty.Empty
|
||||
var metadata runtime.ServerMetadata
|
||||
@@ -377,6 +411,26 @@ func RegisterWalletHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("POST", pattern_Wallet_ChangePassword_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Wallet_ChangePassword_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_Wallet_ChangePassword_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -622,6 +676,26 @@ func RegisterWalletHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("POST", pattern_Wallet_ChangePassword_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_Wallet_ChangePassword_0(rctx, inboundMarshaler, client, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_Wallet_ChangePassword_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -633,6 +707,8 @@ var (
|
||||
pattern_Wallet_WalletConfig_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v2", "validator", "wallet"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_Wallet_GenerateMnemonic_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v2", "validator", "mnemonic", "generate"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_Wallet_ChangePassword_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"v2", "validator", "wallet", "password", "edit"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -643,6 +719,8 @@ var (
|
||||
forward_Wallet_WalletConfig_0 = runtime.ForwardResponseMessage
|
||||
|
||||
forward_Wallet_GenerateMnemonic_0 = runtime.ForwardResponseMessage
|
||||
|
||||
forward_Wallet_ChangePassword_0 = runtime.ForwardResponseMessage
|
||||
)
|
||||
|
||||
// RegisterAccountsHandlerFromEndpoint is same as RegisterAccountsHandler but
|
||||
|
||||
@@ -403,6 +403,32 @@ func (dr *Keymanager) DepositDataForAccount(accountIndex uint64) ([]byte, error)
|
||||
return tx.Data(), nil
|
||||
}
|
||||
|
||||
// RefreshWalletPassword encrypts the seed config with the wallet password and
|
||||
// writes it to disk, such as when the wallet password was modified by the user.
|
||||
func (dr *Keymanager) RefreshWalletPassword(ctx context.Context) error {
|
||||
encryptor := keystorev4.New()
|
||||
encryptedFields, err := encryptor.Encrypt(dr.seed, dr.wallet.Password())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
newConfig := &SeedConfig{
|
||||
Crypto: encryptedFields,
|
||||
ID: dr.seedCfg.ID,
|
||||
NextAccount: dr.seedCfg.NextAccount,
|
||||
Version: dr.seedCfg.Version,
|
||||
Name: dr.seedCfg.Name,
|
||||
}
|
||||
dr.seedCfg = newConfig
|
||||
encodedSeedFile, err := marshalEncryptedSeedFile(newConfig)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "could not marshal encrypted wallet seed file")
|
||||
}
|
||||
if err = dr.wallet.WriteEncryptedSeedToDisk(ctx, encodedSeedFile); err != nil {
|
||||
return errors.Wrap(err, "could not write encrypted wallet seed config to disk")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Append the public and the secret key for the provided secret key to their respective caches
|
||||
func (dr *Keymanager) appendKeysToCaches(secretKey bls.SecretKey) error {
|
||||
publicKey := bytesutil.ToBytes48(secretKey.PublicKey().Marshal())
|
||||
|
||||
@@ -194,3 +194,46 @@ func TestDerivedKeymanager_Sign_NoPublicKeyInCache(t *testing.T) {
|
||||
assert.NotNil(t, err)
|
||||
assert.Equal(t, strings.Contains(err.Error(), "no signing key found"), true)
|
||||
}
|
||||
|
||||
func TestDerivedKeymanager_RefreshWalletPassword(t *testing.T) {
|
||||
password := "secretPassw0rd$1999"
|
||||
wallet := &mock.Wallet{
|
||||
Files: make(map[string]map[string][]byte),
|
||||
AccountPasswords: make(map[string]string),
|
||||
WalletPassword: password,
|
||||
}
|
||||
dr := &Keymanager{
|
||||
wallet: wallet,
|
||||
}
|
||||
seedCfg, err := initializeWalletSeedFile(wallet.Password(), true /* skip mnemonic confirm */)
|
||||
require.NoError(t, err)
|
||||
dr.seedCfg = seedCfg
|
||||
decryptor := keystorev4.New()
|
||||
seed, err := decryptor.Decrypt(dr.seedCfg.Crypto, wallet.Password())
|
||||
require.NoError(t, err)
|
||||
dr.seed = seed
|
||||
require.NoError(t, dr.initializeKeysCachesFromSeed())
|
||||
|
||||
// First, generate some accounts.
|
||||
numAccounts := 2
|
||||
ctx := context.Background()
|
||||
for i := 0; i < numAccounts; i++ {
|
||||
_, err := dr.CreateAccount(ctx, false /*logAccountInfo*/)
|
||||
require.NoError(t, err)
|
||||
}
|
||||
|
||||
// We attempt to decrypt with the wallet password and expect no error.
|
||||
_, err = decryptor.Decrypt(dr.seedCfg.Crypto, dr.wallet.Password())
|
||||
require.NoError(t, err)
|
||||
|
||||
// We change the wallet password.
|
||||
wallet.WalletPassword = "NewPassw0rdz9**#"
|
||||
// Attempting to decrypt with this new wallet password should fail.
|
||||
_, err = decryptor.Decrypt(dr.seedCfg.Crypto, dr.wallet.Password())
|
||||
require.ErrorContains(t, "invalid checksum", err)
|
||||
|
||||
// Call the refresh wallet password method, then attempting to decrypt should work.
|
||||
require.NoError(t, dr.RefreshWalletPassword(ctx))
|
||||
_, err = decryptor.Decrypt(dr.seedCfg.Crypto, dr.wallet.Password())
|
||||
require.NoError(t, err)
|
||||
}
|
||||
|
||||
@@ -348,6 +348,24 @@ func (dr *Keymanager) Sign(ctx context.Context, req *validatorpb.SignRequest) (b
|
||||
return secretKey.Sign(req.SigningRoot), nil
|
||||
}
|
||||
|
||||
// RefreshWalletPassword re-encrypts the accounts store and stores
|
||||
// it to disk using a wallet's password which was recently changed.
|
||||
func (dr *Keymanager) RefreshWalletPassword(ctx context.Context) error {
|
||||
newStore, err := dr.createAccountsKeystore(ctx, dr.accountsStore.PrivateKeys, dr.accountsStore.PublicKeys)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
// Write the encoded keystore.
|
||||
encoded, err := json.MarshalIndent(newStore, "", "\t")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := dr.wallet.WriteFileAtPath(ctx, AccountsPath, accountsKeystoreFileName, encoded); err != nil {
|
||||
return errors.Wrap(err, "could not write keystore file for accounts")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (dr *Keymanager) initializeAccountKeystore(ctx context.Context) error {
|
||||
encoded, err := dr.wallet.ReadFileAtPath(ctx, AccountsPath, accountsKeystoreFileName)
|
||||
if err != nil && strings.Contains(err.Error(), "no files found") {
|
||||
|
||||
@@ -229,3 +229,55 @@ func TestDirectKeymanager_Sign_NoPublicKeyInCache(t *testing.T) {
|
||||
_, err := dr.Sign(context.Background(), req)
|
||||
assert.ErrorContains(t, "no signing key found in keys cache", err)
|
||||
}
|
||||
|
||||
func TestDirectKeymanager_RefreshWalletPassword(t *testing.T) {
|
||||
password := "secretPassw0rd$1999"
|
||||
wallet := &mock.Wallet{
|
||||
Files: make(map[string]map[string][]byte),
|
||||
AccountPasswords: make(map[string]string),
|
||||
WalletPassword: password,
|
||||
}
|
||||
dr := &Keymanager{
|
||||
wallet: wallet,
|
||||
accountsStore: &AccountStore{},
|
||||
}
|
||||
|
||||
ctx := context.Background()
|
||||
numAccounts := 5
|
||||
for i := 0; i < numAccounts; i++ {
|
||||
_, err := dr.CreateAccount(ctx)
|
||||
require.NoError(t, err)
|
||||
}
|
||||
|
||||
var encodedKeystore []byte
|
||||
for k, v := range wallet.Files[AccountsPath] {
|
||||
if strings.Contains(k, "keystore") {
|
||||
encodedKeystore = v
|
||||
}
|
||||
}
|
||||
keystoreFile := &v2keymanager.Keystore{}
|
||||
require.NoError(t, json.Unmarshal(encodedKeystore, keystoreFile))
|
||||
|
||||
// We attempt to decrypt with the wallet password and expect no error.
|
||||
decryptor := keystorev4.New()
|
||||
_, err := decryptor.Decrypt(keystoreFile.Crypto, dr.wallet.Password())
|
||||
require.NoError(t, err)
|
||||
|
||||
// We change the wallet password.
|
||||
wallet.WalletPassword = "NewPassw0rdz9**#"
|
||||
// Attempting to decrypt with this new wallet password should fail.
|
||||
_, err = decryptor.Decrypt(keystoreFile.Crypto, dr.wallet.Password())
|
||||
require.ErrorContains(t, "invalid checksum", err)
|
||||
|
||||
// Call the refresh wallet password method, then attempting to decrypt should work.
|
||||
require.NoError(t, dr.RefreshWalletPassword(ctx))
|
||||
for k, v := range wallet.Files[AccountsPath] {
|
||||
if strings.Contains(k, "keystore") {
|
||||
encodedKeystore = v
|
||||
}
|
||||
}
|
||||
keystoreFile = &v2keymanager.Keystore{}
|
||||
require.NoError(t, json.Unmarshal(encodedKeystore, keystoreFile))
|
||||
_, err = decryptor.Decrypt(keystoreFile.Crypto, dr.wallet.Password())
|
||||
require.NoError(t, err)
|
||||
}
|
||||
|
||||
@@ -13,6 +13,8 @@ import (
|
||||
"github.com/prysmaticlabs/prysm/validator/accounts/v2/wallet"
|
||||
"github.com/prysmaticlabs/prysm/validator/flags"
|
||||
v2keymanager "github.com/prysmaticlabs/prysm/validator/keymanager/v2"
|
||||
"github.com/prysmaticlabs/prysm/validator/keymanager/v2/derived"
|
||||
"github.com/prysmaticlabs/prysm/validator/keymanager/v2/direct"
|
||||
"github.com/tyler-smith/go-bip39"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
@@ -125,3 +127,44 @@ func (s *Server) GenerateMnemonic(ctx context.Context, _ *ptypes.Empty) (*pb.Gen
|
||||
Mnemonic: mnemonic,
|
||||
}, nil
|
||||
}
|
||||
|
||||
// ChangePassword allows changing a wallet password via the API as
|
||||
// an authenticated method.
|
||||
func (s *Server) ChangePassword(ctx context.Context, req *pb.ChangePasswordRequest) (*ptypes.Empty, error) {
|
||||
err := wallet.Exists(defaultWalletPath)
|
||||
if err != nil && errors.Is(err, wallet.ErrNoWalletFound) {
|
||||
return nil, status.Error(codes.FailedPrecondition, "No wallet found")
|
||||
}
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.Internal, "Could not check if wallet exists: %v", err)
|
||||
}
|
||||
if req.Password == "" {
|
||||
return nil, status.Error(codes.InvalidArgument, "Password cannot be empty")
|
||||
}
|
||||
if req.Password != req.PasswordConfirmation {
|
||||
return nil, status.Error(codes.InvalidArgument, "Password does not match confirmation")
|
||||
}
|
||||
switch s.wallet.KeymanagerKind() {
|
||||
case v2keymanager.Direct:
|
||||
km, ok := s.keymanager.(*direct.Keymanager)
|
||||
if !ok {
|
||||
return nil, status.Error(codes.FailedPrecondition, "Not a valid direct keymanager")
|
||||
}
|
||||
s.wallet.SetPassword(req.Password)
|
||||
if err := km.RefreshWalletPassword(ctx); err != nil {
|
||||
return nil, status.Errorf(codes.Internal, "Could not refresh wallet password: %v", err)
|
||||
}
|
||||
case v2keymanager.Derived:
|
||||
km, ok := s.keymanager.(*derived.Keymanager)
|
||||
if !ok {
|
||||
return nil, status.Error(codes.FailedPrecondition, "Not a valid derived keymanager")
|
||||
}
|
||||
s.wallet.SetPassword(req.Password)
|
||||
if err := km.RefreshWalletPassword(ctx); err != nil {
|
||||
return nil, status.Errorf(codes.Internal, "Could not refresh wallet password: %v", err)
|
||||
}
|
||||
case v2keymanager.Remote:
|
||||
return nil, status.Error(codes.Internal, "Cannot change password for remote keymanager")
|
||||
}
|
||||
return &ptypes.Empty{}, nil
|
||||
}
|
||||
|
||||
@@ -118,3 +118,99 @@ func TestServer_WalletConfig(t *testing.T) {
|
||||
WalletPath: localWalletDir,
|
||||
})
|
||||
}
|
||||
|
||||
func TestServer_ChangePassword_Preconditions(t *testing.T) {
|
||||
localWalletDir := setupWalletDir(t)
|
||||
defaultWalletPath = localWalletDir
|
||||
ctx := context.Background()
|
||||
strongPass := "29384283xasjasd32%%&*@*#*"
|
||||
ss := &Server{}
|
||||
_, err := ss.ChangePassword(ctx, &pb.ChangePasswordRequest{
|
||||
Password: "",
|
||||
})
|
||||
assert.ErrorContains(t, "No wallet found", err)
|
||||
// We attempt to create the wallet.
|
||||
w, err := v2.CreateWalletWithKeymanager(ctx, &v2.CreateWalletConfig{
|
||||
WalletCfg: &wallet.Config{
|
||||
WalletDir: defaultWalletPath,
|
||||
KeymanagerKind: v2keymanager.Direct,
|
||||
WalletPassword: strongPass,
|
||||
},
|
||||
SkipMnemonicConfirm: true,
|
||||
})
|
||||
require.NoError(t, err)
|
||||
km, err := w.InitializeKeymanager(ctx, true /* skip mnemonic confirm */)
|
||||
require.NoError(t, err)
|
||||
ss.wallet = w
|
||||
ss.walletInitialized = true
|
||||
ss.keymanager = km
|
||||
_, err = ss.ChangePassword(ctx, &pb.ChangePasswordRequest{
|
||||
Password: "",
|
||||
})
|
||||
assert.ErrorContains(t, "cannot be empty", err)
|
||||
_, err = ss.ChangePassword(ctx, &pb.ChangePasswordRequest{
|
||||
Password: "abc",
|
||||
PasswordConfirmation: "def",
|
||||
})
|
||||
assert.ErrorContains(t, "does not match", err)
|
||||
}
|
||||
|
||||
func TestServer_ChangePassword_DirectKeymanager(t *testing.T) {
|
||||
localWalletDir := setupWalletDir(t)
|
||||
defaultWalletPath = localWalletDir
|
||||
ctx := context.Background()
|
||||
strongPass := "29384283xasjasd32%%&*@*#*"
|
||||
// We attempt to create the wallet.
|
||||
w, err := v2.CreateWalletWithKeymanager(ctx, &v2.CreateWalletConfig{
|
||||
WalletCfg: &wallet.Config{
|
||||
WalletDir: defaultWalletPath,
|
||||
KeymanagerKind: v2keymanager.Direct,
|
||||
WalletPassword: strongPass,
|
||||
},
|
||||
SkipMnemonicConfirm: true,
|
||||
})
|
||||
require.NoError(t, err)
|
||||
km, err := w.InitializeKeymanager(ctx, true /* skip mnemonic confirm */)
|
||||
require.NoError(t, err)
|
||||
ss := &Server{}
|
||||
ss.wallet = w
|
||||
ss.walletInitialized = true
|
||||
ss.keymanager = km
|
||||
newPassword := "NewPassw0rdz%%%%pass"
|
||||
_, err = ss.ChangePassword(ctx, &pb.ChangePasswordRequest{
|
||||
Password: newPassword,
|
||||
PasswordConfirmation: newPassword,
|
||||
})
|
||||
require.NoError(t, err)
|
||||
assert.Equal(t, w.Password(), newPassword)
|
||||
}
|
||||
|
||||
func TestServer_ChangePassword_DerivedKeymanager(t *testing.T) {
|
||||
localWalletDir := setupWalletDir(t)
|
||||
defaultWalletPath = localWalletDir
|
||||
ctx := context.Background()
|
||||
strongPass := "29384283xasjasd32%%&*@*#*"
|
||||
// We attempt to create the wallet.
|
||||
w, err := v2.CreateWalletWithKeymanager(ctx, &v2.CreateWalletConfig{
|
||||
WalletCfg: &wallet.Config{
|
||||
WalletDir: defaultWalletPath,
|
||||
KeymanagerKind: v2keymanager.Derived,
|
||||
WalletPassword: strongPass,
|
||||
},
|
||||
SkipMnemonicConfirm: true,
|
||||
})
|
||||
require.NoError(t, err)
|
||||
km, err := w.InitializeKeymanager(ctx, true /* skip mnemonic confirm */)
|
||||
require.NoError(t, err)
|
||||
ss := &Server{}
|
||||
ss.wallet = w
|
||||
ss.walletInitialized = true
|
||||
ss.keymanager = km
|
||||
newPassword := "NewPassw0rdz%%%%pass"
|
||||
_, err = ss.ChangePassword(ctx, &pb.ChangePasswordRequest{
|
||||
Password: newPassword,
|
||||
PasswordConfirmation: newPassword,
|
||||
})
|
||||
require.NoError(t, err)
|
||||
assert.Equal(t, w.Password(), newPassword)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user