encode

package
v0.0.0-...-fd23662 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2025 License: MIT Imports: 4 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendPayload

func AppendPayload(payloadType ContractCallWithTokenPayloadType, encodedPayload []byte) []byte

func CalculateContractCallWithTokenPayload

func CalculateContractCallWithTokenPayload(
	payloadArgs ContractCallWithTokenPayload,
) ([]byte, []byte, error)

Types

type ContractCallWithTokenPayload

type ContractCallWithTokenPayload struct {
	PayloadType ContractCallWithTokenPayloadType
	*CustodianOnly
	*UPC
}

func DecodeContractCallWithTokenPayload

func DecodeContractCallWithTokenPayload(payload []byte) (*ContractCallWithTokenPayload, error)

func DecodeCustodianOnly

func DecodeCustodianOnly(payload []byte) (*ContractCallWithTokenPayload, error)

func DecodeUPC

func DecodeUPC(payload []byte) (*ContractCallWithTokenPayload, error)

type ContractCallWithTokenPayloadType

type ContractCallWithTokenPayloadType uint8
const (
	ContractCallWithTokenPayloadType_CustodianOnly ContractCallWithTokenPayloadType = iota
	ContractCallWithTokenPayloadType_UPC
)

func (ContractCallWithTokenPayloadType) Bytes

type CustodianOnly

type CustodianOnly struct {
	FeeOptions               types.BTCFeeOpts
	RBF                      bool
	RecipientChainIdentifier []byte
}

type UPC

type UPC struct {
	Psbt []byte
}

Jump to

Keyboard shortcuts

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