1
0
Fork 0
mirror of https://github.com/anyproto/any-sync.git synced 2025-06-09 17:45:03 +09:00

Add tiers, no worries: will be refactored soon

This commit is contained in:
Anton Akentev 2024-03-01 11:46:57 +00:00
parent fad2e59f37
commit 7704bde02a
2 changed files with 112 additions and 197 deletions

View file

@ -22,6 +22,9 @@ var _ = math.Inf
// proto package needs to be updated. // proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
// TODO:
// later we will have an interface to enumerate all available tiers
// it's a bad idea to list them here, because interface will be changed often
type SubscriptionTier int32 type SubscriptionTier int32
const ( const (
@ -35,6 +38,8 @@ const (
// these are the real tiers: // these are the real tiers:
SubscriptionTier_TierBuilder1Year SubscriptionTier = 4 SubscriptionTier_TierBuilder1Year SubscriptionTier = 4
SubscriptionTier_TierCoCreator1Year SubscriptionTier = 5 SubscriptionTier_TierCoCreator1Year SubscriptionTier = 5
SubscriptionTier_TierBuilderPlus SubscriptionTier = 6
SubscriptionTier_TierAnytypeTeam SubscriptionTier = 7
) )
var SubscriptionTier_name = map[int32]string{ var SubscriptionTier_name = map[int32]string{
@ -44,6 +49,8 @@ var SubscriptionTier_name = map[int32]string{
3: "TierCoCreator1WeekTEST", 3: "TierCoCreator1WeekTEST",
4: "TierBuilder1Year", 4: "TierBuilder1Year",
5: "TierCoCreator1Year", 5: "TierCoCreator1Year",
6: "TierBuilderPlus",
7: "TierAnytypeTeam",
} }
var SubscriptionTier_value = map[string]int32{ var SubscriptionTier_value = map[string]int32{
@ -53,6 +60,8 @@ var SubscriptionTier_value = map[string]int32{
"TierCoCreator1WeekTEST": 3, "TierCoCreator1WeekTEST": 3,
"TierBuilder1Year": 4, "TierBuilder1Year": 4,
"TierCoCreator1Year": 5, "TierCoCreator1Year": 5,
"TierBuilderPlus": 6,
"TierAnytypeTeam": 7,
} }
func (x SubscriptionTier) String() string { func (x SubscriptionTier) String() string {
@ -101,6 +110,8 @@ const (
PaymentMethod_MethodCrypto PaymentMethod = 1 PaymentMethod_MethodCrypto PaymentMethod = 1
PaymentMethod_MethodApplePay PaymentMethod = 2 PaymentMethod_MethodApplePay PaymentMethod = 2
PaymentMethod_MethodGooglePay PaymentMethod = 3 PaymentMethod_MethodGooglePay PaymentMethod = 3
PaymentMethod_MethodAppleInapp PaymentMethod = 4
PaymentMethod_MethodGoogleInapp PaymentMethod = 5
) )
var PaymentMethod_name = map[int32]string{ var PaymentMethod_name = map[int32]string{
@ -108,6 +119,8 @@ var PaymentMethod_name = map[int32]string{
1: "MethodCrypto", 1: "MethodCrypto",
2: "MethodApplePay", 2: "MethodApplePay",
3: "MethodGooglePay", 3: "MethodGooglePay",
4: "MethodAppleInapp",
5: "MethodGoogleInapp",
} }
var PaymentMethod_value = map[string]int32{ var PaymentMethod_value = map[string]int32{
@ -115,6 +128,8 @@ var PaymentMethod_value = map[string]int32{
"MethodCrypto": 1, "MethodCrypto": 1,
"MethodApplePay": 2, "MethodApplePay": 2,
"MethodGooglePay": 3, "MethodGooglePay": 3,
"MethodAppleInapp": 4,
"MethodGoogleInapp": 5,
} }
func (x PaymentMethod) String() string { func (x PaymentMethod) String() string {
@ -125,7 +140,6 @@ func (PaymentMethod) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_4feb29dcc5ba50f6, []int{2} return fileDescriptor_4feb29dcc5ba50f6, []int{2}
} }
// 1
type GetSubscriptionRequest struct { type GetSubscriptionRequest struct {
// in the following format: "A5k2d9sFZw84yisTxRnz2bPRd1YPfVfhxqymZ6yESprFTG65" // in the following format: "A5k2d9sFZw84yisTxRnz2bPRd1YPfVfhxqymZ6yESprFTG65"
// you can get it with Account().SignKey.GetPublic().Account() // you can get it with Account().SignKey.GetPublic().Account()
@ -229,21 +243,14 @@ func (m *GetSubscriptionRequestSigned) GetSignature() []byte {
type GetSubscriptionResponse struct { type GetSubscriptionResponse struct {
Tier SubscriptionTier `protobuf:"varint,1,opt,name=tier,proto3,enum=SubscriptionTier" json:"tier,omitempty"` Tier SubscriptionTier `protobuf:"varint,1,opt,name=tier,proto3,enum=SubscriptionTier" json:"tier,omitempty"`
Status SubscriptionStatus `protobuf:"varint,2,opt,name=status,proto3,enum=SubscriptionStatus" json:"status,omitempty"` Status SubscriptionStatus `protobuf:"varint,2,opt,name=status,proto3,enum=SubscriptionStatus" json:"status,omitempty"`
// TODO: use google.protobuf.Timestamp and marshall it
DateStarted uint64 `protobuf:"varint,3,opt,name=dateStarted,proto3" json:"dateStarted,omitempty"` DateStarted uint64 `protobuf:"varint,3,opt,name=dateStarted,proto3" json:"dateStarted,omitempty"`
DateEnds uint64 `protobuf:"varint,4,opt,name=dateEnds,proto3" json:"dateEnds,omitempty"` DateEnds uint64 `protobuf:"varint,4,opt,name=dateEnds,proto3" json:"dateEnds,omitempty"`
IsAutoRenew bool `protobuf:"varint,5,opt,name=isAutoRenew,proto3" json:"isAutoRenew,omitempty"` IsAutoRenew bool `protobuf:"varint,5,opt,name=isAutoRenew,proto3" json:"isAutoRenew,omitempty"`
// if client has "downgraded" - he is still able to use the service until the end of the period PaymentMethod PaymentMethod `protobuf:"varint,6,opt,name=paymentMethod,proto3,enum=PaymentMethod" json:"paymentMethod,omitempty"`
// (dateEnds) but then he will be on nextTier until nextTierEnds RequestedAnyName string `protobuf:"bytes,7,opt,name=requestedAnyName,proto3" json:"requestedAnyName,omitempty"`
//
// if Tier0_Unknown -> then no next tier
NextTier SubscriptionTier `protobuf:"varint,6,opt,name=nextTier,proto3,enum=SubscriptionTier" json:"nextTier,omitempty"`
NextTierEnds uint64 `protobuf:"varint,7,opt,name=nextTierEnds,proto3" json:"nextTierEnds,omitempty"`
PaymentMethod PaymentMethod `protobuf:"varint,8,opt,name=paymentMethod,proto3,enum=PaymentMethod" json:"paymentMethod,omitempty"`
RequestedAnyName string `protobuf:"bytes,9,opt,name=requestedAnyName,proto3" json:"requestedAnyName,omitempty"`
// if user verified her email OR provided it while buying a subscription, it will be here // if user verified her email OR provided it while buying a subscription, it will be here
UserEmail string `protobuf:"bytes,10,opt,name=userEmail,proto3" json:"userEmail,omitempty"` UserEmail string `protobuf:"bytes,8,opt,name=userEmail,proto3" json:"userEmail,omitempty"`
SubscribeToNewsletter bool `protobuf:"varint,11,opt,name=subscribeToNewsletter,proto3" json:"subscribeToNewsletter,omitempty"` SubscribeToNewsletter bool `protobuf:"varint,9,opt,name=subscribeToNewsletter,proto3" json:"subscribeToNewsletter,omitempty"`
} }
func (m *GetSubscriptionResponse) Reset() { *m = GetSubscriptionResponse{} } func (m *GetSubscriptionResponse) Reset() { *m = GetSubscriptionResponse{} }
@ -314,20 +321,6 @@ func (m *GetSubscriptionResponse) GetIsAutoRenew() bool {
return false return false
} }
func (m *GetSubscriptionResponse) GetNextTier() SubscriptionTier {
if m != nil {
return m.NextTier
}
return SubscriptionTier_TierUnknown
}
func (m *GetSubscriptionResponse) GetNextTierEnds() uint64 {
if m != nil {
return m.NextTierEnds
}
return 0
}
func (m *GetSubscriptionResponse) GetPaymentMethod() PaymentMethod { func (m *GetSubscriptionResponse) GetPaymentMethod() PaymentMethod {
if m != nil { if m != nil {
return m.PaymentMethod return m.PaymentMethod
@ -356,7 +349,6 @@ func (m *GetSubscriptionResponse) GetSubscribeToNewsletter() bool {
return false return false
} }
// 2
type BuySubscriptionRequest struct { type BuySubscriptionRequest struct {
// in the following format: "A5k2d9sFZw84yisTxRnz2bPRd1YPfVfhxqymZ6yESprFTG65" // in the following format: "A5k2d9sFZw84yisTxRnz2bPRd1YPfVfhxqymZ6yESprFTG65"
// you can get it with Account().SignKey.GetPublic().Account() // you can get it with Account().SignKey.GetPublic().Account()
@ -848,6 +840,7 @@ type VerifyEmailRequest struct {
// this is required to reserve a name for the owner (later that is done by user) // this is required to reserve a name for the owner (later that is done by user)
// in the following format: "0x7a250d5630b4cf539739df2c5dacb4c659f2488d" // in the following format: "0x7a250d5630b4cf539739df2c5dacb4c659f2488d"
OwnerEthAddress string `protobuf:"bytes,2,opt,name=ownerEthAddress,proto3" json:"ownerEthAddress,omitempty"` OwnerEthAddress string `protobuf:"bytes,2,opt,name=ownerEthAddress,proto3" json:"ownerEthAddress,omitempty"`
// code received in the email
Code string `protobuf:"bytes,3,opt,name=code,proto3" json:"code,omitempty"` Code string `protobuf:"bytes,3,opt,name=code,proto3" json:"code,omitempty"`
} }
@ -1029,64 +1022,65 @@ func init() {
} }
var fileDescriptor_4feb29dcc5ba50f6 = []byte{ var fileDescriptor_4feb29dcc5ba50f6 = []byte{
// 909 bytes of a gzipped FileDescriptorProto // 923 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0xcd, 0x6e, 0xe4, 0x44, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0xcf, 0x6f, 0xe3, 0x54,
0x10, 0xb6, 0x33, 0x93, 0x9f, 0xa9, 0x24, 0x13, 0x6f, 0x65, 0x36, 0xeb, 0x1d, 0x12, 0x6b, 0x68, 0x10, 0x8e, 0x9b, 0xa4, 0x6d, 0xa6, 0xdb, 0xd4, 0x9d, 0xa6, 0x5d, 0x6f, 0x68, 0xa3, 0x60, 0x09,
0x09, 0x88, 0x82, 0x70, 0x44, 0x58, 0x09, 0x90, 0x10, 0x62, 0x12, 0xa2, 0x08, 0x29, 0xac, 0x46, 0xa8, 0x8a, 0xe4, 0x8a, 0xb2, 0x12, 0x20, 0x21, 0x44, 0x5a, 0xa2, 0x6a, 0xa5, 0xb2, 0x8a, 0x9c,
0x9e, 0xec, 0x22, 0x76, 0x2f, 0x38, 0xe3, 0x62, 0xd6, 0x64, 0xd2, 0x6d, 0xda, 0xed, 0xcd, 0xfa, 0xec, 0x22, 0xd8, 0x0b, 0x6e, 0x3c, 0x64, 0x4d, 0xdd, 0xf7, 0xcc, 0xf3, 0xf3, 0x16, 0x9f, 0x39,
0x11, 0xb8, 0x71, 0xe5, 0x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, 0xb8, 0xbc, 0x6e, 0x14, 0xfe,
0x01, 0x00, 0x00, 0xff, 0xff, 0x14, 0xaf, 0xb0, 0x89, 0x7b, 0x0a, 0x00, 0x00, 0xbe, 0x6e, 0x14, 0x7e, 0x30, 0xef, 0x7e, 0xa7, 0x3c, 0x5d, 0x54, 0x5f, 0x9f, 0xfe, 0x17, 0x00,
0x00, 0xff, 0xff, 0x9f, 0xdf, 0x6e, 0x85, 0x80, 0x0a, 0x00, 0x00,
} }
func (m *GetSubscriptionRequest) Marshal() (dAtA []byte, err error) { func (m *GetSubscriptionRequest) Marshal() (dAtA []byte, err error) {
@ -1184,35 +1178,25 @@ func (m *GetSubscriptionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
dAtA[i] = 0 dAtA[i] = 0
} }
i-- i--
dAtA[i] = 0x58 dAtA[i] = 0x48
} }
if len(m.UserEmail) > 0 { if len(m.UserEmail) > 0 {
i -= len(m.UserEmail) i -= len(m.UserEmail)
copy(dAtA[i:], m.UserEmail) copy(dAtA[i:], m.UserEmail)
i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.UserEmail))) i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.UserEmail)))
i-- i--
dAtA[i] = 0x52 dAtA[i] = 0x42
} }
if len(m.RequestedAnyName) > 0 { if len(m.RequestedAnyName) > 0 {
i -= len(m.RequestedAnyName) i -= len(m.RequestedAnyName)
copy(dAtA[i:], m.RequestedAnyName) copy(dAtA[i:], m.RequestedAnyName)
i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.RequestedAnyName))) i = encodeVarintPaymentservice(dAtA, i, uint64(len(m.RequestedAnyName)))
i-- i--
dAtA[i] = 0x4a dAtA[i] = 0x3a
} }
if m.PaymentMethod != 0 { if m.PaymentMethod != 0 {
i = encodeVarintPaymentservice(dAtA, i, uint64(m.PaymentMethod)) i = encodeVarintPaymentservice(dAtA, i, uint64(m.PaymentMethod))
i-- i--
dAtA[i] = 0x40
}
if m.NextTierEnds != 0 {
i = encodeVarintPaymentservice(dAtA, i, uint64(m.NextTierEnds))
i--
dAtA[i] = 0x38
}
if m.NextTier != 0 {
i = encodeVarintPaymentservice(dAtA, i, uint64(m.NextTier))
i--
dAtA[i] = 0x30 dAtA[i] = 0x30
} }
if m.IsAutoRenew { if m.IsAutoRenew {
@ -1749,12 +1733,6 @@ func (m *GetSubscriptionResponse) Size() (n int) {
if m.IsAutoRenew { if m.IsAutoRenew {
n += 2 n += 2
} }
if m.NextTier != 0 {
n += 1 + sovPaymentservice(uint64(m.NextTier))
}
if m.NextTierEnds != 0 {
n += 1 + sovPaymentservice(uint64(m.NextTierEnds))
}
if m.PaymentMethod != 0 { if m.PaymentMethod != 0 {
n += 1 + sovPaymentservice(uint64(m.PaymentMethod)) n += 1 + sovPaymentservice(uint64(m.PaymentMethod))
} }
@ -2300,44 +2278,6 @@ func (m *GetSubscriptionResponse) Unmarshal(dAtA []byte) error {
} }
m.IsAutoRenew = bool(v != 0) m.IsAutoRenew = bool(v != 0)
case 6: case 6:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field NextTier", wireType)
}
m.NextTier = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowPaymentservice
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.NextTier |= SubscriptionTier(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 7:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field NextTierEnds", wireType)
}
m.NextTierEnds = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowPaymentservice
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.NextTierEnds |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 8:
if wireType != 0 { if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field PaymentMethod", wireType) return fmt.Errorf("proto: wrong wireType = %d for field PaymentMethod", wireType)
} }
@ -2356,7 +2296,7 @@ func (m *GetSubscriptionResponse) Unmarshal(dAtA []byte) error {
break break
} }
} }
case 9: case 7:
if wireType != 2 { if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field RequestedAnyName", wireType) return fmt.Errorf("proto: wrong wireType = %d for field RequestedAnyName", wireType)
} }
@ -2388,7 +2328,7 @@ func (m *GetSubscriptionResponse) Unmarshal(dAtA []byte) error {
} }
m.RequestedAnyName = string(dAtA[iNdEx:postIndex]) m.RequestedAnyName = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex iNdEx = postIndex
case 10: case 8:
if wireType != 2 { if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field UserEmail", wireType) return fmt.Errorf("proto: wrong wireType = %d for field UserEmail", wireType)
} }
@ -2420,7 +2360,7 @@ func (m *GetSubscriptionResponse) Unmarshal(dAtA []byte) error {
} }
m.UserEmail = string(dAtA[iNdEx:postIndex]) m.UserEmail = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex iNdEx = postIndex
case 11: case 9:
if wireType != 0 { if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field SubscribeToNewsletter", wireType) return fmt.Errorf("proto: wrong wireType = %d for field SubscribeToNewsletter", wireType)
} }

