response

package
v0.0.0-...-d56c475 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NotSupportError = errors.New("not support")

Functions

This section is empty.

Types

type AppContentResult

type AppContentResult struct {
	Snippets  []NameInfo `json:"snippets"`
	Pages     []NameInfo `json:"pages"`
	Contracts []NameInfo `json:"contracts"`
}

type AppParamsResult

type AppParamsResult struct {
	App  string        `json:"app_id"`
	List []ParamResult `json:"list"`
}

type AuthStatusResponse

type AuthStatusResponse struct {
	IsActive  bool  `json:"active"`
	ExpiresAt int64 `json:"exp,omitempty"`
}

type BatchResponse

type BatchResponse []Response

type BlockDetailedInfo

type BlockDetailedInfo struct {
	Header        BlockHeaderInfo  `json:"header"`
	Hash          string           `json:"hash"`
	NodePosition  int64            `json:"node_position"`
	KeyID         int64            `json:"key_id"`
	Time          int64            `json:"time"`
	TxCount       int32            `json:"tx_count"`
	Size          string           `json:"size"`
	RollbacksHash string           `json:"rollbacks_hash"`
	MerkleRoot    string           `json:"merkle_root"`
	BinData       string           `json:"bin_data"`
	StopCount     int              `json:"stop_count"`
	Transactions  []TxDetailedInfo `json:"transactions"`
}

type BlockHeaderInfo

type BlockHeaderInfo struct {
	BlockID      int64 `json:"block_id"`
	Time         int64 `json:"time"`
	KeyID        int64 `json:"key_id"`
	NodePosition int64 `json:"node_position"`
	Version      int   `json:"version"`
}

type BlockInfoHexResult

type BlockInfoHexResult struct {
	Hash          []byte `json:"hash"`
	KeyID         int64  `json:"key_id"`
	Time          int64  `json:"time"`
	Tx            int32  `json:"tx_count"`
	RollbacksHash []byte `json:"rollbacks_hash"`
	NodePosition  int64  `json:"node_position"`
	ConsensusMode int32  `json:"consensus_mode"`
}

type BlockInfoResult

type BlockInfoResult struct {
	Hash          string `json:"hash"`
	KeyID         int64  `json:"key_id"`
	Time          int64  `json:"time"`
	Tx            int32  `json:"tx_count"`
	RollbacksHash string `json:"rollbacks_hash"`
	NodePosition  int64  `json:"node_position"`
	ConsensusMode int32  `json:"consensus_mode"`
}

type BlockTxInfo

type BlockTxInfo struct {
	Hash         string         `json:"hash"`
	ContractName string         `json:"contract_name"`
	Params       map[string]any `json:"params"`
	KeyID        int64          `json:"key_id"`
}

type BlockTxInfoHex

type BlockTxInfoHex struct {
	Hash         []byte         `json:"hash"`
	ContractName string         `json:"contract_name"`
	Params       map[string]any `json:"params"`
	KeyID        int64          `json:"key_id"`
}

type ContentResult

type ContentResult struct {
	Menu       string          `json:"menu"`
	MenuTree   json.RawMessage `json:"menutree"`
	Title      string          `json:"title"`
	Tree       json.RawMessage `json:"tree"`
	NodesCount int64           `json:"nodesCount"`
}

type EcosystemInfo

type EcosystemInfo struct {
	Id           int64  `json:"id"`
	Name         string `json:"name"`
	Digits       int64  `json:"digits"`
	TokenSymbol  string `json:"token_symbol"`
	TokenName    string `json:"token_name"`
	TotalAmount  string `json:"total_amount"`
	IsWithdraw   bool   `json:"is_withdraw"`
	Withdraw     string `json:"withdraw"`
	IsEmission   bool   `json:"is_emission"`
	Emission     string `json:"emission"`
	Introduction string `json:"introduction"`
	Creator      string `json:"creator"`
}

type EcosystemNameResult

type EcosystemNameResult struct {
	EcosystemName string `json:"ecosystem_name"`
}

type GetContractResult

type GetContractResult struct {
	ID         uint32          `json:"id"`
	StateID    uint32          `json:"state"`
	TableID    string          `json:"tableid"`
	WalletID   string          `json:"walletid"`
	TokenID    string          `json:"tokenid"`
	Address    string          `json:"address"`
	Fields     []contractField `json:"fields"`
	Name       string          `json:"name"`
	AppId      uint32          `json:"app_id"`
	Ecosystem  uint32          `json:"ecosystem"`
	Conditions string          `json:"conditions"`
}

type GetUIDResult

type GetUIDResult struct {
	UID         string `json:"uid"`
	Token       string `json:"token"`
	Expire      string `json:"expire"`
	EcosystemID string `json:"ecosystem_id"`
	KeyID       string `json:"key_id"`
	Address     string `json:"address"`
	NetworkID   string `json:"network_id"`
	Cryptoer    string `json:"cryptoer"`
	Hasher      string `json:"hasher"`
}

type HashResult

type HashResult struct {
	Hash string `json:"hash"`
}

type HistoryResult

type HistoryResult struct {
	List []map[string]string `json:"list"`
}

type KeyInfoResult

