// Copyright (C) 2018 Storj Labs, Inc. // See LICENSE for copying information. syntax = "proto3"; option go_package = "pb"; import "google/protobuf/timestamp.proto"; // The service definition for the Payments API service Payments { // Pay creates a payment to a single storage node rpc Pay(PaymentRequest) returns (PaymentResponse); // Calculate determines the outstanding balance for a given storage node rpc Calculate(CalculateRequest) returns (CalculateResponse); // AdjustPrices sets the prices paid by a satellite for data at rest and bandwidth rpc AdjustPrices(AdjustPricesRequest) returns (AdjustPricesResponse); // GenerateCSV creates a csv file for payment purposes rpc GenerateCSV(GenerateCSVRequest) returns (GenerateCSVResponse); } // The request message containing the details needed to pay a storage node. message PaymentRequest { // ID of the storage node to be paid string node_id = 1; } // The response message for payments. message PaymentResponse {} // The request message containing the details needed to calculate outstanding balance for a storage node. message CalculateRequest { // ID of the storage node to be calculated string node_id = 1; } // The response message for payment calculations. message CalculateResponse { // ID of the storage node calculation made for string node_id = 1; // total balance in Storj of outstanding credit int64 total = 2; } // The request message for adjusting the cost of storage/bandwidth for a satelitte. message AdjustPricesRequest { // price per gigabyte of bandwidth calculated in Storj int64 bandwidth = 1; // price for GB/H of storage calculated in Storj int64 storage = 2; } // The response message from adjusting cost basis on satelittes. message AdjustPricesResponse {} // The request message for querying the data needed to generate a payments CSV message GenerateCSVRequest { google.protobuf.Timestamp start_time = 1; google.protobuf.Timestamp end_time = 2; } // The response message for querying the data needed to generate a payments CSV message GenerateCSVResponse { string filepath = 1; }