network

package
v0.0.0-...-446988d Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2023 License: Apache-2.0, Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package network contains functions that deal with lantah network passphrases and IDs.

Index

Constants

View Source
const (
	// PublicNetworkPassphrase is the pass phrase used for every transaction intended for the public lantah network
	PublicNetworkPassphrase = "Public Global Lantah Network ; 2023"
	// TestNetworkPassphrase is the pass phrase used for every transaction intended for the SDF-run test network
	TestNetworkPassphrase = "Test Lantah Network ; 2023"
	// FutureNetworkPassphrase is the pass phrase used for every transaction intended for the SDF-run future network
	FutureNetworkPassphrase = "Test Lantah Future Network ; 2023"
)

Variables

View Source
var (
	// PublicNetworkhistoryArchiveURLs is a list of history archive URLs for lantah 'pubnet'
	PublicNetworkhistoryArchiveURLs = []string{"https://gravity1.lantah/network/",
		"https://gravity2.lantah/network/",
		"https://gravity3.lantah/network/"}

	// TestNetworkhistoryArchiveURLs is a list of history archive URLs for lantah 'testnet'
	TestNetworkhistoryArchiveURLs = []string{"https://testgravity1.lantah/network/",
		"http://testgravity2.lantah/network/",
		"https://testgravity3.lantah/network/"}
)

Functions

func HashFeeBumpTransaction

func HashFeeBumpTransaction(tx xdr.FeeBumpTransaction, passphrase string) ([32]byte, error)

HashFeeBumpTransaction derives the network specific hash for the provided fee bump transaction using the network identified by the supplied passphrase. The resulting hash is the value that can be signed by stellar secret key to authorize the transaction identified by the hash to stellar validators.

func HashTransaction

func HashTransaction(tx xdr.Transaction, passphrase string) ([32]byte, error)

HashTransaction derives the network specific hash for the provided transaction using the network identified by the supplied passphrase. The resulting hash is the value that can be signed by stellar secret key to authorize the transaction identified by the hash to stellar validators.

func HashTransactionInEnvelope

func HashTransactionInEnvelope(envelope xdr.TransactionEnvelope, passphrase string) ([32]byte, error)

HashTransactionInEnvelope derives the network specific hash for the transaction contained in the provided envelope using the network identified by the supplied passphrase. The resulting hash is the value that can be signed by stellar secret key to authorize the transaction identified by the hash to stellar validators.

func HashTransactionV0

func HashTransactionV0(tx xdr.TransactionV0, passphrase string) ([32]byte, error)

HashTransactionV0 derives the network specific hash for the provided legacy transaction using the network identified by the supplied passphrase. The resulting hash is the value that can be signed by stellar secret key to authorize the transaction identified by the hash to stellar validators.

func ID

func ID(passphrase string) [32]byte

ID returns the network ID derived from the provided passphrase. This value also happens to be the raw (i.e. not strkey encoded) secret key for the root account of the network.

Types

This section is empty.

Jump to

Keyboard shortcuts

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