Documentation ¶
Index ¶
- Variables
- func MarshalAmount(amount *big.Int) string
- func MarshalSecretHash(hash [32]byte) string
- func MarshalToken(token foundation.Token) string
- func NewHandler(authenticator auth.Authenticator, manager funds.Manager, ...) http.Handler
- func NewServer(authenticator auth.Authenticator, fundManager funds.Manager, ...) *server
- func UnmarshalAmount(amount string) (*big.Int, error)
- func UnmarshalSecretHash(hash string) ([32]byte, error)
- func UnmarshalToken(token string) (foundation.Token, error)
- type Balance
- type GetBalanceResponse
- type GetSwapsResponse
- type GetWhoAmIResponse
- type PostWithdrawalsRequest
- type PostWithdrawalsResponse
- type SwapStatus
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidAmount = errors.New("invalid amount")
View Source
var ErrInvalidLength = errors.New("invalid length")
Functions ¶
func MarshalAmount ¶
func MarshalSecretHash ¶
func MarshalToken ¶
func MarshalToken(token foundation.Token) string
func NewHandler ¶
func NewHandler(authenticator auth.Authenticator, manager funds.Manager, swaps chan<- swapper.Swap, statusQueries chan<- status.Query) http.Handler
NewHandler creates a new http handler
func UnmarshalSecretHash ¶
func UnmarshalToken ¶
func UnmarshalToken(token string) (foundation.Token, error)
Types ¶
type GetBalanceResponse ¶
type GetBalanceResponse struct {
Balances []Balance `json:"balances"`
}
type GetSwapsResponse ¶
type GetSwapsResponse struct {
Swaps []SwapStatus `json:"swaps"`
}
type GetWhoAmIResponse ¶
type GetWhoAmIResponse struct { Version string `json:"version"` SupportedTokens []foundation.Token `json:"supportedTokens"` }
GetWhoAmIResponse data object contains the Swapper's internal information.
type PostWithdrawalsRequest ¶
type PostWithdrawalsResponse ¶
type PostWithdrawalsResponse struct {
TxHash string `txHash`
}
type SwapStatus ¶
Click to show internal directories.
Click to hide internal directories.