Documentation
¶
Index ¶
- func CheckIfAlreadySettled(ctx context.Context, db *harmonydb.DB, providerID int64, latestNonce int64) (bool, error)
- func RecordSettlement(ctx context.Context, tx *harmonydb.Tx, providerID int64, paymentNonce int64, ...) error
- func SettleProvider(ctx context.Context, db *harmonydb.DB, chain api.FullNode, ...) (cid.Cid, error)
- type ProviderPaymentInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckIfAlreadySettled ¶
func CheckIfAlreadySettled(ctx context.Context, db *harmonydb.DB, providerID int64, latestNonce int64) (bool, error)
CheckIfAlreadySettled checks if the latest payment is already settled
Types ¶
type ProviderPaymentInfo ¶
type ProviderPaymentInfo struct {
ProviderID int64
LatestNonce int64
CumulativeAmount string
Signature []byte
}
ProviderPaymentInfo holds the payment information for a provider
func GetProviderPaymentInfo ¶
func GetProviderPaymentInfo(ctx context.Context, db *harmonydb.DB, providerID int64) (*ProviderPaymentInfo, error)
GetProviderPaymentInfo fetches the latest payment info for a provider
Click to show internal directories.
Click to hide internal directories.