schema

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2023 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TxStatusConfirmed = "confirmed"
	TxStatusPackaged  = "packaged"

	InternalStatusSuccess = "success"
	InternalStatusFailed  = "failed"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Express

type Express struct {
	ChainTxHash    string `json:"chainTxHash"`
	WithdrawFee    string `json:"withdrawFee"`
	RefundEverHash string `json:"refundEverHash"`
	Err            string `json:"err"`
}

type InternalStatus

type InternalStatus struct {
	Status string `json:"status"` // "success" or "failed"
	*paySchema.InternalErr
}

func (InternalStatus) Marshal

func (i InternalStatus) Marshal() string

type TxInfo

type TxInfo struct {
	EverHash  string
	ChainType string
	Action    string
	Data      string
	Timestamp int64
}

type TxResponse

type TxResponse struct {
	RawId          int64  `json:"rawId"`
	ID             string `json:"id"` // AR tx id
	TokenSymbol    string `json:"tokenSymbol"`
	Action         string `json:"action"`
	From           string `json:"from"`
	To             string `json:"to"`
	Amount         string `json:"amount"`
	Fee            string `json:"fee"`
	FeeRecipient   string `json:"feeRecipient"`
	Nonce          int64  `json:"nonce"`
	TokenID        string `json:"tokenID"`
	ChainType      string `json:"chainType"`
	ChainID        string `json:"chainID"`
	Data           string `json:"data"`
	Version        string `json:"version"`
	Sig            string `json:"sig"`
	EverHash       string `json:"everHash"`
	Status         string `json:"status"`
	InternalStatus string `json:"internalStatus"` // if internal tx (bundle tx) execute success, return "success" then return err info
	Timestamp      int64  `json:"timestamp"`      // arTx timestamp

	// for cross chain
	TargetChainTxHash string `json:"targetChainTxHash"`
	// for express
	Express Express `json:"express"`
}

Jump to

Keyboard shortcuts

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