Documentation ¶
Index ¶
- Constants
- func DoApiJsonRpc(jrpcURL string, reqBody interface{}) (*http.Response, error)
- func DoApiJsonRpcSplit(jrpcURL, rippledMethod string, paramsBodyBytes []byte) (*http.Response, error)
- func MethodToCategory(methodName string) (string, error)
- func MethodsPlus() []string
- func MethodsPlusToAccount() map[string]string
- func TransferFeeDecimal(transferRate int64) float64
- type AccountCurrenciesResponse
- type AccountCurrenciesResult
- type AccountInfoResponse
- type AccountInfoResult
- type AccountRoot
- type Category
- type JsonRpcRequest
- type JsonRpcResponseError
- type JsonRpcResponseErrorResult
- type Method
- func AccountMethods() []Method
- func GetCategoryMethods(categoryName string) ([]Method, error)
- func KeyGenerationMethods() []Method
- func LedgerMethods() []Method
- func Methods() []Method
- func PathAndOrderBookMethods() []Method
- func PaymentChannelMethods() []Method
- func ServerInfoMethods() []Method
- func StatusAndDebuggingMethods() []Method
- func SubscriptionMethods() []Method
- func TransactionMethods() []Method
- func UtilityMethods() []Method
- type MethodsSet
Constants ¶
View Source
const ( CategoryAccount = "account" CategoryLedger = "ledger" CategoryTransaction = "transaction" CategoryPathAndOrderBook = "path_and_order_book" CategoryPaymentChannel = "payment_channel" CategorySubscription = "subscription" CategoryServerInfo = "server_info" CategoryUtility = "utility" CategoryKeyGeneration = "key_generation" CategoryLoggingAndDataManagement = "logging_and_data_management" CategoryServerControl = "server_control" CategoryPeerManagement = "peer_management" CategoryStatusAndDebugging = "status_and_debugging" TypePublic = "public" TypeAdmin = "admin" )
View Source
const ( MethodAccountChannels = "account_channels" MethodAccountCurrencies = "account_currencies" MethodAccountInfo = "account_info" MethodAccountLines = "account_lines" MethodAccountObjects = "account_objects" MethodAccountOffers = "account_offers" MethodAccountTx = "account_tx" MethodGatewayBalances = "gateway_balances" MethodNorippleCheck = "noripple_check" MethodLedger = "ledger" MethodLedgerClosed = "ledger_closed" MethodLedgerCurrent = "ledger_current" MethodLedgerData = "ledger_data" MethodLedgerEntry = "ledger_entry" MethodSign = "sign" MethodSignFor = "sign_for" MethodSubmit = "submit" MethodSubmitMultisigned = "submit_multisigned" MethodTransactionEntry = "transaction_entry" MethodTx = "tx" MethodTxHistory = "tx_history" MethodBookOffers = "book_offers" MethodDepositAuthorized = "deposit_authorized" MethodPathFind = "path_find" MethodRipplePathFind = "ripple_path_find" MethodChannelAuthorize = "channel_authorize" MethodChannelVerify = "channel_verify" MethodSubscribe = "subscribe" MethodUnsubscribe = "unsubscribe" MethodFee = "fee" MethodManifest = "manifest" MethodServerInfo = "server_info" MethodServerState = "server_state" MethodJSON = "json" MethodPing = "ping" MethodRandom = "random" MethodValidationCreate = "validation_create" MethodWalletPropose = "wallet_propose" MethodCanDelete = "can_delete" MethodCrawlShards = "crawl_shards" MethodDownloadShard = "download_shard" MethodLedgerCleaner = "ledger_cleaner" MethodLedgerRequest = "ledger_request" MethodLogLevel = "log_level" MethodLogrotate = "logrotate" MethodLedgerAccept = "ledger_accept" MethodStop = "stop" MethodValidationSeed = "validation_seed" MethodConnect = "connect" MethodPeerReservationsAdd = "peer_reservations_add" MethodPeerReservationsDel = "peer_reservations_del" MethodPeerReservationsList = "peer_reservations_list" MethodPeers = "peers" MethodConsensusInfo = "consensus_info" MethodFeature = "feature" MethodFetchInfo = "fetch_info" MethodGetCounts = "get_counts" MethodPrint = "print" MethodValidatorInfo = "validator_info" MethodValidatorListSites = "validator_list_sites" MethodValidators = "validators" )
View Source
const ( StatusError = "error" StatusSuccess = "success" )
View Source
const JsonRpcUrlDefault = "https://xrpl.ws/"
Variables ¶
This section is empty.
Functions ¶
func DoApiJsonRpc ¶
DoApiJsonRpc sends a JSON RPC API request to the specified `rippled` server using an API method and request params.
func DoApiJsonRpcSplit ¶
func DoApiJsonRpcSplit(jrpcURL, rippledMethod string, paramsBodyBytes []byte) (*http.Response, error)
DoApiJsonRpcSplit sends a JSON RPC API request to the specified `rippled` server using an API method and request params.
func MethodToCategory ¶ added in v0.2.3
func MethodsPlus ¶
func MethodsPlus() []string
func MethodsPlusToAccount ¶
func TransferFeeDecimal ¶ added in v0.4.1
TransferFeeDecimal calculates a transfer fee using the transfer rate from the Account Root object.
Types ¶
type AccountCurrenciesResponse ¶ added in v0.8.0
type AccountCurrenciesResponse struct {
Result AccountCurrenciesResult `json:"result"`
}
type AccountCurrenciesResult ¶ added in v0.8.0
type AccountInfoResponse ¶ added in v0.6.0
type AccountInfoResponse struct {
Result AccountInfoResult `json:"result"`
}
type AccountInfoResult ¶ added in v0.6.0
type AccountInfoResult struct { AccountData AccountRoot `json:"account_data"` LedgerCurrentIndex int64 `json:"ledger_current_index"` Status string `json:"status"` Validated bool `json:"validated"` }
type AccountRoot ¶ added in v0.6.0
type AccountRoot struct { Account string AccountTxnID string `json:"AccountTxnID,omitempty"` Balance string Domain string `json:"Domain,omitempty"` EmailHash string `json:"EmailHash,omitempty"` Flags uint32 LedgerEntryType string MessageKey string `json:"MessageKey,omitempty"` OwnerCount uint32 PreviousTxnID string PreviousTxnLgrSeq uint32 RegularKey string `json:"RegularKey,omitempty"` Sequence uint32 TicketCount uint32 `json:"TicketCount,omitempty"` TickSize uint8 `json:"TickSize,omitempty"` TransferRate uint32 `json:"TransferRate,omitempty"` WalletLocator string `json:"WalletLocator,omitempty"` WalletSize uint32 `json:"WalletSize,omitempty"` Index string `json:"index"` Urlgravatar string `json:"urlgravatar"` }
type Category ¶
type Category struct { Name string DisplayName string Type string Description string IsReadOnly bool }
func AdminCategories ¶ added in v0.4.0
func AdminCategories() []Category
func Categories ¶
func Categories() []Category
func GetCategory ¶
func PublicCategories ¶ added in v0.4.0
func PublicCategories() []Category
func (*Category) APIReferenceURL ¶ added in v0.2.4
type JsonRpcRequest ¶
type JsonRpcRequest struct { Method string `json:"method"` Params []map[string]interface{} `json:"params"` }
func AccountCurrenciesRequestSimple ¶ added in v0.8.0
func AccountCurrenciesRequestSimple(account string) JsonRpcRequest
func AccountInfoRequestSimple ¶ added in v0.8.0
func AccountInfoRequestSimple(account string) JsonRpcRequest
func BuildJsonRpcRequestBody ¶
func BuildJsonRpcRequestBody(rippledMethod string, paramsBodyBytes []byte) (JsonRpcRequest, error)
BuildJsonRpcRequestBody merges a `rippled` API methid with JSON RPC API request params.
type JsonRpcResponseError ¶
type JsonRpcResponseError struct {
Result JsonRpcResponseErrorResult `json:"result"`
}
type Method ¶
type Method struct { Name string ExampleName string ExampleSlug string Category Category Type string Summary string Description string FunctionType string IsOneOf bool IsDeprecated bool HasApiCli bool HasApiJsonRpc bool HasApiWebsocket bool VersionIntroduced string }
func AccountMethods ¶ added in v0.2.1
func AccountMethods() []Method
func GetCategoryMethods ¶ added in v0.2.1
func KeyGenerationMethods ¶ added in v0.8.1
func KeyGenerationMethods() []Method
func LedgerMethods ¶ added in v0.2.1
func LedgerMethods() []Method
func PathAndOrderBookMethods ¶ added in v0.2.1
func PathAndOrderBookMethods() []Method
func PaymentChannelMethods ¶ added in v0.2.1
func PaymentChannelMethods() []Method
func ServerInfoMethods ¶ added in v0.2.1
func ServerInfoMethods() []Method
func StatusAndDebuggingMethods ¶ added in v0.4.0
func StatusAndDebuggingMethods() []Method
func SubscriptionMethods ¶ added in v0.2.1
func SubscriptionMethods() []Method
func TransactionMethods ¶ added in v0.2.1
func TransactionMethods() []Method
func UtilityMethods ¶ added in v0.2.1
func UtilityMethods() []Method
func (*Method) APIReferenceURL ¶
type MethodsSet ¶ added in v0.2.0
type MethodsSet struct {
// contains filtered or unexported fields
}
func NewMethodsSet ¶ added in v0.2.0
func NewMethodsSet() MethodsSet
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
Code generated for package data by go-bindata DO NOT EDIT.
|
Code generated for package data by go-bindata DO NOT EDIT. |
Click to show internal directories.
Click to hide internal directories.