types

package
v0.0.0-...-cb7fc92 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: MIT Imports: 4 Imported by: 4

Documentation

Index

Constants

View Source
const (
	// Transaction flags
	FtfBurnable            Flag = 0x1
	FtfOnlyXrp                  = 0x2
	FtfTransferable             = 0x8
	FtfNoDirectRipple           = 0x10000
	FtfPartialPayment           = 0x20000
	FtfLimitQuality             = 0x40000
	FtfRequireDestTag           = 0x10000
	FtfOptionalDestTag          = 0x20000
	FtfRequireAuth              = 0x40000
	FtfOptionalAuth             = 0x80000
	FtfDisallowXRP              = 0x100000
	FtfAllowXRP                 = 0x200000
	FtfLPToken                  = 0x10000
	FtfTwoAsset                 = 0x100000
	FtfTwoAssetIfEmpty          = 0x800000
	FtfSingleAsset              = 0x80000
	FtfOneAssetLPToken          = 0x200000
	FtfLimitLPToken             = 0x400000
	FtfWithdrawAll              = 0x20000
	FtfOneAssetWithdrawAll      = 0x40000
	FtfSellNFToken              = 0x1

	// Account Set Flags
	FasfAccountTxnID                 = 5
	FasfAllowTrustLineClawback       = 16
	FasfAuthorizedNFTokenMinter      = 10
	FasfDefaultRipple                = 8
	FasfDepositAuth                  = 9
	FasfDisableMaster                = 4
	FasfDisallowIncomingCheck        = 13
	FasfDisallowIncomingNFTokenOffer = 12
	FasfDisallowIncomingPayChan      = 14
	FasfDisallowIncomingTrustline    = 15
	FasfDisallowXRP                  = 3
	FasfGlobalFreeze                 = 7
	FasfNoFreeze                     = 6
	FasfRequireAuth                  = 2
	FasfRequireDest                  = 1
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address string

func (Address) Validate

func (a Address) Validate() error

type CurrencyAmount

type CurrencyAmount interface {
	Kind() CurrencyKind
	Validate() error
}

func UnmarshalCurrencyAmount

func UnmarshalCurrencyAmount(data []byte) (CurrencyAmount, error)

type CurrencyKind

type CurrencyKind int
const (
	XRP CurrencyKind = iota
	ISSUED
)

type Flag

type Flag uint32

func NewFlag

func NewFlag() *Flag

func SetFlag

func SetFlag(v uint32) *Flag

SetFlag is a helper function that allocates a new uint value to store v and returns a pointer to it.

func (*Flag) ClearFlag

func (f *Flag) ClearFlag(v Flag) *Flag

func (*Flag) HasFlag

func (f *Flag) HasFlag(v Flag) bool

func (*Flag) SetFlag

func (f *Flag) SetFlag(v Flag) *Flag

func (*Flag) ToUint

func (f *Flag) ToUint() uint32

func (*Flag) ToggleFlag

func (f *Flag) ToggleFlag(v Flag) *Flag

type FlagsI

type FlagsI interface {
	ToUint() uint32
}

FlagsI is an interface for types that can be converted to a uint.

type Hash128

type Hash128 string

type Hash256

type Hash256 string

func (Hash256) Validate

func (h Hash256) Validate() error

type IssuedCurrencyAmount

type IssuedCurrencyAmount struct {
	Issuer   Address `json:"issuer,omitempty"`
	Currency string  `json:"currency,omitempty"`
	Value    string  `json:"value,omitempty"`
}

func (IssuedCurrencyAmount) Kind

func (IssuedCurrencyAmount) Validate

func (i IssuedCurrencyAmount) Validate() error

type NFToken

type NFToken struct {
	NFTokenID  NFTokenID
	NFTokenURI NFTokenURI `json:"URI"`
}

type NFTokenID

type NFTokenID Hash256

func (NFTokenID) Validate

func (id NFTokenID) Validate() error

type NFTokenURI

type NFTokenURI string

type UInt

type UInt uint32

func SetUInt

func SetUInt(v uint32) *UInt

SetUInt is a helper function that allocates a new uint value to store v and returns a pointer to it.

func (*UInt) ToUInt

func (f *UInt) ToUInt() uint32

type UIntI

type UIntI interface {
	ToUInt() uint32
}

UIntI is an interface for types that can be converted to a uint.

type XRPCurrencyAmount

type XRPCurrencyAmount uint64

func XRPDropsFromFloat

func XRPDropsFromFloat(f float32) XRPCurrencyAmount

func (XRPCurrencyAmount) Kind

func (XRPCurrencyAmount) MarshalJSON

func (a XRPCurrencyAmount) MarshalJSON() ([]byte, error)

func (*XRPCurrencyAmount) UnmarshalJSON

func (a *XRPCurrencyAmount) UnmarshalJSON(data []byte) error

func (*XRPCurrencyAmount) UnmarshalText

func (a *XRPCurrencyAmount) UnmarshalText(data []byte) error

func (XRPCurrencyAmount) Validate

func (XRPCurrencyAmount) Validate() error

Jump to

Keyboard shortcuts

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