builder

package
v0.0.0-...-4f6eca2 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2025 License: Apache-2.0, MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const MaxAccountUnstakes = 20
View Source
const MaxAccountWithdraws = 20
View Source
const MaxTokenTransfers = 20

Max number of token transfers we can fit in a solana transaction, when there's also a create ATA included.

View Source
const RentExemptLamportsThreshold = 3000000
View Source
const RentExemptLamportsThresholdHuman = "0.003"
View Source
const StakeAccountSize = 200

Variables

This section is empty.

Functions

This section is empty.

Types

type TxBuilder

type TxBuilder struct {
	Asset xc.ITask
}

TxBuilder for Solana

func NewTxBuilder

func NewTxBuilder(asset xc.ITask) (TxBuilder, error)

NewTxBuilder creates a new Solana TxBuilder

func (TxBuilder) BuildUnwrapEverythingTx

func (txBuilder TxBuilder) BuildUnwrapEverythingTx(from xc.Address, to xc.Address, amount xc.AmountBlockchain, txInput *TxInput) (xc.Tx, error)

func (TxBuilder) BuildWrapTx

func (txBuilder TxBuilder) BuildWrapTx(from xc.Address, to xc.Address, amount xc.AmountBlockchain, txInput *TxInput) (xc.Tx, error)

func (TxBuilder) NewNativeTransfer

func (txBuilder TxBuilder) NewNativeTransfer(from xc.Address, to xc.Address, amount xc.AmountBlockchain, txInput xc.TxInput) (xc.Tx, error)

NewNativeTransfer creates a new transfer for a native asset

func (TxBuilder) NewTask

func (txBuilder TxBuilder) NewTask(from xc.Address, to xc.Address, amount xc.AmountBlockchain, input xc.TxInput) (xc.Tx, error)

func (TxBuilder) NewTokenTransfer

func (txBuilder TxBuilder) NewTokenTransfer(from xc.Address, to xc.Address, amount xc.AmountBlockchain, input xc.TxInput) (xc.Tx, error)

NewTokenTransfer creates a new transfer for a token asset

func (TxBuilder) NewTransfer

func (txBuilder TxBuilder) NewTransfer(from xc.Address, to xc.Address, amount xc.AmountBlockchain, input xc.TxInput) (xc.Tx, error)

Old transfer interface

func (TxBuilder) Stake

func (txBuilder TxBuilder) Stake(args xcbuilder.StakeArgs, input xc.StakeTxInput) (xc.Tx, error)

func (TxBuilder) Transfer

func (txBuilder TxBuilder) Transfer(args xcbuilder.TransferArgs, input xc.TxInput) (xc.Tx, error)

NewTransfer creates a new transfer for an Asset, either native or token

func (TxBuilder) Unstake

func (txBuilder TxBuilder) Unstake(args xcbuilder.StakeArgs, input xc.UnstakeTxInput) (xc.Tx, error)

func (TxBuilder) Withdraw

func (txBuilder TxBuilder) Withdraw(args xcbuilder.StakeArgs, input xc.WithdrawTxInput) (xc.Tx, error)

type TxInput

type TxInput = tx_input.TxInput

Jump to

Keyboard shortcuts

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