Documentation ¶
Index ¶
- Constants
- type Address
- type AddressParam
- type BMCRelayMethodParams
- type BMCStatus
- type BMCStatusParams
- type Block
- type BlockHeader
- type BlockHeightParam
- type BlockNotification
- type BlockRequest
- type CallData
- type CallParam
- type CommitVoteItem
- type CommitVoteList
- type DataHashParam
- type EventFilter
- type EventLog
- type EventNotification
- type EventRequest
- type HR
- type HexBytes
- type HexInt
- type PartSetID
- type ProofEventsParam
- type ProofResultParam
- type ReceiptProof
- type RelayMessage
- type Signature
- type TransactionHashParam
- type TransactionParam
- type TransactionResult
- type VerifierOptions
- type Vote
- type VoteBase
- type VoteType
- type WSEvent
- type WSResponse
- type WsReadCallback
Constants ¶
View Source
const ( JsonrpcApiVersion = 3 JsonrpcErrorCodeSystem jsonrpc.ErrorCode = -31000 JsonrpcErrorCodeTxPoolOverflow jsonrpc.ErrorCode = -31001 JsonrpcErrorCodePending jsonrpc.ErrorCode = -31002 JsonrpcErrorCodeExecuting jsonrpc.ErrorCode = -31003 JsonrpcErrorCodeNotFound jsonrpc.ErrorCode = -31004 JsonrpcErrorLackOfResource jsonrpc.ErrorCode = -31005 JsonrpcErrorCodeTimeout jsonrpc.ErrorCode = -31006 JsonrpcErrorCodeSystemTimeout jsonrpc.ErrorCode = -31007 JsonrpcErrorCodeScore jsonrpc.ErrorCode = -30000 )
View Source
const ( DuplicateTransactionError = iota + 2000 TransactionPoolOverflowError ExpiredTransactionError FutureTransactionError TransitionInterruptedError InvalidTransactionError InvalidQueryError InvalidResultError NoActiveContractError NotContractAddressError InvalidPatchDataError CommittedTransactionError )
View Source
const ( ResultStatusSuccess = "0x1" ResultStatusFailureCodeRevert = 32 ResultStatusFailureCodeEnd = 99 )
View Source
const ( BMCRelayMethod = "handleRelayMessage" BMCGetStatusMethod = "getStatus" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddressParam ¶
type BMCRelayMethodParams ¶
type BMCStatus ¶
type BMCStatus struct { TxSeq HexInt `json:"tx_seq"` RxSeq HexInt `json:"rx_seq"` BMRIndex HexInt `json:"relay_idx"` RotateHeight HexInt `json:"rotate_height"` RotateTerm HexInt `json:"rotate_term"` DelayLimit HexInt `json:"delay_limit"` MaxAggregation HexInt `json:"max_agg"` CurrentHeight HexInt `json:"cur_height"` RxHeight HexInt `json:"rx_height"` RxHeightSrc HexInt `json:"rx_height_src"` BlockIntervalSrc HexInt `json:"block_interval_src"` BlockIntervalDst HexInt `json:"block_interval_dst"` }
type BMCStatusParams ¶
type BMCStatusParams struct {
Target string `json:"_link"`
}
type Block ¶
type Block struct { //BlockHash HexBytes `json:"block_hash" validate:"required,t_hash"` //Version HexInt `json:"version" validate:"required,t_int"` Height int64 `json:"height" validate:"required,t_int"` //Timestamp int64 `json:"time_stamp" validate:"required,t_int"` //Proposer HexBytes `json:"peer_id" validate:"optional,t_addr_eoa"` //PrevID HexBytes `json:"prev_block_hash" validate:"required,t_hash"` //NormalTransactionsHash HexBytes `json:"merkle_tree_root_hash" validate:"required,t_hash"` NormalTransactions []struct { TxHash HexBytes `json:"txHash"` //Version HexInt `json:"version"` From Address `json:"from"` To Address `json:"to"` //Value HexInt `json:"value,omitempty" ` //StepLimit HexInt `json:"stepLimit"` //TimeStamp HexInt `json:"timestamp"` //NID HexInt `json:"nid,omitempty"` //Nonce HexInt `json:"nonce,omitempty"` //Signature HexBytes `json:"signature"` DataType string `json:"dataType,omitempty"` Data json.RawMessage `json:"data,omitempty"` } `json:"confirmed_transaction_list"` }
type BlockHeader ¶
type BlockHeightParam ¶
type BlockHeightParam struct {
Height HexInt `json:"height" validate:"required,t_int"`
}
type BlockNotification ¶
type BlockRequest ¶
type BlockRequest struct { Height HexInt `json:"height"` EventFilters []*EventFilter `json:"eventFilters,omitempty"` }
type CallData ¶
type CallData struct { Method string `json:"method"` Params interface{} `json:"params,omitempty"` }
type CommitVoteItem ¶
type CommitVoteList ¶
type CommitVoteList struct { Round int32 BlockPartSetID *PartSetID Items []CommitVoteItem }
type DataHashParam ¶
type DataHashParam struct {
Hash HexBytes `json:"hash" validate:"required,t_hash"`
}
type EventFilter ¶
type EventNotification ¶
type EventRequest ¶
type EventRequest struct { EventFilter Height HexInt `json:"height"` }
type ProofEventsParam ¶
type ProofResultParam ¶
type ReceiptProof ¶
type RelayMessage ¶
type RelayMessage struct { ReceiptProofs [][]byte // contains filtered or unexported fields }
type TransactionHashParam ¶
type TransactionHashParam struct {
Hash HexBytes `json:"txHash" validate:"required,t_hash"`
}
type TransactionParam ¶
type TransactionParam struct { Version HexInt `json:"version" validate:"required,t_int"` FromAddress Address `json:"from" validate:"required,t_addr_eoa"` ToAddress Address `json:"to" validate:"required,t_addr"` Value HexInt `json:"value,omitempty" validate:"optional,t_int"` StepLimit HexInt `json:"stepLimit" validate:"required,t_int"` Timestamp HexInt `json:"timestamp" validate:"required,t_int"` NetworkID HexInt `json:"nid" validate:"required,t_int"` Nonce HexInt `json:"nonce,omitempty" validate:"optional,t_int"` Signature string `json:"signature" validate:"required,t_sig"` DataType string `json:"dataType,omitempty" validate:"optional,call|deploy|message"` Data interface{} `json:"data,omitempty"` TxHash HexBytes `json:"-"` }
type TransactionResult ¶
type TransactionResult struct { To Address `json:"to"` CumulativeStepUsed HexInt `json:"cumulativeStepUsed"` StepUsed HexInt `json:"stepUsed"` StepPrice HexInt `json:"stepPrice"` EventLogs []struct { Addr Address `json:"scoreAddress"` Indexed []string `json:"indexed"` Data []string `json:"data"` } `json:"eventLogs"` LogsBloom HexBytes `json:"logsBloom"` Status HexInt `json:"status"` Failure *struct { CodeValue HexInt `json:"code"` MessageValue string `json:"message"` } `json:"failure,omitempty"` SCOREAddress Address `json:"scoreAddress,omitempty"` BlockHash HexBytes `json:"blockHash" validate:"required,t_hash"` BlockHeight HexInt `json:"blockHeight" validate:"required,t_int"` TxIndex HexInt `json:"txIndex" validate:"required,t_int"` TxHash HexBytes `json:"txHash" validate:"required,t_int"` }
type VerifierOptions ¶
type WSResponse ¶
type WsReadCallback ¶
Click to show internal directories.
Click to hide internal directories.