basis

package
v0.1.984 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2026 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// X1000000000 represents a conversion factor where one major unit is equivalent to 1,000,000,000 basis units.
	X1000000000 contract.ConversionFactor = 1000000000
	// X100000000 represents a conversion factor where one major unit is equivalent to 100,000,000 basis units.
	X100000000 contract.ConversionFactor = 100000000
	// X10000000 represents a conversion factor where one major unit is equivalent to 10,000,000 basis units.
	X10000000 contract.ConversionFactor = 10000000
	// X1000000 represents a conversion factor where one major unit is equivalent to 1,000,000 basis units.
	X1000000 contract.ConversionFactor = 1000000
	// X100000 represents a conversion factor where one major unit is equivalent to 100,000 basis units.
	X100000 contract.ConversionFactor = 100000
	// X10000 represents a conversion factor where one major unit is equivalent to 10,000 basis units.
	X10000 contract.ConversionFactor = 10000
	// X1000 represents a conversion factor where one major unit is equivalent to 1,000 basis units.
	X1000 contract.ConversionFactor = 1000
	// X100 represents a conversion factor where one major unit is equivalent to 100 basis units.
	X100 contract.ConversionFactor = 100
	// X10 represents a conversion factor where one major unit is equivalent to 10 basis units.
	X10 contract.ConversionFactor = 10
	// X1 represents a conversion factor where one major unit is equivalent to 1 basis unit.
	X1 contract.ConversionFactor = 1
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	contract.BasisOperator
}

func NewClient

func NewClient() Client

type DefaultTool added in v0.1.11

type DefaultTool struct {
	T *contract.Tool[Client]
}

func NewTool

func NewTool(c Client, opts contract.ToolOptions[Client]) *DefaultTool

func (*DefaultTool) BasisInt32ToMajor added in v0.1.11

BasisInt32ToMajor converts a 32-bit integer basis point value to its major unit equivalent using the provided conversion factor.

func (*DefaultTool) BasisInt64ToMajor added in v0.1.11

BasisInt64ToMajor converts a 64-bit integer basis point value to its major unit equivalent using the provided conversion factor.

func (*DefaultTool) BasisIntToMajor added in v0.1.11

BasisIntToMajor converts an integer basis point value to its major unit equivalent using the provided conversion factor.

func (*DefaultTool) MajorToBasis added in v0.1.11

MajorToBasis converts a major unit value to its equivalent basis point representation using the provided conversion factor.

type Tool added in v0.1.245

type Tool interface {
	Client
}

Jump to

Keyboard shortcuts

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