htlc

package
v0.0.0-...-ec6187d Latest Latest
Warning

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

Go to latest
Published: May 22, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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 SdkMsg) 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 SdkMsg) MsgDocInfo

type HtlcClient

type HtlcClient struct {
}

func NewClient

func NewClient() HtlcClient

func (HtlcClient) HandleTxMsg

func (htlc HtlcClient) HandleTxMsg(v types.Msg) (MsgDocInfo, bool)

Jump to

Keyboard shortcuts

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