stellar

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PublicNetworkPassphrase = "Public Global Stellar Network ; September 2015"
	TestNetworkPassphrase   = "Test SDF Network ; September 2015"
	MinBaseFee              = 100
)
View Source
const (
	VersionByteAccountID    VersionByte = 6 << 3
	VersionByteSeed                     = 18 << 3
	VersionByteMuxedAccount             = 12 << 3
	VersionByteHashTx                   = 19 << 3
	VersionByteHashX                    = 23 << 3
)

Variables

This section is empty.

Functions

func NewAccountFromMnemonic

func NewAccountFromMnemonic(mnemonic, path string) (signing.AccountHandler, error)

func NewAccountFromPrivateKey

func NewAccountFromPrivateKey(privateKey []byte) (signing.AccountHandler, error)

func NewAccountFromPrivateKeyHex

func NewAccountFromPrivateKeyHex(privateKey string) (signing.AccountHandler, error)

func ValidAddress

func ValidAddress(address string) bool

Types

type Account

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

func (*Account) Address

func (a *Account) Address() string

func (*Account) PrivateKey

func (a *Account) PrivateKey() []byte

func (*Account) PrivateKeyHex

func (a *Account) PrivateKeyHex() string

func (*Account) PublicKey

func (a *Account) PublicKey() []byte

func (*Account) PublicKeyHex

func (a *Account) PublicKeyHex() string

func (*Account) SignData

func (a *Account) SignData(data []byte) ([]byte, error)

func (*Account) VerifySignData

func (a *Account) VerifySignData(data, sig []byte) bool

func (*Account) Wipe

func (a *Account) Wipe()

type Ingredient

type Ingredient struct {
	TxType               string `json:"txType"`
	Sender               string `json:"sender"`
	Recipient            string `json:"recipient"`
	ContractAddress      string `json:"contractAddress"`
	Amount               string `json:"amount"`
	Memo                 string `json:"memo"`
	Sequence             string `json:"sequence"`
	IsRecipientActivated string `json:"isRecipientActivated"`
}

type TxBuilder

type TxBuilder struct {
	*Ingredient
	// contains filtered or unexported fields
}

func NewTxBuilder

func NewTxBuilder(ti *Ingredient) *TxBuilder

func (*TxBuilder) Build

func (tx *TxBuilder) Build() error

func (*TxBuilder) ConcatSignature

func (tx *TxBuilder) ConcatSignature(signature string, isDerFormat bool) (string, error)

func (*TxBuilder) GetSigHash

func (tx *TxBuilder) GetSigHash() []string

func (*TxBuilder) GetTxHash

func (tx *TxBuilder) GetTxHash() string

func (*TxBuilder) GetUnsignedHex

func (tx *TxBuilder) GetUnsignedHex() string

func (*TxBuilder) SetSigHash

func (tx *TxBuilder) SetSigHash(s []string)

func (*TxBuilder) SetUnsignedHex

func (tx *TxBuilder) SetUnsignedHex(s string)

func (*TxBuilder) Sign

func (tx *TxBuilder) Sign(privateKey []byte) (string, error)

type VersionByte

type VersionByte byte

Jump to

Keyboard shortcuts

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