event

package
v0.0.0-...-365054f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 16, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// AppTopicHermesPromise represents a topic to which we send hermes promise events.
	AppTopicHermesPromise = "hermes_promise_received"
	// AppTopicBalanceChanged represents the balance change topic
	AppTopicBalanceChanged = "balance_change"
	// AppTopicEarningsChanged represents the earnings change topic
	AppTopicEarningsChanged = "earnings_change"
	// AppTopicInvoicePaid is a topic for publish events exchange message send to provider as a consumer.
	AppTopicInvoicePaid = "invoice_paid"
	// AppTopicSettlementRequest forces the settlement of promises for given provider/hermes.
	AppTopicSettlementRequest = "settlement_request"
	// AppTopicSettlementComplete topic for events related to completed settlement.
	AppTopicSettlementComplete = "provider_settlement_complete"
	// AppTopicWithdrawalRequested topic for succesfull withdrawal requests.
	AppTopicWithdrawalRequested = "provider_withdrawal_requested"
)
View Source
const AppTopicGrandTotalChanged = "consumer_grand_total_change"

AppTopicGrandTotalChanged represents a topic to which we send grand total change messages.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppEventBalanceChanged

type AppEventBalanceChanged struct {
	Identity identity.Identity
	Previous *big.Int
	Current  *big.Int
}

AppEventBalanceChanged represents a balance change event

type AppEventEarningsChanged

type AppEventEarningsChanged struct {
	Identity identity.Identity
	Previous EarningsDetailed
	Current  EarningsDetailed
}

AppEventEarningsChanged represents a balance change event

type AppEventGrandTotalChanged

type AppEventGrandTotalChanged struct {
	Current    *big.Int
	ChainID    int64
	HermesID   common.Address
	ConsumerID identity.Identity
}

AppEventGrandTotalChanged represents the grand total changed event.

type AppEventHermesPromise

type AppEventHermesPromise struct {
	Promise    crypto.Promise
	HermesID   common.Address
	ProviderID identity.Identity
}

AppEventHermesPromise represents the payload that is sent on the AppTopicHermesPromise.

type AppEventInvoicePaid

type AppEventInvoicePaid struct {
	UUID       string
	ConsumerID identity.Identity
	SessionID  string
	Invoice    crypto.Invoice
}

AppEventInvoicePaid is an update on paid invoices during current session

type AppEventSettlementComplete

type AppEventSettlementComplete struct {
	ProviderID identity.Identity
	HermesID   common.Address
	ChainID    int64
}

AppEventSettlementComplete represent a completed settlement.

type AppEventSettlementRequest

type AppEventSettlementRequest struct {
	HermesID   common.Address
	ProviderID identity.Identity
	ChainID    int64
}

AppEventSettlementRequest represents the payload that is sent on the AppTopicSettlementRequest topic.

type AppEventWithdrawalRequested

type AppEventWithdrawalRequested struct {
	ProviderID         identity.Identity
	HermesID           common.Address
	FromChain, ToChain int64
}

AppEventWithdrawalRequested represents a request for withdrawal.

type Earnings

type Earnings struct {
	LifetimeBalance  *big.Int
	UnsettledBalance *big.Int
}

Earnings represents current identity earnings

type EarningsDetailed

type EarningsDetailed struct {
	Total     Earnings
	PerHermes map[common.Address]Earnings
}

EarningsDetailed returns total and split per hermes earnings

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL