suikey

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const Ed25519Scheme byte = 0x00

Ed25519Scheme Ed25519 signature scheme flag https://docs.sui.io/concepts/cryptography/transaction-auth/keys-addresses#address-format

Variables

This section is empty.

Functions

This section is empty.

Types

type Key

type Key struct {
	// contains filtered or unexported fields
}

Key represents a Sui account

func FromEncryptedJSON

func FromEncryptedJSON(keyJSON []byte, password string) (Key, error)

FromEncryptedJSON gets key from json and password

func KeyFor

func KeyFor(raw internal.Raw) Key

KeyFor creates an Account from a raw key

func MustNewInsecure

func MustNewInsecure(reader io.Reader) Key

MustNewInsecure returns an Account if no error

func New

func New() (Key, error)

New creates new Key

func (Key) Account

func (s Key) Account() string

Account is an alias for Address

func (Key) GetPublic

func (s Key) GetPublic() ed25519.PublicKey

GetPublic gets Account's public key

func (Key) ID

func (s Key) ID() string

ID gets Account ID

func (Key) PublicKeyStr

func (s Key) PublicKeyStr() string

PublicKeyStr returns hex encoded public key

func (Key) Raw

func (s Key) Raw() internal.Raw

Raw returns the seed from private key

func (Key) Sign

func (s Key) Sign(msg []byte) ([]byte, error)

Sign is used to sign a message

func (Key) ToEncryptedJSON

func (s Key) ToEncryptedJSON(password string, scryptParams commonkeystore.ScryptParams) (export []byte, err error)

ToEncryptedJSON returns encrypted JSON representing key

Jump to

Keyboard shortcuts

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