xrp

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2019 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TablePrefix = "xrp"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	ID           int64  `xorm:"id bigint autoincr pk"`
	Address      string `xorm:"address char(34) notnull index"` //账户地址
	SignerWeight int    `xorm:"signer_weight int null default '0'"`
	SignerEntrie string `xorm:"signer_entrie char(34) notnull index"`

	Type                int                  `xorm:"type tinyint notnull default '0'"`          //账户类型
	Balance             math.HexOrDecimal256 `xorm:"balance decimal(38,0) notnull default '0'"` //账户余额
	Creator             string               `xorm:"creator char(40) notnull default '' "`
	BirthTimestamp      int64                `xorm:"birth_timestamp int notnull default '0' "`      //账户第一次出现的时间
	LastActiveTimestamp int64                `xorm:"last_active_timestamp int notnull default '0'"` //账户上次活跃时间
}

func (Account) TableName

func (t Account) TableName() string

type AffectedNodes

type AffectedNodes struct {
	ID          int64  `xorm:"id bigint autoincr pk"`
	ParentHash  string `xorm:"parent_hash char(64) notnull index"`
	LedgerIndex int64  `xorm:"ledger_index int index"`
	CloseTime   int64  `xorm:"close_time int notnull"`

	NodeType          string `xorm:"node_type char(20) notnull index"`
	LedgerEntryType   string `xorm:"ledger_entry_type char(20) null index"`
	NodeLedgerIndex   string `xorm:"hash char(64) not null"`
	PreviousTxnID     string `xorm:"previous_txn_id char(64) null"`
	PreviousTxnLgrSeq int64  `xorm:"previous_txn_lgr_seq int null"`
	FullJsonStr       string `xorm:"full_json_str varchar(1024) null"`
}

func (AffectedNodes) TableName

func (t AffectedNodes) TableName() string

type Amount

type Amount struct {
	ID          int64  `xorm:"id bigint autoincr pk"`
	ParentHash  string `xorm:"parent_hash char(64) notnull index"`
	LedgerIndex int64  `xorm:"ledger_index int index"`
	CloseTime   int64  `xorm:"close_time int notnull"`
	Currency    string `xorm:"currency char(8) notnull index"`
	Value       string `xorm:"value decimal(38,4) notnull default '0'"`
	Issuer      string `xorm:"issuer char(34) notnull index"`
	AmountType  int    `xorm:"amount_type int notnull"`
}

func (Amount) TableName

func (t Amount) TableName() string

type Block

type Block struct {
	ID                  int64                `xorm:"id bigint autoincr pk"`
	Accepted            int                  `xorm:"accepted tinyint notnull"`
	AccountHash         string               `xorm:"account_hash varchar(128) notnull index"`
	CloseFlags          int                  `xorm:"close_flags tinyint notnull"`
	CloseTime           int64                `xorm:"close_time int notnull"`
	CloseTimeHuman      string               `xorm:"close_time_human varchar(56) notnull"`
	CloseTimeResolution int                  `xorm:"close_time_resolution int notnull"`
	Closed              int                  `xorm:"closed tinyint notnull"`
	Hash                string               `xorm:"hash varchar(128) not null"`
	LedgerHash          string               `xorm:"ledger_hash varchar(128) notnull"`
	LedgerIndex         int64                `xorm:"ledger_index bigint unique notnull index"`
	ParentCloseTime     int64                `xorm:"parent_close_time int notnull"`
	ParentHash          string               `xorm:"parent_hash varchar(128) notnull"`
	SeqNum              int64                `xorm:"seq_num bigint notnull index"`
	TotalCoins          math.HexOrDecimal256 `xorm:"total_coins decimal(38,0) null"`
	TransactionHash     string               `xorm:"transaction_hash varchar(128) notnull"`
	TransactionLength   int                  `xorm:"tx_len int notnull"`
}

func (Block) TableName

func (t Block) TableName() string

type Meta

type Meta struct {
	ID          int64     `xorm:"id bigint autoincr pk"`
	Name        string    `xorm:"name varchar(255) notnull unique"`
	LastID      int64     `xorm:"last_id bigint notnull"`
	Count       int64     `xorm:"count bigint notnull"`
	CreatedTime time.Time `xorm:"created_time created notnull"`
	UpdatedTime time.Time `xorm:"updated_time updated notnull"`
}

func (Meta) TableName

func (t Meta) TableName() string

type Path

type Path struct {
	ID          int64  `xorm:"id bigint autoincr pk"`
	ParentHash  string `xorm:"parent_hash char(64) notnull index"`
	LedgerIndex int64  `xorm:"ledger_index int index"`
	CloseTime   int64  `xorm:"close_time int notnull"`
	Currency    string `xorm:"currency char(8) notnull index"`
	Issuer      string `xorm:"issuer char(34) notnull index"`
	Type        int64  `xorm:"type int null"`
	Account     string `xorm:"account char(34) null index"`
	InTxIndex   int64  `xorm:"in_tx_index int"`
	InPathIndex int64  `xorm:"in_path_index int"`
}

