Documentation ¶
Index ¶
- Variables
- func AttachNode(node *node.Node)
- func BuildSolanaAddress(encodedString string) (types.SolanaAddress, error)
- func CloseAllWallets() (err error)
- func IsRunning() bool
- func NewCurrencyStr(amount string) (types.Currency, error)
- func StartHTTPServer(webWalletConfig *wwConfig.WebWalletConfig)
- type AllowanceResponse
- type BalInfo
- type JSONMessage
- type RestWallet
- type Session
- type SummarizedTransaction
- type TransactionHistoryLine
- type TransactionHistoryPage
- type TransportHistoryRecord
- type TxDetails
- type TxInput
- type TxOutput
- type Vote
- type VoteOption
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrParseCurrencyAmount is returned when the input is unable to be parsed // into a currency unit due to a malformed amount. ErrParseCurrencyAmount = errors.New("malformed amount") // ErrParseCurrencyInteger is returned when the input is unable to be parsed // into a currency unit due to a non-integer value. ErrParseCurrencyInteger = errors.New("non-integer number of hastings") // ErrParseCurrencyUnits is returned when the input is unable to be parsed // into a currency unit due to missing units. ErrParseCurrencyUnits = errors.New("amount is missing currency units. Currency units are case sensitive") // ErrNegativeCurrency is the error that is returned if performing an // operation results in a negative currency. ErrNegativeCurrency = errors.New("negative currency not allowed") // ErrUint64Overflow is the error that is returned if converting to a // unit64 would cause an overflow. ErrUint64Overflow = errors.New("cannot return the uint64 of this currency - result is an overflow") // ZeroCurrency defines a currency of value zero. ZeroCurrency = types.NewCurrency64(0) )
View Source
var (
UI lorca.UI
)
Functions ¶
func BuildSolanaAddress ¶ added in v1.1.0
func BuildSolanaAddress(encodedString string) (types.SolanaAddress, error)
func CloseAllWallets ¶ added in v0.1.4
func CloseAllWallets() (err error)
CloseAllWallets closes all wallets and detaches them from the node.
func IsRunning ¶ added in v0.1.4
func IsRunning() bool
IsRunning returns true when the server is running
func NewCurrencyStr ¶
NewCurrencyStr creates a Currency value from a supplied string with unit suffix. Valid unit suffixes are: H, pS, nS, uS, mS, SCP, KS, MS, GS, TS, SPF Unit Suffixes are case sensitive.
func StartHTTPServer ¶
func StartHTTPServer(webWalletConfig *wwConfig.WebWalletConfig)
StartHTTPServer starts the HTTP server to serve the GUI.
Types ¶
type AllowanceResponse ¶ added in v1.4.0
type AllowanceResponse struct { Regular types.SolanaTransportAllowance `json:"regular"` Premined map[string]types.SolanaTransportAllowance `json:"premined"` Airdrop *types.SolanaTransportAllowance `json:"airdrop,omitempty"` History []TransportHistoryRecord `json:"history"` Balance interface{} `json:"balance"` CoinType string `json:"coinType"` }
type JSONMessage ¶ added in v1.1.0
type JSONMessage struct { Success bool `json:"success"` Message interface{} `json:"message"` }
func NewErrorMessage ¶ added in v1.1.0
func NewErrorMessage(message interface{}) JSONMessage
func NewSuccessMessage ¶ added in v1.1.0
func NewSuccessMessage(message interface{}) JSONMessage
type RestWallet ¶ added in v1.1.0
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
Session is a struct that tracks session settings
type SummarizedTransaction ¶
type SummarizedTransaction struct { TxnID string `json:"txn_id"` Type string `json:"type"` Time types.Timestamp `json:"time"` Confirmed string `json:"confirmed"` Scp float64 `json:"scp"` ScpFee float64 `json:"scp_fee"` SpfA float64 `json:"spfa"` SpfB float64 `json:"spfb"` }
SummarizedTransaction is a transaction that has been formatted for· humans to read.
func ComputeSummarizedTransactions ¶
func ComputeSummarizedTransactions(pts []modules.ProcessedTransaction, blockHeight types.BlockHeight, wwallet modules.Wallet) ([]SummarizedTransaction, error)
ComputeSummarizedTransactions creates a set of SummarizedTransactions from a set of ProcessedTransactions.
type TransactionHistoryLine ¶ added in v0.2.0
type TransactionHistoryLine struct { TransactionID string `json:"transaction_id"` ShortTransactionID string `json:"short_transaction_id"` Type string `json:"type"` Time types.Timestamp `json:"time"` Amount string `json:"amount"` AmountSCP float64 `json:"amount_scp"` AmountSPFA float64 `json:"amount_spfa"` AmountSPFB float64 `json:"amount_spfb"` Fee string `json:"fee"` FeeSCP float64 `json:"fee_scp"` Confirmed string `json:"confirmed"` }
type TransactionHistoryPage ¶ added in v0.2.0
type TransactionHistoryPage struct { TransactionHistoryLines []TransactionHistoryLine `json:"lines"` Current int `json:"current"` Total int `json:"total"` }
type TransportHistoryRecord ¶ added in v1.4.0
type TransportHistoryRecord struct { BurnID types.TransactionID `json:"burn_id"` Status types.SolanaTransportStatus `json:"status"` Amount string `json:"currency"` Created types.Timestamp `json:"created"` }
type TxDetails ¶ added in v1.1.0
type TxDetails struct { Timestamp types.Timestamp TxID types.TransactionID TxType modules.TXType TxBlock types.BlockHeight Inputs []TxInput Outputs []TxOutput }
type TxInput ¶ added in v1.1.0
type TxInput struct { Value types.Currency Address types.UnlockHash FundType string }
type TxOutput ¶ added in v1.1.0
type TxOutput struct { Value types.Currency Address types.UnlockHash FundType string }
type VoteOption ¶ added in v1.3.0
Source Files ¶
Click to show internal directories.
Click to hide internal directories.