Documentation ¶
Index ¶
- Variables
- func AccountExists(publicKey string) bool
- func FreezeAccount(seed string) (int32, string, error)
- func GetAccountData(a string) ([]byte, error)
- func GetAllBalances(publicKey string) ([]protocols.Balance, error)
- func GetAssetBalance(publicKey string, assetName string) float64
- func GetAssetTrustLimit(publicKey string, assetName string) float64
- func GetBlockHash(blockNumber int) (string, error)
- func GetKeyPair() (string, string, error)
- func GetLatestBlock() (int32, error)
- func GetLatestBlockHash() (string, error)
- func GetLedgerData(blockNumberx int) ([]byte, error)
- func GetNativeBalance(publicKey string) float64
- func GetTransactionData(txhash string) ([]byte, error)
- func GetTransactionHeight(txhash string) (int, error)
- func GetXLM(PublicKey string) error
- func HasStableCoin(publicKey string) bool
- func RefillAccount(publicKey string, refillSeed string) error
- func ReturnSourceAccount(seed string) (horizonprotocol.Account, keypair.KP, error)
- func ReturnSourceAccountPubkey(pubkey string) (horizonprotocol.Account, error)
- func SendTx(mykp keypair.KP, sourceAccount *horizonprotocol.Account, memo string, ...) (int32, string, error)
- func SendXLM(destination string, amountx float64, seed string, memo string) (int32, string, error)
- func SendXLMCreateAccount(destination string, amountx float64, seed string) (int32, string, error)
- func SetAuthImmutable(seed string) (int32, string, error)
- func SetConsts(amount float64, mainnet bool)
Constants ¶
This section is empty.
Variables ¶
var ( // Passphrase defines the stellar network passphrase Passphrase string // Mainnet is a bool which decides which chain to connect to Mainnet bool // TestNetClient defines the horizon client to connect to TestNetClient *horizon.Client )
var RefillAmount float64
RefillAmount defines the default stellar refill amount
Functions ¶
func AccountExists ¶
AccountExists checks whether an account exists
func FreezeAccount ¶
FreezeAccount freezes an account
func GetAccountData ¶
GetAccountData gets the account data
func GetAllBalances ¶
GetAllBalances gets all the balances associated with a certain account.
func GetAssetBalance ¶
GetAssetBalance gets the balance of the user in the specific asset
func GetAssetTrustLimit ¶
GetAssetTrustLimit gets the trust limit that the user has with an issuer
func GetBlockHash ¶
GetBlockHash gets the block hash corresponding to a block number
func GetKeyPair ¶
GetKeyPair gets a keypair that can be used to interact with the stellar blockchain
func GetLatestBlock ¶
GetLatestBlock fetches the latest block from the blockchain
func GetLatestBlockHash ¶
GetLatestBlockHash gets the lastest block hash
func GetLedgerData ¶
GetLedgerData gets the latest data from the ledger
func GetNativeBalance ¶
GetNativeBalance gets the xlm balance of a specific account
func GetTransactionData ¶
GetTransactionData gets tx data
func GetTransactionHeight ¶
GetTransactionHeight gets height at which a tx was confirmed
func HasStableCoin ¶
HasStableCoin checks whether the PublicKey has a stablecoin balance
func RefillAccount ¶
RefillAccount refills an account
func ReturnSourceAccount ¶
ReturnSourceAccount returns the source account of the seed
func ReturnSourceAccountPubkey ¶
func ReturnSourceAccountPubkey(pubkey string) (horizonprotocol.Account, error)
ReturnSourceAccountPubkey returns the source account of the pubkey
func SendTx ¶
func SendTx(mykp keypair.KP, sourceAccount *horizonprotocol.Account, memo string, ops ...build.Operation) (int32, string, error)
SendTx signs and broadcasts a given stellar tx
func SendXLMCreateAccount ¶
SendXLMCreateAccount creates and sends XLM to a new account
func SetAuthImmutable ¶
SetAuthImmutable sets the auth_immutable flag on an account
Types ¶
This section is empty.