Documentation
¶
Index ¶
- type AlonzoAmount
- type Amount
- func (am Amount) Add(other Amount) Amount
- func (am Amount) Clone() Amount
- func (am Amount) Equal(other Amount) bool
- func (am Amount) Greater(other Amount) bool
- func (am Amount) Less(other Amount) bool
- func (am Amount) RemoveZeroAssets() Amount
- func (am Amount) Sub(other Amount) Amount
- func (amt Amount) ToAlonzo() AlonzoAmount
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlonzoAmount ¶ added in v1.0.3
type AlonzoAmount struct {
Coin int64
Value MultiAsset.MultiAsset[int64]
// contains filtered or unexported fields
}
func (AlonzoAmount) Clone ¶ added in v1.0.3
func (am AlonzoAmount) Clone() AlonzoAmount
*
Clone function creates a deep copy of an AlonzoAmount object. Returns: AlonzoAmount: A deep copy of the AlonzoAmount.
func (AlonzoAmount) ToShelley ¶ added in v1.0.3
func (amtAl AlonzoAmount) ToShelley() Amount
*
ToShelley converts an AlonzoAmount to its Shelley representation creating a new Amount object. Params: amtAl (AlonzoAmount): The original AlonzoAmount to be converted. Returns: Amount: The Amount representation of the AlonzoAmount.
type Amount ¶
type Amount struct {
Coin int64
Value MultiAsset.MultiAsset[int64]
// contains filtered or unexported fields
}
func (Amount) Add ¶
*
Add function adds an Amount to the current Amount. Params: other (Amount): The other Amount to add to the current Amount. Returns: Amount: The resulting Amount after addition.
func (Amount) Clone ¶
*
Clone function creates a deep copy of an Amount object. Returns: AlonzoAmount: A deep copy of the Amount.
func (Amount) Equal ¶
*
This function checks if two Amount are equal. Params: other (Amount): The other Amount to compare. Returns: bool: true if the two Amount are equal, false otherwise.
func (Amount) Greater ¶
*
Greater function checks if an Amount is greater than another Amount. Params: other (Amount): The other Amount to compare. Returns: bool: true if the current Amount is greater than the other Amount, false otherwise.
func (Amount) Less ¶
*
Less function checks if an Amount is less than another Amount. Params: other (Amount): The other Amount to compare. Returns: bool: true if the current Amount is less than the other Amount, false otherwise.
func (Amount) RemoveZeroAssets ¶
*
RemoveZeroAssets remove zero-value assets from an amount. Returns: Amount: A copy of the Amount without zero-value assets.
func (Amount) Sub ¶
*
Sub function subtracts an Amount from the current Amount. Params: other (Amount): The other Amount to subtract from the current Amount. Returns: Amount: The resulting Amount after subtraction.
func (Amount) ToAlonzo ¶ added in v1.0.3
func (amt Amount) ToAlonzo() AlonzoAmount
*
ToAlonzo converts an Amount to its Alonzo representation creating a new AlonzoAmount object. Params: amt (Amount): The original Amount to be converted. Returns: AlonzoAmount: The Alonzo representation of the Amount.
Click to show internal directories.
Click to hide internal directories.