controllers

package
v0.0.0-...-ddfbed8 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	InvalidEthereumTxHash = problem.P{
		Type:   "invalid_ethereum_tx_hash",
		Title:  "Invalid Ethereum Transaction Hash",
		Status: http.StatusBadRequest,
		Detail: "The transaction hash of the ethereum transaction is invalid.",
	}
	InvalidLogIndex = problem.P{
		Type:   "invalid_log_index",
		Title:  "Invalid Log Index",
		Status: http.StatusBadRequest,
		Detail: "The given log index for the Ethereum deposit is invalid.",
	}
	InvalidDepositLog = problem.P{
		Type:   "invalid_deposit_log",
		Title:  "Invalid Deposit Log",
		Status: http.StatusBadRequest,
		Detail: "The given log for the transaction hash is invalid.",
	}
	EthereumTxHashNotFound = problem.P{
		Type:   "ethereum_tx_hash_not_found",
		Title:  "Ethereum Transaction Hash Not Found",
		Status: http.StatusNotFound,
		Detail: "The ethereum transaction cannot be found.",
	}
	EthereumTxRequiresMoreConfirmations = problem.P{
		Type:   "ethereum_tx_requires_more_confirmations",
		Title:  "Ethereum Transaction Requires More confirmations",
		Status: http.StatusUnprocessableEntity,
		Detail: "Retry later once the transaction has more confirmations.",
	}
)
View Source
var (
	InvalidStellarTxHash = problem.P{
		Type:   "invalid_stellar_tx_hash",
		Title:  "Invalid Stellar Transaction Hash",
		Status: http.StatusBadRequest,
		Detail: "The transaction hash of the Stellar transaction is invalid.",
	}
	StellarTxHashNotFound = problem.P{
		Type:   "stellar_tx_hash_not_found",
		Title:  "Stellar Transaction Hash Not Found",
		Status: http.StatusNotFound,
		Detail: "The stellar transaction cannot be found.",
	}
)

Functions

This section is empty.

Types

type EthereumRefundHandler

type EthereumRefundHandler struct {
	Observer                ethereum.Observer
	Store                   *store.DB
	EthereumRefundValidator backend.EthereumRefundValidator
	EthereumFinalityBuffer  uint64
}

func (*EthereumRefundHandler) ServeHTTP

type EthereumSignatureResponse

type EthereumSignatureResponse struct {
	Address    string `json:"address"`
	Signature  string `json:"signature"`
	DepositID  string `json:"deposit_id"`
	Expiration int64  `json:"expiration,string"`
	Token      string `json:"token"`
	Amount     string `json:"amount"`
}

type EthereumWithdrawalHandler

type EthereumWithdrawalHandler struct {
	Store                       *store.DB
	EthereumWithdrawalValidator backend.EthereumWithdrawalValidator
}

func (*EthereumWithdrawalHandler) ServeHTTP

type StellarRefundHandler

type StellarRefundHandler struct {
	StellarClient          *horizonclient.Client
	Store                  *store.DB
	StellarRefundValidator backend.StellarRefundValidator
}

func (*StellarRefundHandler) ServeHTTP

func (c *StellarRefundHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type StellarWithdrawalHandler

type StellarWithdrawalHandler struct {
	StellarClient              *horizonclient.Client
	Observer                   ethereum.Observer
	Store                      *store.DB
	StellarWithdrawalValidator backend.StellarWithdrawalValidator
	EthereumFinalityBuffer     uint64
}

func (*StellarWithdrawalHandler) ServeHTTP

type TestDeposit

type TestDeposit struct {
	Store *store.DB
	Token string
}

TODO remove after prototype demo

func (*TestDeposit) ServeHTTP

func (c *TestDeposit) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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