Documentation
¶
Overview ¶
Package swaps is a generated GoMock package.
Index ¶
- Variables
- type Client
- func (f *Client) CreateSwapIn(ctx context.Context, swapReq *CreateSwapInRequest) (*SwapInResponse, error)
- func (f *Client) CreateSwapOut(ctx context.Context, swapReq CreateSwapOutRequest) (*SwapOutResponse, error)
- func (f *Client) GetClaimPSBT(ctx context.Context, swapId, address string) (*GetClaimPSBTResponse, error)
- func (f *Client) GetConfiguration(ctx context.Context) (*ConfigurationResponse, error)
- func (f *Client) GetRefundPSBT(ctx context.Context, swapId, address string) (*RefundPSBTResponse, error)
- func (f *Client) GetSwapIn(ctx context.Context, swapId string) (*SwapInResponse, error)
- func (f *Client) GetSwapOut(ctx context.Context, swapId string) (*SwapOutResponse, error)
- func (f *Client) PostClaim(ctx context.Context, swapId, tx string) error
- func (f *Client) PostRefund(ctx context.Context, swapId, tx string) error
- type ClientInterface
- type ConfigurationResponse
- type CreateSwapInRequest
- type CreateSwapOutRequest
- type GetClaimPSBTResponse
- type MockClientInterface
- func (m *MockClientInterface) CreateSwapIn(ctx context.Context, req *CreateSwapInRequest) (*SwapInResponse, error)
- func (m *MockClientInterface) CreateSwapOut(ctx context.Context, swapReq CreateSwapOutRequest) (*SwapOutResponse, error)
- func (m *MockClientInterface) EXPECT() *MockClientInterfaceMockRecorder
- func (m *MockClientInterface) GetClaimPSBT(ctx context.Context, swapId, address string) (*GetClaimPSBTResponse, error)
- func (m *MockClientInterface) GetConfiguration(ctx context.Context) (*ConfigurationResponse, error)
- func (m *MockClientInterface) GetRefundPSBT(ctx context.Context, swapId, address string) (*RefundPSBTResponse, error)
- func (m *MockClientInterface) GetSwapIn(ctx context.Context, swapId string) (*SwapInResponse, error)
- func (m *MockClientInterface) GetSwapOut(ctx context.Context, swapId string) (*SwapOutResponse, error)
- func (m *MockClientInterface) PostClaim(ctx context.Context, swapId, tx string) error
- func (m *MockClientInterface) PostRefund(ctx context.Context, swapId, tx string) error
- type MockClientInterfaceMockRecorder
- func (mr *MockClientInterfaceMockRecorder) CreateSwapIn(ctx, req any) *gomock.Call
- func (mr *MockClientInterfaceMockRecorder) CreateSwapOut(ctx, swapReq any) *gomock.Call
- func (mr *MockClientInterfaceMockRecorder) GetClaimPSBT(ctx, swapId, address any) *gomock.Call
- func (mr *MockClientInterfaceMockRecorder) GetConfiguration(ctx any) *gomock.Call
- func (mr *MockClientInterfaceMockRecorder) GetRefundPSBT(ctx, swapId, address any) *gomock.Call
- func (mr *MockClientInterfaceMockRecorder) GetSwapIn(ctx, swapId any) *gomock.Call
- func (mr *MockClientInterfaceMockRecorder) GetSwapOut(ctx, swapId any) *gomock.Call
- func (mr *MockClientInterfaceMockRecorder) PostClaim(ctx, swapId, tx any) *gomock.Call
- func (mr *MockClientInterfaceMockRecorder) PostRefund(ctx, swapId, tx any) *gomock.Call
- type RefundPSBTResponse
- type SwapInResponse
- type SwapOutResponse
Constants ¶
This section is empty.
Variables ¶
var ErrSwapNotFound = fmt.Errorf("swap not found")
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) CreateSwapIn ¶
func (f *Client) CreateSwapIn(ctx context.Context, swapReq *CreateSwapInRequest) (*SwapInResponse, error)
func (*Client) CreateSwapOut ¶
func (f *Client) CreateSwapOut(ctx context.Context, swapReq CreateSwapOutRequest) (*SwapOutResponse, error)
func (*Client) GetClaimPSBT ¶
func (*Client) GetConfiguration ¶
func (f *Client) GetConfiguration(ctx context.Context) (*ConfigurationResponse, error)
func (*Client) GetRefundPSBT ¶
func (*Client) GetSwapOut ¶
type ClientInterface ¶
type ClientInterface interface {
GetConfiguration(ctx context.Context) (*ConfigurationResponse, error)
CreateSwapOut(ctx context.Context, swapReq CreateSwapOutRequest) (*SwapOutResponse, error)
GetSwapOut(ctx context.Context, swapId string) (*SwapOutResponse, error)
GetClaimPSBT(ctx context.Context, swapId, address string) (*GetClaimPSBTResponse, error)
PostClaim(ctx context.Context, swapId, tx string) error
CreateSwapIn(ctx context.Context, req *CreateSwapInRequest) (*SwapInResponse, error)
GetSwapIn(ctx context.Context, swapId string) (*SwapInResponse, error)
GetRefundPSBT(ctx context.Context, swapId, address string) (*RefundPSBTResponse, error)
PostRefund(ctx context.Context, swapId, tx string) error
}
type ConfigurationResponse ¶
type CreateSwapInRequest ¶
type CreateSwapOutRequest ¶
type GetClaimPSBTResponse ¶
type GetClaimPSBTResponse struct {
PSBT string `json:"psbt"`
}
type MockClientInterface ¶
type MockClientInterface struct {
// contains filtered or unexported fields
}
MockClientInterface is a mock of ClientInterface interface.
func NewMockClientInterface ¶
func NewMockClientInterface(ctrl *gomock.Controller) *MockClientInterface
NewMockClientInterface creates a new mock instance.
func (*MockClientInterface) CreateSwapIn ¶
func (m *MockClientInterface) CreateSwapIn(ctx context.Context, req *CreateSwapInRequest) (*SwapInResponse, error)
CreateSwapIn mocks base method.
func (*MockClientInterface) CreateSwapOut ¶
func (m *MockClientInterface) CreateSwapOut(ctx context.Context, swapReq CreateSwapOutRequest) (*SwapOutResponse, error)
CreateSwapOut mocks base method.
func (*MockClientInterface) EXPECT ¶
func (m *MockClientInterface) EXPECT() *MockClientInterfaceMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockClientInterface) GetClaimPSBT ¶
func (m *MockClientInterface) GetClaimPSBT(ctx context.Context, swapId, address string) (*GetClaimPSBTResponse, error)
GetClaimPSBT mocks base method.
func (*MockClientInterface) GetConfiguration ¶
func (m *MockClientInterface) GetConfiguration(ctx context.Context) (*ConfigurationResponse, error)
GetConfiguration mocks base method.
func (*MockClientInterface) GetRefundPSBT ¶
func (m *MockClientInterface) GetRefundPSBT(ctx context.Context, swapId, address string) (*RefundPSBTResponse, error)
GetRefundPSBT mocks base method.
func (*MockClientInterface) GetSwapIn ¶
func (m *MockClientInterface) GetSwapIn(ctx context.Context, swapId string) (*SwapInResponse, error)
GetSwapIn mocks base method.
func (*MockClientInterface) GetSwapOut ¶
func (m *MockClientInterface) GetSwapOut(ctx context.Context, swapId string) (*SwapOutResponse, error)
GetSwapOut mocks base method.
func (*MockClientInterface) PostClaim ¶
func (m *MockClientInterface) PostClaim(ctx context.Context, swapId, tx string) error
PostClaim mocks base method.
func (*MockClientInterface) PostRefund ¶
func (m *MockClientInterface) PostRefund(ctx context.Context, swapId, tx string) error
PostRefund mocks base method.
type MockClientInterfaceMockRecorder ¶
type MockClientInterfaceMockRecorder struct {
// contains filtered or unexported fields
}
MockClientInterfaceMockRecorder is the mock recorder for MockClientInterface.
func (*MockClientInterfaceMockRecorder) CreateSwapIn ¶
func (mr *MockClientInterfaceMockRecorder) CreateSwapIn(ctx, req any) *gomock.Call
CreateSwapIn indicates an expected call of CreateSwapIn.
func (*MockClientInterfaceMockRecorder) CreateSwapOut ¶
func (mr *MockClientInterfaceMockRecorder) CreateSwapOut(ctx, swapReq any) *gomock.Call
CreateSwapOut indicates an expected call of CreateSwapOut.
func (*MockClientInterfaceMockRecorder) GetClaimPSBT ¶
func (mr *MockClientInterfaceMockRecorder) GetClaimPSBT(ctx, swapId, address any) *gomock.Call
GetClaimPSBT indicates an expected call of GetClaimPSBT.
func (*MockClientInterfaceMockRecorder) GetConfiguration ¶
func (mr *MockClientInterfaceMockRecorder) GetConfiguration(ctx any) *gomock.Call
GetConfiguration indicates an expected call of GetConfiguration.
func (*MockClientInterfaceMockRecorder) GetRefundPSBT ¶
func (mr *MockClientInterfaceMockRecorder) GetRefundPSBT(ctx, swapId, address any) *gomock.Call
GetRefundPSBT indicates an expected call of GetRefundPSBT.
func (*MockClientInterfaceMockRecorder) GetSwapIn ¶
func (mr *MockClientInterfaceMockRecorder) GetSwapIn(ctx, swapId any) *gomock.Call
GetSwapIn indicates an expected call of GetSwapIn.
func (*MockClientInterfaceMockRecorder) GetSwapOut ¶
func (mr *MockClientInterfaceMockRecorder) GetSwapOut(ctx, swapId any) *gomock.Call
GetSwapOut indicates an expected call of GetSwapOut.
func (*MockClientInterfaceMockRecorder) PostClaim ¶
func (mr *MockClientInterfaceMockRecorder) PostClaim(ctx, swapId, tx any) *gomock.Call
PostClaim indicates an expected call of PostClaim.
func (*MockClientInterfaceMockRecorder) PostRefund ¶
func (mr *MockClientInterfaceMockRecorder) PostRefund(ctx, swapId, tx any) *gomock.Call
PostRefund indicates an expected call of PostRefund.
type RefundPSBTResponse ¶
type RefundPSBTResponse struct {
PSBT string `json:"psbt"`
}
type SwapInResponse ¶
type SwapInResponse struct {
// ContractAddress is the claim address for the swap
ContractAddress string `json:"contractAddress"`
Chain models.Chain `json:"chain"`
CreatedAt time.Time `json:"createdAt"`
InputAmount decimal.Decimal `json:"inputAmount"`
LockTx *string `json:"lockTx"`
Outcome models.SwapOutcome `json:"outcome"`
OutputAmount decimal.Decimal `json:"outputAmount"`
RedeemScript string `json:"redeemScript"`
Status models.SwapStatus `json:"status"`
SwapId string `json:"swapId"`
TimeoutBlockHeight uint32 `json:"timeoutBlockHeight"`
}
type SwapOutResponse ¶
type SwapOutResponse struct {
SwapId string `json:"swapId"`
TimeoutBlockHeight uint32 `json:"timeoutBlockHeight"`
Invoice string `json:"invoice"`
InputAmount decimal.Decimal `json:"inputAmount"`
OutputAmount decimal.Decimal `json:"outputAmount"`
Status models.SwapStatus `json:"status"`
Outcome models.SwapOutcome `json:"outcome"`
CreatedAt time.Time `json:"createdAt"`
LockTx *string `json:"lockTx"`
UnlockTx *string `json:"unlockTx"`
ContractAddress *string `json:"contractAddress"`
RedeemScript *string `json:"redeemScript"`
RefundPublicKey *string `json:"refundPublicKey"`
}