saber

package
v0.0.0-...-4494a5e Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2024 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const TokenAmountStartByte = 113

Byte offset at which the TokenAmount struct we're interested in starts

Variables

This section is empty.

Functions

func GetSaberFees

func GetSaberFees(saberRpcUrl string, transaction solTypes.TransactionResult, saberSwapProgramId string) (feesPaid *big.Rat, logErrors []error, err error)

GetSaberFees by breaking down the log message on the wire. Any errors returned from each stage of breaking down the logs are contained within an error slice, any lookup errors are returned in the final error type

func GetSaberPriceAndDecimals

func GetSaberPriceAndDecimals(saberRpcUrl, pubKey string) (*big.Rat, int, error)

GetSaberPriceAndDecimals at the public key given using Saber's RPC over HTTP

Types

type TokenAmount

type TokenAmount struct {
	Mint   solana.PublicKey
	Amount uint64
}

Jump to

Keyboard shortcuts

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