Documentation ¶
Index ¶
- Variables
- func NewService(cap int, receiver *Receiver) tau.Task
- type AcceptRequest
- type AcceptedRequest
- type GetAddressResponse
- type GetAddressesResponse
- type GetBalanceResponse
- type GetBalancesResponse
- type GetInfoResponse
- type GetSignatureResponseJSON
- type GetSignatureResponseString
- type GetSwapResponse
- type GetSwapsResponse
- type GetTransfersResponse
- type Handler
- type PostRedeemSwapResponse
- type PostSwapRequest
- type PostSwapResponse
- type PostTransfersRequest
- type PostTransfersResponse
- type Receiver
- type Server
- type Storage
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrHandlerIsShuttingDown = fmt.Errorf("Http handler is shutting down")
View Source
var ErrReceiverIsShuttingDown = errors.New("receiver is shutting down")
Functions ¶
Types ¶
type AcceptRequest ¶
type AcceptRequest struct { }
func (AcceptRequest) IsMessage ¶
func (req AcceptRequest) IsMessage()
type AcceptedRequest ¶
func NewAcceptedRequest ¶
func NewAcceptedRequest(msg tau.Message) AcceptedRequest
func (AcceptedRequest) IsMessage ¶
func (req AcceptedRequest) IsMessage()
type GetAddressResponse ¶
type GetAddressResponse string
type GetAddressesResponse ¶
type GetAddressesResponse map[blockchain.TokenName]string
type GetBalanceResponse ¶
type GetBalanceResponse blockchain.Balance
type GetBalancesResponse ¶
type GetBalancesResponse map[blockchain.TokenName]blockchain.Balance
type GetInfoResponse ¶
type GetInfoResponse struct { Version string `json:"version"` Bootloaded bool `json:"bootloaded"` SupportedTokens []blockchain.Token `json:"supportedTokens"` }
type GetSignatureResponseJSON ¶
type GetSignatureResponseJSON struct { Message json.RawMessage `json:"message"` Signature string `json:"signature"` }
type GetSwapResponse ¶
type GetSwapResponse swap.SwapReceipt
type GetSwapsResponse ¶
type GetSwapsResponse struct {
Swaps []swap.SwapReceipt `json:"swaps"`
}
type GetTransfersResponse ¶
type GetTransfersResponse struct {
Transfers []transfer.TransferReceipt `json:"transfers"`
}
func MarshalGetTransfersResponse ¶
func MarshalGetTransfersResponse(receiptMap transfer.TransferReceiptMap) GetTransfersResponse
type Handler ¶
type Handler interface { GetID(password string, idType string) (string, error) GetInfo(password string) GetInfoResponse GetSwap(password string, id swap.SwapID) (GetSwapResponse, error) GetSwaps(password string) (GetSwapsResponse, error) GetBalances(password string) (GetBalancesResponse, error) GetBalance(password string, token blockchain.Token) (GetBalanceResponse, error) GetAddresses(password string) (GetAddressesResponse, error) GetAddress(password string, token blockchain.Token) (GetAddressResponse, error) GetTransfers(password string) (GetTransfersResponse, error) GetJSONSignature(password string, message json.RawMessage) (GetSignatureResponseJSON, error) GetBase64Signature(password string, message string) (GetSignatureResponseString, error) GetHexSignature(password string, message string) (GetSignatureResponseString, error) PostTransfers(PostTransfersRequest) error PostSwaps(PostSwapRequest) (PostSwapResponse, error) PostDelayedSwaps(PostSwapRequest) error Shutdown() }
The Handler for swapperd requests
type PostRedeemSwapResponse ¶
type PostSwapRequest ¶
type PostSwapResponse ¶
type PostTransfersRequest ¶
type PostTransfersResponse ¶
type PostTransfersResponse transfer.TransferReceipt
type Receiver ¶
type Receiver struct {
// contains filtered or unexported fields
}
func NewReceiver ¶
type Storage ¶
type Storage interface { Receipts() ([]swap.SwapReceipt, error) Transfers() ([]transfer.TransferReceipt, error) }
Click to show internal directories.
Click to hide internal directories.