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

@@ -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;