normalize

package
v0.0.0-...-fa9a987 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2024 License: Apache-2.0, MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddressEqual

func AddressEqual(address1 string, address2 string, nativeAsset xc.NativeAsset) bool

func Normalize

func Normalize(address string, nativeAsset xc.NativeAsset) string

NormalizeAddressString normalizes an address or hash If possible (if it's hex), it will be lowercased. You may specify if you want to remove or ensure the common prefix (if there is one).

func NormalizeAddressString

func NormalizeAddressString(address string, nativeAsset xc.NativeAsset) string

deprecated, use Normalize

func NormalizeMoveAddress

func NormalizeMoveAddress(address string) string

Given an address like coin::Coin<0x11AAbbCCdd::coin::NAME>, we only want to normalize the 0x11AAbbCCdd part, and remove the coin::Coin::<> part.

func TransactionHash

func TransactionHash(hash string, nativeAsset xc.NativeAsset) string

Normalize a transaction hash

Types

type NormalizeOptions

type NormalizeOptions struct {
	NoPrefix bool
	ZeroPad  bool
}

Jump to

Keyboard shortcuts

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