func (Path) TableName

func (t Path) TableName() string

type Transaction

type Transaction struct {
	ID              int64  `xorm:"id bigint autoincr pk"`
	Account         string `xorm:"account varchar(68) notnull index"`
	TransactionType string `xorm:"transaction_type char(30) notnull index"`
	//The type of transaction. Valid types include: Payment, OfferCreate, OfferCancel, TrustSet,
	// AccountSet, SetRegularKey, SignerListSet, EscrowCreate, EscrowFinish, EscrowCancel,
	// PaymentChannelCreate, PaymentChannelFund, PaymentChannelClaim, and DepositPreauth.
	Fee                int64  `xorm:"fee bigint notnull"` //in drops
	Sequence           int64  `xorm:"sequence bigint notnull"`
	AccountTxnID       string `xorm:"account_txn_id varchar(128) null"`
	Flags              int64  `xorm:"flags bigint null"`
	LastLedgerSequence int64  `xorm:"last_ledger_sequence bigint null"`
	Memos              string `xorm:"memos varchar(1024) null"`
	Signers            string `xorm:"signers varchar(2048) null"`
	SourceTag          int64  `xorm:"source_tag bigint null"`
	SigningPubKey      string `xorm:"signing_pub_key varchar(132) null"`
	TxnSignature       string `xorm:"txn_signature varchar(380) null"`

	Hash              string `xorm:"hash varchar(128) notnull index"`
	LedgerIndex       int64  `xorm:"ledger_index bigint index"`
	AffectedNodesLen  int    `xorm:"affected_nodes_len bigint null"`
	TransactionResult string `xorm:"transaction_result varchar(30) null"`
	TransactionIndex  int    `xorm:"transaction_index bigint null"`
	Validated         int    `xorm:"validated tinyint null"`
	Date              int64  `xorm:"date bigint null"`

	//additional
	CloseTime int64 `xorm:"close_time bigint notnull"`

	//Payment
	Amount         int64  `xorm:"amount bigint notnull"` //if xrp, then in drops, else be -1 and ref: fk-Amount
	Destination    string `xorm:"destination varchar(68) null"`
	DestinationTag int64  `xorm:"destination_tag bigint null"`
	InvoiceID      string `xorm:"invoice_id varchar(128) null"`
	//Pathes fk
	PathesLen  int   `xorm:"pathes_len bigint null"`
	SendMax    int64 `xorm:"send_max bigint notnull"`    //if xrp, then in drops, else be -1 and ref: fk-Amount
	DeliverMin int64 `xorm:"deliver_min bigint notnull"` //if xrp, then in drops, else be -1 and ref: fk-Amount

	//OfferCreate  OfferCancel
	Expiration    int64 `xorm:"expiration bigint null"`
	OfferSequence int   `xorm:"offer_sequence bigint null"`
	TakerGets     int64 `xorm:"taker_gets bigint null"` //if xrp, then in drops, else be -1 and ref: fk-Amount
	TakerPays     int64 `xorm:"taker_pays bigint null"` //if xrp, then in drops, else be -1 and ref: fk-Amount

	//TrustSet
	LimitAmount int64 `xorm:"limit_amount bigint null"` //if xrp, then in drops, else be -1 and ref: fk-Amount
	QualityIn   int64 `xorm:"quality_in bigint null"`
	QualityOut  int64 `xorm:"quality_out bigint null"`

	//AccountSet
	ClearFlag    int    `xorm:"clear_flag bigint null"`
	Domain       string `xorm:"domain varchar(512) null"`
	EmailHash    string `xorm:"email_hash char(64) null"`
	MessageKey   string `xorm:"message_key varchar(68) null"`
	SetFlag      int    `xorm:"set_flag bigint null"`
	TransferRate int    `xorm:"transfer_rate bigint null"`
	TickSize     int    `xorm:"tick_size bigint null"`

	//SetRegularKey
	RegularKey string `xorm:"regular_key varchar(68) null"`

	//SignerListSet
	SignerQuorum int `xorm:"signer_quorum bigint null"`

	//EscrowCreate
	CancelAfter int64  `xorm:"cancel_after bigint null"`
	FinishAfter int64  `xorm:"finish_after bigint null"`
	Condition   string `xorm:"condition varchar(512) null"`

	//EscrowFinish
	Owner       string `xorm:"owner varchar(68) null"`
	Fulfillment string `xorm:"fulfillment varchar(512) null"`
	//EscrowCancel
	//PaymentChannelCreate
	SettleDelay int64  `xorm:"settle_delay bigint null"`
	PublicKey   string `xorm:"public_key char(66) null"`
	//PaymentChannelFund
	Channel string `xorm:"channel char(64) null"`
	//PaymentChannelClaim
	Balance int64 `xorm:"balance bigint null"`
	//DepositPreauth
	Authorize   string `xorm:"authorize varchar(68) null"`
	UnAuthorize string `xorm:"un_authorize varchar(68) null"`
}

func (Transaction) TableName

func (t Transaction) TableName() string

Jump to

Keyboard shortcuts

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