Documentation ¶
Index ¶
- Variables
- func AccountAdressFromSecret(secret string) (address string, err error)
- func GetHorizonClient(network string) (*horizonclient.Client, error)
- func GetNetworkPassPhrase(ntwrk string) string
- func IsValidStellarAddress(address string) bool
- func IsValidStellarSecret(secret string) bool
- type TransactionStorage
- type Wallet
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrAccountAlreadyExists = errors.New("Account already exists")
View Source
var ErrInvalidAddress = errors.New("Invalid Stellar address")
Functions ¶
func AccountAdressFromSecret ¶
func GetHorizonClient ¶
func GetHorizonClient(network string) (*horizonclient.Client, error)
GetHorizonClient gets an horizon client for a specific network
func GetNetworkPassPhrase ¶
GetNetworkPassPhrase gets the Stellar network passphrase based on a network input
func IsValidStellarAddress ¶
func IsValidStellarSecret ¶
Types ¶
type TransactionStorage ¶
type TransactionStorage struct { // sentTransactionMemos keeps the memo's of outgoing transactions of the addressToScan account // this is used to check if an accountactivation has already been executed TransactionMemos map[string]bool // contains filtered or unexported fields }
func NewTransactionStorage ¶
func NewTransactionStorage(network, addressToScan string) *TransactionStorage
func (*TransactionStorage) ScanAccount ¶
func (s *TransactionStorage) ScanAccount(ctx context.Context) error
func (*TransactionStorage) StoreTransaction ¶
func (s *TransactionStorage) StoreTransaction(tx hProtocol.Transaction)
StoreTransaction stores a transaction in the cache If there is a memo of type hash and the transaction is created by the account being watched, the memo is kept as well to know that an activation already happened.
func (*TransactionStorage) TransactionWithMemoExists ¶
func (s *TransactionStorage) TransactionWithMemoExists(ctx context.Context, memo string) (exists bool, err error)
TransactionWithMemoExists checks if a transaction with the given memo exists Will return a context.Canceled error if the context is canceled
Click to show internal directories.
Click to hide internal directories.