storj/pkg/pb/referralmanager.proto

32 lines
880 B
Protocol Buffer

syntax = "proto3";
option go_package = "pb";
import "gogo.proto";
package referralmanager;
// ReferralManager is a service for handling referrals
service ReferralManager {
// GetTokens retrieves a list of unredeemed tokens for a user
rpc GetTokens(GetTokensRequest) returns (GetTokensResponse);
// RedeemToken saves newly created user info in referral manager
rpc RedeemToken(RedeemTokenRequest) returns (RedeemTokenResponse);
}
message GetTokensRequest{
bytes owner_user_id = 1;
bytes owner_satellite_id = 2 [(gogoproto.customtype) = "NodeID", (gogoproto.nullable) = false];
}
message GetTokensResponse {
repeated bytes token_secrets = 1;
}
message RedeemTokenRequest {
bytes token = 1;
bytes redeem_user_id = 2;
bytes redeem_satellite_id = 3 [(gogoproto.customtype) = "NodeID", (gogoproto.nullable) = false];
}
message RedeemTokenResponse {}