type KeyInfoResult struct {
	Account    string              `json:"account"`
	Ecosystems []*keyEcosystemInfo `json:"ecosystems"`
}

type ListResult

type ListResult struct {
	Count int64               `json:"count"`
	List  []map[string]string `json:"list"`
}

type LoginResult

type LoginResult struct {
	Token       string        `json:"token"`
	EcosystemID string        `json:"ecosystem_id"`
	KeyID       string        `json:"key_id"`
	Account     string        `json:"account"`
	NotifyKey   string        `json:"notify_key"`
	IsNode      bool          `json:"isnode"`
	IsOwner     bool          `json:"isowner"`
	IsCLB       bool          `json:"clb"`
	Timestamp   string        `json:"timestamp"`
	Roles       []rolesResult `json:"roles"`
}

type MemberInfo

type MemberInfo struct {
	ID         int64  `json:"id"`
	MemberName string `json:"member_name"`
	ImageID    *int64 `json:"image_id"`
	MemberInfo string `json:"member_info"`
}
type MenuResult struct {
	ID         int64  `json:"id"`
	Name       string `json:"name"`
	Title      string `json:"title"`
	Value      string `json:"value"`
	Conditions string `json:"conditions"`
}

type MultiTxInfoResult

type MultiTxInfoResult struct {
	Results map[string]*TxInfoResult `json:"results"`
}

type NameInfo

type NameInfo struct {
	ID   int64  `json:"id"`
	Name string `json:"name"`
}

type PageResult

type PageResult struct {
	ID            int64  `json:"id"`
	Name          string `json:"name"`
	Value         string `json:"value"`
	Menu          string `json:"menu"`
	ValidateCount int64  `json:"nodesCount"`
	AppID         int64  `json:"app_id"`
	Conditions    string `json:"conditions"`
}

type ParamResult

type ParamResult struct {
	ID         string `json:"id"`
	Name       string `json:"name"`
	Value      string `json:"value"`
	Conditions string `json:"conditions"`
}

type ParamsResult

type ParamsResult struct {
	List []ParamResult `json:"list"`
}

type Response

type Response struct {
	JSONRPC string          `json:"jsonrpc"`
	ID      request.ID      `json:"id"`
	Result  json.RawMessage `json:"result,omitempty"`
	Error   *jsonError      `json:"error,omitempty"`
}

func (Response) MarshalJSON

func (r Response) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler and adds the "jsonrpc":"2.0" property.

func (*Response) UnmarshalJSON

func (r *Response) UnmarshalJSON(data []byte) error

UnmarshalJSON implements json.Unmarshaler.

type RowResult

type RowResult struct {
	Value map[string]string `json:"value"`
}

type SendTxResult

type SendTxResult struct {
	Hashes map[string]string `json:"hashes"`
}

type SnippetResult

type SnippetResult struct {
	ID         int64  `json:"id"`
	Name       string `json:"name"`
	Value      string `json:"value"`
	Conditions string `json:"conditions"`
}

type TableResult

type TableResult struct {
	Name       string       `json:"name"`
	Insert     string       `json:"insert"`
	NewColumn  string       `json:"new_column"`
	Update     string       `json:"update"`
	Read       string       `json:"read,omitempty"`
	Filter     string       `json:"filter,omitempty"`
	Conditions string       `json:"conditions"`
	AppID      string       `json:"app_id"`
	Columns    []columnInfo `json:"columns"`
}

type TablesResult

type TablesResult struct {
	Count int64       `json:"count"`
	List  []tableInfo `json:"list"`
}

type TokenBalanceResult

type TokenBalanceResult struct {
	Amount      string `json:"amount"`
	Digits      int64  `json:"digits"`
	Total       string `json:"total"`
	Utxo        string `json:"utxo"`
	TokenSymbol string `json:"token_symbol"`
}

type TxDetailedInfo

type TxDetailedInfo struct {
	Hash         []byte         `json:"hash"`
	ContractName string         `json:"contract_name"`
	Params       map[string]any `json:"params"`
	KeyID        int64          `json:"key_id"`
	Time         int64          `json:"time"`
	Type         byte           `json:"type"`
	Size         string         `json:"size"`
}

type TxInfo

type TxInfo struct {
	BlockId      int64          `json:"block_id"`
	BlockHash    string         `json:"block_hash"`
	Address      string         `json:"address"`
	Ecosystem    int64          `json:"ecosystem"`
	Hash         string         `json:"hash"`
	Expedite     string         `json:"expedite"`
	ContractName string         `json:"contract_name"`
	Params       map[string]any `json:"params"`
	CreatedAt    int64          `json:"created_at"`
	Size         string         `json:"size"`
	Status       int64          `json:"status"` //0:success 1:penalty
}

type TxInfoResult

type TxInfoResult struct {
	BlockID string  `json:"blockid"`
	Confirm int     `json:"confirm"`
	Data    *TxInfo `json:"data"`
}

type TxStatusResult

type TxStatusResult struct {
	BlockId int64  `json:"block_id"`
	Hash    string `json:"hash"`
	Penalty int64  `json:"penalty"`
	Err     string `json:"err"`
}

Jump to

Keyboard shortcuts

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