diff --git a/Makefile b/Makefile index 4978416d..5727432f 100644 --- a/Makefile +++ b/Makefile @@ -26,6 +26,7 @@ proto: protoc --gogofaster_out=$(PKGMAP):. --go-drpc_out=protolib=github.com/gogo/protobuf:. coordinator/coordinatorproto/protos/*.proto protoc --gogofaster_out=:. --go-drpc_out=protolib=github.com/gogo/protobuf:. consensus/consensusproto/protos/*.proto protoc --gogofaster_out=:. --go-drpc_out=protolib=github.com/gogo/protobuf:. identityrepo/identityrepoproto/protos/*.proto + protoc --gogofaster_out=:. --go-drpc_out=protolib=github.com/gogo/protobuf:. nameservice/nameserviceproto/protos/*.proto deps: diff --git a/nameservice/nameserviceproto/nameservice.pb.go b/nameservice/nameserviceproto/nameservice.pb.go new file mode 100644 index 00000000..5e2a81cc --- /dev/null +++ b/nameservice/nameserviceproto/nameservice.pb.go @@ -0,0 +1,1066 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: nameservice/nameserviceproto/protos/nameservice.proto + +package nameserviceproto + +import ( + fmt "fmt" + proto "github.com/gogo/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type NameAvailableRequest struct { + // Name including .any suffix + FullName string `protobuf:"bytes,1,opt,name=fullName,proto3" json:"fullName,omitempty"` +} + +func (m *NameAvailableRequest) Reset() { *m = NameAvailableRequest{} } +func (m *NameAvailableRequest) String() string { return proto.CompactTextString(m) } +func (*NameAvailableRequest) ProtoMessage() {} +func (*NameAvailableRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_06bca2ea4304f305, []int{0} +} +func (m *NameAvailableRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NameAvailableRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NameAvailableRequest.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 *NameAvailableRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_NameAvailableRequest.Merge(m, src) +} +func (m *NameAvailableRequest) XXX_Size() int { + return m.Size() +} +func (m *NameAvailableRequest) XXX_DiscardUnknown() { + xxx_messageInfo_NameAvailableRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_NameAvailableRequest proto.InternalMessageInfo + +func (m *NameAvailableRequest) GetFullName() string { + if m != nil { + return m.FullName + } + return "" +} + +type NameByAddressRequest struct { + // An Ethereum address that owns that name + OwnerEthAddress string `protobuf:"bytes,1,opt,name=ownerEthAddress,proto3" json:"ownerEthAddress,omitempty"` +} + +func (m *NameByAddressRequest) Reset() { *m = NameByAddressRequest{} } +func (m *NameByAddressRequest) String() string { return proto.CompactTextString(m) } +func (*NameByAddressRequest) ProtoMessage() {} +func (*NameByAddressRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_06bca2ea4304f305, []int{1} +} +func (m *NameByAddressRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NameByAddressRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NameByAddressRequest.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 *NameByAddressRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_NameByAddressRequest.Merge(m, src) +} +func (m *NameByAddressRequest) XXX_Size() int { + return m.Size() +} +func (m *NameByAddressRequest) XXX_DiscardUnknown() { + xxx_messageInfo_NameByAddressRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_NameByAddressRequest proto.InternalMessageInfo + +func (m *NameByAddressRequest) GetOwnerEthAddress() string { + if m != nil { + return m.OwnerEthAddress + } + return "" +} + +type NameAvailableResponse struct { + Available bool `protobuf:"varint,1,opt,name=available,proto3" json:"available,omitempty"` + // An Ethereum address that owns that name + // This field is non-empty only if name is "already registered" + OwnerEthAddress string `protobuf:"bytes,2,opt,name=ownerEthAddress,proto3" json:"ownerEthAddress,omitempty"` + // A content hash attached to this name + // This field is non-empty only if name is "already registered" + OwnerAnyAddress string `protobuf:"bytes,3,opt,name=ownerAnyAddress,proto3" json:"ownerAnyAddress,omitempty"` + // A SpaceID attached to this name + // This field is non-empty only if name is "already registered" + SpaceId string `protobuf:"bytes,4,opt,name=spaceId,proto3" json:"spaceId,omitempty"` + // doestn't work with marashalling/unmarshalling + // google.protobuf.Timestamp nameExpires = 5 [(gogoproto.stdtime) = true]; + NameExpires int64 `protobuf:"varint,5,opt,name=nameExpires,proto3" json:"nameExpires,omitempty"` +} + +func (m *NameAvailableResponse) Reset() { *m = NameAvailableResponse{} } +func (m *NameAvailableResponse) String() string { return proto.CompactTextString(m) } +func (*NameAvailableResponse) ProtoMessage() {} +func (*NameAvailableResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_06bca2ea4304f305, []int{2} +} +func (m *NameAvailableResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NameAvailableResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NameAvailableResponse.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 *NameAvailableResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_NameAvailableResponse.Merge(m, src) +} +func (m *NameAvailableResponse) XXX_Size() int { + return m.Size() +} +func (m *NameAvailableResponse) XXX_DiscardUnknown() { + xxx_messageInfo_NameAvailableResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_NameAvailableResponse proto.InternalMessageInfo + +func (m *NameAvailableResponse) GetAvailable() bool { + if m != nil { + return m.Available + } + return false +} + +func (m *NameAvailableResponse) GetOwnerEthAddress() string { + if m != nil { + return m.OwnerEthAddress + } + return "" +} + +func (m *NameAvailableResponse) GetOwnerAnyAddress() string { + if m != nil { + return m.OwnerAnyAddress + } + return "" +} + +func (m *NameAvailableResponse) GetSpaceId() string { + if m != nil { + return m.SpaceId + } + return "" +} + +func (m *NameAvailableResponse) GetNameExpires() int64 { + if m != nil { + return m.NameExpires + } + return 0 +} + +type NameByAddressResponse struct { + Found bool `protobuf:"varint,1,opt,name=found,proto3" json:"found,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` +} + +func (m *NameByAddressResponse) Reset() { *m = NameByAddressResponse{} } +func (m *NameByAddressResponse) String() string { return proto.CompactTextString(m) } +func (*NameByAddressResponse) ProtoMessage() {} +func (*NameByAddressResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_06bca2ea4304f305, []int{3} +} +func (m *NameByAddressResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NameByAddressResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NameByAddressResponse.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 *NameByAddressResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_NameByAddressResponse.Merge(m, src) +} +func (m *NameByAddressResponse) XXX_Size() int { + return m.Size() +} +func (m *NameByAddressResponse) XXX_DiscardUnknown() { + xxx_messageInfo_NameByAddressResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_NameByAddressResponse proto.InternalMessageInfo + +func (m *NameByAddressResponse) GetFound() bool { + if m != nil { + return m.Found + } + return false +} + +func (m *NameByAddressResponse) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func init() { + proto.RegisterType((*NameAvailableRequest)(nil), "NameAvailableRequest") + proto.RegisterType((*NameByAddressRequest)(nil), "NameByAddressRequest") + proto.RegisterType((*NameAvailableResponse)(nil), "NameAvailableResponse") + proto.RegisterType((*NameByAddressResponse)(nil), "NameByAddressResponse") +} + +func init() { + proto.RegisterFile("nameservice/nameserviceproto/protos/nameservice.proto", fileDescriptor_06bca2ea4304f305) +} + +var fileDescriptor_06bca2ea4304f305 = []byte{ + // 330 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x52, 0x31, 0x6f, 0xf2, 0x30, + 0x10, 0x8d, 0x3f, 0xe0, 0x2b, 0x5c, 0x07, 0x2a, 0x0b, 0xaa, 0x08, 0x21, 0x0b, 0x79, 0x62, 0x02, + 0x89, 0xaa, 0x9d, 0x1b, 0x2a, 0x54, 0xb1, 0x74, 0xc8, 0xd8, 0xcd, 0x90, 0x43, 0x45, 0x0a, 0x4e, + 0x1a, 0x07, 0x5a, 0xfe, 0x05, 0x7f, 0xaa, 0x52, 0x47, 0xc6, 0x8e, 0x15, 0xfc, 0x91, 0x0a, 0xc7, + 0x81, 0x90, 0x46, 0x5d, 0x12, 0xdf, 0xf3, 0xbd, 0xbb, 0x77, 0xef, 0x0c, 0xb7, 0x52, 0x2c, 0x50, + 0x61, 0xb4, 0x9a, 0x4f, 0xb1, 0x9f, 0x39, 0x87, 0x51, 0x10, 0x07, 0x7d, 0xfd, 0x55, 0x59, 0xbc, + 0xa7, 0x21, 0x3e, 0x80, 0xc6, 0x93, 0x58, 0xa0, 0xb3, 0x12, 0x73, 0x5f, 0x4c, 0x7c, 0x74, 0xf1, + 0x75, 0x89, 0x2a, 0xa6, 0x2d, 0xa8, 0xce, 0x96, 0xbe, 0x7f, 0xb8, 0xb3, 0x49, 0x87, 0x74, 0x6b, + 0xee, 0x31, 0xe6, 0xf7, 0x09, 0x67, 0xb8, 0x76, 0x3c, 0x2f, 0x42, 0xa5, 0x52, 0x4e, 0x17, 0xea, + 0xc1, 0x9b, 0xc4, 0x68, 0x14, 0xbf, 0x98, 0x1b, 0x43, 0xcd, 0xc3, 0xfc, 0x83, 0x40, 0x33, 0xd7, + 0x56, 0x85, 0x81, 0x54, 0x48, 0xdb, 0x50, 0x13, 0x29, 0xa8, 0xd9, 0x55, 0xf7, 0x04, 0x14, 0x75, + 0xf8, 0x57, 0xd8, 0xe1, 0x98, 0xe9, 0xc8, 0x54, 0xa5, 0x5d, 0xca, 0x64, 0x9e, 0x60, 0x6a, 0xc3, + 0x85, 0x0a, 0xc5, 0x14, 0xc7, 0x9e, 0x5d, 0xd6, 0x19, 0x69, 0x48, 0x3b, 0x70, 0x79, 0x30, 0x6c, + 0xf4, 0x1e, 0xce, 0x23, 0x54, 0x76, 0xa5, 0x43, 0xba, 0x25, 0x37, 0x0b, 0x71, 0x27, 0x19, 0x23, + 0xe3, 0x84, 0x19, 0xa3, 0x01, 0x95, 0x59, 0xb0, 0x94, 0x9e, 0x19, 0x21, 0x09, 0x28, 0x85, 0xf2, + 0x81, 0x6d, 0x34, 0xeb, 0xf3, 0x60, 0x43, 0xa0, 0xe2, 0xc8, 0xb5, 0x54, 0x74, 0x08, 0xf5, 0xb1, + 0x3a, 0x73, 0x85, 0x36, 0x7b, 0x45, 0xcb, 0x69, 0x5d, 0xf7, 0x0a, 0xcd, 0xe3, 0x16, 0x7d, 0x80, + 0xab, 0x47, 0x8c, 0xcf, 0x34, 0x99, 0x22, 0xf9, 0x6d, 0x99, 0x22, 0xbf, 0xa4, 0x73, 0x6b, 0x78, + 0xf7, 0xb9, 0x63, 0x64, 0xbb, 0x63, 0xe4, 0x7b, 0xc7, 0xc8, 0x66, 0xcf, 0xac, 0xed, 0x9e, 0x59, + 0x5f, 0x7b, 0x66, 0x3d, 0xb7, 0xff, 0x7a, 0x64, 0x93, 0xff, 0xfa, 0x77, 0xf3, 0x13, 0x00, 0x00, + 0xff, 0xff, 0xe0, 0x5b, 0xc6, 0xb3, 0x8b, 0x02, 0x00, 0x00, +} + +func (m *NameAvailableRequest) 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 *NameAvailableRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *NameAvailableRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.FullName) > 0 { + i -= len(m.FullName) + copy(dAtA[i:], m.FullName) + i = encodeVarintNameservice(dAtA, i, uint64(len(m.FullName))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *NameByAddressRequest) 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 *NameByAddressRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *NameByAddressRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.OwnerEthAddress) > 0 { + i -= len(m.OwnerEthAddress) + copy(dAtA[i:], m.OwnerEthAddress) + i = encodeVarintNameservice(dAtA, i, uint64(len(m.OwnerEthAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *NameAvailableResponse) 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 *NameAvailableResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *NameAvailableResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.NameExpires != 0 { + i = encodeVarintNameservice(dAtA, i, uint64(m.NameExpires)) + i-- + dAtA[i] = 0x28 + } + if len(m.SpaceId) > 0 { + i -= len(m.SpaceId) + copy(dAtA[i:], m.SpaceId) + i = encodeVarintNameservice(dAtA, i, uint64(len(m.SpaceId))) + i-- + dAtA[i] = 0x22 + } + if len(m.OwnerAnyAddress) > 0 { + i -= len(m.OwnerAnyAddress) + copy(dAtA[i:], m.OwnerAnyAddress) + i = encodeVarintNameservice(dAtA, i, uint64(len(m.OwnerAnyAddress))) + i-- + dAtA[i] = 0x1a + } + if len(m.OwnerEthAddress) > 0 { + i -= len(m.OwnerEthAddress) + copy(dAtA[i:], m.OwnerEthAddress) + i = encodeVarintNameservice(dAtA, i, uint64(len(m.OwnerEthAddress))) + i-- + dAtA[i] = 0x12 + } + if m.Available { + i-- + if m.Available { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *NameByAddressResponse) 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 *NameByAddressResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *NameByAddressResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintNameservice(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0x12 + } + if m.Found { + i-- + if m.Found { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func encodeVarintNameservice(dAtA []byte, offset int, v uint64) int { + offset -= sovNameservice(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *NameAvailableRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.FullName) + if l > 0 { + n += 1 + l + sovNameservice(uint64(l)) + } + return n +} + +func (m *NameByAddressRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.OwnerEthAddress) + if l > 0 { + n += 1 + l + sovNameservice(uint64(l)) + } + return n +} + +func (m *NameAvailableResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Available { + n += 2 + } + l = len(m.OwnerEthAddress) + if l > 0 { + n += 1 + l + sovNameservice(uint64(l)) + } + l = len(m.OwnerAnyAddress) + if l > 0 { + n += 1 + l + sovNameservice(uint64(l)) + } + l = len(m.SpaceId) + if l > 0 { + n += 1 + l + sovNameservice(uint64(l)) + } + if m.NameExpires != 0 { + n += 1 + sovNameservice(uint64(m.NameExpires)) + } + return n +} + +func (m *NameByAddressResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Found { + n += 2 + } + l = len(m.Name) + if l > 0 { + n += 1 + l + sovNameservice(uint64(l)) + } + return n +} + +func sovNameservice(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozNameservice(x uint64) (n int) { + return sovNameservice(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *NameAvailableRequest) 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 ErrIntOverflowNameservice + } + 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: NameAvailableRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NameAvailableRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FullName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNameservice + } + 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 ErrInvalidLengthNameservice + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthNameservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FullName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipNameservice(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthNameservice + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NameByAddressRequest) 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 ErrIntOverflowNameservice + } + 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: NameByAddressRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NameByAddressRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerEthAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNameservice + } + 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 ErrInvalidLengthNameservice + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthNameservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OwnerEthAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipNameservice(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthNameservice + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NameAvailableResponse) 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 ErrIntOverflowNameservice + } + 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: NameAvailableResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NameAvailableResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Available", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNameservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Available = bool(v != 0) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerEthAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNameservice + } + 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 ErrInvalidLengthNameservice + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthNameservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OwnerEthAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerAnyAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNameservice + } + 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 ErrInvalidLengthNameservice + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthNameservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OwnerAnyAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNameservice + } + 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 ErrInvalidLengthNameservice + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthNameservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SpaceId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NameExpires", wireType) + } + m.NameExpires = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNameservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NameExpires |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipNameservice(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthNameservice + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NameByAddressResponse) 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 ErrIntOverflowNameservice + } + 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: NameByAddressResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NameByAddressResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Found", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNameservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Found = bool(v != 0) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNameservice + } + 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 ErrInvalidLengthNameservice + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthNameservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipNameservice(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthNameservice + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipNameservice(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowNameservice + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowNameservice + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowNameservice + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthNameservice + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupNameservice + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthNameservice + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthNameservice = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowNameservice = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupNameservice = fmt.Errorf("proto: unexpected end of group") +) diff --git a/nameservice/nameserviceproto/nameservice_aa.pb.go b/nameservice/nameserviceproto/nameservice_aa.pb.go new file mode 100644 index 00000000..61567fd5 --- /dev/null +++ b/nameservice/nameserviceproto/nameservice_aa.pb.go @@ -0,0 +1,3185 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: nameservice/nameserviceproto/protos/nameservice_aa.proto + +package nameserviceproto + +import ( + fmt "fmt" + proto "github.com/gogo/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type OperationState int32 + +const ( + OperationState_Unknown OperationState = 0 + OperationState_Pending OperationState = 1 + OperationState_PendingOrNotFound OperationState = 2 + OperationState_Completed OperationState = 3 + OperationState_Error OperationState = 4 +) + +var OperationState_name = map[int32]string{ + 0: "Unknown", + 1: "Pending", + 2: "PendingOrNotFound", + 3: "Completed", + 4: "Error", +} + +var OperationState_value = map[string]int32{ + "Unknown": 0, + "Pending": 1, + "PendingOrNotFound": 2, + "Completed": 3, + "Error": 4, +} + +func (x OperationState) String() string { + return proto.EnumName(OperationState_name, int32(x)) +} + +func (OperationState) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_c9d3f9b8b141e804, []int{0} +} + +type UserAccount struct { + // An Ethereum address that owns that account + OwnerEthAddress string `protobuf:"bytes,1,opt,name=ownerEthAddress,proto3" json:"ownerEthAddress,omitempty"` + // This smart contract really controls all names + // you can ask .owner() method to get 'ownerEthAddress' + OwnerSmartContracWalletAddress string `protobuf:"bytes,2,opt,name=ownerSmartContracWalletAddress,proto3" json:"ownerSmartContracWalletAddress,omitempty"` + // The ownerSmartContracWalletAddress field is calculated automatically + // from ownerEthAddress even if SCW is not deployed yet + // SCW is deployed automatically after first operation + OwnerSmartContracWalletDeployed bool `protobuf:"varint,3,opt,name=ownerSmartContracWalletDeployed,proto3" json:"ownerSmartContracWalletDeployed,omitempty"` + // Number of names that the user can buy. We will mint him tokens that he can use to buy names + // (one token per name) + NamesCountLeft uint64 `protobuf:"varint,4,opt,name=namesCountLeft,proto3" json:"namesCountLeft,omitempty"` + // Number of gas operations: update name, add new data, etc + OperationsCountLeft uint64 `protobuf:"varint,5,opt,name=operationsCountLeft,proto3" json:"operationsCountLeft,omitempty"` +} + +func (m *UserAccount) Reset() { *m = UserAccount{} } +func (m *UserAccount) String() string { return proto.CompactTextString(m) } +func (*UserAccount) ProtoMessage() {} +func (*UserAccount) Descriptor() ([]byte, []int) { + return fileDescriptor_c9d3f9b8b141e804, []int{0} +} +func (m *UserAccount) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *UserAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_UserAccount.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 *UserAccount) XXX_Merge(src proto.Message) { + xxx_messageInfo_UserAccount.Merge(m, src) +} +func (m *UserAccount) XXX_Size() int { + return m.Size() +} +func (m *UserAccount) XXX_DiscardUnknown() { + xxx_messageInfo_UserAccount.DiscardUnknown(m) +} + +var xxx_messageInfo_UserAccount proto.InternalMessageInfo + +func (m *UserAccount) GetOwnerEthAddress() string { + if m != nil { + return m.OwnerEthAddress + } + return "" +} + +func (m *UserAccount) GetOwnerSmartContracWalletAddress() string { + if m != nil { + return m.OwnerSmartContracWalletAddress + } + return "" +} + +func (m *UserAccount) GetOwnerSmartContracWalletDeployed() bool { + if m != nil { + return m.OwnerSmartContracWalletDeployed + } + return false +} + +func (m *UserAccount) GetNamesCountLeft() uint64 { + if m != nil { + return m.NamesCountLeft + } + return 0 +} + +func (m *UserAccount) GetOperationsCountLeft() uint64 { + if m != nil { + return m.OperationsCountLeft + } + return 0 +} + +type AdminFundUserAccountRequest struct { + // An Ethereum address that owns that name + OwnerEthAddress string `protobuf:"bytes,1,opt,name=ownerEthAddress,proto3" json:"ownerEthAddress,omitempty"` + // Number of names that user can buy. We will mint him tokens that he can use to buy names + // (one token per name) + NamesCount uint64 `protobuf:"varint,2,opt,name=namesCount,proto3" json:"namesCount,omitempty"` +} + +func (m *AdminFundUserAccountRequest) Reset() { *m = AdminFundUserAccountRequest{} } +func (m *AdminFundUserAccountRequest) String() string { return proto.CompactTextString(m) } +func (*AdminFundUserAccountRequest) ProtoMessage() {} +func (*AdminFundUserAccountRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_c9d3f9b8b141e804, []int{1} +} +func (m *AdminFundUserAccountRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AdminFundUserAccountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AdminFundUserAccountRequest.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 *AdminFundUserAccountRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_AdminFundUserAccountRequest.Merge(m, src) +} +func (m *AdminFundUserAccountRequest) XXX_Size() int { + return m.Size() +} +func (m *AdminFundUserAccountRequest) XXX_DiscardUnknown() { + xxx_messageInfo_AdminFundUserAccountRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_AdminFundUserAccountRequest proto.InternalMessageInfo + +func (m *AdminFundUserAccountRequest) GetOwnerEthAddress() string { + if m != nil { + return m.OwnerEthAddress + } + return "" +} + +func (m *AdminFundUserAccountRequest) GetNamesCount() uint64 { + if m != nil { + return m.NamesCount + } + return 0 +} + +type AdminFundUserAccountRequestSigned struct { + // AdminFundUserAccountRequest struct + Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` + // payload signed by Admin of this service + Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` +} + +func (m *AdminFundUserAccountRequestSigned) Reset() { *m = AdminFundUserAccountRequestSigned{} } +func (m *AdminFundUserAccountRequestSigned) String() string { return proto.CompactTextString(m) } +func (*AdminFundUserAccountRequestSigned) ProtoMessage() {} +func (*AdminFundUserAccountRequestSigned) Descriptor() ([]byte, []int) { + return fileDescriptor_c9d3f9b8b141e804, []int{2} +} +func (m *AdminFundUserAccountRequestSigned) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AdminFundUserAccountRequestSigned) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AdminFundUserAccountRequestSigned.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 *AdminFundUserAccountRequestSigned) XXX_Merge(src proto.Message) { + xxx_messageInfo_AdminFundUserAccountRequestSigned.Merge(m, src) +} +func (m *AdminFundUserAccountRequestSigned) XXX_Size() int { + return m.Size() +} +func (m *AdminFundUserAccountRequestSigned) XXX_DiscardUnknown() { + xxx_messageInfo_AdminFundUserAccountRequestSigned.DiscardUnknown(m) +} + +var xxx_messageInfo_AdminFundUserAccountRequestSigned proto.InternalMessageInfo + +func (m *AdminFundUserAccountRequestSigned) GetPayload() []byte { + if m != nil { + return m.Payload + } + return nil +} + +func (m *AdminFundUserAccountRequestSigned) GetSignature() []byte { + if m != nil { + return m.Signature + } + return nil +} + +type AdminFundGasOperationsRequest struct { + // An Ethereum address that owns that name + OwnerEthAddress string `protobuf:"bytes,1,opt,name=ownerEthAddress,proto3" json:"ownerEthAddress,omitempty"` + OwnerAnyID string `protobuf:"bytes,2,opt,name=ownerAnyID,proto3" json:"ownerAnyID,omitempty"` + // Number of gas operations: update name, add new data, etc + OperationsCount uint64 `protobuf:"varint,3,opt,name=operationsCount,proto3" json:"operationsCount,omitempty"` +} + +func (m *AdminFundGasOperationsRequest) Reset() { *m = AdminFundGasOperationsRequest{} } +func (m *AdminFundGasOperationsRequest) String() string { return proto.CompactTextString(m) } +func (*AdminFundGasOperationsRequest) ProtoMessage() {} +func (*AdminFundGasOperationsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_c9d3f9b8b141e804, []int{3} +} +func (m *AdminFundGasOperationsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AdminFundGasOperationsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AdminFundGasOperationsRequest.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 *AdminFundGasOperationsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_AdminFundGasOperationsRequest.Merge(m, src) +} +func (m *AdminFundGasOperationsRequest) XXX_Size() int { + return m.Size() +} +func (m *AdminFundGasOperationsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_AdminFundGasOperationsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_AdminFundGasOperationsRequest proto.InternalMessageInfo + +func (m *AdminFundGasOperationsRequest) GetOwnerEthAddress() string { + if m != nil { + return m.OwnerEthAddress + } + return "" +} + +func (m *AdminFundGasOperationsRequest) GetOwnerAnyID() string { + if m != nil { + return m.OwnerAnyID + } + return "" +} + +func (m *AdminFundGasOperationsRequest) GetOperationsCount() uint64 { + if m != nil { + return m.OperationsCount + } + return 0 +} + +type AdminFundGasOperationsRequestSigned struct { + // AdminFundGasOperationsRequest struct + Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` + // payload signed by Admin of this service + Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` +} + +func (m *AdminFundGasOperationsRequestSigned) Reset() { *m = AdminFundGasOperationsRequestSigned{} } +func (m *AdminFundGasOperationsRequestSigned) String() string { return proto.CompactTextString(m) } +func (*AdminFundGasOperationsRequestSigned) ProtoMessage() {} +func (*AdminFundGasOperationsRequestSigned) Descriptor() ([]byte, []int) { + return fileDescriptor_c9d3f9b8b141e804, []int{4} +} +func (m *AdminFundGasOperationsRequestSigned) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AdminFundGasOperationsRequestSigned) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AdminFundGasOperationsRequestSigned.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 *AdminFundGasOperationsRequestSigned) XXX_Merge(src proto.Message) { + xxx_messageInfo_AdminFundGasOperationsRequestSigned.Merge(m, src) +} +func (m *AdminFundGasOperationsRequestSigned) XXX_Size() int { + return m.Size() +} +func (m *AdminFundGasOperationsRequestSigned) XXX_DiscardUnknown() { + xxx_messageInfo_AdminFundGasOperationsRequestSigned.DiscardUnknown(m) +} + +var xxx_messageInfo_AdminFundGasOperationsRequestSigned proto.InternalMessageInfo + +func (m *AdminFundGasOperationsRequestSigned) GetPayload() []byte { + if m != nil { + return m.Payload + } + return nil +} + +func (m *AdminFundGasOperationsRequestSigned) GetSignature() []byte { + if m != nil { + return m.Signature + } + return nil +} + +// no signature required here +type GetUserAccountRequest struct { + // An Ethereum address that owns that account + OwnerEthAddress string `protobuf:"bytes,1,opt,name=ownerEthAddress,proto3" json:"ownerEthAddress,omitempty"` +} + +func (m *GetUserAccountRequest) Reset() { *m = GetUserAccountRequest{} } +func (m *GetUserAccountRequest) String() string { return proto.CompactTextString(m) } +func (*GetUserAccountRequest) ProtoMessage() {} +func (*GetUserAccountRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_c9d3f9b8b141e804, []int{5} +} +func (m *GetUserAccountRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetUserAccountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetUserAccountRequest.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 *GetUserAccountRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetUserAccountRequest.Merge(m, src) +} +func (m *GetUserAccountRequest) XXX_Size() int { + return m.Size() +} +func (m *GetUserAccountRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GetUserAccountRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_GetUserAccountRequest proto.InternalMessageInfo + +func (m *GetUserAccountRequest) GetOwnerEthAddress() string { + if m != nil { + return m.OwnerEthAddress + } + return "" +} + +type GetDataNameRegisterResponse struct { + Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` + Context []byte `protobuf:"bytes,2,opt,name=context,proto3" json:"context,omitempty"` +} + +func (m *GetDataNameRegisterResponse) Reset() { *m = GetDataNameRegisterResponse{} } +func (m *GetDataNameRegisterResponse) String() string { return proto.CompactTextString(m) } +func (*GetDataNameRegisterResponse) ProtoMessage() {} +func (*GetDataNameRegisterResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_c9d3f9b8b141e804, []int{6} +} +func (m *GetDataNameRegisterResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetDataNameRegisterResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetDataNameRegisterResponse.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 *GetDataNameRegisterResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetDataNameRegisterResponse.Merge(m, src) +} +func (m *GetDataNameRegisterResponse) XXX_Size() int { + return m.Size() +} +func (m *GetDataNameRegisterResponse) XXX_DiscardUnknown() { + xxx_messageInfo_GetDataNameRegisterResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_GetDataNameRegisterResponse proto.InternalMessageInfo + +func (m *GetDataNameRegisterResponse) GetData() []byte { + if m != nil { + return m.Data + } + return nil +} + +func (m *GetDataNameRegisterResponse) GetContext() []byte { + if m != nil { + return m.Context + } + return nil +} + +type CreateUserOperationRequest struct { + Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` + // "data" signed with Ethereum private key + SignedData []byte `protobuf:"bytes,2,opt,name=signedData,proto3" json:"signedData,omitempty"` + Context []byte `protobuf:"bytes,3,opt,name=context,proto3" json:"context,omitempty"` + OwnerEthAddress string `protobuf:"bytes,4,opt,name=ownerEthAddress,proto3" json:"ownerEthAddress,omitempty"` + OwnerAnyID string `protobuf:"bytes,5,opt,name=ownerAnyID,proto3" json:"ownerAnyID,omitempty"` +} + +func (m *CreateUserOperationRequest) Reset() { *m = CreateUserOperationRequest{} } +func (m *CreateUserOperationRequest) String() string { return proto.CompactTextString(m) } +func (*CreateUserOperationRequest) ProtoMessage() {} +func (*CreateUserOperationRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_c9d3f9b8b141e804, []int{7} +} +func (m *CreateUserOperationRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CreateUserOperationRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CreateUserOperationRequest.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 *CreateUserOperationRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_CreateUserOperationRequest.Merge(m, src) +} +func (m *CreateUserOperationRequest) XXX_Size() int { + return m.Size() +} +func (m *CreateUserOperationRequest) XXX_DiscardUnknown() { + xxx_messageInfo_CreateUserOperationRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_CreateUserOperationRequest proto.InternalMessageInfo + +func (m *CreateUserOperationRequest) GetData() []byte { + if m != nil { + return m.Data + } + return nil +} + +func (m *CreateUserOperationRequest) GetSignedData() []byte { + if m != nil { + return m.SignedData + } + return nil +} + +func (m *CreateUserOperationRequest) GetContext() []byte { + if m != nil { + return m.Context + } + return nil +} + +func (m *CreateUserOperationRequest) GetOwnerEthAddress() string { + if m != nil { + return m.OwnerEthAddress + } + return "" +} + +func (m *CreateUserOperationRequest) GetOwnerAnyID() string { + if m != nil { + return m.OwnerAnyID + } + return "" +} + +type CreateUserOperationRequestSigned struct { + // CreateUserOperationRequest struct + Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` + // payload signed with Anytype identity + Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` +} + +func (m *CreateUserOperationRequestSigned) Reset() { *m = CreateUserOperationRequestSigned{} } +func (m *CreateUserOperationRequestSigned) String() string { return proto.CompactTextString(m) } +func (*CreateUserOperationRequestSigned) ProtoMessage() {} +func (*CreateUserOperationRequestSigned) Descriptor() ([]byte, []int) { + return fileDescriptor_c9d3f9b8b141e804, []int{8} +} +func (m *CreateUserOperationRequestSigned) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CreateUserOperationRequestSigned) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CreateUserOperationRequestSigned.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 *CreateUserOperationRequestSigned) XXX_Merge(src proto.Message) { + xxx_messageInfo_CreateUserOperationRequestSigned.Merge(m, src) +} +func (m *CreateUserOperationRequestSigned) XXX_Size() int { + return m.Size() +} +func (m *CreateUserOperationRequestSigned) XXX_DiscardUnknown() { + xxx_messageInfo_CreateUserOperationRequestSigned.DiscardUnknown(m) +} + +var xxx_messageInfo_CreateUserOperationRequestSigned proto.InternalMessageInfo + +func (m *CreateUserOperationRequestSigned) GetPayload() []byte { + if m != nil { + return m.Payload + } + return nil +} + +func (m *CreateUserOperationRequestSigned) GetSignature() []byte { + if m != nil { + return m.Signature + } + return nil +} + +type NameRegisterRequest struct { + FullName string `protobuf:"bytes,1,opt,name=fullName,proto3" json:"fullName,omitempty"` + // A content hash attached to this name + OwnerAnyAddress string `protobuf:"bytes,2,opt,name=ownerAnyAddress,proto3" json:"ownerAnyAddress,omitempty"` + // An Ethereum address that owns that name + OwnerEthAddress string `protobuf:"bytes,3,opt,name=ownerEthAddress,proto3" json:"ownerEthAddress,omitempty"` + // A SpaceID attached to this name + SpaceId string `protobuf:"bytes,4,opt,name=spaceId,proto3" json:"spaceId,omitempty"` +} + +func (m *NameRegisterRequest) Reset() { *m = NameRegisterRequest{} } +func (m *NameRegisterRequest) String() string { return proto.CompactTextString(m) } +func (*NameRegisterRequest) ProtoMessage() {} +func (*NameRegisterRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_c9d3f9b8b141e804, []int{9} +} +func (m *NameRegisterRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NameRegisterRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NameRegisterRequest.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 *NameRegisterRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_NameRegisterRequest.Merge(m, src) +} +func (m *NameRegisterRequest) XXX_Size() int { + return m.Size() +} +func (m *NameRegisterRequest) XXX_DiscardUnknown() { + xxx_messageInfo_NameRegisterRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_NameRegisterRequest proto.InternalMessageInfo + +func (m *NameRegisterRequest) GetFullName() string { + if m != nil { + return m.FullName + } + return "" +} + +func (m *NameRegisterRequest) GetOwnerAnyAddress() string { + if m != nil { + return m.OwnerAnyAddress + } + return "" +} + +func (m *NameRegisterRequest) GetOwnerEthAddress() string { + if m != nil { + return m.OwnerEthAddress + } + return "" +} + +func (m *NameRegisterRequest) GetSpaceId() string { + if m != nil { + return m.SpaceId + } + return "" +} + +type GetOperationStatusRequest struct { + OperationId string `protobuf:"bytes,1,opt,name=operationId,proto3" json:"operationId,omitempty"` +} + +func (m *GetOperationStatusRequest) Reset() { *m = GetOperationStatusRequest{} } +func (m *GetOperationStatusRequest) String() string { return proto.CompactTextString(m) } +func (*GetOperationStatusRequest) ProtoMessage() {} +func (*GetOperationStatusRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_c9d3f9b8b141e804, []int{10} +} +func (m *GetOperationStatusRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetOperationStatusRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetOperationStatusRequest.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 *GetOperationStatusRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetOperationStatusRequest.Merge(m, src) +} +func (m *GetOperationStatusRequest) XXX_Size() int { + return m.Size() +} +func (m *GetOperationStatusRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GetOperationStatusRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_GetOperationStatusRequest proto.InternalMessageInfo + +func (m *GetOperationStatusRequest) GetOperationId() string { + if m != nil { + return m.OperationId + } + return "" +} + +type OperationResponse struct { + OperationId string `protobuf:"bytes,1,opt,name=operationId,proto3" json:"operationId,omitempty"` + OperationState OperationState `protobuf:"varint,2,opt,name=operationState,proto3,enum=OperationState" json:"operationState,omitempty"` +} + +func (m *OperationResponse) Reset() { *m = OperationResponse{} } +func (m *OperationResponse) String() string { return proto.CompactTextString(m) } +func (*OperationResponse) ProtoMessage() {} +func (*OperationResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_c9d3f9b8b141e804, []int{11} +} +func (m *OperationResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *OperationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_OperationResponse.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 *OperationResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_OperationResponse.Merge(m, src) +} +func (m *OperationResponse) XXX_Size() int { + return m.Size() +} +func (m *OperationResponse) XXX_DiscardUnknown() { + xxx_messageInfo_OperationResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_OperationResponse proto.InternalMessageInfo + +func (m *OperationResponse) GetOperationId() string { + if m != nil { + return m.OperationId + } + return "" +} + +func (m *OperationResponse) GetOperationState() OperationState { + if m != nil { + return m.OperationState + } + return OperationState_Unknown +} + +func init() { + proto.RegisterEnum("OperationState", OperationState_name, OperationState_value) + proto.RegisterType((*UserAccount)(nil), "UserAccount") + proto.RegisterType((*AdminFundUserAccountRequest)(nil), "AdminFundUserAccountRequest") + proto.RegisterType((*AdminFundUserAccountRequestSigned)(nil), "AdminFundUserAccountRequestSigned") + proto.RegisterType((*AdminFundGasOperationsRequest)(nil), "AdminFundGasOperationsRequest") + proto.RegisterType((*AdminFundGasOperationsRequestSigned)(nil), "AdminFundGasOperationsRequestSigned") + proto.RegisterType((*GetUserAccountRequest)(nil), "GetUserAccountRequest") + proto.RegisterType((*GetDataNameRegisterResponse)(nil), "GetDataNameRegisterResponse") + proto.RegisterType((*CreateUserOperationRequest)(nil), "CreateUserOperationRequest") + proto.RegisterType((*CreateUserOperationRequestSigned)(nil), "CreateUserOperationRequestSigned") + proto.RegisterType((*NameRegisterRequest)(nil), "NameRegisterRequest") + proto.RegisterType((*GetOperationStatusRequest)(nil), "GetOperationStatusRequest") + proto.RegisterType((*OperationResponse)(nil), "OperationResponse") +} + +func init() { + proto.RegisterFile("nameservice/nameserviceproto/protos/nameservice_aa.proto", fileDescriptor_c9d3f9b8b141e804) +} + +var fileDescriptor_c9d3f9b8b141e804 = []byte{ + // 744 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0xd1, 0x4e, 0xdb, 0x48, + 0x14, 0x8d, 0x49, 0x58, 0xc8, 0x25, 0x1b, 0xc2, 0x04, 0xd8, 0x6c, 0x60, 0xbd, 0xc1, 0xbb, 0x5a, + 0x45, 0xfb, 0x60, 0x2a, 0x2a, 0xb5, 0xbc, 0x54, 0xaa, 0x1b, 0x20, 0x45, 0x54, 0x80, 0x4c, 0x51, + 0x25, 0x50, 0x55, 0x0d, 0xf1, 0x25, 0x8d, 0x9a, 0xcc, 0xa4, 0x33, 0x93, 0xd2, 0xfc, 0x45, 0xa5, + 0x7e, 0x40, 0x1f, 0xfa, 0x0b, 0xfd, 0x88, 0x3e, 0xf2, 0x58, 0xf5, 0xa9, 0x82, 0x1f, 0xa9, 0x3c, + 0x38, 0xc6, 0x49, 0x9d, 0x84, 0x96, 0x17, 0xf0, 0x3d, 0xbe, 0x73, 0xef, 0xb9, 0xe7, 0x7a, 0x8e, + 0x02, 0xeb, 0x8c, 0xb6, 0x50, 0xa2, 0x78, 0xd3, 0xa8, 0xe1, 0x6a, 0xe4, 0xb9, 0x2d, 0xb8, 0xe2, + 0xab, 0xfa, 0xaf, 0x8c, 0xe2, 0x2f, 0x28, 0xb5, 0x35, 0x6a, 0x7d, 0x9c, 0x80, 0x99, 0x43, 0x89, + 0xc2, 0xa9, 0xd5, 0x78, 0x87, 0x29, 0x52, 0x86, 0x59, 0x7e, 0xc6, 0x50, 0x6c, 0xaa, 0x97, 0x8e, + 0xe7, 0x09, 0x94, 0xb2, 0x60, 0x94, 0x8c, 0x72, 0xda, 0x1d, 0x84, 0xc9, 0x16, 0x98, 0x1a, 0x3a, + 0x68, 0x51, 0xa1, 0x2a, 0x9c, 0x29, 0x41, 0x6b, 0xcf, 0x68, 0xb3, 0x89, 0xaa, 0x77, 0x70, 0x42, + 0x1f, 0x1c, 0x93, 0x45, 0x1e, 0xc3, 0xdf, 0x43, 0x32, 0x36, 0xb0, 0xdd, 0xe4, 0x5d, 0xf4, 0x0a, + 0xc9, 0x92, 0x51, 0x9e, 0x76, 0xc7, 0xa5, 0x91, 0xff, 0x20, 0xab, 0x67, 0xac, 0xf8, 0x93, 0x3c, + 0xc1, 0x53, 0x55, 0x48, 0x95, 0x8c, 0x72, 0xca, 0x1d, 0x40, 0xc9, 0x1d, 0xc8, 0xf3, 0x36, 0x0a, + 0xaa, 0x1a, 0x9c, 0x45, 0x92, 0x27, 0x75, 0x72, 0xdc, 0x2b, 0xab, 0x0e, 0x4b, 0x8e, 0xd7, 0x6a, + 0xb0, 0xad, 0x0e, 0xf3, 0x22, 0x6a, 0xb9, 0xf8, 0xba, 0x83, 0xf2, 0x67, 0x44, 0x33, 0x01, 0xae, + 0xc9, 0x68, 0x81, 0x52, 0x6e, 0x04, 0xb1, 0x8e, 0x61, 0x65, 0x44, 0xa3, 0x83, 0x46, 0x9d, 0xa1, + 0x47, 0x0a, 0x30, 0xd5, 0xa6, 0xdd, 0x26, 0xa7, 0x9e, 0x6e, 0x93, 0x71, 0x7b, 0x21, 0x59, 0x86, + 0xb4, 0x6c, 0xd4, 0x19, 0x55, 0x1d, 0x81, 0xba, 0x7a, 0xc6, 0xbd, 0x06, 0xac, 0xf7, 0x06, 0xfc, + 0x15, 0x56, 0xaf, 0x52, 0xb9, 0x17, 0x4e, 0xfa, 0x4b, 0x83, 0x68, 0xc8, 0x61, 0xdd, 0xed, 0x8d, + 0x60, 0xd3, 0x11, 0x44, 0x57, 0xea, 0x17, 0x52, 0x6f, 0x31, 0xe5, 0x0e, 0xc2, 0xd6, 0x73, 0xf8, + 0x67, 0x24, 0xa9, 0x5b, 0x0e, 0xed, 0xc0, 0x42, 0x15, 0xd5, 0x6d, 0x96, 0x66, 0xed, 0xc0, 0x52, + 0x15, 0xd5, 0x06, 0x55, 0x74, 0x97, 0xb6, 0xd0, 0xc5, 0x7a, 0x43, 0x2a, 0x14, 0x2e, 0xca, 0x36, + 0x67, 0x12, 0x09, 0x81, 0x94, 0x47, 0x15, 0x0d, 0x68, 0xe9, 0x67, 0x9f, 0x6d, 0x8d, 0x33, 0x85, + 0x6f, 0x55, 0xc0, 0xa8, 0x17, 0x5a, 0x9f, 0x0c, 0x28, 0x56, 0x04, 0x52, 0x85, 0x3e, 0xa7, 0x70, + 0xda, 0x1e, 0xab, 0xb8, 0x62, 0x26, 0x80, 0xd4, 0x22, 0xf8, 0x14, 0x82, 0x7a, 0x11, 0x24, 0xda, + 0x2c, 0xd9, 0xd7, 0x2c, 0x6e, 0xc6, 0xd4, 0x4d, 0xf6, 0x39, 0x39, 0xb8, 0x4f, 0xeb, 0x08, 0x4a, + 0xc3, 0x59, 0xdf, 0x72, 0x45, 0x1f, 0x0c, 0xc8, 0xf7, 0x2b, 0x7b, 0xa5, 0x45, 0x11, 0xa6, 0x4f, + 0x3b, 0xcd, 0xa6, 0xff, 0x2a, 0x58, 0x4d, 0x18, 0x87, 0x93, 0x39, 0xac, 0xdb, 0x6f, 0x37, 0x83, + 0x70, 0x9c, 0x06, 0xc9, 0x78, 0x0d, 0x0a, 0x30, 0x25, 0xdb, 0xb4, 0x86, 0xdb, 0x5e, 0xa0, 0x52, + 0x2f, 0xb4, 0x1e, 0xc0, 0x9f, 0x55, 0x54, 0xe1, 0xd8, 0x07, 0x8a, 0xaa, 0x4e, 0x78, 0x69, 0x4a, + 0x30, 0x13, 0x7e, 0xd3, 0xdb, 0x5e, 0xc0, 0x34, 0x0a, 0x59, 0x0c, 0xe6, 0x22, 0x92, 0x05, 0x9f, + 0xcd, 0xd8, 0x63, 0xe4, 0x3e, 0x64, 0x79, 0xb4, 0xe5, 0x95, 0x74, 0xd9, 0xb5, 0x59, 0xbb, 0x8f, + 0x09, 0xba, 0x03, 0x69, 0xff, 0x1f, 0x43, 0xb6, 0x3f, 0x83, 0xcc, 0xc0, 0xd4, 0x21, 0x7b, 0xc5, + 0xf8, 0x19, 0xcb, 0x25, 0xfc, 0x60, 0x1f, 0x99, 0xd7, 0x60, 0xf5, 0x9c, 0x41, 0x16, 0x60, 0x2e, + 0x08, 0xf6, 0xc4, 0x2e, 0x57, 0x5b, 0xbc, 0xc3, 0xbc, 0xdc, 0x04, 0xf9, 0x1d, 0xd2, 0x15, 0xde, + 0x6a, 0x37, 0x51, 0xa1, 0x97, 0x4b, 0x92, 0x34, 0x4c, 0x6e, 0x0a, 0xc1, 0x45, 0x2e, 0xb5, 0xf6, + 0x35, 0x09, 0x7f, 0x38, 0xac, 0xcb, 0x64, 0x70, 0x9f, 0x9c, 0x13, 0xe9, 0x7b, 0xb1, 0xdf, 0x8b, + 0x3c, 0x84, 0x4c, 0x54, 0x27, 0x52, 0xb4, 0x87, 0xca, 0x56, 0x24, 0xf6, 0x0f, 0x9a, 0x58, 0x09, + 0xb2, 0x0f, 0xf3, 0x71, 0x06, 0x48, 0x2c, 0x7b, 0xac, 0x2f, 0x0e, 0xa9, 0xf8, 0x14, 0x16, 0xe3, + 0xfd, 0x85, 0xfc, 0x6b, 0xdf, 0xc0, 0x78, 0x86, 0x54, 0x5d, 0x87, 0x6c, 0xbf, 0xad, 0x90, 0x45, + 0x3b, 0xd6, 0x67, 0x8a, 0x19, 0x3b, 0x02, 0x5a, 0x09, 0xb2, 0x03, 0xf9, 0x18, 0x37, 0x21, 0xf3, + 0x76, 0xcc, 0x15, 0x28, 0x2e, 0xdb, 0x23, 0x9c, 0xc7, 0x4a, 0x90, 0x5d, 0xc8, 0xc7, 0x5c, 0x4b, + 0xb2, 0x62, 0x8f, 0xbb, 0xac, 0xf1, 0x63, 0x3d, 0xba, 0xf7, 0xf9, 0xc2, 0x34, 0xce, 0x2f, 0x4c, + 0xe3, 0xdb, 0x85, 0x69, 0xbc, 0xbb, 0x34, 0x13, 0xe7, 0x97, 0x66, 0xe2, 0xcb, 0xa5, 0x99, 0x38, + 0x5a, 0x1e, 0xf5, 0x13, 0xe3, 0xe4, 0x37, 0xfd, 0xef, 0xee, 0xf7, 0x00, 0x00, 0x00, 0xff, 0xff, + 0x66, 0x80, 0x8a, 0xf8, 0x89, 0x08, 0x00, 0x00, +} + +func (m *UserAccount) 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 *UserAccount) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *UserAccount) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.OperationsCountLeft != 0 { + i = encodeVarintNameserviceAa(dAtA, i, uint64(m.OperationsCountLeft)) + i-- + dAtA[i] = 0x28 + } + if m.NamesCountLeft != 0 { + i = encodeVarintNameserviceAa(dAtA, i, uint64(m.NamesCountLeft)) + i-- + dAtA[i] = 0x20 + } + if m.OwnerSmartContracWalletDeployed { + i-- + if m.OwnerSmartContracWalletDeployed { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 + } + if len(m.OwnerSmartContracWalletAddress) > 0 { + i -= len(m.OwnerSmartContracWalletAddress) + copy(dAtA[i:], m.OwnerSmartContracWalletAddress) + i = encodeVarintNameserviceAa(dAtA, i, uint64(len(m.OwnerSmartContracWalletAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.OwnerEthAddress) > 0 { + i -= len(m.OwnerEthAddress) + copy(dAtA[i:], m.OwnerEthAddress) + i = encodeVarintNameserviceAa(dAtA, i, uint64(len(m.OwnerEthAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *AdminFundUserAccountRequest) 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 *AdminFundUserAccountRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AdminFundUserAccountRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.NamesCount != 0 { + i = encodeVarintNameserviceAa(dAtA, i, uint64(m.NamesCount)) + i-- + dAtA[i] = 0x10 + } + if len(m.OwnerEthAddress) > 0 { + i -= len(m.OwnerEthAddress) + copy(dAtA[i:], m.OwnerEthAddress) + i = encodeVarintNameserviceAa(dAtA, i, uint64(len(m.OwnerEthAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *AdminFundUserAccountRequestSigned) 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 *AdminFundUserAccountRequestSigned) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AdminFundUserAccountRequestSigned) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Signature) > 0 { + i -= len(m.Signature) + copy(dAtA[i:], m.Signature) + i = encodeVarintNameserviceAa(dAtA, i, uint64(len(m.Signature))) + i-- + dAtA[i] = 0x12 + } + if len(m.Payload) > 0 { + i -= len(m.Payload) + copy(dAtA[i:], m.Payload) + i = encodeVarintNameserviceAa(dAtA, i, uint64(len(m.Payload))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *AdminFundGasOperationsRequest) 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 *AdminFundGasOperationsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AdminFundGasOperationsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.OperationsCount != 0 { + i = encodeVarintNameserviceAa(dAtA, i, uint64(m.OperationsCount)) + i-- + dAtA[i] = 0x18 + } + if len(m.OwnerAnyID) > 0 { + i -= len(m.OwnerAnyID) + copy(dAtA[i:], m.OwnerAnyID) + i = encodeVarintNameserviceAa(dAtA, i, uint64(len(m.OwnerAnyID))) + i-- + dAtA[i] = 0x12 + } + if len(m.OwnerEthAddress) > 0 { + i -= len(m.OwnerEthAddress) + copy(dAtA[i:], m.OwnerEthAddress) + i = encodeVarintNameserviceAa(dAtA, i, uint64(len(m.OwnerEthAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *AdminFundGasOperationsRequestSigned) 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 *AdminFundGasOperationsRequestSigned) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AdminFundGasOperationsRequestSigned) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Signature) > 0 { + i -= len(m.Signature) + copy(dAtA[i:], m.Signature) + i = encodeVarintNameserviceAa(dAtA, i, uint64(len(m.Signature))) + i-- + dAtA[i] = 0x12 + } + if len(m.Payload) > 0 { + i -= len(m.Payload) + copy(dAtA[i:], m.Payload) + i = encodeVarintNameserviceAa(dAtA, i, uint64(len(m.Payload))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetUserAccountRequest) 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 *GetUserAccountRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetUserAccountRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.OwnerEthAddress) > 0 { + i -= len(m.OwnerEthAddress) + copy(dAtA[i:], m.OwnerEthAddress) + i = encodeVarintNameserviceAa(dAtA, i, uint64(len(m.OwnerEthAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetDataNameRegisterResponse) 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 *GetDataNameRegisterResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetDataNameRegisterResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Context) > 0 { + i -= len(m.Context) + copy(dAtA[i:], m.Context) + i = encodeVarintNameserviceAa(dAtA, i, uint64(len(m.Context))) + i-- + dAtA[i] = 0x12 + } + if len(m.Data) > 0 { + i -= len(m.Data) + copy(dAtA[i:], m.Data) + i = encodeVarintNameserviceAa(dAtA, i, uint64(len(m.Data))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *CreateUserOperationRequest) 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 *CreateUserOperationRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CreateUserOperationRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.OwnerAnyID) > 0 { + i -= len(m.OwnerAnyID) + copy(dAtA[i:], m.OwnerAnyID) + i = encodeVarintNameserviceAa(dAtA, i, uint64(len(m.OwnerAnyID))) + i-- + dAtA[i] = 0x2a + } + if len(m.OwnerEthAddress) > 0 { + i -= len(m.OwnerEthAddress) + copy(dAtA[i:], m.OwnerEthAddress) + i = encodeVarintNameserviceAa(dAtA, i, uint64(len(m.OwnerEthAddress))) + i-- + dAtA[i] = 0x22 + } + if len(m.Context) > 0 { + i -= len(m.Context) + copy(dAtA[i:], m.Context) + i = encodeVarintNameserviceAa(dAtA, i, uint64(len(m.Context))) + i-- + dAtA[i] = 0x1a + } + if len(m.SignedData) > 0 { + i -= len(m.SignedData) + copy(dAtA[i:], m.SignedData) + i = encodeVarintNameserviceAa(dAtA, i, uint64(len(m.SignedData))) + i-- + dAtA[i] = 0x12 + } + if len(m.Data) > 0 { + i -= len(m.Data) + copy(dAtA[i:], m.Data) + i = encodeVarintNameserviceAa(dAtA, i, uint64(len(m.Data))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *CreateUserOperationRequestSigned) 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 *CreateUserOperationRequestSigned) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CreateUserOperationRequestSigned) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Signature) > 0 { + i -= len(m.Signature) + copy(dAtA[i:], m.Signature) + i = encodeVarintNameserviceAa(dAtA, i, uint64(len(m.Signature))) + i-- + dAtA[i] = 0x12 + } + if len(m.Payload) > 0 { + i -= len(m.Payload) + copy(dAtA[i:], m.Payload) + i = encodeVarintNameserviceAa(dAtA, i, uint64(len(m.Payload))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *NameRegisterRequest) 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 *NameRegisterRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *NameRegisterRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.SpaceId) > 0 { + i -= len(m.SpaceId) + copy(dAtA[i:], m.SpaceId) + i = encodeVarintNameserviceAa(dAtA, i, uint64(len(m.SpaceId))) + i-- + dAtA[i] = 0x22 + } + if len(m.OwnerEthAddress) > 0 { + i -= len(m.OwnerEthAddress) + copy(dAtA[i:], m.OwnerEthAddress) + i = encodeVarintNameserviceAa(dAtA, i, uint64(len(m.OwnerEthAddress))) + i-- + dAtA[i] = 0x1a + } + if len(m.OwnerAnyAddress) > 0 { + i -= len(m.OwnerAnyAddress) + copy(dAtA[i:], m.OwnerAnyAddress) + i = encodeVarintNameserviceAa(dAtA, i, uint64(len(m.OwnerAnyAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.FullName) > 0 { + i -= len(m.FullName) + copy(dAtA[i:], m.FullName) + i = encodeVarintNameserviceAa(dAtA, i, uint64(len(m.FullName))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetOperationStatusRequest) 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 *GetOperationStatusRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetOperationStatusRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.OperationId) > 0 { + i -= len(m.OperationId) + copy(dAtA[i:], m.OperationId) + i = encodeVarintNameserviceAa(dAtA, i, uint64(len(m.OperationId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *OperationResponse) 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 *OperationResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *OperationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.OperationState != 0 { + i = encodeVarintNameserviceAa(dAtA, i, uint64(m.OperationState)) + i-- + dAtA[i] = 0x10 + } + if len(m.OperationId) > 0 { + i -= len(m.OperationId) + copy(dAtA[i:], m.OperationId) + i = encodeVarintNameserviceAa(dAtA, i, uint64(len(m.OperationId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintNameserviceAa(dAtA []byte, offset int, v uint64) int { + offset -= sovNameserviceAa(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *UserAccount) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.OwnerEthAddress) + if l > 0 { + n += 1 + l + sovNameserviceAa(uint64(l)) + } + l = len(m.OwnerSmartContracWalletAddress) + if l > 0 { + n += 1 + l + sovNameserviceAa(uint64(l)) + } + if m.OwnerSmartContracWalletDeployed { + n += 2 + } + if m.NamesCountLeft != 0 { + n += 1 + sovNameserviceAa(uint64(m.NamesCountLeft)) + } + if m.OperationsCountLeft != 0 { + n += 1 + sovNameserviceAa(uint64(m.OperationsCountLeft)) + } + return n +} + +func (m *AdminFundUserAccountRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.OwnerEthAddress) + if l > 0 { + n += 1 + l + sovNameserviceAa(uint64(l)) + } + if m.NamesCount != 0 { + n += 1 + sovNameserviceAa(uint64(m.NamesCount)) + } + return n +} + +func (m *AdminFundUserAccountRequestSigned) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Payload) + if l > 0 { + n += 1 + l + sovNameserviceAa(uint64(l)) + } + l = len(m.Signature) + if l > 0 { + n += 1 + l + sovNameserviceAa(uint64(l)) + } + return n +} + +func (m *AdminFundGasOperationsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.OwnerEthAddress) + if l > 0 { + n += 1 + l + sovNameserviceAa(uint64(l)) + } + l = len(m.OwnerAnyID) + if l > 0 { + n += 1 + l + sovNameserviceAa(uint64(l)) + } + if m.OperationsCount != 0 { + n += 1 + sovNameserviceAa(uint64(m.OperationsCount)) + } + return n +} + +func (m *AdminFundGasOperationsRequestSigned) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Payload) + if l > 0 { + n += 1 + l + sovNameserviceAa(uint64(l)) + } + l = len(m.Signature) + if l > 0 { + n += 1 + l + sovNameserviceAa(uint64(l)) + } + return n +} + +func (m *GetUserAccountRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.OwnerEthAddress) + if l > 0 { + n += 1 + l + sovNameserviceAa(uint64(l)) + } + return n +} + +func (m *GetDataNameRegisterResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Data) + if l > 0 { + n += 1 + l + sovNameserviceAa(uint64(l)) + } + l = len(m.Context) + if l > 0 { + n += 1 + l + sovNameserviceAa(uint64(l)) + } + return n +} + +func (m *CreateUserOperationRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Data) + if l > 0 { + n += 1 + l + sovNameserviceAa(uint64(l)) + } + l = len(m.SignedData) + if l > 0 { + n += 1 + l + sovNameserviceAa(uint64(l)) + } + l = len(m.Context) + if l > 0 { + n += 1 + l + sovNameserviceAa(uint64(l)) + } + l = len(m.OwnerEthAddress) + if l > 0 { + n += 1 + l + sovNameserviceAa(uint64(l)) + } + l = len(m.OwnerAnyID) + if l > 0 { + n += 1 + l + sovNameserviceAa(uint64(l)) + } + return n +} + +func (m *CreateUserOperationRequestSigned) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Payload) + if l > 0 { + n += 1 + l + sovNameserviceAa(uint64(l)) + } + l = len(m.Signature) + if l > 0 { + n += 1 + l + sovNameserviceAa(uint64(l)) + } + return n +} + +func (m *NameRegisterRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.FullName) + if l > 0 { + n += 1 + l + sovNameserviceAa(uint64(l)) + } + l = len(m.OwnerAnyAddress) + if l > 0 { + n += 1 + l + sovNameserviceAa(uint64(l)) + } + l = len(m.OwnerEthAddress) + if l > 0 { + n += 1 + l + sovNameserviceAa(uint64(l)) + } + l = len(m.SpaceId) + if l > 0 { + n += 1 + l + sovNameserviceAa(uint64(l)) + } + return n +} + +func (m *GetOperationStatusRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.OperationId) + if l > 0 { + n += 1 + l + sovNameserviceAa(uint64(l)) + } + return n +} + +func (m *OperationResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.OperationId) + if l > 0 { + n += 1 + l + sovNameserviceAa(uint64(l)) + } + if m.OperationState != 0 { + n += 1 + sovNameserviceAa(uint64(m.OperationState)) + } + return n +} + +func sovNameserviceAa(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozNameserviceAa(x uint64) (n int) { + return sovNameserviceAa(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *UserAccount) 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 ErrIntOverflowNameserviceAa + } + 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: UserAccount: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UserAccount: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerEthAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNameserviceAa + } + 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 ErrInvalidLengthNameserviceAa + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthNameserviceAa + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OwnerEthAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerSmartContracWalletAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNameserviceAa + } + 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 ErrInvalidLengthNameserviceAa + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthNameserviceAa + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OwnerSmartContracWalletAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerSmartContracWalletDeployed", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNameserviceAa + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.OwnerSmartContracWalletDeployed = bool(v != 0) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NamesCountLeft", wireType) + } + m.NamesCountLeft = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNameserviceAa + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NamesCountLeft |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OperationsCountLeft", wireType) + } + m.OperationsCountLeft = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNameserviceAa + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.OperationsCountLeft |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipNameserviceAa(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthNameserviceAa + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AdminFundUserAccountRequest) 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 ErrIntOverflowNameserviceAa + } + 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: AdminFundUserAccountRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AdminFundUserAccountRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerEthAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNameserviceAa + } + 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 ErrInvalidLengthNameserviceAa + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthNameserviceAa + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OwnerEthAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NamesCount", wireType) + } + m.NamesCount = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNameserviceAa + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NamesCount |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipNameserviceAa(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthNameserviceAa + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AdminFundUserAccountRequestSigned) 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 ErrIntOverflowNameserviceAa + } + 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: AdminFundUserAccountRequestSigned: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AdminFundUserAccountRequestSigned: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNameserviceAa + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthNameserviceAa + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthNameserviceAa + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...) + if m.Payload == nil { + m.Payload = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNameserviceAa + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthNameserviceAa + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthNameserviceAa + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) + if m.Signature == nil { + m.Signature = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipNameserviceAa(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthNameserviceAa + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AdminFundGasOperationsRequest) 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 ErrIntOverflowNameserviceAa + } + 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: AdminFundGasOperationsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AdminFundGasOperationsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerEthAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNameserviceAa + } + 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 ErrInvalidLengthNameserviceAa + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthNameserviceAa + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OwnerEthAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerAnyID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNameserviceAa + } + 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 ErrInvalidLengthNameserviceAa + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthNameserviceAa + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OwnerAnyID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OperationsCount", wireType) + } + m.OperationsCount = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNameserviceAa + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.OperationsCount |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipNameserviceAa(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthNameserviceAa + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AdminFundGasOperationsRequestSigned) 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 ErrIntOverflowNameserviceAa + } + 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: AdminFundGasOperationsRequestSigned: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AdminFundGasOperationsRequestSigned: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNameserviceAa + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthNameserviceAa + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthNameserviceAa + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...) + if m.Payload == nil { + m.Payload = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNameserviceAa + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthNameserviceAa + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthNameserviceAa + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) + if m.Signature == nil { + m.Signature = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipNameserviceAa(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthNameserviceAa + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetUserAccountRequest) 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 ErrIntOverflowNameserviceAa + } + 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: GetUserAccountRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetUserAccountRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerEthAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNameserviceAa + } + 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 ErrInvalidLengthNameserviceAa + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthNameserviceAa + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OwnerEthAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipNameserviceAa(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthNameserviceAa + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetDataNameRegisterResponse) 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 ErrIntOverflowNameserviceAa + } + 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: GetDataNameRegisterResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetDataNameRegisterResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNameserviceAa + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthNameserviceAa + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthNameserviceAa + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) + if m.Data == nil { + m.Data = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Context", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNameserviceAa + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthNameserviceAa + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthNameserviceAa + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Context = append(m.Context[:0], dAtA[iNdEx:postIndex]...) + if m.Context == nil { + m.Context = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipNameserviceAa(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthNameserviceAa + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CreateUserOperationRequest) 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 ErrIntOverflowNameserviceAa + } + 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: CreateUserOperationRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CreateUserOperationRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNameserviceAa + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthNameserviceAa + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthNameserviceAa + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) + if m.Data == nil { + m.Data = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SignedData", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNameserviceAa + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthNameserviceAa + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthNameserviceAa + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SignedData = append(m.SignedData[:0], dAtA[iNdEx:postIndex]...) + if m.SignedData == nil { + m.SignedData = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Context", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNameserviceAa + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthNameserviceAa + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthNameserviceAa + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Context = append(m.Context[:0], dAtA[iNdEx:postIndex]...) + if m.Context == nil { + m.Context = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerEthAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNameserviceAa + } + 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 ErrInvalidLengthNameserviceAa + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthNameserviceAa + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OwnerEthAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerAnyID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNameserviceAa + } + 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 ErrInvalidLengthNameserviceAa + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthNameserviceAa + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OwnerAnyID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipNameserviceAa(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthNameserviceAa + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CreateUserOperationRequestSigned) 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 ErrIntOverflowNameserviceAa + } + 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: CreateUserOperationRequestSigned: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CreateUserOperationRequestSigned: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNameserviceAa + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthNameserviceAa + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthNameserviceAa + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...) + if m.Payload == nil { + m.Payload = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNameserviceAa + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthNameserviceAa + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthNameserviceAa + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signature = append(m.Signature[:0], dAtA[iNdEx:postIndex]...) + if m.Signature == nil { + m.Signature = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipNameserviceAa(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthNameserviceAa + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NameRegisterRequest) 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 ErrIntOverflowNameserviceAa + } + 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: NameRegisterRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NameRegisterRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FullName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNameserviceAa + } + 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 ErrInvalidLengthNameserviceAa + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthNameserviceAa + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FullName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerAnyAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNameserviceAa + } + 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 ErrInvalidLengthNameserviceAa + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthNameserviceAa + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OwnerAnyAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerEthAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNameserviceAa + } + 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 ErrInvalidLengthNameserviceAa + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthNameserviceAa + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OwnerEthAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpaceId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNameserviceAa + } + 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 ErrInvalidLengthNameserviceAa + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthNameserviceAa + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SpaceId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipNameserviceAa(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthNameserviceAa + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetOperationStatusRequest) 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 ErrIntOverflowNameserviceAa + } + 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: GetOperationStatusRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetOperationStatusRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OperationId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNameserviceAa + } + 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 ErrInvalidLengthNameserviceAa + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthNameserviceAa + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OperationId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipNameserviceAa(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthNameserviceAa + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *OperationResponse) 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 ErrIntOverflowNameserviceAa + } + 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: OperationResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OperationResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OperationId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNameserviceAa + } + 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 ErrInvalidLengthNameserviceAa + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthNameserviceAa + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OperationId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OperationState", wireType) + } + m.OperationState = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNameserviceAa + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.OperationState |= OperationState(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipNameserviceAa(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthNameserviceAa + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipNameserviceAa(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowNameserviceAa + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowNameserviceAa + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowNameserviceAa + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthNameserviceAa + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupNameserviceAa + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthNameserviceAa + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthNameserviceAa = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowNameserviceAa = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupNameserviceAa = fmt.Errorf("proto: unexpected end of group") +) diff --git a/nameservice/nameserviceproto/nameservice_aa_drpc.pb.go b/nameservice/nameserviceproto/nameservice_aa_drpc.pb.go new file mode 100644 index 00000000..afc93af8 --- /dev/null +++ b/nameservice/nameserviceproto/nameservice_aa_drpc.pb.go @@ -0,0 +1,313 @@ +// Code generated by protoc-gen-go-drpc. DO NOT EDIT. +// protoc-gen-go-drpc version: v0.0.33 +// source: nameservice/nameserviceproto/protos/nameservice_aa.proto + +package nameserviceproto + +import ( + bytes "bytes" + context "context" + errors "errors" + jsonpb "github.com/gogo/protobuf/jsonpb" + proto "github.com/gogo/protobuf/proto" + drpc "storj.io/drpc" + drpcerr "storj.io/drpc/drpcerr" +) + +type drpcEncoding_File_nameservice_nameserviceproto_protos_nameservice_aa_proto struct{} + +func (drpcEncoding_File_nameservice_nameserviceproto_protos_nameservice_aa_proto) Marshal(msg drpc.Message) ([]byte, error) { + return proto.Marshal(msg.(proto.Message)) +} + +func (drpcEncoding_File_nameservice_nameserviceproto_protos_nameservice_aa_proto) Unmarshal(buf []byte, msg drpc.Message) error { + return proto.Unmarshal(buf, msg.(proto.Message)) +} + +func (drpcEncoding_File_nameservice_nameserviceproto_protos_nameservice_aa_proto) JSONMarshal(msg drpc.Message) ([]byte, error) { + var buf bytes.Buffer + err := new(jsonpb.Marshaler).Marshal(&buf, msg.(proto.Message)) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} + +func (drpcEncoding_File_nameservice_nameserviceproto_protos_nameservice_aa_proto) JSONUnmarshal(buf []byte, msg drpc.Message) error { + return jsonpb.Unmarshal(bytes.NewReader(buf), msg.(proto.Message)) +} + +type DRPCAnynsAccountAbstractionClient interface { + DRPCConn() drpc.Conn + + GetOperation(ctx context.Context, in *GetOperationStatusRequest) (*OperationResponse, error) + AdminFundUserAccount(ctx context.Context, in *AdminFundUserAccountRequestSigned) (*OperationResponse, error) + AdminFundGasOperations(ctx context.Context, in *AdminFundGasOperationsRequestSigned) (*OperationResponse, error) + GetUserAccount(ctx context.Context, in *GetUserAccountRequest) (*UserAccount, error) + GetDataNameRegister(ctx context.Context, in *NameRegisterRequest) (*GetDataNameRegisterResponse, error) + CreateUserOperation(ctx context.Context, in *CreateUserOperationRequestSigned) (*OperationResponse, error) +} + +type drpcAnynsAccountAbstractionClient struct { + cc drpc.Conn +} + +func NewDRPCAnynsAccountAbstractionClient(cc drpc.Conn) DRPCAnynsAccountAbstractionClient { + return &drpcAnynsAccountAbstractionClient{cc} +} + +func (c *drpcAnynsAccountAbstractionClient) DRPCConn() drpc.Conn { return c.cc } + +func (c *drpcAnynsAccountAbstractionClient) GetOperation(ctx context.Context, in *GetOperationStatusRequest) (*OperationResponse, error) { + out := new(OperationResponse) + err := c.cc.Invoke(ctx, "/AnynsAccountAbstraction/GetOperation", drpcEncoding_File_nameservice_nameserviceproto_protos_nameservice_aa_proto{}, in, out) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *drpcAnynsAccountAbstractionClient) AdminFundUserAccount(ctx context.Context, in *AdminFundUserAccountRequestSigned) (*OperationResponse, error) { + out := new(OperationResponse) + err := c.cc.Invoke(ctx, "/AnynsAccountAbstraction/AdminFundUserAccount", drpcEncoding_File_nameservice_nameserviceproto_protos_nameservice_aa_proto{}, in, out) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *drpcAnynsAccountAbstractionClient) AdminFundGasOperations(ctx context.Context, in *AdminFundGasOperationsRequestSigned) (*OperationResponse, error) { + out := new(OperationResponse) + err := c.cc.Invoke(ctx, "/AnynsAccountAbstraction/AdminFundGasOperations", drpcEncoding_File_nameservice_nameserviceproto_protos_nameservice_aa_proto{}, in, out) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *drpcAnynsAccountAbstractionClient) GetUserAccount(ctx context.Context, in *GetUserAccountRequest) (*UserAccount, error) { + out := new(UserAccount) + err := c.cc.Invoke(ctx, "/AnynsAccountAbstraction/GetUserAccount", drpcEncoding_File_nameservice_nameserviceproto_protos_nameservice_aa_proto{}, in, out) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *drpcAnynsAccountAbstractionClient) GetDataNameRegister(ctx context.Context, in *NameRegisterRequest) (*GetDataNameRegisterResponse, error) { + out := new(GetDataNameRegisterResponse) + err := c.cc.Invoke(ctx, "/AnynsAccountAbstraction/GetDataNameRegister", drpcEncoding_File_nameservice_nameserviceproto_protos_nameservice_aa_proto{}, in, out) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *drpcAnynsAccountAbstractionClient) CreateUserOperation(ctx context.Context, in *CreateUserOperationRequestSigned) (*OperationResponse, error) { + out := new(OperationResponse) + err := c.cc.Invoke(ctx, "/AnynsAccountAbstraction/CreateUserOperation", drpcEncoding_File_nameservice_nameserviceproto_protos_nameservice_aa_proto{}, in, out) + if err != nil { + return nil, err + } + return out, nil +} + +type DRPCAnynsAccountAbstractionServer interface { + GetOperation(context.Context, *GetOperationStatusRequest) (*OperationResponse, error) + AdminFundUserAccount(context.Context, *AdminFundUserAccountRequestSigned) (*OperationResponse, error) + AdminFundGasOperations(context.Context, *AdminFundGasOperationsRequestSigned) (*OperationResponse, error) + GetUserAccount(context.Context, *GetUserAccountRequest) (*UserAccount, error) + GetDataNameRegister(context.Context, *NameRegisterRequest) (*GetDataNameRegisterResponse, error) + CreateUserOperation(context.Context, *CreateUserOperationRequestSigned) (*OperationResponse, error) +} + +type DRPCAnynsAccountAbstractionUnimplementedServer struct{} + +func (s *DRPCAnynsAccountAbstractionUnimplementedServer) GetOperation(context.Context, *GetOperationStatusRequest) (*OperationResponse, error) { + return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) +} + +func (s *DRPCAnynsAccountAbstractionUnimplementedServer) AdminFundUserAccount(context.Context, *AdminFundUserAccountRequestSigned) (*OperationResponse, error) { + return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) +} + +func (s *DRPCAnynsAccountAbstractionUnimplementedServer) AdminFundGasOperations(context.Context, *AdminFundGasOperationsRequestSigned) (*OperationResponse, error) { + return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) +} + +func (s *DRPCAnynsAccountAbstractionUnimplementedServer) GetUserAccount(context.Context, *GetUserAccountRequest) (*UserAccount, error) { + return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) +} + +func (s *DRPCAnynsAccountAbstractionUnimplementedServer) GetDataNameRegister(context.Context, *NameRegisterRequest) (*GetDataNameRegisterResponse, error) { + return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) +} + +func (s *DRPCAnynsAccountAbstractionUnimplementedServer) CreateUserOperation(context.Context, *CreateUserOperationRequestSigned) (*OperationResponse, error) { + return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) +} + +type DRPCAnynsAccountAbstractionDescription struct{} + +func (DRPCAnynsAccountAbstractionDescription) NumMethods() int { return 6 } + +func (DRPCAnynsAccountAbstractionDescription) Method(n int) (string, drpc.Encoding, drpc.Receiver, interface{}, bool) { + switch n { + case 0: + return "/AnynsAccountAbstraction/GetOperation", drpcEncoding_File_nameservice_nameserviceproto_protos_nameservice_aa_proto{}, + func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { + return srv.(DRPCAnynsAccountAbstractionServer). + GetOperation( + ctx, + in1.(*GetOperationStatusRequest), + ) + }, DRPCAnynsAccountAbstractionServer.GetOperation, true + case 1: + return "/AnynsAccountAbstraction/AdminFundUserAccount", drpcEncoding_File_nameservice_nameserviceproto_protos_nameservice_aa_proto{}, + func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { + return srv.(DRPCAnynsAccountAbstractionServer). + AdminFundUserAccount( + ctx, + in1.(*AdminFundUserAccountRequestSigned), + ) + }, DRPCAnynsAccountAbstractionServer.AdminFundUserAccount, true + case 2: + return "/AnynsAccountAbstraction/AdminFundGasOperations", drpcEncoding_File_nameservice_nameserviceproto_protos_nameservice_aa_proto{}, + func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { + return srv.(DRPCAnynsAccountAbstractionServer). + AdminFundGasOperations( + ctx, + in1.(*AdminFundGasOperationsRequestSigned), + ) + }, DRPCAnynsAccountAbstractionServer.AdminFundGasOperations, true + case 3: + return "/AnynsAccountAbstraction/GetUserAccount", drpcEncoding_File_nameservice_nameserviceproto_protos_nameservice_aa_proto{}, + func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { + return srv.(DRPCAnynsAccountAbstractionServer). + GetUserAccount( + ctx, + in1.(*GetUserAccountRequest), + ) + }, DRPCAnynsAccountAbstractionServer.GetUserAccount, true + case 4: + return "/AnynsAccountAbstraction/GetDataNameRegister", drpcEncoding_File_nameservice_nameserviceproto_protos_nameservice_aa_proto{}, + func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { + return srv.(DRPCAnynsAccountAbstractionServer). + GetDataNameRegister( + ctx, + in1.(*NameRegisterRequest), + ) + }, DRPCAnynsAccountAbstractionServer.GetDataNameRegister, true + case 5: + return "/AnynsAccountAbstraction/CreateUserOperation", drpcEncoding_File_nameservice_nameserviceproto_protos_nameservice_aa_proto{}, + func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { + return srv.(DRPCAnynsAccountAbstractionServer). + CreateUserOperation( + ctx, + in1.(*CreateUserOperationRequestSigned), + ) + }, DRPCAnynsAccountAbstractionServer.CreateUserOperation, true + default: + return "", nil, nil, nil, false + } +} + +func DRPCRegisterAnynsAccountAbstraction(mux drpc.Mux, impl DRPCAnynsAccountAbstractionServer) error { + return mux.Register(impl, DRPCAnynsAccountAbstractionDescription{}) +} + +type DRPCAnynsAccountAbstraction_GetOperationStream interface { + drpc.Stream + SendAndClose(*OperationResponse) error +} + +type drpcAnynsAccountAbstraction_GetOperationStream struct { + drpc.Stream +} + +func (x *drpcAnynsAccountAbstraction_GetOperationStream) SendAndClose(m *OperationResponse) error { + if err := x.MsgSend(m, drpcEncoding_File_nameservice_nameserviceproto_protos_nameservice_aa_proto{}); err != nil { + return err + } + return x.CloseSend() +} + +type DRPCAnynsAccountAbstraction_AdminFundUserAccountStream interface { + drpc.Stream + SendAndClose(*OperationResponse) error +} + +type drpcAnynsAccountAbstraction_AdminFundUserAccountStream struct { + drpc.Stream +} + +func (x *drpcAnynsAccountAbstraction_AdminFundUserAccountStream) SendAndClose(m *OperationResponse) error { + if err := x.MsgSend(m, drpcEncoding_File_nameservice_nameserviceproto_protos_nameservice_aa_proto{}); err != nil { + return err + } + return x.CloseSend() +} + +type DRPCAnynsAccountAbstraction_AdminFundGasOperationsStream interface { + drpc.Stream + SendAndClose(*OperationResponse) error +} + +type drpcAnynsAccountAbstraction_AdminFundGasOperationsStream struct { + drpc.Stream +} + +func (x *drpcAnynsAccountAbstraction_AdminFundGasOperationsStream) SendAndClose(m *OperationResponse) error { + if err := x.MsgSend(m, drpcEncoding_File_nameservice_nameserviceproto_protos_nameservice_aa_proto{}); err != nil { + return err + } + return x.CloseSend() +} + +type DRPCAnynsAccountAbstraction_GetUserAccountStream interface { + drpc.Stream + SendAndClose(*UserAccount) error +} + +type drpcAnynsAccountAbstraction_GetUserAccountStream struct { + drpc.Stream +} + +func (x *drpcAnynsAccountAbstraction_GetUserAccountStream) SendAndClose(m *UserAccount) error { + if err := x.MsgSend(m, drpcEncoding_File_nameservice_nameserviceproto_protos_nameservice_aa_proto{}); err != nil { + return err + } + return x.CloseSend() +} + +type DRPCAnynsAccountAbstraction_GetDataNameRegisterStream interface { + drpc.Stream + SendAndClose(*GetDataNameRegisterResponse) error +} + +type drpcAnynsAccountAbstraction_GetDataNameRegisterStream struct { + drpc.Stream +} + +func (x *drpcAnynsAccountAbstraction_GetDataNameRegisterStream) SendAndClose(m *GetDataNameRegisterResponse) error { + if err := x.MsgSend(m, drpcEncoding_File_nameservice_nameserviceproto_protos_nameservice_aa_proto{}); err != nil { + return err + } + return x.CloseSend() +} + +type DRPCAnynsAccountAbstraction_CreateUserOperationStream interface { + drpc.Stream + SendAndClose(*OperationResponse) error +} + +type drpcAnynsAccountAbstraction_CreateUserOperationStream struct { + drpc.Stream +} + +func (x *drpcAnynsAccountAbstraction_CreateUserOperationStream) SendAndClose(m *OperationResponse) error { + if err := x.MsgSend(m, drpcEncoding_File_nameservice_nameserviceproto_protos_nameservice_aa_proto{}); err != nil { + return err + } + return x.CloseSend() +} diff --git a/nameservice/nameserviceproto/nameservice_drpc.pb.go b/nameservice/nameserviceproto/nameservice_drpc.pb.go new file mode 100644 index 00000000..47ed633b --- /dev/null +++ b/nameservice/nameserviceproto/nameservice_drpc.pb.go @@ -0,0 +1,153 @@ +// Code generated by protoc-gen-go-drpc. DO NOT EDIT. +// protoc-gen-go-drpc version: v0.0.33 +// source: nameservice/nameserviceproto/protos/nameservice.proto + +package nameserviceproto + +import ( + bytes "bytes" + context "context" + errors "errors" + jsonpb "github.com/gogo/protobuf/jsonpb" + proto "github.com/gogo/protobuf/proto" + drpc "storj.io/drpc" + drpcerr "storj.io/drpc/drpcerr" +) + +type drpcEncoding_File_nameservice_nameserviceproto_protos_nameservice_proto struct{} + +func (drpcEncoding_File_nameservice_nameserviceproto_protos_nameservice_proto) Marshal(msg drpc.Message) ([]byte, error) { + return proto.Marshal(msg.(proto.Message)) +} + +func (drpcEncoding_File_nameservice_nameserviceproto_protos_nameservice_proto) Unmarshal(buf []byte, msg drpc.Message) error { + return proto.Unmarshal(buf, msg.(proto.Message)) +} + +func (drpcEncoding_File_nameservice_nameserviceproto_protos_nameservice_proto) JSONMarshal(msg drpc.Message) ([]byte, error) { + var buf bytes.Buffer + err := new(jsonpb.Marshaler).Marshal(&buf, msg.(proto.Message)) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} + +func (drpcEncoding_File_nameservice_nameserviceproto_protos_nameservice_proto) JSONUnmarshal(buf []byte, msg drpc.Message) error { + return jsonpb.Unmarshal(bytes.NewReader(buf), msg.(proto.Message)) +} + +type DRPCAnynsClient interface { + DRPCConn() drpc.Conn + + IsNameAvailable(ctx context.Context, in *NameAvailableRequest) (*NameAvailableResponse, error) + GetNameByAddress(ctx context.Context, in *NameByAddressRequest) (*NameByAddressResponse, error) +} + +type drpcAnynsClient struct { + cc drpc.Conn +} + +func NewDRPCAnynsClient(cc drpc.Conn) DRPCAnynsClient { + return &drpcAnynsClient{cc} +} + +func (c *drpcAnynsClient) DRPCConn() drpc.Conn { return c.cc } + +func (c *drpcAnynsClient) IsNameAvailable(ctx context.Context, in *NameAvailableRequest) (*NameAvailableResponse, error) { + out := new(NameAvailableResponse) + err := c.cc.Invoke(ctx, "/Anyns/IsNameAvailable", drpcEncoding_File_nameservice_nameserviceproto_protos_nameservice_proto{}, in, out) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *drpcAnynsClient) GetNameByAddress(ctx context.Context, in *NameByAddressRequest) (*NameByAddressResponse, error) { + out := new(NameByAddressResponse) + err := c.cc.Invoke(ctx, "/Anyns/GetNameByAddress", drpcEncoding_File_nameservice_nameserviceproto_protos_nameservice_proto{}, in, out) + if err != nil { + return nil, err + } + return out, nil +} + +type DRPCAnynsServer interface { + IsNameAvailable(context.Context, *NameAvailableRequest) (*NameAvailableResponse, error) + GetNameByAddress(context.Context, *NameByAddressRequest) (*NameByAddressResponse, error) +} + +type DRPCAnynsUnimplementedServer struct{} + +func (s *DRPCAnynsUnimplementedServer) IsNameAvailable(context.Context, *NameAvailableRequest) (*NameAvailableResponse, error) { + return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) +} + +func (s *DRPCAnynsUnimplementedServer) GetNameByAddress(context.Context, *NameByAddressRequest) (*NameByAddressResponse, error) { + return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) +} + +type DRPCAnynsDescription struct{} + +func (DRPCAnynsDescription) NumMethods() int { return 2 } + +func (DRPCAnynsDescription) Method(n int) (string, drpc.Encoding, drpc.Receiver, interface{}, bool) { + switch n { + case 0: + return "/Anyns/IsNameAvailable", drpcEncoding_File_nameservice_nameserviceproto_protos_nameservice_proto{}, + func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { + return srv.(DRPCAnynsServer). + IsNameAvailable( + ctx, + in1.(*NameAvailableRequest), + ) + }, DRPCAnynsServer.IsNameAvailable, true + case 1: + return "/Anyns/GetNameByAddress", drpcEncoding_File_nameservice_nameserviceproto_protos_nameservice_proto{}, + func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { + return srv.(DRPCAnynsServer). + GetNameByAddress( + ctx, + in1.(*NameByAddressRequest), + ) + }, DRPCAnynsServer.GetNameByAddress, true + default: + return "", nil, nil, nil, false + } +} + +func DRPCRegisterAnyns(mux drpc.Mux, impl DRPCAnynsServer) error { + return mux.Register(impl, DRPCAnynsDescription{}) +} + +type DRPCAnyns_IsNameAvailableStream interface { + drpc.Stream + SendAndClose(*NameAvailableResponse) error +} + +type drpcAnyns_IsNameAvailableStream struct { + drpc.Stream +} + +func (x *drpcAnyns_IsNameAvailableStream) SendAndClose(m *NameAvailableResponse) error { + if err := x.MsgSend(m, drpcEncoding_File_nameservice_nameserviceproto_protos_nameservice_proto{}); err != nil { + return err + } + return x.CloseSend() +} + +type DRPCAnyns_GetNameByAddressStream interface { + drpc.Stream + SendAndClose(*NameByAddressResponse) error +} + +type drpcAnyns_GetNameByAddressStream struct { + drpc.Stream +} + +func (x *drpcAnyns_GetNameByAddressStream) SendAndClose(m *NameByAddressResponse) error { + if err := x.MsgSend(m, drpcEncoding_File_nameservice_nameserviceproto_protos_nameservice_proto{}); err != nil { + return err + } + return x.CloseSend() +} diff --git a/nameservice/nameserviceproto/protos/nameservice.proto b/nameservice/nameserviceproto/protos/nameservice.proto new file mode 100644 index 00000000..778e46e4 --- /dev/null +++ b/nameservice/nameserviceproto/protos/nameservice.proto @@ -0,0 +1,46 @@ +syntax = "proto3"; +option go_package = "nameservice/nameserviceproto"; + +//import "google/protobuf/timestamp.proto"; + +message NameAvailableRequest { + // Name including .any suffix + string fullName = 1; +} + +message NameByAddressRequest { + // An Ethereum address that owns that name + string ownerEthAddress = 1; +} + +message NameAvailableResponse { + bool available = 1; + + // An Ethereum address that owns that name + // This field is non-empty only if name is "already registered" + string ownerEthAddress = 2; + + // A content hash attached to this name + // This field is non-empty only if name is "already registered" + string ownerAnyAddress = 3; + + // A SpaceID attached to this name + // This field is non-empty only if name is "already registered" + string spaceId = 4; + + // doestn't work with marashalling/unmarshalling + //google.protobuf.Timestamp nameExpires = 5 [(gogoproto.stdtime) = true]; + int64 nameExpires = 5; +} + +message NameByAddressResponse { + bool found = 1; + + string name = 2; +} + +service Anyns { + // Check if name is free or get the attached information if not + rpc IsNameAvailable(NameAvailableRequest) returns (NameAvailableResponse) {} + rpc GetNameByAddress(NameByAddressRequest) returns (NameByAddressResponse) {} +} diff --git a/nameservice/nameserviceproto/protos/nameservice_aa.proto b/nameservice/nameserviceproto/protos/nameservice_aa.proto new file mode 100644 index 00000000..82d59bbe --- /dev/null +++ b/nameservice/nameserviceproto/protos/nameservice_aa.proto @@ -0,0 +1,158 @@ +syntax = "proto3"; +option go_package = "nameservice/nameserviceproto"; + +message UserAccount { + // An Ethereum address that owns that account + string ownerEthAddress = 1; + + // This smart contract really controls all names + // you can ask .owner() method to get 'ownerEthAddress' + string ownerSmartContracWalletAddress = 2; + + // The ownerSmartContracWalletAddress field is calculated automatically + // from ownerEthAddress even if SCW is not deployed yet + // SCW is deployed automatically after first operation + bool ownerSmartContracWalletDeployed = 3; + + // Number of names that the user can buy. We will mint him tokens that he can use to buy names + // (one token per name) + uint64 namesCountLeft = 4; + + // Number of gas operations: update name, add new data, etc + uint64 operationsCountLeft = 5; +} + +message AdminFundUserAccountRequest { + // An Ethereum address that owns that name + string ownerEthAddress = 1; + + // Number of names that user can buy. We will mint him tokens that he can use to buy names + // (one token per name) + uint64 namesCount = 2; +} + +message AdminFundUserAccountRequestSigned { + // AdminFundUserAccountRequest struct + bytes payload = 1; + + // payload signed by Admin of this service + bytes signature = 2; +} + +message AdminFundGasOperationsRequest { + // An Ethereum address that owns that name + string ownerEthAddress = 1; + + string ownerAnyID = 2; + + // Number of gas operations: update name, add new data, etc + uint64 operationsCount = 3; +} + +message AdminFundGasOperationsRequestSigned { + // AdminFundGasOperationsRequest struct + bytes payload = 1; + + // payload signed by Admin of this service + bytes signature = 2; +} + +// no signature required here +message GetUserAccountRequest { + // An Ethereum address that owns that account + string ownerEthAddress = 1; +} + +message GetDataNameRegisterResponse { + bytes data = 1; + + bytes context = 2; +} + +message CreateUserOperationRequest { + bytes data = 1; + + // "data" signed with Ethereum private key + bytes signedData = 2; + + bytes context = 3; + + string ownerEthAddress = 4; + + string ownerAnyID = 5; +} + +message CreateUserOperationRequestSigned { + // CreateUserOperationRequest struct + bytes payload = 1; + + // payload signed with Anytype identity + bytes signature = 2; +} + +message NameRegisterRequest { + string fullName = 1; + + // A content hash attached to this name + string ownerAnyAddress = 2; + + // An Ethereum address that owns that name + string ownerEthAddress = 3; + + // A SpaceID attached to this name + string spaceId = 4; +} + +message GetOperationStatusRequest { + string operationId = 1; +} + +enum OperationState { + Unknown = 0; + + Pending = 1; + PendingOrNotFound = 2; + Completed = 3; + Error = 4; +} + +message OperationResponse { + string operationId = 1; + + OperationState operationState = 2; +} + +service AnynsAccountAbstraction { +// COMMON METHODS: + rpc GetOperation(GetOperationStatusRequest) returns (OperationResponse) {} + +// ADMIN METHODS: + // Will send "access tokens" to the user's account (to his SmartContractWallet). + // User will be able to use these "access tokens" to register his name later directly. + // + // Blocking, will send TX to EVM chain + // If finished without error -> please use GetUserAccount to get updated info + rpc AdminFundUserAccount(AdminFundUserAccountRequestSigned) returns (OperationResponse) {} + + // Each operation is a single blockchain TX like "name update". + // User will be able to send operations without having any gas in his wallet later + rpc AdminFundGasOperations(AdminFundGasOperationsRequestSigned) returns (OperationResponse) {} + +// USER METHODS: + // Use it to: + // 1 - get your SmartContractWallet address + // 2 - get how many operations you still have + rpc GetUserAccount(GetUserAccountRequest) returns (UserAccount) {} + + // Example usage: + // 1. get data + context + // 2. sign it with your Ethereum private key + // 3. send it using CreateUserOperation + // 4. check operation status using GetOperation + rpc GetDataNameRegister(NameRegisterRequest) returns (GetDataNameRegisterResponse) {} + + // TODO + //rpc GetDataNameUpdate(NameUpdateRequest) returns (GetDataNameRegisterResponse) {} + + rpc CreateUserOperation(CreateUserOperationRequestSigned) returns (OperationResponse) {} +}