router

package
v1.114.0 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DepositEventName  = "MayaRouterDepositEvent"
	WithdrawEventName = "MayaRouterWithdrawEvent"
)
View Source
var (
	TransactionValidityEpochs uint64 = 2
	TipPercentage             uint16 = 0
)

Functions

func BuildTransferOutTransaction

func BuildTransferOutTransaction(
	routerForWithdrawals string,
	routerForDeposits string,
	currentEpoch uint64,
	nonce uint32,
	resourceAddress string,
	resourceAmount *ret.Decimal,
	memo mem.Memo,
	maxFee *ret.Decimal,
	network types.Network,
	tx stypes.TxOutItem,
) (*ret.SignedIntent, error)

func GetVaultBalanceInRouter

func GetVaultBalanceInRouter(
	coreApiWrapper *coreapi.CoreApiWrapper,
	routerAddress string,
	vaultPubKey common.PubKey,
	resourceAddress string,
	networkId uint8,
) (*ret.Decimal, error)

Types

type DepositEvent

type DepositEvent struct {
	Sender            string
	VaultAddress      string
	ResourceAddress   string
	AmountXrdSubunits cosmos.Uint
	Memo              string
}

func DecodeDepositEventFromApiEvent

func DecodeDepositEventFromApiEvent(event models.Eventable, network types.Network) (DepositEvent, error)

type ManifestBuilderWrapper

type ManifestBuilderWrapper struct {
	// contains filtered or unexported fields
}

func NewManifestBuilderWrapper

func NewManifestBuilderWrapper(routerForWithdrawals string, routerForDeposits string) (ManifestBuilderWrapper, error)

type WithdrawEvent

type WithdrawEvent struct {
	VaultAddress            string
	IntendedRecipient       string
	ResourceAddress         string
	AmountXrdSubunits       cosmos.Uint
	Memo                    string
	AggregatorAddress       string
	AggregatorTargetAddress string
	AggregatorMinAmount     *cosmos.Uint
}

func DecodeWithdrawEventFromApiEvent

func DecodeWithdrawEventFromApiEvent(event models.Eventable, network types.Network) (WithdrawEvent, error)

Jump to

Keyboard shortcuts

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