From c77a5fe2ff79d3b57a51b49ecdc9d53a7267be4b Mon Sep 17 00:00:00 2001 From: Anton Akentev Date: Wed, 6 Mar 2024 17:25:50 +0000 Subject: [PATCH] Add FinalizeSubscription method --- .../paymentserviceproto/paymentservice.pb.go | 778 ++++++++++++++++-- .../paymentservice_drpc.pb.go | 46 +- .../protos/paymentservice.proto | 31 +- 3 files changed, 775 insertions(+), 80 deletions(-) diff --git a/paymentservice/paymentserviceproto/paymentservice.pb.go b/paymentservice/paymentserviceproto/paymentservice.pb.go index c41edb35..97be3f29 100644 --- a/paymentservice/paymentserviceproto/paymentservice.pb.go +++ b/paymentservice/paymentserviceproto/paymentservice.pb.go @@ -84,21 +84,21 @@ const ( // when buying from other side - some data is missing in the Subscription // we need to provide additional data after the payment // please call BuySubscription to fill-in needed fields - SubscriptionStatus_StatusPendingRequiresInput SubscriptionStatus = 3 + SubscriptionStatus_StatusPendingRequiresFinalization SubscriptionStatus = 3 ) var SubscriptionStatus_name = map[int32]string{ 0: "StatusUnknown", 1: "StatusPending", 2: "StatusActive", - 3: "StatusPendingRequiresInput", + 3: "StatusPendingRequiresFinalization", } var SubscriptionStatus_value = map[string]int32{ - "StatusUnknown": 0, - "StatusPending": 1, - "StatusActive": 2, - "StatusPendingRequiresInput": 3, + "StatusUnknown": 0, + "StatusPending": 1, + "StatusActive": 2, + "StatusPendingRequiresFinalization": 3, } func (x SubscriptionStatus) String() string { @@ -541,6 +541,163 @@ func (m *BuySubscriptionResponse) GetPaymentUrl() string { return "" } +type FinalizeSubscriptionRequest struct { + // in the following format: "A5k2d9sFZw84yisTxRnz2bPRd1YPfVfhxqymZ6yESprFTG65" + // you can get it with Account().SignKey.GetPublic().Account() + OwnerAnyId string `protobuf:"bytes,1,opt,name=ownerAnyId,proto3" json:"ownerAnyId,omitempty"` + // this is the owner's main EOA (Externally Owned Account) address + // not AccountAbstraction's SCW (Smart Contract Wallet) address! + // this is required to reserve a name for the owner (later that is done by user) + // in the following format: "0x7a250d5630b4cf539739df2c5dacb4c659f2488d" + OwnerEthAddress string `protobuf:"bytes,2,opt,name=ownerEthAddress,proto3" json:"ownerEthAddress,omitempty"` + // if empty - then no name requested + RequestedAnyName string `protobuf:"bytes,3,opt,name=requestedAnyName,proto3" json:"requestedAnyName,omitempty"` +} + +func (m *FinalizeSubscriptionRequest) Reset() { *m = FinalizeSubscriptionRequest{} } +func (m *FinalizeSubscriptionRequest) String() string { return proto.CompactTextString(m) } +func (*FinalizeSubscriptionRequest) ProtoMessage() {} +func (*FinalizeSubscriptionRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_4feb29dcc5ba50f6, []int{6} +} +func (m *FinalizeSubscriptionRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *FinalizeSubscriptionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_FinalizeSubscriptionRequest.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 *FinalizeSubscriptionRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_FinalizeSubscriptionRequest.Merge(m, src) +} +func (m *FinalizeSubscriptionRequest) XXX_Size() int { + return m.Size() +} +func (m *FinalizeSubscriptionRequest) XXX_DiscardUnknown() { + xxx_messageInfo_FinalizeSubscriptionRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_FinalizeSubscriptionRequest proto.InternalMessageInfo + +func (m *FinalizeSubscriptionRequest) GetOwnerAnyId() string { + if m != nil { + return m.OwnerAnyId + } + return "" +} + +func (m *FinalizeSubscriptionRequest) GetOwnerEthAddress() string { + if m != nil { + return m.OwnerEthAddress + } + return "" +} + +func (m *FinalizeSubscriptionRequest) GetRequestedAnyName() string { + if m != nil { + return m.RequestedAnyName + } + return "" +} + +type FinalizeSubscriptionResponse struct { +} + +func (m *FinalizeSubscriptionResponse) Reset() { *m = FinalizeSubscriptionResponse{} } +func (m *FinalizeSubscriptionResponse) String() string { return proto.CompactTextString(m) } +func (*FinalizeSubscriptionResponse) ProtoMessage() {} +func (*FinalizeSubscriptionResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_4feb29dcc5ba50f6, []int{7} +} +func (m *FinalizeSubscriptionResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *FinalizeSubscriptionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_FinalizeSubscriptionResponse.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 *FinalizeSubscriptionResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_FinalizeSubscriptionResponse.Merge(m, src) +} +func (m *FinalizeSubscriptionResponse) XXX_Size() int { + return m.Size() +} +func (m *FinalizeSubscriptionResponse) XXX_DiscardUnknown() { + xxx_messageInfo_FinalizeSubscriptionResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_FinalizeSubscriptionResponse proto.InternalMessageInfo + +type FinalizeSubscriptionRequestSigned struct { + // VerifyEmailRequest + Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` + // this is payload signed with payload.ownerAnyID + Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` +} + +func (m *FinalizeSubscriptionRequestSigned) Reset() { *m = FinalizeSubscriptionRequestSigned{} } +func (m *FinalizeSubscriptionRequestSigned) String() string { return proto.CompactTextString(m) } +func (*FinalizeSubscriptionRequestSigned) ProtoMessage() {} +func (*FinalizeSubscriptionRequestSigned) Descriptor() ([]byte, []int) { + return fileDescriptor_4feb29dcc5ba50f6, []int{8} +} +func (m *FinalizeSubscriptionRequestSigned) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *FinalizeSubscriptionRequestSigned) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_FinalizeSubscriptionRequestSigned.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 *FinalizeSubscriptionRequestSigned) XXX_Merge(src proto.Message) { + xxx_messageInfo_FinalizeSubscriptionRequestSigned.Merge(m, src) +} +func (m *FinalizeSubscriptionRequestSigned) XXX_Size() int { + return m.Size() +} +func (m *FinalizeSubscriptionRequestSigned) XXX_DiscardUnknown() { + xxx_messageInfo_FinalizeSubscriptionRequestSigned.DiscardUnknown(m) +} + +var xxx_messageInfo_FinalizeSubscriptionRequestSigned proto.InternalMessageInfo + +func (m *FinalizeSubscriptionRequestSigned) GetPayload() []byte { + if m != nil { + return m.Payload + } + return nil +} + +func (m *FinalizeSubscriptionRequestSigned) GetSignature() []byte { + if m != nil { + return m.Signature + } + return nil +} + type GetSubscriptionPortalLinkRequest struct { // in the following format: "A5k2d9sFZw84yisTxRnz2bPRd1YPfVfhxqymZ6yESprFTG65" // you can get it with Account().SignKey.GetPublic().Account() @@ -551,7 +708,7 @@ func (m *GetSubscriptionPortalLinkRequest) Reset() { *m = GetSubscriptio func (m *GetSubscriptionPortalLinkRequest) String() string { return proto.CompactTextString(m) } func (*GetSubscriptionPortalLinkRequest) ProtoMessage() {} func (*GetSubscriptionPortalLinkRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_4feb29dcc5ba50f6, []int{6} + return fileDescriptor_4feb29dcc5ba50f6, []int{9} } func (m *GetSubscriptionPortalLinkRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -600,7 +757,7 @@ func (m *GetSubscriptionPortalLinkRequestSigned) Reset() { func (m *GetSubscriptionPortalLinkRequestSigned) String() string { return proto.CompactTextString(m) } func (*GetSubscriptionPortalLinkRequestSigned) ProtoMessage() {} func (*GetSubscriptionPortalLinkRequestSigned) Descriptor() ([]byte, []int) { - return fileDescriptor_4feb29dcc5ba50f6, []int{7} + return fileDescriptor_4feb29dcc5ba50f6, []int{10} } func (m *GetSubscriptionPortalLinkRequestSigned) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -651,7 +808,7 @@ func (m *GetSubscriptionPortalLinkResponse) Reset() { *m = GetSubscripti func (m *GetSubscriptionPortalLinkResponse) String() string { return proto.CompactTextString(m) } func (*GetSubscriptionPortalLinkResponse) ProtoMessage() {} func (*GetSubscriptionPortalLinkResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_4feb29dcc5ba50f6, []int{8} + return fileDescriptor_4feb29dcc5ba50f6, []int{11} } func (m *GetSubscriptionPortalLinkResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -699,7 +856,7 @@ func (m *GetVerificationEmailRequest) Reset() { *m = GetVerificationEmai func (m *GetVerificationEmailRequest) String() string { return proto.CompactTextString(m) } func (*GetVerificationEmailRequest) ProtoMessage() {} func (*GetVerificationEmailRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_4feb29dcc5ba50f6, []int{9} + return fileDescriptor_4feb29dcc5ba50f6, []int{12} } func (m *GetVerificationEmailRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -756,7 +913,7 @@ func (m *GetVerificationEmailResponse) Reset() { *m = GetVerificationEma func (m *GetVerificationEmailResponse) String() string { return proto.CompactTextString(m) } func (*GetVerificationEmailResponse) ProtoMessage() {} func (*GetVerificationEmailResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_4feb29dcc5ba50f6, []int{10} + return fileDescriptor_4feb29dcc5ba50f6, []int{13} } func (m *GetVerificationEmailResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -796,7 +953,7 @@ func (m *GetVerificationEmailRequestSigned) Reset() { *m = GetVerificati func (m *GetVerificationEmailRequestSigned) String() string { return proto.CompactTextString(m) } func (*GetVerificationEmailRequestSigned) ProtoMessage() {} func (*GetVerificationEmailRequestSigned) Descriptor() ([]byte, []int) { - return fileDescriptor_4feb29dcc5ba50f6, []int{11} + return fileDescriptor_4feb29dcc5ba50f6, []int{14} } func (m *GetVerificationEmailRequestSigned) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -856,7 +1013,7 @@ func (m *VerifyEmailRequest) Reset() { *m = VerifyEmailRequest{} } func (m *VerifyEmailRequest) String() string { return proto.CompactTextString(m) } func (*VerifyEmailRequest) ProtoMessage() {} func (*VerifyEmailRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_4feb29dcc5ba50f6, []int{12} + return fileDescriptor_4feb29dcc5ba50f6, []int{15} } func (m *VerifyEmailRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -914,7 +1071,7 @@ func (m *VerifyEmailResponse) Reset() { *m = VerifyEmailResponse{} } func (m *VerifyEmailResponse) String() string { return proto.CompactTextString(m) } func (*VerifyEmailResponse) ProtoMessage() {} func (*VerifyEmailResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_4feb29dcc5ba50f6, []int{13} + return fileDescriptor_4feb29dcc5ba50f6, []int{16} } func (m *VerifyEmailResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -961,7 +1118,7 @@ func (m *VerifyEmailRequestSigned) Reset() { *m = VerifyEmailRequestSign func (m *VerifyEmailRequestSigned) String() string { return proto.CompactTextString(m) } func (*VerifyEmailRequestSigned) ProtoMessage() {} func (*VerifyEmailRequestSigned) Descriptor() ([]byte, []int) { - return fileDescriptor_4feb29dcc5ba50f6, []int{14} + return fileDescriptor_4feb29dcc5ba50f6, []int{17} } func (m *VerifyEmailRequestSigned) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1014,6 +1171,9 @@ func init() { proto.RegisterType((*BuySubscriptionRequest)(nil), "BuySubscriptionRequest") proto.RegisterType((*BuySubscriptionRequestSigned)(nil), "BuySubscriptionRequestSigned") proto.RegisterType((*BuySubscriptionResponse)(nil), "BuySubscriptionResponse") + proto.RegisterType((*FinalizeSubscriptionRequest)(nil), "FinalizeSubscriptionRequest") + proto.RegisterType((*FinalizeSubscriptionResponse)(nil), "FinalizeSubscriptionResponse") + proto.RegisterType((*FinalizeSubscriptionRequestSigned)(nil), "FinalizeSubscriptionRequestSigned") proto.RegisterType((*GetSubscriptionPortalLinkRequest)(nil), "GetSubscriptionPortalLinkRequest") proto.RegisterType((*GetSubscriptionPortalLinkRequestSigned)(nil), "GetSubscriptionPortalLinkRequestSigned") proto.RegisterType((*GetSubscriptionPortalLinkResponse)(nil), "GetSubscriptionPortalLinkResponse") @@ -1030,66 +1190,69 @@ func init() { } var fileDescriptor_4feb29dcc5ba50f6 = []byte{ - // 931 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0x4f, 0x6f, 0xe3, 0x54, - 0x10, 0x8f, 0xf3, 0xa7, 0x6d, 0xa6, 0xdb, 0xd6, 0x3b, 0x4d, 0xbb, 0xde, 0xd0, 0x5a, 0xc1, 0x42, - 0x50, 0x15, 0xc9, 0x15, 0xcb, 0x1e, 0x40, 0x42, 0x88, 0xb4, 0x44, 0x55, 0xa5, 0x65, 0x15, 0x39, - 0xd9, 0x45, 0xb0, 0x17, 0xdc, 0x78, 0xc8, 0x9a, 0xba, 0xef, 0x99, 0xe7, 0xe7, 0x2d, 0xfe, 0x04, - 0x88, 0x1b, 0xdf, 0x69, 0x2f, 0x1c, 0xf7, 0xc8, 0x11, 0xb5, 0x37, 0x4e, 0x7c, 0x04, 0xe4, 0x67, - 0xb7, 0x71, 0xfe, 0xb6, 0xd0, 0x4b, 0xf2, 0xe6, 0xf7, 0x66, 0xc6, 0x33, 0xbf, 0xf7, 0x7b, 0x63, - 0xc3, 0x97, 0xa1, 0x9b, 0x9c, 0x13, 0x93, 0x11, 0x89, 0x37, 0xfe, 0x80, 0x0e, 0xc6, 0xcd, 0x50, - 0x70, 0xc9, 0x0f, 0xd4, 0x6f, 0x34, 0xb1, 0x65, 0x2b, 0xd4, 0xfa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, 0x81, 0x2a, 0x7a, 0xf1, 0x44, 0x69, 0xee, 0xda, 0x0b, 0xa7, 0x52, - 0x09, 0xbf, 0x82, 0xd5, 0xc2, 0xad, 0xc4, 0xc7, 0xf6, 0xbc, 0x3b, 0xda, 0x6c, 0xd8, 0x33, 0xee, - 0xbb, 0x55, 0x3a, 0xfc, 0xe2, 0x8f, 0x4b, 0x53, 0x7b, 0x77, 0x69, 0x6a, 0x7f, 0x5d, 0x9a, 0xda, - 0xef, 0x57, 0x66, 0xe9, 0xdd, 0x95, 0x59, 0xfa, 0xf3, 0xca, 0x2c, 0x7d, 0x6f, 0xdd, 0xfe, 0x35, - 0x79, 0xba, 0xa4, 0xfe, 0x3e, 0xfd, 0x37, 0x00, 0x00, 0xff, 0xff, 0x34, 0x5d, 0x18, 0xf8, 0x7a, - 0x0a, 0x00, 0x00, + // 983 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0x4f, 0x6f, 0xe3, 0x54, + 0x10, 0x8f, 0x9b, 0xa4, 0x7f, 0xa6, 0xdb, 0xd6, 0x3b, 0x4d, 0xbb, 0xde, 0x6c, 0x6b, 0xb5, 0x16, + 0x7f, 0xaa, 0x22, 0xb9, 0x62, 0xd9, 0x03, 0x48, 0x08, 0x91, 0x96, 0x50, 0xad, 0xb4, 0xac, 0x22, + 0x27, 0xbb, 0x08, 0xf6, 0x82, 0x1b, 0x0f, 0x59, 0x53, 0xf7, 0xd9, 0x3c, 0x3f, 0x6f, 0x31, 0x5f, + 0x00, 0x71, 0x43, 0xe2, 0x0b, 0xf0, 0x5d, 0xb8, 0x70, 0xdc, 0x23, 0x47, 0xd4, 0xde, 0x38, 0xf1, + 0x11, 0x90, 0x9f, 0x9d, 0xc6, 0x49, 0x9c, 0xa4, 0x10, 0xed, 0x25, 0x79, 0xf3, 0x7b, 0x6f, 0xc6, + 0x33, 0xbf, 0x19, 0xff, 0x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eb, 0xa1, + 0x05, 0x5b, 0x23, 0x12, 0x91, 0x51, 0xb3, 0x6b, 0x4e, 0xfb, 0x7c, 0xaa, 0x6b, 0xe6, 0x84, 0x8f, + 0x20, 0xa3, 0x84, 0x4f, 0x60, 0x63, 0xe4, 0xaa, 0xc1, 0x5d, 0x73, 0xda, 0xa5, 0x56, 0xd7, 0xcc, + 0x09, 0x77, 0x93, 0x51, 0xc2, 0x17, 0x50, 0x2b, 0xd2, 0x71, 0x34, 0xcc, 0x99, 0xf2, 0x5e, 0xdf, + 0x35, 0xa7, 0x5e, 0x11, 0x25, 0xfc, 0x0e, 0xee, 0x4f, 0x54, 0x48, 0x7c, 0xd7, 0xbc, 0x9d, 0x3e, + 0xd7, 0x0d, 0x73, 0xa6, 0xcc, 0xa6, 0x85, 0x14, 0xc9, 0x13, 0x4a, 0xef, 0xe9, 0xaa, 0x55, 0xdf, + 0x35, 0xa7, 0x2a, 0x5f, 0x09, 0x3f, 0x85, 0xd5, 0xdc, 0x9b, 0x8f, 0xf7, 0xcd, 0x49, 0x3a, 0x50, + 0xaf, 0x99, 0x05, 0x9a, 0x62, 0x94, 0x8e, 0x3f, 0xfe, 0xe3, 0x4a, 0x57, 0x5e, 0x5f, 0xe9, 0xca, + 0x5f, 0x57, 0xba, 0xf2, 0xcb, 0xb5, 0x5e, 0x7a, 0x7d, 0xad, 0x97, 0xfe, 0xbc, 0xd6, 0x4b, 0x5f, + 0x1b, 0xb3, 0x3f, 0xe2, 0xcf, 0x16, 0xe5, 0xdf, 0x07, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0xd1, + 0x76, 0x53, 0x44, 0xf1, 0x0b, 0x00, 0x00, } func (m *GetSubscriptionRequest) Marshal() (dAtA []byte, err error) { @@ -1362,6 +1525,110 @@ func (m *BuySubscriptionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } +func (m *FinalizeSubscriptionRequest) 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 *FinalizeSubscriptionRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *FinalizeSubscriptionRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.RequestedAnyName) > 0 { + i -= len(m.RequestedAnyName) + copy(dAtA[i:], m.RequestedAnyName) + i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.RequestedAnyName))) + i-- + dAtA[i] = 0x1a + } + if len(m.OwnerEthAddress) > 0 { + i -= len(m.OwnerEthAddress) + copy(dAtA[i:], m.OwnerEthAddress) + i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.OwnerEthAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.OwnerAnyId) > 0 { + i -= len(m.OwnerAnyId) + copy(dAtA[i:], m.OwnerAnyId) + i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.OwnerAnyId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *FinalizeSubscriptionResponse) 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 *FinalizeSubscriptionResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *FinalizeSubscriptionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *FinalizeSubscriptionRequestSigned) 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 *FinalizeSubscriptionRequestSigned) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *FinalizeSubscriptionRequestSigned) 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 = encodeVarintPaymentservice(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 = encodeVarintPaymentservice(dAtA, i, uint64(len(m.Payload))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func (m *GetSubscriptionPortalLinkRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1816,6 +2083,53 @@ func (m *BuySubscriptionResponse) Size() (n int) { return n } +func (m *FinalizeSubscriptionRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.OwnerAnyId) + if l > 0 { + n += 1 + l + sovPaymentservice(uint64(l)) + } + l = len(m.OwnerEthAddress) + if l > 0 { + n += 1 + l + sovPaymentservice(uint64(l)) + } + l = len(m.RequestedAnyName) + if l > 0 { + n += 1 + l + sovPaymentservice(uint64(l)) + } + return n +} + +func (m *FinalizeSubscriptionResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *FinalizeSubscriptionRequestSigned) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Payload) + if l > 0 { + n += 1 + l + sovPaymentservice(uint64(l)) + } + l = len(m.Signature) + if l > 0 { + n += 1 + l + sovPaymentservice(uint64(l)) + } + return n +} + func (m *GetSubscriptionPortalLinkRequest) Size() (n int) { if m == nil { return 0 @@ -2794,6 +3108,320 @@ func (m *BuySubscriptionResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *FinalizeSubscriptionRequest) 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 ErrIntOverflowPaymentservice + } + 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: FinalizeSubscriptionRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FinalizeSubscriptionRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + 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 ErrIntOverflowPaymentservice + } + 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 ErrInvalidLengthPaymentservice + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPaymentservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OwnerAnyId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + 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 ErrIntOverflowPaymentservice + } + 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 ErrInvalidLengthPaymentservice + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPaymentservice + } + 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 RequestedAnyName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPaymentservice + } + 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 ErrInvalidLengthPaymentservice + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPaymentservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RequestedAnyName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipPaymentservice(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthPaymentservice + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *FinalizeSubscriptionResponse) 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 ErrIntOverflowPaymentservice + } + 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: FinalizeSubscriptionResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FinalizeSubscriptionResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipPaymentservice(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthPaymentservice + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *FinalizeSubscriptionRequestSigned) 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 ErrIntOverflowPaymentservice + } + 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: FinalizeSubscriptionRequestSigned: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FinalizeSubscriptionRequestSigned: 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 ErrIntOverflowPaymentservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthPaymentservice + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthPaymentservice + } + 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 ErrIntOverflowPaymentservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthPaymentservice + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthPaymentservice + } + 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 := skipPaymentservice(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthPaymentservice + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *GetSubscriptionPortalLinkRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/paymentservice/paymentserviceproto/paymentservice_drpc.pb.go b/paymentservice/paymentserviceproto/paymentservice_drpc.pb.go index 369ecb66..d034694a 100644 --- a/paymentservice/paymentserviceproto/paymentservice_drpc.pb.go +++ b/paymentservice/paymentserviceproto/paymentservice_drpc.pb.go @@ -42,6 +42,7 @@ type DRPCAnyPaymentProcessingClient interface { GetSubscriptionStatus(ctx context.Context, in *GetSubscriptionRequestSigned) (*GetSubscriptionResponse, error) BuySubscription(ctx context.Context, in *BuySubscriptionRequestSigned) (*BuySubscriptionResponse, error) + FinalizeSubscription(ctx context.Context, in *FinalizeSubscriptionRequestSigned) (*FinalizeSubscriptionResponse, error) GetSubscriptionPortalLink(ctx context.Context, in *GetSubscriptionPortalLinkRequestSigned) (*GetSubscriptionPortalLinkResponse, error) GetVerificationEmail(ctx context.Context, in *GetVerificationEmailRequestSigned) (*GetVerificationEmailResponse, error) VerifyEmail(ctx context.Context, in *VerifyEmailRequestSigned) (*VerifyEmailResponse, error) @@ -75,6 +76,15 @@ func (c *drpcAnyPaymentProcessingClient) BuySubscription(ctx context.Context, in return out, nil } +func (c *drpcAnyPaymentProcessingClient) FinalizeSubscription(ctx context.Context, in *FinalizeSubscriptionRequestSigned) (*FinalizeSubscriptionResponse, error) { + out := new(FinalizeSubscriptionResponse) + err := c.cc.Invoke(ctx, "/AnyPaymentProcessing/FinalizeSubscription", drpcEncoding_File_paymentservice_paymentserviceproto_protos_paymentservice_proto{}, in, out) + if err != nil { + return nil, err + } + return out, nil +} + func (c *drpcAnyPaymentProcessingClient) GetSubscriptionPortalLink(ctx context.Context, in *GetSubscriptionPortalLinkRequestSigned) (*GetSubscriptionPortalLinkResponse, error) { out := new(GetSubscriptionPortalLinkResponse) err := c.cc.Invoke(ctx, "/AnyPaymentProcessing/GetSubscriptionPortalLink", drpcEncoding_File_paymentservice_paymentserviceproto_protos_paymentservice_proto{}, in, out) @@ -105,6 +115,7 @@ func (c *drpcAnyPaymentProcessingClient) VerifyEmail(ctx context.Context, in *Ve type DRPCAnyPaymentProcessingServer interface { GetSubscriptionStatus(context.Context, *GetSubscriptionRequestSigned) (*GetSubscriptionResponse, error) BuySubscription(context.Context, *BuySubscriptionRequestSigned) (*BuySubscriptionResponse, error) + FinalizeSubscription(context.Context, *FinalizeSubscriptionRequestSigned) (*FinalizeSubscriptionResponse, error) GetSubscriptionPortalLink(context.Context, *GetSubscriptionPortalLinkRequestSigned) (*GetSubscriptionPortalLinkResponse, error) GetVerificationEmail(context.Context, *GetVerificationEmailRequestSigned) (*GetVerificationEmailResponse, error) VerifyEmail(context.Context, *VerifyEmailRequestSigned) (*VerifyEmailResponse, error) @@ -120,6 +131,10 @@ func (s *DRPCAnyPaymentProcessingUnimplementedServer) BuySubscription(context.Co return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) } +func (s *DRPCAnyPaymentProcessingUnimplementedServer) FinalizeSubscription(context.Context, *FinalizeSubscriptionRequestSigned) (*FinalizeSubscriptionResponse, error) { + return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) +} + func (s *DRPCAnyPaymentProcessingUnimplementedServer) GetSubscriptionPortalLink(context.Context, *GetSubscriptionPortalLinkRequestSigned) (*GetSubscriptionPortalLinkResponse, error) { return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) } @@ -134,7 +149,7 @@ func (s *DRPCAnyPaymentProcessingUnimplementedServer) VerifyEmail(context.Contex type DRPCAnyPaymentProcessingDescription struct{} -func (DRPCAnyPaymentProcessingDescription) NumMethods() int { return 5 } +func (DRPCAnyPaymentProcessingDescription) NumMethods() int { return 6 } func (DRPCAnyPaymentProcessingDescription) Method(n int) (string, drpc.Encoding, drpc.Receiver, interface{}, bool) { switch n { @@ -157,6 +172,15 @@ func (DRPCAnyPaymentProcessingDescription) Method(n int) (string, drpc.Encoding, ) }, DRPCAnyPaymentProcessingServer.BuySubscription, true case 2: + return "/AnyPaymentProcessing/FinalizeSubscription", drpcEncoding_File_paymentservice_paymentserviceproto_protos_paymentservice_proto{}, + func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { + return srv.(DRPCAnyPaymentProcessingServer). + FinalizeSubscription( + ctx, + in1.(*FinalizeSubscriptionRequestSigned), + ) + }, DRPCAnyPaymentProcessingServer.FinalizeSubscription, true + case 3: return "/AnyPaymentProcessing/GetSubscriptionPortalLink", drpcEncoding_File_paymentservice_paymentserviceproto_protos_paymentservice_proto{}, func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { return srv.(DRPCAnyPaymentProcessingServer). @@ -165,7 +189,7 @@ func (DRPCAnyPaymentProcessingDescription) Method(n int) (string, drpc.Encoding, in1.(*GetSubscriptionPortalLinkRequestSigned), ) }, DRPCAnyPaymentProcessingServer.GetSubscriptionPortalLink, true - case 3: + case 4: return "/AnyPaymentProcessing/GetVerificationEmail", drpcEncoding_File_paymentservice_paymentserviceproto_protos_paymentservice_proto{}, func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { return srv.(DRPCAnyPaymentProcessingServer). @@ -174,7 +198,7 @@ func (DRPCAnyPaymentProcessingDescription) Method(n int) (string, drpc.Encoding, in1.(*GetVerificationEmailRequestSigned), ) }, DRPCAnyPaymentProcessingServer.GetVerificationEmail, true - case 4: + case 5: return "/AnyPaymentProcessing/VerifyEmail", drpcEncoding_File_paymentservice_paymentserviceproto_protos_paymentservice_proto{}, func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { return srv.(DRPCAnyPaymentProcessingServer). @@ -224,6 +248,22 @@ func (x *drpcAnyPaymentProcessing_BuySubscriptionStream) SendAndClose(m *BuySubs return x.CloseSend() } +type DRPCAnyPaymentProcessing_FinalizeSubscriptionStream interface { + drpc.Stream + SendAndClose(*FinalizeSubscriptionResponse) error +} + +type drpcAnyPaymentProcessing_FinalizeSubscriptionStream struct { + drpc.Stream +} + +func (x *drpcAnyPaymentProcessing_FinalizeSubscriptionStream) SendAndClose(m *FinalizeSubscriptionResponse) error { + if err := x.MsgSend(m, drpcEncoding_File_paymentservice_paymentserviceproto_protos_paymentservice_proto{}); err != nil { + return err + } + return x.CloseSend() +} + type DRPCAnyPaymentProcessing_GetSubscriptionPortalLinkStream interface { drpc.Stream SendAndClose(*GetSubscriptionPortalLinkResponse) error diff --git a/paymentservice/paymentserviceproto/protos/paymentservice.proto b/paymentservice/paymentserviceproto/protos/paymentservice.proto index 9c873271..e68482e0 100644 --- a/paymentservice/paymentserviceproto/protos/paymentservice.proto +++ b/paymentservice/paymentserviceproto/protos/paymentservice.proto @@ -31,8 +31,8 @@ enum SubscriptionStatus { StatusActive = 2; // when buying from other side - some data is missing in the Subscription // we need to provide additional data after the payment - // please call BuySubscription to fill-in needed fields - StatusPendingRequiresInput = 3; + // please call FinalizeSubscription to fill-in needed fields + StatusPendingRequiresFinalization = 3; } enum PaymentMethod { @@ -101,6 +101,30 @@ message BuySubscriptionResponse { string paymentUrl = 1; } +message FinalizeSubscriptionRequest { + // in the following format: "A5k2d9sFZw84yisTxRnz2bPRd1YPfVfhxqymZ6yESprFTG65" + // you can get it with Account().SignKey.GetPublic().Account() + string ownerAnyId = 1; + // this is the owner's main EOA (Externally Owned Account) address + // not AccountAbstraction's SCW (Smart Contract Wallet) address! + // this is required to reserve a name for the owner (later that is done by user) + // in the following format: "0x7a250d5630b4cf539739df2c5dacb4c659f2488d" + string ownerEthAddress = 2; + // if empty - then no name requested + string requestedAnyName = 3; +} + +message FinalizeSubscriptionResponse { + +} + +message FinalizeSubscriptionRequestSigned { + // VerifyEmailRequest + bytes payload = 1; + // this is payload signed with payload.ownerAnyID + bytes signature = 2; +} + message GetSubscriptionPortalLinkRequest { // in the following format: "A5k2d9sFZw84yisTxRnz2bPRd1YPfVfhxqymZ6yESprFTG65" // you can get it with Account().SignKey.GetPublic().Account() @@ -173,6 +197,9 @@ service AnyPaymentProcessing { // If user has already an active subscription, then this will return an error. rpc BuySubscription(BuySubscriptionRequestSigned) returns (BuySubscriptionResponse) {} + // If your subscription is in StatusPendingRequiresFinalization, then you need to call this method + rpc FinalizeSubscription(FinalizeSubscriptionRequestSigned) returns (FinalizeSubscriptionResponse) {} + // Generate a link to the portal where user can: // a) change her billing details // b) see payment info, invoices, etc