Documentation ¶
Overview ¶
Copyright © 2019 Annchain Authors <EMAIL ADDRESS>
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright © 2019 Annchain Authors <EMAIL ADDRESS>
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright © 2019 Annchain Authors <EMAIL ADDRESS>
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright © 2019 Annchain Authors <EMAIL ADDRESS>
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright © 2019 Annchain Authors <EMAIL ADDRESS>
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright © 2019 Annchain Authors <EMAIL ADDRESS>
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright © 2019 Annchain Authors <EMAIL ADDRESS>
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright © 2019 Annchain Authors <EMAIL ADDRESS>
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- func Response(c *gin.Context, status int, err error, data interface{})
- type Monitor
- type NewAccountRequest
- type NewArchiveRequest
- type NewPublicOfferingRequest
- type NewQueryContractReq
- type NewTxRequest
- func (z *NewTxRequest) DecodeMsg(dc *msgp.Reader) (err error)
- func (z *NewTxRequest) EncodeMsg(en *msgp.Writer) (err error)
- func (z *NewTxRequest) MarshalMsg(b []byte) (o []byte, err error)
- func (z *NewTxRequest) Msgsize() (s int)
- func (z *NewTxRequest) UnmarshalMsg(bts []byte) (o []byte, err error)
- type NewTxsRequests
- func (z *NewTxsRequests) DecodeMsg(dc *msgp.Reader) (err error)
- func (z *NewTxsRequests) EncodeMsg(en *msgp.Writer) (err error)
- func (z *NewTxsRequests) MarshalMsg(b []byte) (o []byte, err error)
- func (z *NewTxsRequests) Msgsize() (s int)
- func (z *NewTxsRequests) UnmarshalMsg(bts []byte) (o []byte, err error)
- type NodeStatus
- type Peer
- type ReceiptResponse
- type RpcController
- func (r *RpcController) BftStatus(c *gin.Context)
- func (r *RpcController) BufferDependencyCache(c *gin.Context)
- func (r *RpcController) BufferKnownCache(c *gin.Context)
- func (r *RpcController) ConStatus(c *gin.Context)
- func (r *RpcController) Confirm(c *gin.Context)
- func (r *RpcController) ConfirmStatus(c *gin.Context)
- func (r *RpcController) ContractPayload(c *gin.Context)
- func (r *RpcController) Debug(c *gin.Context)
- func (r *RpcController) DebugCallerCall(setvalue string) error
- func (r *RpcController) DebugCallerCreate() error
- func (r *RpcController) DebugCreateContract() error
- func (r *RpcController) DebugCreateTxAndSendToBuffer(from, to common.Address, value *math.BigInt, data []byte, nonce uint64) error
- func (r *RpcController) DebugQueryContract() ([]byte, error)
- func (r *RpcController) DebugSetContract(n string) error
- func (r *RpcController) Genesis(c *gin.Context)
- func (r *RpcController) GetPoolHashes(c *gin.Context)
- func (r *RpcController) GetToken(c *gin.Context)
- func (r *RpcController) LatestTokenId(c *gin.Context)
- func (r *RpcController) Monitor(c *gin.Context)
- func (r *RpcController) NetInfo(c *gin.Context)
- func (r *RpcController) NetIo(c *gin.Context)
- func (r *RpcController) NewAccount(c *gin.Context)
- func (r *RpcController) NewArchive(c *gin.Context)
- func (r *RpcController) NewPublicOffering(c *gin.Context)
- func (rpc *RpcController) NewRouter() *gin.Engine
- func (r *RpcController) NewSecondOffering(c *gin.Context)
- func (r *RpcController) NewTransaction(c *gin.Context)
- func (r *RpcController) NewTransactions(c *gin.Context)
- func (r *RpcController) OgPeersInfo(c *gin.Context)
- func (r *RpcController) PeersInfo(c *gin.Context)
- func (r *RpcController) Performance(c *gin.Context)
- func (r *RpcController) Query(c *gin.Context)
- func (r *RpcController) QueryBalance(c *gin.Context)
- func (r *RpcController) QueryContract(c *gin.Context)
- func (r *RpcController) QueryNonce(c *gin.Context)
- func (r *RpcController) QueryReceipt(c *gin.Context)
- func (r *RpcController) QueryShare(c *gin.Context)
- func (r *RpcController) Sequencer(c *gin.Context)
- func (r *RpcController) Status(c *gin.Context)
- func (r *RpcController) SyncStatus(c *gin.Context)
- func (r *RpcController) TokenDestroy(c *gin.Context)
- func (r *RpcController) Tokens(c *gin.Context)
- func (r *RpcController) Tps(c *gin.Context)
- func (r *RpcController) Transaction(c *gin.Context)
- func (r *RpcController) Transactions(c *gin.Context)
- func (r *RpcController) Validator(c *gin.Context)
- type RpcServer
- type SequenceRequester
- type SyncStatus
- type Tps
- type TxRequester
Constants ¶
const ShutdownTimeoutSeconds = 5
Variables ¶
This section is empty.
Functions ¶
Types ¶
type NewAccountRequest ¶
type NewAccountRequest struct {
Algorithm string `json:"algorithm"`
}
NewAccountRequest for RPC request
type NewArchiveRequest ¶ added in v0.0.2
type NewArchiveRequest struct {
Data []byte `json:"data"`
}
NewArchiveRequest for RPC request
type NewPublicOfferingRequest ¶ added in v0.0.2
type NewPublicOfferingRequest struct { Nonce uint64 `json:"nonce"` From string `json:"from"` Value string `json:"value"` Action uint8 `json:"action"` EnableSPO bool `json:"enable_spo"` CryptoType string `json:"crypto_type"` Signature string `json:"signature"` Pubkey string `json:"pubkey"` TokenId int32 `json:"token_id"` TokenName string `json:"token_name"` }
type NewQueryContractReq ¶
type NewTxRequest ¶
type NewTxRequest struct { Nonce string `json:"nonce"` From string `json:"from"` To string `json:"to"` Value string `json:"value"` Data string `json:"data"` CryptoType string `json:"crypto_type"` Signature string `json:"signature"` Pubkey string `json:"pubkey"` TokenId int32 `json:"token_id"` }
NewTxrequest for RPC request
func (*NewTxRequest) DecodeMsg ¶ added in v0.0.2
func (z *NewTxRequest) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (*NewTxRequest) EncodeMsg ¶ added in v0.0.2
func (z *NewTxRequest) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (*NewTxRequest) MarshalMsg ¶ added in v0.0.2
func (z *NewTxRequest) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*NewTxRequest) Msgsize ¶ added in v0.0.2
func (z *NewTxRequest) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*NewTxRequest) UnmarshalMsg ¶ added in v0.0.2
func (z *NewTxRequest) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type NewTxsRequests ¶ added in v0.0.2
type NewTxsRequests struct {
Txs []NewTxRequest `json:"txs"`
}
func (*NewTxsRequests) DecodeMsg ¶ added in v0.0.2
func (z *NewTxsRequests) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (*NewTxsRequests) EncodeMsg ¶ added in v0.0.2
func (z *NewTxsRequests) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (*NewTxsRequests) MarshalMsg ¶ added in v0.0.2
func (z *NewTxsRequests) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*NewTxsRequests) Msgsize ¶ added in v0.0.2
func (z *NewTxsRequests) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*NewTxsRequests) UnmarshalMsg ¶ added in v0.0.2
func (z *NewTxsRequests) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type NodeStatus ¶
type NodeStatus struct { NodeInfo *p2p.NodeInfo `json:"node_info"` PeersInfo []*p2p.PeerInfo `json:"peers_info"` }
NodeStatus
type ReceiptResponse ¶
type RpcController ¶
type RpcController struct { P2pServer *p2p.Server Og *og.Og TxBuffer *pool.TxBuffer TxCreator *txmaker.OGTxCreator SyncerManager *syncer.SyncManager PerformanceMonitor *performance.PerformanceMonitor NewRequestChan chan archive2.TxBaseType AnnSensus *annsensus.AnnSensus FormatVerifier *verifier.TxFormatVerifier }
func (*RpcController) BftStatus ¶ added in v0.0.2
func (r *RpcController) BftStatus(c *gin.Context)
func (*RpcController) BufferDependencyCache ¶ added in v0.0.3
func (r *RpcController) BufferDependencyCache(c *gin.Context)
func (*RpcController) BufferKnownCache ¶ added in v0.0.3
func (r *RpcController) BufferKnownCache(c *gin.Context)
func (*RpcController) ConStatus ¶
func (r *RpcController) ConStatus(c *gin.Context)
func (*RpcController) Confirm ¶
func (r *RpcController) Confirm(c *gin.Context)
Confirm checks if tx has already been confirmed.
func (*RpcController) ConfirmStatus ¶ added in v0.0.2
func (r *RpcController) ConfirmStatus(c *gin.Context)
func (*RpcController) ContractPayload ¶
func (r *RpcController) ContractPayload(c *gin.Context)
func (*RpcController) Debug ¶
func (r *RpcController) Debug(c *gin.Context)
func (*RpcController) DebugCallerCall ¶
func (r *RpcController) DebugCallerCall(setvalue string) error
func (*RpcController) DebugCallerCreate ¶
func (r *RpcController) DebugCallerCreate() error
func (*RpcController) DebugCreateContract ¶
func (r *RpcController) DebugCreateContract() error
func (*RpcController) DebugCreateTxAndSendToBuffer ¶
func (*RpcController) DebugQueryContract ¶
func (r *RpcController) DebugQueryContract() ([]byte, error)
func (*RpcController) DebugSetContract ¶
func (r *RpcController) DebugSetContract(n string) error
func (*RpcController) Genesis ¶
func (r *RpcController) Genesis(c *gin.Context)
func (*RpcController) GetPoolHashes ¶ added in v0.0.2
func (r *RpcController) GetPoolHashes(c *gin.Context)
func (*RpcController) GetToken ¶ added in v0.0.2
func (r *RpcController) GetToken(c *gin.Context)
func (*RpcController) LatestTokenId ¶ added in v0.0.2
func (r *RpcController) LatestTokenId(c *gin.Context)
func (*RpcController) Monitor ¶
func (r *RpcController) Monitor(c *gin.Context)
func (*RpcController) NetInfo ¶
func (r *RpcController) NetInfo(c *gin.Context)
PeersInfo network information
func (*RpcController) NetIo ¶ added in v0.0.2
func (r *RpcController) NetIo(c *gin.Context)
func (*RpcController) NewAccount ¶
func (r *RpcController) NewAccount(c *gin.Context)
func (*RpcController) NewArchive ¶ added in v0.0.2
func (r *RpcController) NewArchive(c *gin.Context)
func (*RpcController) NewPublicOffering ¶ added in v0.0.2
func (r *RpcController) NewPublicOffering(c *gin.Context)
func (*RpcController) NewRouter ¶ added in v0.0.2
func (rpc *RpcController) NewRouter() *gin.Engine
func (*RpcController) NewSecondOffering ¶ added in v0.0.2
func (r *RpcController) NewSecondOffering(c *gin.Context)
func (*RpcController) NewTransaction ¶
func (r *RpcController) NewTransaction(c *gin.Context)
func (*RpcController) NewTransactions ¶ added in v0.0.2
func (r *RpcController) NewTransactions(c *gin.Context)
func (*RpcController) OgPeersInfo ¶
func (r *RpcController) OgPeersInfo(c *gin.Context)
func (*RpcController) PeersInfo ¶
func (r *RpcController) PeersInfo(c *gin.Context)
PeersInfo peers information
func (*RpcController) Performance ¶
func (r *RpcController) Performance(c *gin.Context)
func (*RpcController) QueryBalance ¶
func (r *RpcController) QueryBalance(c *gin.Context)
func (*RpcController) QueryContract ¶
func (r *RpcController) QueryContract(c *gin.Context)
func (*RpcController) QueryNonce ¶
func (r *RpcController) QueryNonce(c *gin.Context)
func (*RpcController) QueryReceipt ¶
func (r *RpcController) QueryReceipt(c *gin.Context)
func (*RpcController) QueryShare ¶
func (r *RpcController) QueryShare(c *gin.Context)
func (*RpcController) Sequencer ¶
func (r *RpcController) Sequencer(c *gin.Context)
func (*RpcController) SyncStatus ¶
func (r *RpcController) SyncStatus(c *gin.Context)
Status node status
func (*RpcController) TokenDestroy ¶ added in v0.0.2
func (r *RpcController) TokenDestroy(c *gin.Context)
todo optimize later
func (*RpcController) Tokens ¶ added in v0.0.2
func (r *RpcController) Tokens(c *gin.Context)
func (*RpcController) Tps ¶
func (r *RpcController) Tps(c *gin.Context)
func (*RpcController) Transaction ¶
func (r *RpcController) Transaction(c *gin.Context)
Transaction get transaction
func (*RpcController) Transactions ¶
func (r *RpcController) Transactions(c *gin.Context)
Transactions query Transactions
func (*RpcController) Validator ¶
func (r *RpcController) Validator(c *gin.Context)
type RpcServer ¶
type RpcServer struct { C *RpcController // contains filtered or unexported fields }
func NewRpcServer ¶
type SyncStatus ¶
type SyncStatus struct { Id string `json:"id"` SyncMode string `json:"syncMode"` CatchupSyncerStatus string `json:"catchupSyncerStatus"` CatchupSyncerEnabled bool `json:"catchupSyncerEnabled"` IncrementalSyncerEnabled bool `json:"incrementalSyncerEnabled"` Height uint64 `json:"height"` LatestHeight uint64 `json:"latestHeight"` BestPeer string `json:"bestPeer"` Error string `json:"error"` Txid uint32 `json:"txid"` }