View file

@ -1,12 +1,11 @@
syntax = "proto3"; syntax = "proto3";
option go_package = "paymentservice/paymentserviceproto"; option go_package = "paymentservice/paymentserviceproto";
// TODO: no marshalling avail :-( // TODO:
//import "google/protobuf/timestamp.proto"; // later we will have an interface to enumerate all available tiers
// it's a bad idea to list them here, because interface will be changed often
enum SubscriptionTier { enum SubscriptionTier {
TierUnknown = 0; TierUnknown = 0;
// "free" tier // "free" tier
TierExplorer = 1; TierExplorer = 1;
@ -18,16 +17,17 @@ enum SubscriptionTier {
// these are the real tiers: // these are the real tiers:
TierBuilder1Year = 4; TierBuilder1Year = 4;
TierCoCreator1Year = 5; TierCoCreator1Year = 5;
TierBuilderPlus = 6;
TierAnytypeTeam = 7;
} }
enum SubscriptionStatus { enum SubscriptionStatus {
StatusUnknown = 0; StatusUnknown = 0;
// payment is still pending // payment is still pending
// this will be the status until the payment is confirmed or N is elapsed and no payment is received // this will be the status until the payment is confirmed or N is elapsed and no payment is received
// in the last case the subscription will switch to Status_Unknown or Status_Active // in the last case the subscription will switch to Status_Unknown or Status_Active
StatusPending = 1; StatusPending = 1;
StatusActive = 2; StatusActive = 2;
} }
@ -36,9 +36,10 @@ enum PaymentMethod {
MethodCrypto = 1; MethodCrypto = 1;
MethodApplePay = 2; MethodApplePay = 2;
MethodGooglePay = 3; MethodGooglePay = 3;
MethodAppleInapp = 4;
MethodGoogleInapp = 5;
} }
// 1
message GetSubscriptionRequest { message GetSubscriptionRequest {
// in the following format: "A5k2d9sFZw84yisTxRnz2bPRd1YPfVfhxqymZ6yESprFTG65" // in the following format: "A5k2d9sFZw84yisTxRnz2bPRd1YPfVfhxqymZ6yESprFTG65"
// you can get it with Account().SignKey.GetPublic().Account() // you can get it with Account().SignKey.GetPublic().Account()
@ -48,7 +49,6 @@ message GetSubscriptionRequest {
message GetSubscriptionRequestSigned { message GetSubscriptionRequestSigned {
// GetSubscriptionRequest // GetSubscriptionRequest
bytes payload = 1; bytes payload = 1;
// this is payload signed with payload.ownerAnyID // this is payload signed with payload.ownerAnyID
bytes signature = 2; bytes signature = 2;
} }
@ -56,45 +56,27 @@ message GetSubscriptionRequestSigned {
message GetSubscriptionResponse { message GetSubscriptionResponse {
SubscriptionTier tier = 1; SubscriptionTier tier = 1;
SubscriptionStatus status = 2; SubscriptionStatus status = 2;
//TODO: use google.protobuf.Timestamp and marshall it
uint64 dateStarted = 3; uint64 dateStarted = 3;
uint64 dateEnds = 4; uint64 dateEnds = 4;
bool isAutoRenew = 5; bool isAutoRenew = 5;
PaymentMethod paymentMethod = 6;
// if client has "downgraded" - he is still able to use the service until the end of the period string requestedAnyName = 7;
// (dateEnds) but then he will be on nextTier until nextTierEnds
//
// if Tier0_Unknown -> then no next tier
SubscriptionTier nextTier = 6;
uint64 nextTierEnds = 7;
PaymentMethod paymentMethod = 8;
string requestedAnyName = 9;
// if user verified her email OR provided it while buying a subscription, it will be here // if user verified her email OR provided it while buying a subscription, it will be here
string userEmail = 10; string userEmail = 8;
bool subscribeToNewsletter = 9;
bool subscribeToNewsletter = 11;
} }
// 2
message BuySubscriptionRequest { message BuySubscriptionRequest {
// in the following format: "A5k2d9sFZw84yisTxRnz2bPRd1YPfVfhxqymZ6yESprFTG65" // in the following format: "A5k2d9sFZw84yisTxRnz2bPRd1YPfVfhxqymZ6yESprFTG65"
// you can get it with Account().SignKey.GetPublic().Account() // you can get it with Account().SignKey.GetPublic().Account()
string ownerAnyId = 1; string ownerAnyId = 1;
// this is the owner's main EOA (Externally Owned Account) address // this is the owner's main EOA (Externally Owned Account) address
// not AccountAbstraction's SCW (Smart Contract Wallet) 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) // this is required to reserve a name for the owner (later that is done by user)
// in the following format: "0x7a250d5630b4cf539739df2c5dacb4c659f2488d" // in the following format: "0x7a250d5630b4cf539739df2c5dacb4c659f2488d"
string ownerEthAddress = 2; string ownerEthAddress = 2;
SubscriptionTier requestedTier = 3; SubscriptionTier requestedTier = 3;
PaymentMethod paymentMethod = 4; PaymentMethod paymentMethod = 4;
// if empty - then no name requested // if empty - then no name requested
// if non-empty - PP node will register that name on behalf of the user // if non-empty - PP node will register that name on behalf of the user
string requestedAnyName = 5; string requestedAnyName = 5;
@ -103,7 +85,6 @@ message BuySubscriptionRequest {
message BuySubscriptionRequestSigned { message BuySubscriptionRequestSigned {
// BuySubscriptionRequest // BuySubscriptionRequest
bytes payload = 1; bytes payload = 1;
// this is payload signed with payload.ownerAnyID // this is payload signed with payload.ownerAnyID
bytes signature = 2; bytes signature = 2;
} }
@ -123,7 +104,6 @@ message GetSubscriptionPortalLinkRequest {
message GetSubscriptionPortalLinkRequestSigned { message GetSubscriptionPortalLinkRequestSigned {
// GetSubscriptionPortalLinkRequest // GetSubscriptionPortalLinkRequest
bytes payload = 1; bytes payload = 1;
// this is payload signed with payload.ownerAnyID // this is payload signed with payload.ownerAnyID
bytes signature = 2; bytes signature = 2;
} }
@ -136,9 +116,7 @@ message GetVerificationEmailRequest {
// in the following format: "A5k2d9sFZw84yisTxRnz2bPRd1YPfVfhxqymZ6yESprFTG65" // in the following format: "A5k2d9sFZw84yisTxRnz2bPRd1YPfVfhxqymZ6yESprFTG65"
// you can get it with Account().SignKey.GetPublic().Account() // you can get it with Account().SignKey.GetPublic().Account()
string ownerAnyId = 1; string ownerAnyId = 1;
string email = 2; string email = 2;
bool subscribeToNewsletter = 3; bool subscribeToNewsletter = 3;
} }
@ -149,7 +127,6 @@ message GetVerificationEmailResponse {
message GetVerificationEmailRequestSigned { message GetVerificationEmailRequestSigned {
// GetVerificationEmailRequest // GetVerificationEmailRequest
bytes payload = 1; bytes payload = 1;
// this is payload signed with payload.ownerAnyID // this is payload signed with payload.ownerAnyID
bytes signature = 2; bytes signature = 2;
} }
@ -158,13 +135,12 @@ message VerifyEmailRequest {
// in the following format: "A5k2d9sFZw84yisTxRnz2bPRd1YPfVfhxqymZ6yESprFTG65" // in the following format: "A5k2d9sFZw84yisTxRnz2bPRd1YPfVfhxqymZ6yESprFTG65"
// you can get it with Account().SignKey.GetPublic().Account() // you can get it with Account().SignKey.GetPublic().Account()
string ownerAnyId = 1; string ownerAnyId = 1;
// this is the owner's main EOA (Externally Owned Account) address // this is the owner's main EOA (Externally Owned Account) address
// not AccountAbstraction's SCW (Smart Contract Wallet) 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) // this is required to reserve a name for the owner (later that is done by user)
// in the following format: "0x7a250d5630b4cf539739df2c5dacb4c659f2488d" // in the following format: "0x7a250d5630b4cf539739df2c5dacb4c659f2488d"
string ownerEthAddress = 2; string ownerEthAddress = 2;
// code received in the email
string code = 3; string code = 3;
} }
@ -175,7 +151,6 @@ message VerifyEmailResponse {
message VerifyEmailRequestSigned { message VerifyEmailRequestSigned {
// VerifyEmailRequest // VerifyEmailRequest
bytes payload = 1; bytes payload = 1;
// this is payload signed with payload.ownerAnyID // this is payload signed with payload.ownerAnyID
bytes signature = 2; bytes signature = 2;
} }