sui

package
v0.52.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2025 License: MIT Imports: 10 Imported by: 2

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 a Sui address string to bytes. Sui addresses are hex strings typically prefixed with "0x" (32 bytes).

func PublicKeyBytes added in v0.45.2

func PublicKeyBytes(s SuiSigner) ([]byte, error)

PublicKeyBytes extracts the raw 32-byte ed25519 public key from a SuiSigner.

Types

type AddressConverter added in v0.44.0

type AddressConverter struct{}

AddressConverter implements address conversion for Sui chains. This struct implements the AddressConverter strategy interface.

func (AddressConverter) ConvertToBytes added in v0.44.0

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

ConvertToBytes converts a Sui address string to bytes.

func (AddressConverter) Supports added in v0.44.0

func (s AddressConverter) Supports(family string) bool

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

type Chain

type Chain struct {
	ChainMetadata
	Client    sui.ISuiAPI
	Signer    SuiSigner
	URL       string
	FaucetURL string
}

Chain represents an Sui chain.

type ChainMetadata added in v0.5.1

type ChainMetadata = common.ChainMetadata

type SuiSigner added in v0.24.0

type SuiSigner interface {
	// Sign signs the given message and returns the serialized signature.
	Sign(message []byte) ([]string, error)

	// GetAddress returns the Sui address derived from the signer's public key
	GetAddress() (string, error)
}

TODO: Everything in this file should come from chainlink-sui when available

func NewSignerFromHexPrivateKey added in v0.24.0

func NewSignerFromHexPrivateKey(hexPrivateKey string) (SuiSigner, error)

func NewSignerFromSeed added in v0.24.0

func NewSignerFromSeed(seed []byte) (SuiSigner, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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