htlc

package
v0.0.0-...-f148bc3 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	HandleTxMsg(v types.Msg) (MsgDocInfo, bool)
}

func NewClient

func NewClient() Client

type DocTxMsgClaimHTLC

type DocTxMsgClaimHTLC struct {
	Sender string `bson:"sender"` // the initiator address
	Id     string `bson:"id"`     // the id identifying the HTLC to be claimed
	Secret string `bson:"secret"` // the secret with which to claim
}

func (*DocTxMsgClaimHTLC) BuildMsg

func (doctx *DocTxMsgClaimHTLC) BuildMsg(txMsg interface{})

func (*DocTxMsgClaimHTLC) GetType

func (doctx *DocTxMsgClaimHTLC) GetType() string

func (*DocTxMsgClaimHTLC) HandleTxMsg

func (m *DocTxMsgClaimHTLC) HandleTxMsg(v sdk.Msg) MsgDocInfo

type DocTxMsgCreateHTLC

type DocTxMsgCreateHTLC struct {
	Sender               string        `bson:"sender"`                  // the initiator address
	To                   string        `bson:"to"`                      // the destination address
	ReceiverOnOtherChain string        `bson:"receiver_on_other_chain"` // the claim receiving address on the other chain
	SenderOnOtherChain   string        `bson:"sender_on_other_chain"`
	Amount               []models.Coin `bson:"amount"`    // the amount to be transferred
	HashLock             string        `bson:"hash_lock"` // the hash lock generated from secret (and timestamp if provided)
	Timestamp            int64         `bson:"timestamp"` // if provided, used to generate the hash lock together with secret
	TimeLock             int64         `bson:"time_lock"` // the time span after which the HTLC will expire
	Transfer             bool          `bson:"transfer"`
}

func (*DocTxMsgCreateHTLC) BuildMsg

func (doctx *DocTxMsgCreateHTLC) BuildMsg(txMsg interface{})

func (*DocTxMsgCreateHTLC) GetType

func (doctx *DocTxMsgCreateHTLC) GetType() string

func (*DocTxMsgCreateHTLC) HandleTxMsg

func (m *DocTxMsgCreateHTLC) HandleTxMsg(v sdk.Msg) MsgDocInfo

Jump to

Keyboard shortcuts

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