aptos

package
v0.51.0 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2025 License: MIT Imports: 4 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddressToBytes added in v0.44.0

func AddressToBytes(address string) ([]byte, error)

AddressToBytes converts an Aptos address string to bytes. Aptos addresses can be in various formats (short, long, with/without 0x prefix) but are normalized to 32 bytes.

Types

type AddressConverter added in v0.44.0

type AddressConverter struct{}

AddressConverter implements address conversion for Aptos chains. This struct implements the AddressConverter interface.

func (AddressConverter) ConvertToBytes added in v0.44.0

func (a AddressConverter) ConvertToBytes(address string) ([]byte, error)

ConvertToBytes converts an Aptos address string to bytes.

func (AddressConverter) Supports added in v0.44.0

func (a AddressConverter) Supports(family string) bool

Supports returns true if this converter supports the given chain family.

type Chain

type Chain struct {
	Selector uint64

	Client         aptoslib.AptosRpcClient
	DeployerSigner aptoslib.TransactionSigner
	URL            string

	Confirm func(txHash string, opts ...any) error
}

Chain represents an Aptos chain.

func (Chain) ChainSelector

func (c Chain) ChainSelector() uint64

ChainSelector returns the chain selector of the chain

func (Chain) Family added in v0.5.1

func (c Chain) Family() string

Family returns the family of the chain

func (Chain) Name

func (c Chain) Name() string

Name returns the name of the chain

func (Chain) String

func (c Chain) String() string

String returns chain name and selector "<name> (<selector>)"

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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