Documentation ¶
Index ¶
- type AccountBalancesStruct
- type AccountInfoData
- type AccountInfoResp
- type AccountInfoResult
- type AccountTransactionData
- type AccountTransactionMeta
- type AccountTransactionResp
- type AccountTransactionTx
- type Amount
- type Balance
- type Client
- func (c *Client) GenAddress() (string, string, string, error)
- func (c *Client) GetAccountBalances(address string, queryParams map[string]string) (*AccountBalancesStruct, error)
- func (c *Client) GetAccountInfo(address string) (*AccountInfoResult, error)
- func (c *Client) GetAccountTransactions(address string, params map[string]string) (*AccountTransactionResp, error)
- func (c *Client) GetLedger(index uint32) (*Ledger, error)
- func (c *Client) GetLedgerCurrent() (*LedgerCurrent, error)
- func (c *Client) GetServerInfo() (*ServerInfoResult, error)
- func (c *Client) Payments(currency string, startTs, endTs int64, limit int, marker string) (*PaymentResp, error)
- func (c *Client) Sign(from, to string, tag uint32, currency, value, fee, privateKey string, ...) (string, string, error)
- func (c *Client) Submit(txBlob string) (*SubmitResult, error)
- func (c *Client) TX(hash string) (*TxResult, error)
- type Ledger
- type LedgerCurrent
- type LedgerCurrentResult
- type LedgerRequest
- type LedgerResult
- type LedgerSub
- type Params
- type Payment
- type PaymentBalanceChanges
- type PaymentResp
- type ServerInfoResp
- type ServerInfoResult
- type ServerInfoState
- type ServerInfoValidatedLedger
- type SubmitResp
- type SubmitResult
- type SubmitTxJson
- type Transaction
- type TxFinalFields
- type TxMeta
- type TxModifyNode
- type TxPreviousFields
- type TxRequest
- type TxResp
- type TxResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountBalancesStruct ¶
type AccountInfoData ¶
type AccountInfoResp ¶
type AccountInfoResp struct {
Result *AccountInfoResult
}
type AccountInfoResult ¶
type AccountInfoResult struct { Validated bool Status string LedgerCurrentIndex int64 `json:"ledger_current_index"` AccountData *AccountInfoData `json:"account_data"` }
type AccountTransactionData ¶
type AccountTransactionData struct { Hash string LedgerIndex int64 `json:"ledger_index"` Date string Tx *AccountTransactionTx Meta *AccountTransactionMeta }
type AccountTransactionMeta ¶
type AccountTransactionResp ¶
type AccountTransactionResp struct { Result string Count int Marker string Transactions []*AccountTransactionData }
type AccountTransactionTx ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) GenAddress ¶
GenAddress 生成账户地址
func (*Client) GetAccountBalances ¶
func (c *Client) GetAccountBalances(address string, queryParams map[string]string) (*AccountBalancesStruct, error)
GetAccountBalances 获取账户余额
func (*Client) GetAccountInfo ¶
func (c *Client) GetAccountInfo(address string) (*AccountInfoResult, error)
func (*Client) GetAccountTransactions ¶
func (c *Client) GetAccountTransactions(address string, params map[string]string) (*AccountTransactionResp, error)
GetAccountTransactions https://developers.ripple.com/data-api.html#get-account-transaction-history
func (*Client) GetLedgerCurrent ¶
func (c *Client) GetLedgerCurrent() (*LedgerCurrent, error)
func (*Client) GetServerInfo ¶
func (c *Client) GetServerInfo() (*ServerInfoResult, error)
func (*Client) Payments ¶
type LedgerCurrent ¶
type LedgerCurrentResult ¶
type LedgerCurrentResult struct {
Reslut *LedgerCurrent `json:"result"`
}
type LedgerRequest ¶
type LedgerResult ¶
type LedgerResult struct {
Reslut *Ledger `json:"result"`
}
type LedgerSub ¶
type LedgerSub struct { Accepted bool `json:"accepted"` AccountHash string `json:"account_hash"` CloseFlags uint32 `json:"close_flags"` CloseTime uint32 `json:"close_time"` CloseTimeHuman string `json:"close_time_human"` CloseTimeResolution uint32 `json:"close_time_resolution"` Closed bool `json:"closed"` Hash string `json:"hash"` LedgerHash string `json:"ledger_hash"` LedgerIndex string `json:"ledger_index"` ParentCloseTime uint32 `json:"parent_close_time"` ParentHash string `json:"parent_hash"` SeqNum string `json:"seqNum"` TotalCoins string `json:"totalCoins"` TransactionHash string `json:"transaction_hash"` Transactions []string `json:"transactions"` }
type Params ¶
type Params struct { Method string `json:"method"` Params []interface{} `json:"params"` }
type Payment ¶
type Payment struct { Amount string DeliveredAmount string `json:"delivered_amount"` DestinationBalanceChanges []*PaymentBalanceChanges `json:"destination_balance_changes"` SourceBalanceChanges []*PaymentBalanceChanges `json:"source_balance_changes"` TransacationCost string `json:"transacation_cost"` TxIndex int64 `json:"tx_index"` Currency string Destination string ExecutedTime string `json:"executed_time"` Issuer string LedgerIndex int64 `json:"ledger_index"` Source string SourceCurrency string TxHash string `json:"tx_hash"` }
type PaymentBalanceChanges ¶
type PaymentResp ¶
type ServerInfoResp ¶
type ServerInfoResp struct {
Result *ServerInfoResult
}
type ServerInfoResult ¶
type ServerInfoResult struct { State ServerInfoState Status string }
type ServerInfoState ¶
type ServerInfoState struct { BuildVersion string `json:"build_version"` CompleteLedgers string `json:"complete_ledgers"` ValidatedLedger ServerInfoValidatedLedger `json:"validated_ledger"` }
type SubmitResp ¶
type SubmitResp struct {
Result *SubmitResult
}
type SubmitResult ¶
type SubmitResult struct { EngineResult string `json:"engine_result"` EngineResultCode int64 `json:"engine_result_code"` EngineResultMessage string `json:"engine_result_message"` Status string TxBlob string `json:"tx_blob"` TxJson SubmitTxJson `json:"tx_json"` }
submit 命令的返回
type SubmitTxJson ¶
type Transaction ¶
type TxFinalFields ¶
type TxMeta ¶
type TxMeta struct { AffectedNodes []TxModifyNode TransactionIndex int64 TransactionResult string DeliveredAomunt string `json:"delivered_amount"` }
type TxModifyNode ¶
type TxModifyNode struct { FinalFields TxFinalFields LedgerEntryType string LedgerIndex string PreviousFields TxPreviousFields }
type TxPreviousFields ¶
type TxResult ¶
type TxResult struct { Account string Amount string Destination string DestinationTag uint64 SourceTag uint64 Fee string LastLedgerSequence int64 Sequence int64 SigningPubKey string TransactionType string TxnSignatrue string Date int64 Hash string InLedger int64 LedgerIndex int64 `json:"ledger_index"` Meta *TxMeta Validated bool `json:"validated"` Status string `json:"status"` Error string ErrorMessage string `json:"error_message"` ErrorCode int64 `json:"error_code"` Requeset *TxRequest }
Click to show internal directories.
Click to hide internal directories.