Crate ckb_jsonrpc_types

Source
Expand description

Wrappers for JSON serialization.

Structs§

Alert
An alert is a message about critical problems to be broadcast to all nodes via the p2p network.
AlertMessage
An alert sent by RPC send_alert.
AncestorsScoreSortKey
A struct as a sorted key for tx-pool
BannedAddr
A banned P2P address.
Block
The JSON view of a Block used as a parameter in the RPC.
BlockEconomicState
Block Economic State.
BlockFilter
Block filter data and hash.
BlockIssuance
Block base rewards.
BlockTemplate
A block template for miners.
BlockView
The JSON view of a Block including header and body.
BlockWithCyclesResponse
BlockResponse with cycles format wrapper
Byte32
Fixed-length 32 bytes binary encoded as a 0x-prefixed hex string in JSON.
CellData
The cell data content and hash.
CellDep
The cell dependency of a transaction.
CellInfo
The JSON view of a cell combining the fields in cell output and cell data.
CellInput
The input cell of a transaction.
CellOutput
The fields of an output cell except the cell data.
CellWithStatus
The JSON view of a cell with its status information.
CellbaseTemplate
The cellbase transaction template of the new block for miners.
ChainInfo
Chain information.
Consensus
Consensus defines various parameters that influence chain consensus
Deployment
RFC0043 deployment params
DeploymentInfo
An object containing various state info regarding deployments of consensus changes
DeploymentsInfo
Chain information.
EntryCompleted
Transaction’s verify result by test_tx_pool_accept
EpochView
JSON view of an epoch.
EstimateCycles
Response result of the RPC method estimate_cycles.
ExtraLoggerConfig
Runtime logger config for extra loggers.
FeeRateDef
Serialize and Deserialize implementations for FeeRate
FeeRateStatistics
The fee_rate statistics information, includes mean and median, unit: shannons per kilo-weight
HardForkFeature
The information about one hardfork feature.
HardForks
Hardfork information
Header
The block header.
HeaderView
The JSON view of a Header.
IndexerCell
Live cell
IndexerCellsCapacity
Cells capacity
IndexerPagination
IndexerPagination wraps objects array and last_cursor to provide paging
IndexerRange
A array represent (half-open) range bounded inclusively below and exclusively above [start, end).
IndexerSearchKey
SearchKey represent indexer support params
IndexerSearchKeyFilter
IndexerSearchKeyFilter represent indexer params filter
IndexerTip
Indexer tip information
IndexerTxWithCell
Ungrouped Tx inner type
IndexerTxWithCells
Grouped Tx inner type
JsonBytes
Variable-length binary encoded as a 0x-prefixed hex string in JSON.
LocalNode
The information of the node itself.
LocalNodeProtocol
The information of a P2P protocol that is supported by the local node.
MainLoggerConfig
Runtime logger config.
MerkleProof
Proof of CKB Merkle Tree.
MinerReward
Block rewards for miners.
NodeAddress
Node P2P address and score.
OutPoint
Reference to a cell via transaction hash and output index.
PeerSyncState
The chain synchronization state between the local node and a remote node.
PoolTransactionEntry
The transaction entry in the pool.
PoolTxDetailInfo
A Tx details info in tx-pool.
ProposalShortId
The 10-byte fixed-length binary encoded as a 0x-prefixed hex string in JSON.
ProposalWindow
Two protocol parameters closest and farthest define the closest and farthest on-chain distance between a transaction’s proposal and commitment.
Ratio
Represents the ratio numerator / denominator, where numerator and denominator are both unsigned 64-bit integers.
RationalU256
Represents the ratio numerator / denominator, where numerator and denominator are both unsigned 256-bit integers.
RemoteNode
Information of a remote node.
RemoteNodeProtocol
The information about an active running protocol.
ResponseFormat
This is a wrapper for JSON serialization to select the format between Json and Hex.
Script
Describes the lock script and type script for a cell.
SyncState
The overall chain synchronization state of this local node.
Transaction
The transaction.
TransactionAndWitnessProof
Merkle proof for transactions’ witnesses in a block.
TransactionProof
Merkle proof for transactions in a block.
TransactionTemplate
Transaction template which is ready to be committed in the new block.
TransactionView
The JSON view of a Transaction.
TransactionWithStatusResponse
The JSON view of a transaction as well as its status.
TxPoolEntries
Tx-pool entries object
TxPoolEntry
Transaction entry info
TxPoolIds
Array of transaction ids
TxPoolInfo
Transaction pool information.
TxStatus
Transaction status and the block hash if it is committed.
UncleBlock
The uncle block used as a parameter in the RPC.
UncleBlockView
The uncle block.
UncleTemplate
The uncle block template of the new block for miners.

Enums§

BlockResponse
The wrapper represent response of get_block | get_block_by_number, return a Block with cycles.
DaoWithdrawingCalculationKind
An enum to represent the two kinds of dao withdrawal amount calculation option. DaoWithdrawingCalculationKind is equivalent to H256 | OutPoint.
DepType
The dep cell type. Allowed values: “code” and “dep_group”.
DeploymentPos
Deployment name
DeploymentState
The possible softfork deployment state
Either
The enum Either with variants Left and Right is a general purpose sum type with two cases.
EstimateMode
The fee estimate mode.
IndexerCellType
Cell type
IndexerOrder
Order Desc | Asc
IndexerScriptType
ScriptType Lock | Type
IndexerSearchMode
IndexerSearchMode represent search mode, default is prefix search
IndexerTx
Indexer Transaction Object
OutputsValidator
Transaction output validators that prevent common mistakes.
PoolTransactionReject
TX reject message, PoolTransactionReject is a JSON object with following fields.
RawTxPool
All transactions in tx-pool.
ResponseFormatInnerType
The enum ResponseFormatInnerType with variants Json and Hex is used to supply a format choice for the format of ResponseFormatResponse.transaction
ScriptHashType
Specifies how the script code_hash is used to match the script code and how to run the code.
SoftFork
SoftFork information
Status
Status for transaction
Topic
Specifies the topic which to be added as active subscription.

Traits§

AsEpochNumberWithFraction
This trait is a restriction for type Uint64, so we can only get epoch_number, epoch_index and epoch_length from the type EpochNumberWithFraction instead of all Uint64
Deserialize
A data structure that can be deserialized from any data format supported by Serde.
Serialize
A data structure that can be serialized into any data format supported by Serde.

Type Aliases§

AlertId
The alert identifier that is used to filter duplicated alerts.
AlertPriority
Alerts are sorted by priority. Greater integers mean higher priorities.
BlockNumber
Consecutive block number starting from 0.
Capacity
The capacity of a cell is the value of the cell in Shannons. It is also the upper limit of the cell occupied storage size where every 100,000,000 Shannons give 1-byte storage.
Cycle
Count of cycles consumed by CKB VM to run scripts.
EpochNumber
Consecutive epoch number starting from 0.
EpochNumberWithFraction
The epoch indicator of a block. It shows which epoch the block is in, and the elapsed epoch fraction after adding this block.
Timestamp
The Unix timestamp in milliseconds (1 second is 1000 milliseconds).
Uint32
The 32-bit unsigned integer type encoded as the 0x-prefixed hex string in JSON.
Uint64
The 64-bit unsigned integer type encoded as the 0x-prefixed hex string in JSON.
Uint128
The 128-bit unsigned integer type encoded as the 0x-prefixed hex string in JSON.
Version
The simple increasing integer version.

Derive Macros§

Deserialize
Serialize