ripple

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2020 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NormalizeTx added in v1.0.37

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

Normalize converts a Ripple transaction into the generic model

func NormalizeTxs added in v1.0.37

func NormalizeTxs(srcTxs []Tx) (txs []blockatlas.Tx)

Types

type Client added in v1.0.0

type Client struct {
	blockatlas.Request
}

func (*Client) GetBlockByNumber added in v1.0.37

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

func (*Client) GetCurrentBlock added in v1.0.37

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

func (*Client) GetTxsOfAddress added in v1.0.0

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

type DeliveredAmount added in v1.0.37

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

type LedgerInfo added in v1.0.37

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

type LedgerResponse added in v1.0.37

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

type Meta added in v1.0.37

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

type Payment added in v1.0.0

type Payment struct {
	TransactionType TransactionType   `json:"TransactionType"`
	Flags           uint64            `json:"Flags"`
	Sequence        uint64            `json:"Sequence"`
	Fee             blockatlas.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 added in v1.0.0

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

func Init added in v1.1.0

func Init(api string) *Platform

func (*Platform) Coin added in v1.0.0

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

func (*Platform) CurrentBlockNumber added in v1.0.37

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

func (*Platform) GetBlockByNumber added in v1.0.37

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

func (*Platform) GetTxsByAddress added in v1.0.0

func (p *Platform) GetTxsByAddress(address string) (blockatlas.TxPage, error)

type Response added in v1.0.0

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

type TransactionResult added in v1.1.0

type TransactionResult string

type TransactionType added in v1.1.0

type TransactionType string

type Tx added in v1.0.0

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