ripple

package
v1.1.16-0...-5f6d184 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 28, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NormalizeTx

func NormalizeTx(srcTx *Tx) (types.Tx, bool)

Normalize converts a Ripple transaction into the generic model

func NormalizeTxs

func NormalizeTxs(srcTxs []Tx) (txs types.Txs)

Types

type Client

type Client struct {
	client.Request
}

func (*Client) GetBlockByNumber

func (c *Client) GetBlockByNumber(num int64) ([]Tx, error)

func (*Client) GetCurrentBlock

func (c *Client) GetCurrentBlock() (int64, error)

func (*Client) GetTxsOfAddress

func (c *Client) GetTxsOfAddress(address string) ([]Tx, error)

type DeliveredAmount

type DeliveredAmount struct {
	Value    string `json:"value"`
	Currency string `json:"currency"`
	Issuer   string `json:"issuer"`
}

type LedgerInfo

type LedgerInfo struct {
	LedgerIndex  int64 `json:"ledger_index"`
	Transactions []Tx  `json:"transactions,omitempty"`
}

type LedgerResponse

type LedgerResponse struct {
	Ledger LedgerInfo `json:"ledger"`
}

type Meta

type Meta struct {
	TransactionResult TransactionResult `json:"TransactionResult,omitempty"`
	DeliveredAmount   interface{}       `json:"delivered_amount,omitempty"`
}

type Payment

type Payment struct {
	TransactionType TransactionType `json:"TransactionType"`
	Flags           uint64          `json:"Flags"`
	Sequence        uint64          `json:"Sequence"`
	Fee             types.Amount    `json:"Fee"`
	SigningPubKey   string          `json:"SigningPubKey"`
	TxnSignature    string          `json:"TxnSignature"`
	Account         string          `json:"Account"`
	Destination     string          `json:"Destination"`
	DestinationTag  int64           `json:"DestinationTag,omitempty"`
}

type Platform

type Platform struct {
	// contains filtered or unexported fields
}

func Init

func Init(api string) *Platform

func (*Platform) Coin

func (p *Platform) Coin() coin.Coin

func (*Platform) CurrentBlockNumber

func (p *Platform) CurrentBlockNumber() (int64, error)

func (*Platform) GetBlockByNumber

func (p *Platform) GetBlockByNumber(num int64) (*types.Block, error)

func (*Platform) GetTxsByAddress

func (p *Platform) GetTxsByAddress(address string) (types.Txs, error)

type Response

type Response struct {
	Result       string `json:"result"`
	Count        uint64 `json:"count"`
	Marker       string `json:"marker"`
	Transactions []Tx   `json:"transactions"`
}

type TransactionResult

type TransactionResult string

type TransactionType

type TransactionType string

type Tx

type Tx struct {
	Hash        string  `json:"hash"`
	Date        string  `json:"date"`
	LedgerIndex uint64  `json:"ledger_index"`
	LedgerHash  string  `json:"ledger_hash"`
	Payment     Payment `json:"tx"`
	Meta        Meta    `json:"meta"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL