Documentation ¶
Index ¶
- func Accept(opts AcceptOpts) (string, []byte, error)
- func Complete(complete CompleteOpts) (string, []byte, error)
- func Fail(opts FailOpts) (string, []byte, error)
- func Request(opts RequestOpts) ([]byte, error)
- func ValidateCompletePset(opts ValidateCompletePsetOpts) error
- type AcceptOpts
- type CompleteOpts
- type ErrCode
- type FailOpts
- type RequestOpts
- type ValidateCompletePsetOpts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Accept ¶
func Accept(opts AcceptOpts) (string, []byte, error)
Accept takes a AcceptOpts and returns the id of the SwapAccept entity and its serialized version
func Complete ¶
func Complete(complete CompleteOpts) (string, []byte, error)
Complete takes a CompleteOpts and returns the id of the SwapComplete entity and its serialized version
func Request ¶
func Request(opts RequestOpts) ([]byte, error)
Request takes a RequestOpts struct and returns a serialized protobuf message.
func ValidateCompletePset ¶
func ValidateCompletePset(opts ValidateCompletePsetOpts) error
ValidateCompletePset takes a VerifyCompeltePsetOpts and returns whether the final signed pset matches the original SwapRequest message
Types ¶
type AcceptOpts ¶
type AcceptOpts struct { Message []byte PsetBase64 string InputBlindingKeys map[string][]byte OutputBlindingKeys map[string][]byte }
AcceptOpts is the struct given to Accept method
type CompleteOpts ¶
CompleteOpts is the struct given to the Complete method
type RequestOpts ¶
type RequestOpts struct { Id string AssetToSend string AmountToSend uint64 AssetToReceive string AmountToReceive uint64 PsetBase64 string InputBlindingKeys map[string][]byte OutputBlindingKeys map[string][]byte }
RequestOpts is the struct to be given to the Request method
type ValidateCompletePsetOpts ¶
type ValidateCompletePsetOpts struct { PsetBase64 string InputBlindingKeys map[string][]byte OutputBlindingKeys map[string][]byte SwapRequest *pb.SwapRequest }
ValidateCompletePsetOpts is the struct given to the ValidateCompletePset method