refactored notificatoin / tgsettle responsibility boundaries

This commit is contained in:
Stephan D
2026-02-19 18:56:59 +01:00
parent 47f0a3d890
commit 2fd8a6ebb7
73 changed files with 3705 additions and 681 deletions

View File

@@ -6,7 +6,7 @@ option go_package = "github.com/tech/sendico/pkg/proto/payments/quotation/v1;quo
import "api/proto/payments/shared/v1/shared.proto";
// QuotePaymentRequest is the request to quote a single payment.
message QuotePaymentRequest {
payments.shared.v1.RequestMeta meta = 1;
string idempotency_key = 2;
@@ -14,6 +14,7 @@ message QuotePaymentRequest {
bool preview_only = 4;
}
// QuotePaymentResponse is the response for QuotePayment.
message QuotePaymentResponse {
payments.shared.v1.PaymentQuote quote = 1;
string idempotency_key = 2;
@@ -21,6 +22,7 @@ message QuotePaymentResponse {
string execution_note = 3;
}
// QuotePaymentsRequest is the request to quote multiple payments in a batch.
message QuotePaymentsRequest {
payments.shared.v1.RequestMeta meta = 1;
string idempotency_key = 2;
@@ -28,6 +30,7 @@ message QuotePaymentsRequest {
bool preview_only = 4;
}
// QuotePaymentsResponse is the response for QuotePayments.
message QuotePaymentsResponse {
string quote_ref = 1;
payments.shared.v1.PaymentQuoteAggregate aggregate = 2;
@@ -35,6 +38,7 @@ message QuotePaymentsResponse {
string idempotency_key = 4;
}
// QuotationService provides payment quoting capabilities.
service QuotationService {
// QuotePayment returns a quote for a single payment request.
rpc QuotePayment(QuotePaymentRequest) returns (QuotePaymentResponse);

View File

@@ -12,6 +12,7 @@ import "api/proto/common/payment/v1/settlement.proto";
import "api/proto/billing/fees/v1/fees.proto";
import "api/proto/oracle/v1/oracle.proto";
// QuoteState tracks the lifecycle of a payment quote.
enum QuoteState {
QUOTE_STATE_UNSPECIFIED = 0;
QUOTE_STATE_INDICATIVE = 1;
@@ -20,6 +21,7 @@ enum QuoteState {
QUOTE_STATE_EXPIRED = 4;
}
// QuoteBlockReason explains why a quote cannot be executed.
enum QuoteBlockReason {
QUOTE_BLOCK_REASON_UNSPECIFIED = 0;
QUOTE_BLOCK_REASON_ROUTE_UNAVAILABLE = 1;
@@ -31,6 +33,7 @@ enum QuoteBlockReason {
QUOTE_BLOCK_REASON_AMOUNT_TOO_LARGE = 7;
}
// QuoteExecutionReadiness indicates how readily a quote can be executed.
enum QuoteExecutionReadiness {
QUOTE_EXECUTION_READINESS_UNSPECIFIED = 0;
QUOTE_EXECUTION_READINESS_LIQUIDITY_READY = 1;
@@ -38,6 +41,7 @@ enum QuoteExecutionReadiness {
QUOTE_EXECUTION_READINESS_INDICATIVE = 3;
}
// RouteHopRole classifies a hop's position in the payment route.
enum RouteHopRole {
ROUTE_HOP_ROLE_UNSPECIFIED = 0;
ROUTE_HOP_ROLE_SOURCE = 1;
@@ -45,12 +49,14 @@ enum RouteHopRole {
ROUTE_HOP_ROLE_DESTINATION = 3;
}
// FeeTreatment determines how fees are applied to the transfer amount.
enum FeeTreatment {
FEE_TREATMENT_UNSPECIFIED = 0;
FEE_TREATMENT_ADD_TO_SOURCE = 1;
FEE_TREATMENT_DEDUCT_FROM_DESTINATION = 2;
}
// RouteHop represents a single step in the payment route topology.
message RouteHop {
uint32 index = 1;
string rail = 2;
@@ -60,6 +66,7 @@ message RouteHop {
RouteHopRole role = 6;
}
// RouteSettlement describes the settlement asset and model for a route.
message RouteSettlement {
common.payment.v1.ChainAsset asset = 1;
string model = 2;
@@ -91,6 +98,7 @@ message ExecutionConditions {
repeated string assumptions = 7;
}
// PaymentQuote is a priced, time-bound quote for a single payment intent.
message PaymentQuote {
common.storable.v1.Storable storable = 1;
QuoteState state = 2;

View File

@@ -10,6 +10,7 @@ import "api/proto/common/payment/v1/settlement.proto";
import "api/proto/payments/endpoint/v1/endpoint.proto";
import "api/proto/payments/quotation/v2/interface.proto";
// QuoteIntent describes the intent behind a v2 quote request.
message QuoteIntent {
payments.endpoint.v1.PaymentEndpoint source = 1;
payments.endpoint.v1.PaymentEndpoint destination = 2;
@@ -20,34 +21,38 @@ message QuoteIntent {
string comment = 7;
}
// QuotePaymentRequest is the request to quote a single v2 payment.
message QuotePaymentRequest {
payments.shared.v1.RequestMeta meta = 1;
string idempotency_key = 2;
payments.quotation.v2.QuoteIntent intent = 3;
bool preview_only = 4;
string initiator_ref = 5;
string initiator_ref = 5;
}
// QuotePaymentResponse is the response for QuotePayment.
message QuotePaymentResponse {
payments.quotation.v2.PaymentQuote quote = 1;
string idempotency_key = 2;
}
// QuotePaymentsRequest is the request to quote multiple v2 payments in a batch.
message QuotePaymentsRequest {
payments.shared.v1.RequestMeta meta = 1;
string idempotency_key = 2;
repeated payments.quotation.v2.QuoteIntent intents = 3;
bool preview_only = 4;
string initiator_ref = 5;
string initiator_ref = 5;
}
// QuotePaymentsResponse is the response for QuotePayments.
message QuotePaymentsResponse {
string quote_ref = 1;
repeated payments.quotation.v2.PaymentQuote quotes = 3;
string idempotency_key = 4;
}
// Quotation service interface
// QuotationService provides v2 payment quoting capabilities.
service QuotationService {
// QuotePayment returns a quote for a single payment request.
rpc QuotePayment(QuotePaymentRequest) returns (QuotePaymentResponse);