Documentation ¶
Index ¶
- Variables
- type Client
- func (c *Client) GetClosedLedger() (ledger *Ledger, err error)
- func (c *Client) GetLedger(cmdLedger *CommandLedger) (ledger *Ledger, err error)
- func (c *Client) GetLedgers(cls *CommandLedgerStream) (ledger <-chan *Ledger, err error)
- func (c *Client) GetTransaction(hash string) (ledger *Ledger, err error)
- func (c *Client) Ping() (err error)
- func (c *Client) SendCommand(cmd []byte) (err error)
- func (c *Client) SubmitTransaction(tx *TxOptions) (rsp *TxResult, err error)
- type Command
- type CommandGetTX
- type CommandLedger
- type CommandLedgerStream
- type CommandTX
- type Error
- type Info
- type Ledger
- type Options
- type Request
- type Response
- type Result
- type Transaction
- type TxJSON
- type TxOptions
- type TxResult
Constants ¶
This section is empty.
Variables ¶
View Source
var ( //TestNetURL todo.. TestNetURL = "s.altnet.rippletest.net:51233" //MainNetURL todo.. MainNetURL = "s2.ripple.com:443" )
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { Options Response chan *Response Ledger chan *Ledger // contains filtered or unexported fields }
Client main node client
func (*Client) GetClosedLedger ¶
GetClosedLedger returns get last closed ledger
func (*Client) GetLedger ¶
func (c *Client) GetLedger(cmdLedger *CommandLedger) (ledger *Ledger, err error)
GetLedger returns ledger by hash
func (*Client) GetLedgers ¶
func (c *Client) GetLedgers(cls *CommandLedgerStream) (ledger <-chan *Ledger, err error)
GetLedgers get validated ledgers from network
func (*Client) GetTransaction ¶
GetTransaction returns tx by hash
func (*Client) SendCommand ¶
SendCommand send ws command
type Command ¶
type Command struct { Command string `json:"command,omitempty"` ID int `json:"id,omitempty"` *CommandTX *CommandGetTX *CommandLedger *CommandLedgerStream }
Command ..
type CommandGetTX ¶
type CommandLedger ¶
type CommandLedger struct { LedgerHash string `json:"ledger_hash,omitempty"` LedgerIndex string `json:"ledger_index,omitempty"` Full bool `json:"full,omitempty"` Accounts bool `json:"accounts,omitempty"` Expand bool `json:"expand,omitempty"` OwnerFunds bool `json:"owner_funds,omitempty"` Queue bool `json:"queue,omitempty"` Binary bool `json:"binary,omitempty"` }
type CommandLedgerStream ¶
type CommandLedgerStream struct { Streams []string `json:"streams,omitempty"` LedgerIndex string `json:"ledger_index,omitempty"` Full bool `json:"full,omitempty"` Accounts bool `json:"accounts,omitempty"` Transactions bool `json:"transactions,omitempty"` Expand bool `json:"expand,omitempty"` OwnerFunds bool `json:"owner_funds,omitempty"` }
type CommandTX ¶
type CommandTX struct { Seed string `json:"seed,omitempty"` SeedHex string `json:"seed_hex,omitempty"` Passphrase string `json:"passphrase,omitempty"` TxJSON *TxOptions `json:"tx_json"` Secret string `json:"secret,omitempty"` Offline bool `json:"offline,omitempty"` FeeMultMax int32 `json:"fee_mult_max,omitempty"` }
type Ledger ¶
type Ledger struct { FeeBase int `json:"fee_base,omitempty"` FeeRef int `json:"fee_ref,omitempty"` LedgerHash string `json:"ledger_hash,omitempty"` LedgerIndex uint64 `json:"ledger_index,omitempty"` LedgerTime int `json:"ledger_time,omitempty"` ReserveBase int `json:"reserve_base,omitempty"` ReserveInc int `json:"reserve_inc,omitempty"` TxnCount int `json:"txn_count,omitempty"` Type string `json:"type,omitempty"` ValidatedLedgers string `json:"validated_ledgers,omitempty"` Transactions []Transaction }
Ledger todo..
type Request ¶
type Request struct { Account string `json:"account,omitempty"` Command string `json:"command,omitempty"` ID int `json:"id,omitempty"` LedgerIndex string `json:"ledger_index,omitempty"` Strict bool `json:"strict,omitempty"` }
Request todo..
type Response ¶
type Response struct { ID int `json:"id,omitempty"` Status string `json:"status,omitempty"` Type string `json:"type,omitempty"` *Error *Request `json:"request,omitempty"` *Result `json:"result,omitempty"` // pure tx subs EngineResult string `json:"engine_result,omitempty"` EngineResultCode int `json:"engine_result_code,omitempty"` LedgerCurrentIndex uint64 `json:"ledger_current_index,omitempty"` EngineResultMessage string `json:"engine_result_message,omitempty"` LedgerHash string `json:"ledger_hash,omitempty"` LedgerIndex uint64 `json:"ledger_index,omitempty"` Transaction Transaction `json:"transaction,omitempty"` Validated bool `json:"validated,omitempty"` Ledger }
Response todo..
type Transaction ¶
type Transaction struct { Account string `json:"Account"` Expiration int64 `json:"Expiration"` Fee string `json:"Fee"` Flags int64 `json:"Flags"` LastLedgerSequence int64 `json:"LastLedgerSequence"` OfferSequence int64 `json:"OfferSequence"` Sequence int64 `json:"Sequence"` SigningPubKey string `json:"SigningPubKey"` DestinationTag uint32 `json:"DestinationTag"` TransactionType string `json:"TransactionType"` TxnSignature string `json:"TxnSignature"` Date int64 `json:"date"` Hash string `json:"hash"` OwnerFunds string `json:"owner_funds"` }
Transaction todo..
type TxJSON ¶
type TxJSON struct { Account string `json:"Account,omitempty"` Amount string `json:"Amount,omitempty"` Destination string `json:"Destination,omitempty"` DestinationTag int `json:"DestinationTag,omitempty"` Fee string `json:"Fee,omitempty"` Flags int64 `json:"Flags,omitempty"` Sequence int `json:"Sequence,omitempty"` SigningPubKey string `json:"SigningPubKey,omitempty"` TransactionType string `json:"TransactionType,omitempty"` TxnSignature string `json:"TxnSignature,omitempty"` Hash string `json:"hash,omitempty"` }
Click to show internal directories.
Click to hide internal directories.