Documentation ¶
Index ¶
- Constants
- type AccountSetFlags
- type Amount
- type BaseRequest
- type BaseResponse
- type BaseTransaction
- type BinaryLedger
- type CTID
- type ConsensusStream
- type CreatedNode
- type CreatedNodeMap
- type Currency
- type DeletedNode
- type DeletedNodeMap
- type ErrorResponse
- type GlobalFlags
- type IssuedCurrency
- type IssuedCurrencyAmount
- type LedgerIndex
- type LedgerQueueData
- type LedgerRequest
- type LedgerResponse
- type LedgerResult
- type LedgerStream
- type Memo
- type MemoMap
- type ModifiedNode
- type ModifiedNodeMap
- type NFTOffer
- type NFTokenCreateOfferFlags
- type NFTokenMintFlags
- type OfferCreateFlags
- type OrderBookStream
- type Path
- type PathFindStream
- type PathStep
- type PaymentChannelClaimFlags
- type PaymentFlags
- type PeerStatusStream
- type ResponseOnlyTxInfo
- type Signer
- type SignerEntry
- type SignerEntryMap
- type SignerMap
- type StreamType
- type Transaction
- type TransactionAccountDelete
- type TransactionAccountSet
- type TransactionCheckCancel
- type TransactionCheckCash
- type TransactionCheckCreate
- type TransactionDepositPreauth
- type TransactionEscrowCancel
- type TransactionEscrowCreate
- type TransactionEscrowFinish
- type TransactionMetadata
- type TransactionNFTokenAcceptOffer
- type TransactionNFTokenBurn
- type TransactionNFTokenCancelOffer
- type TransactionNFTokenCreateOffer
- type TransactionNFTokenMint
- type TransactionOfferCancel
- type TransactionOfferCreate
- type TransactionPayment
- type TransactionPaymentChannelClaim
- type TransactionPaymentChannelCreate
- type TransactionPaymentChannelFund
- type TransactionSetRegularKey
- type TransactionSignerListSet
- type TransactionStream
- type TransactionTicketCreate
- type TransactionTrustSet
- type TrustSetFlags
- type ValidationStream
- type Warning
Constants ¶
const ( MIN_TICK_SIZE = 3 MAX_TICK_SIZE = 15 )
const MAX_TICKETS = 250
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountSetFlags ¶
type AccountSetFlags struct { GlobalFlags TfRequireDestTag bool `json:"tfRequireDestTag,omitempty"` TfOptionalDestTag bool `json:"tfOptionalDestTag,omitempty"` TfRequireAuth bool `json:"tfRequireAuth,omitempty"` TfOptionalAuth bool `json:"tfOptionalAuth,omitempty"` TfDisallowXRP bool `json:"tfDisallowXRP,omitempty"` TfAllowXRP bool `json:"tfAllowXRP,omitempty"` }
Map of flags to boolean values representing {@link AccountSet} transaction flags.
type Amount ¶
type Amount IssuedCurrencyAmount
type BaseRequest ¶
type BaseResponse ¶
type BaseResponse struct { Id string `json:"id,omitempty"` Status string `json:"status,omitempty"` Type string `json:"type,omitempty"` Result string `json:"result,omitempty"` Warning string `json:"warning,omitempty"` Warnings []Warning `json:"warnings,omitempty"` Forwarded bool `json:"forwarded,omitempty"` ApiVersion int16 `json:"api_version,omitempty"` }
type BaseTransaction ¶
type BaseTransaction struct { Account string TransactionType string Fee string Sequence int64 AccountTxnID string Flags int64 LastLedgerSequence int64 Memos []Memo Signers []Signer SourceTag int64 SigningPubKey string TicketSequence int64 TxnSignature string }
Set of common fields for every transaction
type BinaryLedger ¶
type CTID ¶ added in v0.2.3
* CTID spec: https://github.com/XRPLF/XRPL-Standards/tree/master/XLS-0037d-concise-transaction-identifier-ctid
type ConsensusStream ¶
type CreatedNode ¶
type CreatedNode struct {
CreatedNode CreatedNodeMap
}
type CreatedNodeMap ¶
type DeletedNode ¶
type DeletedNode struct {
DeletedNode DeletedNodeMap
}
type DeletedNodeMap ¶
type ErrorResponse ¶
type ErrorResponse struct { Id int `json:"id,omitempty"` Status string `json:"status,omitempty"` Type string `json:"type,omitempty"` Error string `json:"error,omitempty"` ErrorCode string `json:"error_code,omitempty"` ErrorMessage string `json:"error_message,omitempty"` ApiVersion int16 `json:"api_version,omitempty"` }
type GlobalFlags ¶
type GlobalFlags struct { }
type IssuedCurrency ¶
type IssuedCurrencyAmount ¶
type IssuedCurrencyAmount struct { IssuedCurrency `json:"issued_currency,omitempty"` Value string `json:"value,omitempty"` }
type LedgerIndex ¶
type LedgerIndex int
type LedgerQueueData ¶
type LedgerQueueData struct { Account string `json:"account,omitempty"` Tx interface{} `json:"tx,omitempty"` RetriesRemaining int `json:"retries_remaining,omitempty"` PreflightResult string `json:"preflight_result,omitempty"` LastResult string `json:"last_result,omitempty"` AuthChange bool `json:"auth_change,omitempty"` Fee string `json:"fee,omitempty"` FeeLevel string `json:"fee_level,omitempty"` MaxSpendDrops string `json:"max_spend_drops,omitempty"` }
type LedgerRequest ¶
type LedgerRequest struct { BaseRequest LedgerHash string `json:"ledger_hash,omitempty"` LedgerIndex LedgerIndex `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"` Binary bool `json:"binary,omitempty"` Queue bool `json:"queue,omitempty"` }
type LedgerResponse ¶
type LedgerResponse struct { BaseResponse Result LedgerResult }
type LedgerResult ¶
type LedgerResult struct { Ledger interface{} `json:"ledger,omitempty"` LedgerHash string `json:"ledger_hash,omitempty"` LedgerIndex int `json:"ledger_index,omitempty"` QueueData []LedgerQueueData `json:"queue_data,omitempty"` Validated bool `json:"validated,omitempty"` }
type LedgerStream ¶
type LedgerStream struct { Type string `json:"type,omitempty"` // default: ledgerClosed FeeBase uint64 `json:"fee_base,omitempty"` FeeRef uint64 `json:"fee_ref,omitempty"` LedgerHash string `json:"ledger_hash,omitempty"` LedgerIndex uint64 `json:"ledger_index,omitempty"` LedgerTime uint64 `json:"ledger_time,omitempty"` ReserveBase uint64 `json:"reserve_base,omitempty"` ReserveInc uint64 `json:"reserve_inc,omitempty"` TxnCount uint64 `json:"txn_count,omitempty"` ValidatedLedgers string `json:"validated_ledgers,omitempty"` }
type ModifiedNode ¶
type ModifiedNode struct {
ModifiedNode ModifiedNodeMap
}
type ModifiedNodeMap ¶
type NFTokenCreateOfferFlags ¶
type NFTokenCreateOfferFlags struct { GlobalFlags TfSellNFToken bool `json:"tfSellNFToken,omitempty"` }
type NFTokenMintFlags ¶
type NFTokenMintFlags struct { GlobalFlags TfBurnable bool `json:"tfBurnable,omitempty"` TfOnlyXRP bool `json:"tfOnlyXRP,omitempty"` TfTrustLine bool `json:"tfTrustLine,omitempty"` TfTransferable bool `json:"tfTransferable,omitempty"` }
type OfferCreateFlags ¶
type OfferCreateFlags struct { GlobalFlags TfPassive bool `json:"tfPassive,omitempty"` TfImmediateOrCancel bool `json:"tfImmediateOrCancel,omitempty"` TfFillOrKill bool `json:"tfFillOrKill,omitempty"` TfSell bool `json:"tfSell,omitempty"` }
type OrderBookStream ¶
type OrderBookStream struct { Type string `json:"type,omitempty"` // default: transaction Status string `json:"status,omitempty"` EngineResult string `json:"engine_result,omitempty"` EngineResultCode int64 `json:"engine_result_code,omitempty"` EngineResultMessage string `json:"engine_result_message,omitempty"` LedgerCurrentIndex uint64 `json:"ledger_current_index,omitempty"` LedgerHash string `json:"ledger_hash,omitempty"` LedgerIndex uint64 `json:"ledger_index,omitempty"` Meta string `json:"meta,omitempty"` Transaction string `json:"transaction,omitempty"` Validated bool `json:"validated,omitempty"` }
type PathFindStream ¶
type PathFindStream struct { Type string `json:"type,omitempty"` // default: path_find SourceAccount string `json:"source_account,omitempty"` DestinationAccount string `json:"destination_account,omitempty"` DestinationAmount string `json:"destination_amount,omitempty"` FullReply bool `json:"full_reply,omitempty"` Id string `json:"id,omitempty"` SendMax string `json:"send_max,omitempty"` }
type PaymentChannelClaimFlags ¶
type PaymentChannelClaimFlags struct { GlobalFlags TfRenew bool `json:"tfRenew,omitempty"` TfClose bool `json:"tfClose,omitempty"` }
type PaymentFlags ¶
type PaymentFlags struct { GlobalFlags TfNoDirectRipple bool `json:"tfNoDirectRipple,omitempty"` TfPartialPayment bool `json:"tfPartialPayment,omitempty"` TfLimitQuality bool `json:"tfLimitQuality,omitempty"` }
type PeerStatusStream ¶
type PeerStatusStream struct { Type string `json:"type,omitempty"` // default: peerStatusChange Action string `json:"action,omitempty"` Date uint64 `json:"date,omitempty"` LedgerHash string `json:"ledger_hash,omitempty"` LedgerIndex uint64 `json:"ledger_index,omitempty"` LedgerIndexMax uint64 `json:"ledger_index_max,omitempty"` LedgerIndexMin uint64 `json:"ledger_index_min,omitempty"` }
type ResponseOnlyTxInfo ¶
type SignerEntry ¶
type SignerEntry struct {
SignerEntry SignerEntryMap `json:"signer_entry,omitempty"`
}
type SignerEntryMap ¶
type StreamType ¶
type StreamType string
type Transaction ¶
type Transaction struct { TransactionAccountDelete TransactionAccountSet TransactionCheckCancel TransactionCheckCash TransactionCheckCreate TransactionDepositPreauth TransactionEscrowCancel TransactionEscrowCreate TransactionEscrowFinish TransactionNFTokenAcceptOffer TransactionNFTokenBurn TransactionNFTokenCancelOffer TransactionNFTokenCreateOffer TransactionNFTokenMint TransactionOfferCancel TransactionOfferCreate TransactionPayment TransactionPaymentChannelClaim TransactionPaymentChannelCreate TransactionPaymentChannelFund TransactionSetRegularKey TransactionSignerListSet TransactionTicketCreate TransactionTrustSet }
type TransactionAccountDelete ¶
type TransactionAccountDelete struct { BaseTransaction Destination string DestinationTag int64 }
An AccountDelete transaction deletes an account and any objects it owns in the XRP Ledger, if possible, sending the account's remaining XRP to a specified destination account.
TransactionType: 'AccountDelete'
type TransactionAccountSet ¶
type TransactionAccountSet struct { BaseTransaction Flags int64 ClearFlag int64 Domain string EmailHash string MessageKey string SetFlag int64 TransferRate int64 TickSize int64 NFTokenMinter string }
An AccountSet transaction modifies the properties of an account in the XRP Ledger
TransactionType: 'AccountSet'
type TransactionCheckCancel ¶
type TransactionCheckCancel struct { BaseTransaction CheckID string }
Cancels an unredeemed Check, removing it from the ledger without sending any money. The source or the destination of the check can cancel a Check at any time using this transaction type. If the Check has expired, any address can cancel it.
TransactionType: 'CheckCancel'
type TransactionCheckCash ¶
type TransactionCheckCash struct { BaseTransaction CheckID string Amount Amount DeliverMin Amount }
Attempts to redeem a Check object in the ledger to receive up to the amount authorized by the corresponding CheckCreate transaction. Only the Destination address of a Check can cash it with a CheckCash transaction.
TransactionType: 'CheckCash'
type TransactionCheckCreate ¶
type TransactionCheckCreate struct { BaseTransaction Destination string SendMax Amount DestinationTag int64 Expiration int64 InvoiceID string }
Create a Check object in the ledger, which is a deferred payment that can be cashed by its intended destination. The sender of this transaction is the sender of the Check.
TransactionType: 'CheckCreate'
type TransactionDepositPreauth ¶
type TransactionDepositPreauth struct { BaseTransaction Authorize string }
A DepositPreauth transaction gives another account pre-approval to deliver payments to the sender of this transaction. This is only useful if the sender of this transaction is using (or plans to use) Deposit Authorization.
TransactionType: 'DepositPreauth'
type TransactionEscrowCancel ¶
type TransactionEscrowCancel struct { BaseTransaction Owner string OfferSequence int64 }
Return escrowed XRP to the sender.
TransactionType: 'EscrowCancel'
type TransactionEscrowCreate ¶
type TransactionEscrowCreate struct { BaseTransaction Amount Amount Destination string CancelAfter int64 FinishAfter int64 Condition string DestinationTag int64 }
Sequester XRP until the escrow process either finishes or is canceled.
TransactionType: 'EscrowCreate'
type TransactionEscrowFinish ¶
type TransactionEscrowFinish struct { BaseTransaction Owner string OfferSequence int64 Condition string Fulfillment string }
Deliver XRP from a held payment to the recipient.
TransactionType: 'EscrowFinish'
type TransactionMetadata ¶
type TransactionNFTokenAcceptOffer ¶
type TransactionNFTokenAcceptOffer struct { BaseTransaction NFTokenSellOffer string NFTokenBuyOffer string NFTokenBrokerFee Amount }
The NFTokenOfferAccept transaction is used to accept offers to buy or sell an NFToken
TransactionType: 'NFTokenAcceptOffer'
type TransactionNFTokenBurn ¶
type TransactionNFTokenBurn struct { BaseTransaction Account string NFTokenID string Owner string }
The NFTokenBurn transaction is used to remove an NFToken object from the NFTokenPage in which it is being held, effectively removing the token from the ledger ("burning" it).
TransactionType: 'NFTokenBurn'
type TransactionNFTokenCancelOffer ¶
type TransactionNFTokenCancelOffer struct { BaseTransaction NFTokenOffers []string }
The NFTokenCancelOffer transaction deletes existing NFTokenOffer objects. It is useful if you want to free up space on your account to lower your reserve requirement.
TransactionType: 'NFTokenCancelOffer'
type TransactionNFTokenCreateOffer ¶
type TransactionNFTokenCreateOffer struct { BaseTransaction NFTokenID string Amount Amount Owner string Expiration int64 Destination string Flags int64 }
The NFTokenCreateOffer transaction creates either an offer to buy an NFT the submitting account does not own, or an offer to sell an NFT the submitting account does own.
TransactionType: 'NFTokenCreateOffer'
type TransactionNFTokenMint ¶
type TransactionNFTokenMint struct { BaseTransaction NFTokenTaxon int64 Issuer string TransferFee int64 URI string Flags int64 }
The NFTokenMint transaction creates an NFToken object and adds it to the relevant NFTokenPage object of the minter. If the transaction is successful, the newly minted token will be owned by the minter account specified by the transaction.
TransactionType: 'NFTokenMint'
type TransactionOfferCancel ¶
type TransactionOfferCancel struct { BaseTransaction OfferSequence int64 }
An OfferCancel transaction removes an Offer object from the XRP Ledger.
TransactionType: 'OfferCancel'
type TransactionOfferCreate ¶
type TransactionOfferCreate struct { BaseTransaction Flags int64 Expiration int64 OfferSequence int64 TakerGets Amount TakerPays Amount }
An OfferCreate transaction is effectively a limit order . It defines an intent to exchange currencies, and creates an Offer object if not completely. Fulfilled when placed. Offers can be partially fulfilled.
TransactionType: 'OfferCreate'
type TransactionPayment ¶
type TransactionPayment struct { BaseTransaction Amount Amount Destination string DestinationTag int64 InvoiceID string Paths []Path SendMax Amount DeliverMin Amount Flags int64 }
A Payment transaction represents a transfer of value from one account to another.
TransactionType: 'Payment'
type TransactionPaymentChannelClaim ¶
type TransactionPaymentChannelClaim struct { BaseTransaction Flags int64 Channel string Balance string Amount string Signature string PublicKey string }
Claim XRP from a payment channel, adjust the payment channel's expiration, or both.
TransactionType: 'PaymentChannelClaim'
type TransactionPaymentChannelCreate ¶
type TransactionPaymentChannelCreate struct { BaseTransaction Amount string Destination string SettleDelay int64 PublicKey string CancelAfter int64 DestinationTag int64 }
Create a unidirectional channel and fund it with XRP. The address sending this transaction becomes the "source address" of the payment channel.
TransactionType: 'PaymentChannelCreate'
type TransactionPaymentChannelFund ¶
type TransactionPaymentChannelFund struct { BaseTransaction Channel string Amount string Expiration int64 }
Add additional XRP to an open payment channel, and optionally update the expiration time of the channel. Only the source address of the channel can use this transaction.
TransactionType: 'PaymentChannelFund'
type TransactionSetRegularKey ¶
type TransactionSetRegularKey struct { BaseTransaction RegularKey string }
A SetRegularKey transaction assigns, changes, or removes the regular key pair associated with an account.
TransactionType: 'SetRegularKey'
type TransactionSignerListSet ¶
type TransactionSignerListSet struct { BaseTransaction SignerQuorum int64 SignerEntries []SignerEntry }
The SignerListSet transaction creates, replaces, or removes a list of signers that can be used to multi-sign a transaction.
TransactionType: 'SignerListSet'
type TransactionStream ¶
type TransactionStream struct { Type string `json:"type,omitempty"` // default: transaction Status string `json:"status,omitempty"` EngineResult string `json:"engine_result,omitempty"` EngineResultCode int64 `json:"engine_result_code,omitempty"` EngineResultMessage string `json:"engine_result_message,omitempty"` LedgerCurrentIndex uint64 `json:"ledger_current_index,omitempty"` LedgerHash string `json:"ledger_hash,omitempty"` LedgerIndex uint64 `json:"ledger_index,omitempty"` Meta string `json:"meta,omitempty"` Transaction string `json:"transaction,omitempty"` Validated bool `json:"validated,omitempty"` }
type TransactionTicketCreate ¶
type TransactionTicketCreate struct { BaseTransaction TicketCount int64 }
A TicketCreate transaction sets aside one or more sequence numbers as Tickets.
TransactionType: 'TicketCreate'
type TransactionTrustSet ¶
type TransactionTrustSet struct { BaseTransaction LimitAmount IssuedCurrencyAmount QualityIn int64 QualityOut int64 Flags int64 }
Create or modify a trust line linking two accounts.
TransactionType: 'TrustSet'
type TrustSetFlags ¶
type ValidationStream ¶
type ValidationStream struct { Type string `json:"type,omitempty"` // default: validationReceived Amendments []string `json:"amendments,omitempty"` BaseFee uint64 `json:"base_fee,omitempty"` Cookie string `json:"cookie,omitempty"` Data string `json:"data,omitempty"` Flags uint64 `json:"flags,omitempty"` Full bool `json:"full,omitempty"` LedgerHash string `json:"ledger_hash,omitempty"` LedgerIndex uint64 `json:"ledger_index,omitempty"` LoadFee uint64 `json:"load_fee,omitempty"` MasterKey string `json:"master_key,omitempty"` ReserveBase uint64 `json:"reserve_base,omitempty"` ReserveInc uint64 `json:"reserve_inc,omitempty"` Signature string `json:"signature,omitempty"` SigningTime uint64 `json:"signing_time,omitempty"` ValidationPublicKey string `json:"validation_public_key,omitempty"` }