Documentation ¶
Index ¶
- Constants
- Variables
- func SerializedLengthFromBytesTrusted(b []byte) (uint64, error)
- type Addition
- type BlockCountMetrics
- type BlockEvent
- type BlockRecord
- type BlockchainState
- type Bytes
- type Bytes100
- type Bytes32
- type Bytes48
- type Bytes96
- type ChallengeBlockInfo
- type ChallengeChainSubSlot
- type ClassgroupElement
- type Coin
- type CoinAddedEvent
- type CoinRecord
- type CoinSpend
- type CompressibleVDFField
- type Connection
- type CrawlerPeerCounts
- type DeclareProofOfSpace
- type EndOfSubSlotBundle
- type EventFarmerNewFarmingInfo
- type EventFarmerNewSignagePoint
- type EventFarmerProof
- type EventFarmerSubmittedPartial
- type EventHarvesterFarmingInfo
- type FarmerMissingSignagePoints
- type FinishedPoTEvent
- type Foliage
- type FoliageBlockData
- type FoliageTransactionBlock
- type FullBlock
- type G1Element
- type G2Element
- type HarvestingMode
- type InfusedChallengeChainSubSlot
- type KeyData
- type KeyDataSecrets
- type MemoTuple
- type MempoolInclusionStatus
- type MempoolMinFees
- type NFTInfo
- type NewCompactProofEvent
- type NewPeakEvent
- type NewSignagePoint
- type NodeType
- type PoolTarget
- type PrivateKey
- type ProofOfSpace
- type PublicKeyMPL
- type ReceiveBlockResult
- type RewardChainBlock
- type RewardChainSubSlot
- type SentTo
- type SerializedProgram
- type SignagePointEvent
- type SignatureMPL
- type SkippingPeakEvent
- type SpendBundle
- type SubEpochSummary
- type SubSlotProofs
- type Sync
- type TimelordChain
- type Timestamp
- type TimestampedPeerInfo
- type TransactionRecord
- type TransactionType
- type TransactionsInfo
- type Uint128
- func (u Uint128) Add(v Uint128) Uint128
- func (u Uint128) Add64(v uint64) Uint128
- func (u Uint128) AddWrap(v Uint128) Uint128
- func (u Uint128) AddWrap64(v uint64) Uint128
- func (u Uint128) And(v Uint128) Uint128
- func (u Uint128) And64(v uint64) Uint128
- func (u Uint128) Big() *big.Int
- func (u Uint128) Cmp(v Uint128) int
- func (u Uint128) Cmp64(v uint64) int
- func (u Uint128) Div(v Uint128) Uint128
- func (u Uint128) Div64(v uint64) Uint128
- func (u Uint128) Equals(v Uint128) bool
- func (u Uint128) Equals64(v uint64) bool
- func (u Uint128) FitsInUint64() bool
- func (u Uint128) IsZero() bool
- func (u Uint128) LeadingZeros() int
- func (u Uint128) Len() int
- func (u Uint128) Lsh(n uint) (s Uint128)
- func (u Uint128) MarshalJSON() ([]byte, error)
- func (u Uint128) MarshalYAML() (interface{}, error)
- func (u Uint128) Mod(v Uint128) (r Uint128)
- func (u Uint128) Mod64(v uint64) (r uint64)
- func (u Uint128) Mul(v Uint128) Uint128
- func (u Uint128) Mul64(v uint64) Uint128
- func (u Uint128) MulWrap(v Uint128) Uint128
- func (u Uint128) MulWrap64(v uint64) Uint128
- func (u Uint128) OnesCount() int
- func (u Uint128) Or(v Uint128) Uint128
- func (u Uint128) Or64(v uint64) Uint128
- func (u Uint128) PutBytes(b []byte)
- func (u Uint128) QuoRem(v Uint128) (q, r Uint128)
- func (u Uint128) QuoRem64(v uint64) (q Uint128, r uint64)
- func (u Uint128) Reverse() Uint128
- func (u Uint128) ReverseBytes() Uint128
- func (u Uint128) RotateLeft(k int) Uint128
- func (u Uint128) RotateRight(k int) Uint128
- func (u Uint128) Rsh(n uint) (s Uint128)
- func (u Uint128) String() string
- func (u Uint128) Sub(v Uint128) Uint128
- func (u Uint128) Sub64(v uint64) Uint128
- func (u Uint128) SubWrap(v Uint128) Uint128
- func (u Uint128) SubWrap64(v uint64) Uint128
- func (u Uint128) TrailingZeros() int
- func (u Uint128) Uint64() uint64
- func (u *Uint128) UnmarshalJSON(data []byte) error
- func (u *Uint128) UnmarshalYAML(unmarshal func(interface{}) error) error
- func (u Uint128) Xor(v Uint128) Uint128
- func (u Uint128) Xor64(v uint64) Uint128
- type VDFInfo
- type VDFProof
- type WalletBalance
- type WalletInfo
- type WalletType
- type WebsocketBlockchainState
- type WebsocketRequest
- type WebsocketResponse
- type WebsocketSubscription
Constants ¶
const ( // HarvestingModeCPU Using CPU to harvest HarvestingModeCPU = HarvestingMode(1) // HarvestingModeGPU Using CPU to harvest HarvestingModeGPU = HarvestingMode(2) )
const ( // WalletTypeStandard Standard Wallet WalletTypeStandard = WalletType(0) // WalletTypeRateLimited Deprecated: Rate Limited Wallet WalletTypeRateLimited = WalletType(1) // WalletTypeAtomicSwap Atomic Swap WalletTypeAtomicSwap = WalletType(2) // WalletTypeAuthorizedPayee Authorized Payee WalletTypeAuthorizedPayee = WalletType(3) // WalletTypeMultiSig Multi Sig WalletTypeMultiSig = WalletType(4) // WalletTypeCustody Custody WalletTypeCustody = WalletType(5) // WalletTypeCAT CAT Wallet WalletTypeCAT = WalletType(6) // WalletTypeRecoverable Recoverable Wallet WalletTypeRecoverable = WalletType(7) // WalletTypeDID DECENTRALIZED_ID Wallet WalletTypeDID = WalletType(8) // WalletTypePooling Pooling Wallet WalletTypePooling = WalletType(9) // WalletTypeNFT NFT Wallet WalletTypeNFT = WalletType(10) // WalletTypeDataLayer Data Layer Wallet WalletTypeDataLayer = WalletType(11) // WalletTypeDataLayerOffer Data Layer Offer wallet WalletTypeDataLayerOffer = WalletType(12) )
const BackReference byte = 0xfe
BackReference back referencee marker
const ConsBoxMarker byte = 0xff
ConsBoxMarker cons box marker
const MaxSingleByte byte = 0x7f
MaxSingleByte Max single byte
Variables ¶
var Uint128Max = NewUint128(math.MaxUint64, math.MaxUint64)
Uint128Max is the largest possible uint128 value.
Functions ¶
func SerializedLengthFromBytesTrusted ¶ added in v0.8.0
SerializedLengthFromBytesTrusted returns the length
Types ¶
type Addition ¶ added in v0.0.20
type Addition struct { Amount uint64 `json:"amount"` PuzzleHash Bytes32 `json:"puzzle_hash"` Memos []string `json:"memos,omitempty"` }
Addition an addition for a spend There isn't really good documentation for what is expected here, other than inspecting the transaction RPCs Amounts are known to be uint64 PuzzleHash is known to be Bytes32 Memos is a list of strings only in the RPCs, that is converted to bytes in chia. Can't send raw bytes Memos Ref: https://github.com/Chia-Network/chia-blockchain/blob/main/chia/rpc/wallet_rpc_api.py#L2358
type BlockCountMetrics ¶
type BlockCountMetrics struct { CompactBlocks uint64 `json:"compact_blocks"` UncompactBlocks uint64 `json:"uncompact_blocks"` HintCount uint64 `json:"hint_count"` }
BlockCountMetrics metrics from get_block_count_metrics endpoint https://github.com/Chia-Network/chia-blockchain/blob/0befdec071f49708e26c7638656874492c52600a/chia/rpc/full_node_rpc_api.py#L382 Types are `int` in python, which is apparently unlimited in python3. Using uint64 as the largest native int in go
type BlockEvent ¶
type BlockEvent struct { TransactionBlock bool `json:"transaction_block"` KSize uint8 `json:"k_size"` HeaderHash Bytes32 `json:"header_hash"` ForkHeight mo.Option[uint32] `json:"fork_height"` RolledBackRecords mo.Option[uint64] `json:"rolled_back_records"` Height uint32 `json:"height"` ValidationTime float64 `json:"validation_time"` PreValidationTime float64 `json:"pre_validation_time"` BlockCost mo.Option[uint64] `json:"block_cost,omitempty"` BlockFees mo.Option[uint64] `json:"block_fees,omitempty"` Timestamp mo.Option[Timestamp] `json:"timestamp"` TransactionGeneratorSizeBytes mo.Option[uint64] `json:"transaction_generator_size_bytes,omitempty"` TransactionGeneratorRefList []uint32 `json:"transaction_generator_ref_list"` ReceiveBlockResult mo.Option[ReceiveBlockResult] `json:"receive_block_result,omitempty"` }
BlockEvent data from block websocket event https://github.com/Chia-Network/chia-blockchain/blob/0befdec071f49708e26c7638656874492c52600a/chia/full_node/full_node.py#L1784
type BlockRecord ¶
type BlockRecord struct { HeaderHash Bytes32 `json:"header_hash"` PrevHash Bytes32 `json:"prev_hash"` Height uint32 `json:"height"` Weight Uint128 `json:"weight"` TotalIters Uint128 `json:"total_iters"` SignagePointIndex uint8 `json:"signage_point_index"` ChallengeVDFOutput ClassgroupElement `json:"challenge_vdf_output"` InfusedChallengeVDFOutput mo.Option[ClassgroupElement] `json:"infused_challenge_vdf_output"` RewardInfusionNewChallenge Bytes32 `json:"reward_infusion_new_challenge"` ChallengeBlockInfoHash Bytes32 `json:"challenge_block_info_hash"` SubSlotIters uint64 `json:"sub_slot_iters"` PoolPuzzleHash Bytes32 `json:"pool_puzzle_hash"` FarmerPuzzleHash Bytes32 `json:"farmer_puzzle_hash"` RequiredIters uint64 `json:"required_iters"` Deficit uint8 `json:"deficit"` Overflow bool `json:"overflow"` PrevTransactionBlockHeight uint32 `json:"prev_transaction_block_height"` // Transaction Block - Present if is_transaction_block Timestamp mo.Option[Timestamp] `json:"timestamp"` PrevTransactionBlockHash mo.Option[Bytes32] `json:"prev_transaction_block_hash"` Fees mo.Option[uint64] `json:"fees"` RewardClaimsIncorporated mo.Option[[]Coin] `json:"reward_claims_incorporated"` // Slot - present if this is the first SB in sub slot FinishedChallengeSlotHashes mo.Option[[]Bytes32] `json:"finished_challenge_slot_hashes"` FinishedInfusedChallengeSlotHashes mo.Option[[]Bytes32] `json:"finished_infused_challenge_slot_hashes"` FinishedRewardSlotHashes mo.Option[[]Bytes32] `json:"finished_reward_slot_hashes"` // Sub-epoch - present if this is the first SB after sub-epoch SubEpochSummaryIncluded mo.Option[SubEpochSummary] `json:"sub_epoch_summary_included"` }
BlockRecord a single block record https://github.com/Chia-Network/chia-blockchain/blob/main/chia/consensus/block_record.py#L18 @TODO Streamable
type BlockchainState ¶
type BlockchainState struct { Difficulty uint64 `json:"difficulty"` GenesisChallengeInitialized bool `json:"genesis_challenge_initialized"` MempoolSize uint64 `json:"mempool_size"` MempoolCost uint64 `json:"mempool_cost"` MempoolMinFees MempoolMinFees `json:"mempool_min_fees"` MempoolMaxTotalCost uint64 `json:"mempool_max_total_cost"` Peak mo.Option[BlockRecord] `json:"peak"` Space Uint128 `json:"space"` SubSlotIters uint64 `json:"sub_slot_iters"` Sync Sync `json:"sync"` BlockMaxCost uint64 `json:"block_max_cost"` }
BlockchainState blockchain state https://github.com/Chia-Network/chia-blockchain/blob/main/chia/rpc/full_node_rpc_api.py#L123
type Bytes ¶ added in v0.1.0
type Bytes []byte
Bytes is a wrapper around []byte that marshals down to hex and more closely matches types in chia-blockchain
func Bytes100ToBytes ¶ added in v0.1.0
Bytes100ToBytes returns []byte from [100]byte
func Bytes32ToBytes ¶ added in v0.0.13
Bytes32ToBytes returns []byte from [32]byte
func Bytes48ToBytes ¶ added in v0.1.0
Bytes48ToBytes returns []byte from [48]byte
func Bytes96ToBytes ¶ added in v0.1.0
Bytes96ToBytes returns []byte from [96]byte
func BytesFromHexString ¶ added in v0.1.1
BytesFromHexString parses a hex string into Bytes
func (Bytes) MarshalJSON ¶ added in v0.1.0
MarshalJSON marshals Bytes into hex for json
func (*Bytes) UnmarshalJSON ¶ added in v0.1.0
UnmarshalJSON unmarshals hex into []byte
type Bytes100 ¶ added in v0.1.0
type Bytes100 [100]byte
Bytes100 Helper type with custom json handling for [100]byte
func BytesToBytes100 ¶ added in v0.1.0
BytesToBytes100 Returns Bytes100 from Bytes If input is shorter than 100 bytes, the end will be padded If the input is longer than 100 bytes, an error will be returned
func (Bytes100) MarshalJSON ¶ added in v0.1.0
MarshalJSON marshals Bytes into hex for json
func (*Bytes100) UnmarshalJSON ¶ added in v0.1.0
UnmarshalJSON unmarshals hex into []byte
type Bytes32 ¶ added in v0.1.0
type Bytes32 [32]byte
Bytes32 Helper type with custom json handling for [32]byte
func Bytes32FromHexString ¶ added in v0.1.1
Bytes32FromHexString parses a hex string into Bytes32
func BytesToBytes32 ¶ added in v0.0.13
BytesToBytes32 Returns Bytes32 from Bytes If input is shorter than 32 bytes, the end will be padded If the input is longer than 32 bytes, an error will be returned
func (Bytes32) MarshalJSON ¶ added in v0.1.0
MarshalJSON marshals Bytes into hex for json
func (*Bytes32) UnmarshalJSON ¶ added in v0.1.0
UnmarshalJSON unmarshals hex into []byte
type Bytes48 ¶ added in v0.1.0
type Bytes48 [48]byte
Bytes48 Helper type with custom json handling for [48]byte
func BytesToBytes48 ¶ added in v0.1.0
BytesToBytes48 Returns Bytes48 from Bytes If input is shorter than 48 bytes, the end will be padded If the input is longer than 48 bytes, an error will be returned
func (Bytes48) MarshalJSON ¶ added in v0.1.0
MarshalJSON marshals Bytes into hex for json
func (*Bytes48) UnmarshalJSON ¶ added in v0.1.0
UnmarshalJSON unmarshals hex into []byte
type Bytes96 ¶ added in v0.1.0
type Bytes96 [96]byte
Bytes96 Helper type with custom json handling for [96]byte
func BytesToBytes96 ¶ added in v0.1.0
BytesToBytes96 Returns Bytes96 from Bytes If input is shorter than 96 bytes, the end will be padded If the input is longer than 96 bytes, an error will be returned
func (Bytes96) MarshalJSON ¶ added in v0.1.0
MarshalJSON marshals Bytes into hex for json
func (*Bytes96) UnmarshalJSON ¶ added in v0.1.0
UnmarshalJSON unmarshals hex into []byte
type ChallengeBlockInfo ¶ added in v0.8.0
type ChallengeBlockInfo struct { ProofOfSpace ProofOfSpace `json:"proof_of_space" streamable:""` ChallengeChainSPVDF mo.Option[VDFInfo] `json:"challenge_chain_sp_vdf" streamable:""` ChallengeChainSPSignature G2Element `json:"challenge_chain_sp_signature" streamable:""` ChallengeChainIPVDF VDFInfo `json:"challenge_chain_ip_vdf" streamable:""` }
ChallengeBlockInfo is a type of challenge_block_info
type ChallengeChainSubSlot ¶ added in v0.8.0
type ChallengeChainSubSlot struct { ChallengeChainEndOfSlotVDF VDFInfo `json:"challenge_chain_end_of_slot_vdf" streamable:""` InfusedChallengeChainSubSlotHash mo.Option[Bytes32] `json:"infused_challenge_chain_sub_slot_hash" streamable:""` SubepochSummaryHash mo.Option[Bytes32] `json:"subepoch_summary_hash" streamable:""` NewSubSlotIters mo.Option[uint64] `json:"new_sub_slot_iters" streamable:""` NewDifficulty mo.Option[uint64] `json:"new_difficulty" streamable:""` }
ChallengeChainSubSlot is a type of challenge_chain_sub_slot
type ClassgroupElement ¶
type ClassgroupElement struct {
Data Bytes100 `json:"data" streamable:""`
}
ClassgroupElement Classgroup Element https://github.com/Chia-Network/chia_rs/blob/main/crates/chia-protocol/src/classgroup.rs#L8
type Coin ¶
type Coin struct { ParentCoinInfo Bytes32 `json:"parent_coin_info" streamable:""` PuzzleHash Bytes32 `json:"puzzle_hash" streamable:""` Amount uint64 `json:"amount" streamable:""` }
Coin is a coin https://github.com/Chia-Network/chia_rs/blob/69908769e7df0ff2c10569aea9992cfecf3eb23a/wheel/src/coin.rs#L16
type CoinAddedEvent ¶
type CoinAddedEvent struct { Success bool `json:"success"` State string `json:"state"` WalletID uint32 `json:"wallet_id"` }
CoinAddedEvent data from coin-added websocket event https://github.com/Chia-Network/chia-blockchain/blob/main/chia/wallet/wallet_node.py#L1250
type CoinRecord ¶ added in v0.0.19
type CoinRecord struct { Coin Coin `json:"coin"` ConfirmedBlockIndex uint32 `json:"confirmed_block_index"` SpentBlockIndex uint32 `json:"spent_block_index"` Coinbase bool `json:"coinbase"` Timestamp Timestamp `json:"timestamp"` }
CoinRecord type https://github.com/Chia-Network/chia-blockchain/blob/main/chia/types/coin_record.py#L15 @TODO Streamable
func (*CoinRecord) Spent ¶ added in v0.2.2
func (cr *CoinRecord) Spent() bool
Spent returns whether this coin has been spent See https://github.com/Chia-Network/chia-blockchain/blob/main/chia/types/coin_record.py#L28
type CoinSpend ¶ added in v0.0.18
type CoinSpend struct { Coin Coin `json:"coin"` PuzzleReveal SerializedProgram `json:"puzzle_reveal"` Solution SerializedProgram `json:"solution"` }
CoinSpend spend to a coin https://github.com/Chia-Network/chia-blockchain/blob/main/chia/types/coin_spend.py#L11 @TODO Streamable
type CompressibleVDFField ¶
type CompressibleVDFField uint8
CompressibleVDFField Stores, for a given VDF, the field that uses it. https://github.com/Chia-Network/chia-blockchain/blob/main/chia/types/blockchain_format/vdf.py#L94
const ( // CompressibleVDFFieldCCEOSVDF CC_EOS_VDF CompressibleVDFFieldCCEOSVDF CompressibleVDFField = 1 // CompressibleVDFFieldICCEOSVDF ICC_EOS_VDF CompressibleVDFFieldICCEOSVDF CompressibleVDFField = 2 // CompressibleVDFFieldCCSPVDF CC_SP_VDF CompressibleVDFFieldCCSPVDF CompressibleVDFField = 3 // CompressibleVDFFieldCCIPVDF CC_IP_VDF CompressibleVDFFieldCCIPVDF CompressibleVDFField = 4 )
type Connection ¶
type Connection struct { Type NodeType `json:"type"` LocalPort uint16 `json:"local_port"` PeerHost string `json:"peer_host"` // Can be hostname as well as IP PeerPort uint16 `json:"peer_port"` PeerServerPort uint16 `json:"peer_server_port"` NodeID Bytes32 `json:"node_id"` CreationTime Timestamp `json:"creation_time"` BytesRead uint64 `json:"bytes_read"` BytesWritten uint64 `json:"bytes_written"` LastMessageTime Timestamp `json:"last_message_time"` // Full Node PeakHash mo.Option[Bytes32] `json:"peak_hash"` PeakHeight mo.Option[uint32] `json:"peak_height"` PeakWeight mo.Option[Uint128] `json:"peak_weight"` }
Connection represents a single peer or internal connection https://github.com/Chia-Network/chia-blockchain/blob/main/chia/rpc/rpc_server.py#L119
type CrawlerPeerCounts ¶
type CrawlerPeerCounts struct { TotalLast5Days uint `json:"total_last_5_days"` ReliableNodes uint `json:"reliable_nodes"` IPV4Last5Days uint `json:"ipv4_last_5_days"` IPV6Last5Days uint `json:"ipv6_last_5_days"` Versions map[string]int `json:"versions"` }
CrawlerPeerCounts peer_count data from the crawler https://github.com/Chia-Network/chia-blockchain/blob/main/chia/rpc/crawler_rpc_api.py#L47
type DeclareProofOfSpace ¶ added in v0.0.5
type DeclareProofOfSpace struct { ChallengeHash Bytes32 `json:"challenge_hash"` ChallengeChainSP Bytes32 `json:"challenge_chain_sp"` SignagePointIndex uint8 `json:"signage_point_index"` RewardChainSP Bytes32 `json:"reward_chain_sp"` ProofOfSpace ProofOfSpace `json:"proof_of_space"` ChallengeChainSPSignature G2Element `json:"challenge_chain_sp_signature"` RewardChainSPSignature G2Element `json:"reward_chain_sp_signature"` FarmerPuzzleHash Bytes32 `json:"farmer_puzzle_hash"` PoolTarget mo.Option[PoolTarget] `json:"pool_target,omitempty"` PoolSignature mo.Option[G2Element] `json:"pool_signature,omitempty"` }
DeclareProofOfSpace matches to the farmer protocol type https://github.com/Chia-Network/chia-blockchain/blob/main/chia/protocols/farmer_protocol.py#L33 @TODO Streamable
type EndOfSubSlotBundle ¶
type EndOfSubSlotBundle struct { ChallengeChain ChallengeChainSubSlot `json:"challenge_chain" streamable:""` InfusedChallengeChain mo.Option[InfusedChallengeChainSubSlot] `json:"infused_challenge_chain" streamable:""` RewardChain RewardChainSubSlot `json:"reward_chain" streamable:""` Proofs SubSlotProofs `json:"proofs" streamable:""` }
EndOfSubSlotBundle end of subslot bundle https://github.com/Chia-Network/chia_rs/blob/main/crates/chia-protocol/src/end_of_sub_slot_bundle.rs#L9
type EventFarmerNewFarmingInfo ¶ added in v0.5.0
type EventFarmerNewFarmingInfo struct { FarmingInfo struct { ChallengeHash Bytes32 `json:"challenge_hash"` SignagePoint Bytes32 `json:"signage_point"` PassedFilter uint32 `json:"passed_filter"` Proofs uint32 `json:"proofs"` TotalPlots uint32 `json:"total_plots"` Timestamp Timestamp `json:"timestamp"` NodeID Bytes32 `json:"node_id"` LookupTime uint64 `json:"lookup_time"` } `json:"farming_info"` }
EventFarmerNewFarmingInfo is the event data for `new_farming_info` from the farmer https://github.com/Chia-Network/chia-blockchain/blob/main/chia/farmer/farmer_api.py#L535
type EventFarmerNewSignagePoint ¶ added in v0.5.0
type EventFarmerNewSignagePoint struct { SPHash Bytes32 `json:"sp_hash"` MissingSignagePoints mo.Option[tuple.Tuple[FarmerMissingSignagePoints]] }
EventFarmerNewSignagePoint is the event data for `new_signage_point` in the farmer service
type EventFarmerProof ¶ added in v0.0.5
type EventFarmerProof struct { Proof DeclareProofOfSpace `json:"proof"` PassedFilter bool `json:"passed_filter"` }
EventFarmerProof is the farmer event `proof` https://github.com/Chia-Network/chia-blockchain/blob/main/chia/farmer/farmer_api.py#L367
type EventFarmerSubmittedPartial ¶ added in v0.0.5
type EventFarmerSubmittedPartial struct { LauncherID Bytes32 `json:"launcher_id"` PoolURL string `json:"pool_url"` CurrentDifficulty uint64 `json:"current_difficulty"` // https://github.com/Chia-Network/chia-blockchain/blob/main/chia/protocols/pool_protocol.py#L97 PointsAcknowledgedSinceStart uint64 `json:"points_acknowledged_since_start"` }
EventFarmerSubmittedPartial is the event data for `submitted_partial` from the farmer https://github.com/Chia-Network/chia-blockchain/blob/main/chia/farmer/farmer_api.py#L270
type EventHarvesterFarmingInfo ¶ added in v0.0.5
type EventHarvesterFarmingInfo struct { ChallengeHash Bytes32 `json:"challenge_hash"` TotalPlots uint64 `json:"total_plots"` FoundProofs uint64 `json:"found_proofs"` EligiblePlots uint64 `json:"eligible_plots"` Time float64 `json:"time"` }
EventHarvesterFarmingInfo is the event data for `farming_info` from the harvester https://github.com/Chia-Network/chia-blockchain/blob/main/chia/harvester/harvester_api.py#L232
type FarmerMissingSignagePoints ¶ added in v0.5.0
type FarmerMissingSignagePoints struct { Timestamp Timestamp // uint64 in the Python Tuple Count uint32 }
FarmerMissingSignagePoints is the struct representation of the missing signage points tuple
type FinishedPoTEvent ¶
type FinishedPoTEvent struct { Success bool `json:"success"` EstimatedIPS float64 `json:"estimated_ips"` IterationsNeeded uint64 `json:"iterations_needed"` Chain TimelordChain `json:"chain"` VDFInfo VDFInfo `json:"vdf_info"` VDFProof VDFProof `json:"vdf_proof"` }
FinishedPoTEvent data every time a PoT Challenge is completed https://github.com/Chia-Network/chia-blockchain/blob/main/chia/timelord/timelord.py#L1050
type Foliage ¶
type Foliage struct { PrevBlockHash Bytes32 `json:"prev_block_hash" streamable:""` RewardBlockHash Bytes32 `json:"reward_block_hash" streamable:""` FoliageBlockData FoliageBlockData `json:"foliage_block_data" streamable:""` FoliageBlockDataSignature G2Element `json:"foliage_block_data_signature" streamable:""` FoliageTransactionBlockHash mo.Option[Bytes32] `json:"foliage_transaction_block_hash" streamable:""` FoliageTransactionBlockSignature mo.Option[G2Element] `json:"foliage_transaction_block_signature" streamable:""` }
Foliage Foliage https://github.com/Chia-Network/chia_rs/blob/main/crates/chia-protocol/src/foliage.rs#L41
type FoliageBlockData ¶
type FoliageBlockData struct { UnfinishedRewardBlockHash Bytes32 `json:"unfinished_reward_block_hash" streamable:""` PoolTarget PoolTarget `json:"pool_target" streamable:""` PoolSignature mo.Option[G2Element] `json:"pool_signature" streamable:""` FarmerRewardPuzzleHash Bytes32 `json:"farmer_reward_puzzle_hash" streamable:""` ExtensionData Bytes32 `json:"extension_data" streamable:""` }
FoliageBlockData FoliageBlockData https://github.com/Chia-Network/chia_rs/blob/main/crates/chia-protocol/src/foliage.rs#L31
type FoliageTransactionBlock ¶
type FoliageTransactionBlock struct { PrevTransactionBlockHash Bytes32 `json:"prev_transaction_block_hash" streamable:""` Timestamp Timestamp `json:"timestamp" streamable:"Timestamp"` FilterHash Bytes32 `json:"filter_hash" streamable:""` AdditionsRoot Bytes32 `json:"additions_root" streamable:""` RemovalsRoot Bytes32 `json:"removals_root" streamable:""` TransactionsInfoHash Bytes32 `json:"transactions_info_hash" streamable:""` }
FoliageTransactionBlock foliage transaction block https://github.com/Chia-Network/chia_rs/blob/main/crates/chia-protocol/src/foliage.rs#L20
type FullBlock ¶
type FullBlock struct { FinishedSubSlots []EndOfSubSlotBundle `json:"finished_sub_slots" streamable:""` RewardChainBlock RewardChainBlock `json:"reward_chain_block" streamable:""` ChallengeChainSPProof mo.Option[VDFProof] `json:"challenge_chain_sp_proof" streamable:""` ChallengeChainIPProof VDFProof `json:"challenge_chain_ip_proof" streamable:""` RewardChainSPProof mo.Option[VDFProof] `json:"reward_chain_sp_proof" streamable:""` RewardChainIPProof VDFProof `json:"reward_chain_ip_proof" streamable:""` InfusedChallengeChainIPProof mo.Option[VDFProof] `json:"infused_challenge_chain_ip_proof" streamable:""` Foliage Foliage `json:"foliage" streamable:""` FoliageTransactionBlock mo.Option[FoliageTransactionBlock] `json:"foliage_transaction_block" streamable:""` TransactionsInfo mo.Option[TransactionsInfo] `json:"transactions_info" streamable:""` TransactionsGenerator mo.Option[SerializedProgram] `json:"transactions_generator" streamable:"SerializedProgram"` TransactionsGeneratorRefList []uint32 `json:"transactions_generator_ref_list" streamable:""` }
FullBlock a full block https://github.com/Chia-Network/chia_rs/blob/main/crates/chia-protocol/src/fullblock.rs#L13
type G1Element ¶
type G1Element PublicKeyMPL
G1Element is a public key
func (G1Element) MarshalJSON ¶ added in v0.1.0
MarshalJSON custom hex marshaller
func (*G1Element) UnmarshalJSON ¶ added in v0.1.0
UnmarshalJSON custom hex unmarshaller
type G2Element ¶
type G2Element SignatureMPL
G2Element is a signature
func (G2Element) MarshalJSON ¶ added in v0.1.0
MarshalJSON custom hex marshaller
func (*G2Element) UnmarshalJSON ¶ added in v0.1.0
UnmarshalJSON custom hex unmarshaller
type HarvestingMode ¶ added in v0.5.0
type HarvestingMode int
HarvestingMode is the mode the harvester is using to harvest CPU or GPU
type InfusedChallengeChainSubSlot ¶ added in v0.8.0
type InfusedChallengeChainSubSlot struct {
InfusedChallengeChainEndOfSlotVDF VDFInfo `json:"infused_challenge_chain_end_of_slot_vdf" streamable:""`
}
InfusedChallengeChainSubSlot is a type of infused_challenge_chain_sub_slot
type KeyData ¶ added in v0.7.1
type KeyData struct { Fingerprint uint32 `json:"fingerprint" streamable:""` PublicKey G1Element `json:"public_key" streamable:""` Label mo.Option[string] `json:"label" streamable:""` Secrets mo.Option[KeyDataSecrets] `json:"secrets" streamable:""` }
KeyData is the KeyData type from chia-blockchain
type KeyDataSecrets ¶ added in v0.7.1
type KeyDataSecrets struct { Mnemonic []string `json:"mnemonic" streamable:""` Entropy []byte `json:"entropy" streamable:""` PrivateKey PrivateKey `json:"PrivateKey" streamable:""` }
KeyDataSecrets contains the secret portion of key data
type MemoTuple ¶ added in v0.1.1
MemoTuple corresponds to the fields in the memo tuple for TransactionRecord
type MempoolInclusionStatus ¶
type MempoolInclusionStatus uint8
MempoolInclusionStatus status of being included in the mempool https://github.com/Chia-Network/chia-blockchain/blob/main/chia/types/mempool_inclusion_status.py#L6
const ( // MempoolInclusionStatusSuccess Successfully added to mempool MempoolInclusionStatusSuccess MempoolInclusionStatus = 1 // MempoolInclusionStatusPending Pending being added to the mempool MempoolInclusionStatusPending MempoolInclusionStatus = 2 // MempoolInclusionStatusFailed Failed being added to the mempool MempoolInclusionStatusFailed MempoolInclusionStatus = 3 )
type MempoolMinFees ¶
type MempoolMinFees struct {
Cost5m float64 `json:"cost_5000000"`
}
MempoolMinFees minimum fees to get in the mempool at varying costs
type NFTInfo ¶ added in v0.1.1
type NFTInfo struct { LauncherID Bytes32 `json:"launcher_id"` NftCoinID Bytes32 `json:"nft_coin_id"` OwnerDid mo.Option[Bytes32] `json:"owner_did"` RoyaltyPercentage mo.Option[uint16] `json:"royalty_percentage"` RoyaltyPuzzleHash mo.Option[Bytes32] `json:"royalty_puzzle_hash"` DataUris []string `json:"data_uris"` DataHash Bytes `json:"data_hash"` MetadataURIs []string `json:"metadata_uris"` MetadataHash Bytes `json:"metadata_hash"` LicenseURIs []string `json:"license_uris"` LicenseHash Bytes `json:"license_hash"` EditionTotal uint64 `json:"edition_total"` EditionNumber uint64 `json:"edition_number"` UpdaterPuzhash Bytes32 `json:"updater_puzhash"` ChainInfo string `json:"chain_info"` MintHeight uint32 `json:"mint_height"` SupportsDid bool `json:"supports_did"` P2Address Bytes32 `json:"p2_address"` PendingTransaction bool `json:"pending_transaction"` MinterDid mo.Option[Bytes32] `json:"minter_did"` LauncherPuzhash Bytes32 `json:"launcher_puzhash"` OffChainMetadata mo.Option[string] `json:"off_chain_metadata"` }
NFTInfo is an NFT https://github.com/Chia-Network/chia-blockchain/blob/main/chia/wallet/nft_wallet/nft_info.py#L21 @TODO Streamable
type NewCompactProofEvent ¶
type NewCompactProofEvent struct { Success bool `json:"success"` HeaderHash Bytes32 `json:"header_hash"` Height uint32 `json:"height"` FieldVdf CompressibleVDFField `json:"field_vdf"` }
NewCompactProofEvent is an event from the timelord every time a new compact proof is generated https://github.com/Chia-Network/chia-blockchain/blob/main/chia/timelord/timelord.py#L1074
type NewPeakEvent ¶
NewPeakEvent data that is sent when a timelord skips a peak because it was fastest/already had the peak https://github.com/Chia-Network/chia-blockchain/blob/main/chia/timelord/timelord_api.py#L49
type NewSignagePoint ¶
type NewSignagePoint struct { ChallengeHash Bytes32 `json:"challenge_hash"` ChallengeChainHash Bytes32 `json:"challenge_chain_hash"` RewardChainSP Bytes32 `json:"reward_chain_sp"` Difficulty uint64 `json:"difficulty"` SubSlotIters uint64 `json:"sub_slot_iters"` SignagePointIndex uint8 `json:"signage_point_index"` }
NewSignagePoint is the event broadcast to farmers for a new signage point https://github.com/Chia-Network/chia-blockchain/blob/main/chia/protocols/farmer_protocol.py#L22 @TODO Streamable
type NodeType ¶
type NodeType uint8
NodeType is the type of peer (farmer, full node, etc) https://github.com/Chia-Network/chia-blockchain/blob/main/chia/server/outbound_message.py#L12
const ( // NodeTypeFullNode NodeType for full node NodeTypeFullNode NodeType = 1 // NodeTypeHarvester NodeType for Harvester NodeTypeHarvester NodeType = 2 // NodeTypeFarmer NodeType for Farmer NodeTypeFarmer NodeType = 3 // NodeTypeTimelord NodeType for Timelord NodeTypeTimelord NodeType = 4 // NodeTypeIntroducer NodeType for Introducer NodeTypeIntroducer NodeType = 5 // NodeTypeWallet NodeType for Wallet NodeTypeWallet NodeType = 6 // NodeTypeDataLayer Data Layer Node NodeTypeDataLayer NodeType = 7 )
type PoolTarget ¶
type PoolTarget struct { PuzzleHash Bytes32 `json:"puzzle_hash" streamable:""` MaxHeight uint32 `json:"max_height" streamable:""` }
PoolTarget PoolTarget https://github.com/Chia-Network/chia_rs/blob/main/crates/chia-protocol/src/pool_target.rs#L6
type PrivateKey ¶ added in v0.7.1
type PrivateKey struct { }
PrivateKey is a chia_rs type that represents a private key
type ProofOfSpace ¶
type ProofOfSpace struct { Challenge Bytes32 `json:"challenge" streamable:""` PoolPublicKey mo.Option[G1Element] `json:"pool_public_key" streamable:""` // Only one of these two should be present PoolContractPuzzleHash mo.Option[Bytes32] `json:"pool_contract_puzzle_hash" streamable:""` PlotPublicKey G1Element `json:"plot_public_key" streamable:""` Size uint8 `json:"size" streamable:""` Proof Bytes `json:"proof" streamable:""` }
ProofOfSpace Proof of Space https://github.com/Chia-Network/chia_rs/blob/main/crates/chia-protocol/src/proof_of_space.rs#L6
type ReceiveBlockResult ¶
type ReceiveBlockResult uint8
ReceiveBlockResult When Blockchain.receive_block(b) is called, one of these results is returned, showing whether the block was added to the chain (extending the peak), and if not, why it was not added. These values match values in chia blockchain. Must not be arbitrarily changed https://github.com/Chia-Network/chia-blockchain/blob/0befdec071f49708e26c7638656874492c52600a/chia/consensus/blockchain.py#L57
const ( // ReceiveBlockResultNewPeak Added to the peak of the blockchain ReceiveBlockResultNewPeak ReceiveBlockResult = 1 // ReceiveBlockResultOrphan Added as an orphan/stale block (not a new peak of the chain) ReceiveBlockResultOrphan ReceiveBlockResult = 2 // ReceiveBlockResultInvalidBlock Block was not added because it was invalid ReceiveBlockResultInvalidBlock ReceiveBlockResult = 3 // ReceiveBlockResultAlreadyHaveBlock Block is already present in this blockchain ReceiveBlockResultAlreadyHaveBlock ReceiveBlockResult = 4 // ReceiveBlockResultDisconnectedBlock Block's parent (previous pointer) is not in this blockchain ReceiveBlockResultDisconnectedBlock ReceiveBlockResult = 5 )
type RewardChainBlock ¶
type RewardChainBlock struct { Weight Uint128 `json:"weight" streamable:""` Height uint32 `json:"height" streamable:""` TotalIters Uint128 `json:"total_iters" streamable:""` SignagePointIndex uint8 `json:"signage_point_index" streamable:""` POSSSCCChallengeHash Bytes32 `json:"pos_ss_cc_challenge_hash" streamable:""` ProofOfSpace ProofOfSpace `json:"proof_of_space" streamable:""` ChallengeChainSPVDF mo.Option[VDFInfo] `json:"challenge_chain_sp_vdf" streamable:""` ChallengeChainSPSignature G2Element `json:"challenge_chain_sp_signature" streamable:""` ChallengeChainIPVDF VDFInfo `json:"challenge_chain_ip_vdf" streamable:""` RewardChainSPVDF mo.Option[VDFInfo] `json:"reward_chain_sp_vdf" streamable:""` // Not present for first sp in slot RewardChainSPSignature G2Element `json:"reward_chain_sp_signature" streamable:""` RewardChainIPVDF VDFInfo `json:"reward_chain_ip_vdf" streamable:""` InfusedChallengeChainIPVDF mo.Option[VDFInfo] `json:"infused_challenge_chain_ip_vdf" streamable:""` // Iff deficit < 16 IsTransactionBlock bool `json:"is_transaction_block" streamable:""` }
RewardChainBlock Reward Chain Block https://github.com/Chia-Network/chia_rs/blob/main/crates/chia-protocol/src/reward_chain_block.rs#L24
type RewardChainSubSlot ¶ added in v0.8.0
type RewardChainSubSlot struct { EndOfSlotVDF VDFInfo `json:"end_of_slot_vdf" streamable:""` ChallengeChainSubSlotHash Bytes32 `json:"challenge_chain_sub_slot_hash" streamable:""` InfusedChallengeChainSubSlotHash mo.Option[Bytes32] `json:"infused_challenge_chain_sub_slot_hash" streamable:""` Deficit uint8 `json:"deficit" streamable:""` }
RewardChainSubSlot is a type of reward_chain_sub_slot
type SentTo ¶
type SentTo struct { Peer string MempoolInclusionStatus MempoolInclusionStatus Error mo.Option[string] }
SentTo Represents the list of peers that we sent the transaction to, whether each one included it in the mempool, and what the error message (if any) was sent_to: List[Tuple[str, uint8, Optional[str]]]
type SerializedProgram ¶
type SerializedProgram Bytes
SerializedProgram An opaque representation of a clvm program. It has a more limited interface than a full SExp https://github.com/Chia-Network/chia-blockchain/blob/main/chia/types/blockchain_format/program.py#L232
func (SerializedProgram) MarshalJSON ¶ added in v0.1.0
func (g SerializedProgram) MarshalJSON() ([]byte, error)
MarshalJSON custom hex marshaller
func (*SerializedProgram) UnmarshalJSON ¶ added in v0.1.0
func (g *SerializedProgram) UnmarshalJSON(data []byte) error
UnmarshalJSON custom hex unmarshaller
type SignagePointEvent ¶
type SignagePointEvent struct { Success bool `json:"success"` BroadcastFarmer NewSignagePoint `json:"broadcast_farmer"` }
SignagePointEvent is the data received for each signage point https://github.com/Chia-Network/chia-blockchain/blob/main/chia/full_node/full_node.py#L1413
type SkippingPeakEvent ¶
SkippingPeakEvent data that is sent when a timelord skips a peak because it was fastest/already had the peak https://github.com/Chia-Network/chia-blockchain/blob/main/chia/timelord/timelord_api.py#L44
type SpendBundle ¶
type SpendBundle struct { CoinSpends []CoinSpend `json:"coin_spends"` AggregatedSignature G2Element `json:"aggregated_signature"` }
SpendBundle Spend Bundle https://github.com/Chia-Network/chia-blockchain/blob/main/chia/types/spend_bundle.py#L20 @TODO Streamable
type SubEpochSummary ¶
type SubEpochSummary struct { PrevSubEpochSummaryHash Bytes32 `json:"prev_subepoch_summary_hash"` RewardChainHash Bytes32 `json:"reward_chain_hash"` NumBlocksOverflow uint8 `json:"num_blocks_overflow"` NewDifficulty mo.Option[uint64] `json:"new_difficulty"` NewSubSlotIters mo.Option[uint64] `json:"new_sub_slot_iters"` }
SubEpochSummary sub epoch summary https://github.com/Chia-Network/chia-blockchain/blob/main/chia/types/blockchain_format/sub_epoch_summary.py#L13 @TODO Streamable
type SubSlotProofs ¶ added in v0.8.0
type SubSlotProofs struct { ChallengeChainSlotProof VDFProof `json:"challenge_chain_slot_proof" streamable:""` InfusedChallengeChainSlotProof mo.Option[VDFProof] `json:"infused_challenge_chain_slot_proof" streamable:""` RewardChainSlotProof VDFProof `json:"reward_chain_slot_proof" streamable:""` }
SubSlotProofs is a type of sub_slot_proofs
type Sync ¶
type Sync struct { SyncMode bool `json:"sync_mode"` SyncProgressHeight uint32 `json:"sync_progress_height"` SyncTipHeight uint32 `json:"sync_tip_height"` Synced bool `json:"synced"` }
Sync struct within blockchain state
type TimelordChain ¶
type TimelordChain uint8
TimelordChain references a particular chain within timelord code https://github.com/Chia-Network/chia-blockchain/blob/main/chia/timelord/types.py#L6
const ( // TimelordChainChallenge Challenge Chain TimelordChainChallenge TimelordChain = 1 // TimelordChainReward Reward Chain TimelordChainReward TimelordChain = 2 // TimelordChainInfusedChallenge Infused Challenge Chain TimelordChainInfusedChallenge TimelordChain = 3 // TimelordChainBluebox Bluebox Chain TimelordChainBluebox TimelordChain = 4 )
type Timestamp ¶ added in v0.1.1
Timestamp Helper type to go to/from uint64 timestamps in json but represent as time.Time in go applications
func (Timestamp) MarshalJSON ¶ added in v0.1.1
MarshalJSON marshals the time to unix timestamp
func (*Timestamp) UnmarshalJSON ¶ added in v0.1.1
UnmarshalJSON unmarshals from uint64
type TimestampedPeerInfo ¶ added in v0.4.0
type TimestampedPeerInfo struct { Host string `streamable:""` Port uint16 `streamable:""` Timestamp uint64 `streamable:""` }
TimestampedPeerInfo contains information about peers with timestamps
type TransactionRecord ¶
type TransactionRecord struct { ConfirmedAtHeight uint32 `json:"confirmed_at_height"` CreatedAtTime Timestamp `json:"created_at_time"` ToPuzzleHash Bytes32 `json:"to_puzzle_hash"` Amount uint64 `json:"amount"` FeeAmount uint64 `json:"fee_amount"` Confirmed bool `json:"confirmed"` Sent uint32 `json:"sent"` SpendBundle mo.Option[SpendBundle] `json:"spend_bundle"` Additions []Coin `json:"additions"` Removals []Coin `json:"removals"` WalletID uint32 `json:"wallet_id"` SentTo []tuple.Tuple[SentTo] `json:"sent_to"` // List[Tuple[str, uint8, Optional[str]]] TradeID mo.Option[Bytes32] `json:"trade_id"` Type TransactionType `json:"type"` Name Bytes32 `json:"name"` Memos []tuple.Tuple[MemoTuple] `json:"-"` // List[Tuple[bytes32, List[bytes]]] MemosDict map[string]string `json:"memos"` // The tuple above is translated to a dict{ coin_id: memo, coin_id: memo } before going into the response // ToAddress is not on the official type, but some endpoints return it anyways. This part is not streamable ToAddress string `json:"to_address"` }
TransactionRecord Single Transaction https://github.com/Chia-Network/chia-blockchain/blob/main/chia/wallet/transaction_record.py#L26 @TODO Streamable
func (TransactionRecord) MarshalJSON ¶ added in v0.1.1
func (t TransactionRecord) MarshalJSON() ([]byte, error)
MarshalJSON Handles the weird juggling between the tuple and map[string]string that goes on with memos on RPC
func (*TransactionRecord) UnmarshalJSON ¶ added in v0.1.1
func (t *TransactionRecord) UnmarshalJSON(data []byte) error
UnmarshalJSON Handles the weird juggling between the tuple and map[string]string that goes on with memos on RPC
type TransactionType ¶
type TransactionType uint32
TransactionType type of transaction https://github.com/Chia-Network/chia-blockchain/blob/main/chia/wallet/util/transaction_type.py#L6
const ( // TransactionTypeIncomingTX incoming transaction TransactionTypeIncomingTX TransactionType = 0 // TransactionTypeOutgoingTX outgoing transaction TransactionTypeOutgoingTX TransactionType = 1 // TransactionTypeCoinbaseReward coinbase reward TransactionTypeCoinbaseReward TransactionType = 2 // TransactionTypeFeeReward fee reward TransactionTypeFeeReward TransactionType = 3 // TransactionTypeIncomingTrade incoming trade TransactionTypeIncomingTrade TransactionType = 4 // TransactionTypeOutgoingTrade outgoing trade TransactionTypeOutgoingTrade TransactionType = 5 )
type TransactionsInfo ¶
type TransactionsInfo struct { GeneratorRoot Bytes32 `json:"generator_root" streamable:""` GeneratorRefsRoot Bytes32 `json:"generator_refs_root" streamable:""` AggregatedSignature G2Element `json:"aggregated_signature" streamable:""` Fees uint64 `json:"fees" streamable:""` Cost uint64 `json:"cost" streamable:""` RewardClaimsIncorporated []Coin `json:"reward_claims_incorporated" streamable:""` }
TransactionsInfo transactions info https://github.com/Chia-Network/chia_rs/blob/main/crates/chia-protocol/src/foliage.rs#L9 @TODO Streamable
type Uint128 ¶
A Uint128 is an unsigned 128-bit number.
var Uint128Zero Uint128
Uint128Zero is a zero-valued uint128.
func NewUint128 ¶
NewUint128 returns the Uint128 value (lo,hi).
func Uint128From64 ¶
Uint128From64 converts v to a Uint128 value.
func Uint128FromBig ¶
Uint128FromBig converts i to a Uint128 value. It panics if i is negative or overflows 128 bits.
func Uint128FromBytes ¶
Uint128FromBytes converts b to a Uint128 value.
func (Uint128) AddWrap ¶
AddWrap returns u+v with wraparound semantics; for example, Max.AddWrap(From64(1)) == Zero.
func (Uint128) AddWrap64 ¶
AddWrap64 returns u+v with wraparound semantics; for example, Max.AddWrap64(1) == Zero.
func (Uint128) Equals ¶
Equals returns true if u == v.
Uint128 values can be compared directly with ==, but use of the Equals method is preferred for consistency.
func (Uint128) FitsInUint64 ¶
FitsInUint64 returns true if the value of the Uint128 will fit in Uint64
func (Uint128) LeadingZeros ¶
LeadingZeros returns the number of leading zero bits in u; the result is 128 for u == 0.
func (Uint128) Len ¶
Len returns the minimum number of bits required to represent u; the result is 0 for u == 0.
func (Uint128) MarshalJSON ¶
MarshalJSON marshals the uint128 value to json
func (Uint128) MarshalYAML ¶ added in v0.8.3
MarshalYAML marshals the uint128 value to yaml
func (Uint128) MulWrap ¶
MulWrap returns u*v with wraparound semantics; for example, Max.MulWrap(Max) == 1.
func (Uint128) MulWrap64 ¶
MulWrap64 returns u*v with wraparound semantics; for example, Max.MulWrap64(2) == Max.Sub64(1).
func (Uint128) ReverseBytes ¶
ReverseBytes returns the value of u with its bytes in reversed order.
func (Uint128) RotateLeft ¶
RotateLeft returns the value of u rotated left by (k mod 128) bits.
func (Uint128) RotateRight ¶
RotateRight returns the value of u rotated left by (k mod 128) bits.
func (Uint128) SubWrap ¶
SubWrap returns u-v with wraparound semantics; for example, Zero.SubWrap(From64(1)) == Max.
func (Uint128) SubWrap64 ¶
SubWrap64 returns u-v with wraparound semantics; for example, Zero.SubWrap64(1) == Max.
func (Uint128) TrailingZeros ¶
TrailingZeros returns the number of trailing zero bits in u; the result is 128 for u == 0.
func (Uint128) Uint64 ¶
Uint64 returns the Uint64 value of the Int Be careful with this - if the number is larger than Uint64, it will just return nonsense
func (*Uint128) UnmarshalJSON ¶
UnmarshalJSON Uint128 from json
func (*Uint128) UnmarshalYAML ¶ added in v0.8.3
UnmarshalYAML Uint128 from yaml
type VDFInfo ¶
type VDFInfo struct { Challenge Bytes32 `json:"challenge" streamable:""` NumberOfIterations uint64 `json:"number_of_iterations" streamable:""` Output ClassgroupElement `json:"output" streamable:""` }
VDFInfo VDF Info https://github.com/Chia-Network/chia_rs/blob/main/crates/chia-protocol/src/vdf.rs#L7
type VDFProof ¶
type VDFProof struct { WitnessType uint8 `json:"witness_type" streamable:""` Witness Bytes `json:"witness" streamable:""` NormalizedToIdentity bool `json:"normalized_to_identity" streamable:""` }
VDFProof VDF Proof https://github.com/Chia-Network/chia_rs/blob/main/crates/chia-protocol/src/vdf.rs#L14
type WalletBalance ¶
type WalletBalance struct { WalletID int32 `json:"wallet_id"` Fingerprint int `json:"fingerprint"` ConfirmedWalletBalance Uint128 `json:"confirmed_wallet_balance"` UnconfirmedWalletBalance Uint128 `json:"unconfirmed_wallet_balance"` SpendableBalance Uint128 `json:"spendable_balance"` PendingChange int64 `json:"pending_change"` MaxSendAmount Uint128 `json:"max_send_amount"` UnspentCoinCount int64 `json:"unspent_coin_count"` PendingCoinRemovalCount int64 `json:"pending_coin_removal_count"` WalletType WalletType `json:"wallet_type"` AssetID string `json:"asset_id"` }
WalletBalance specific wallet balance information https://github.com/Chia-Network/chia-blockchain/blob/main/chia/rpc/wallet_rpc_api.py#L721
type WalletInfo ¶
type WalletInfo struct { ID uint32 `json:"id"` Name string `json:"name"` Type WalletType `json:"type"` Data string `json:"data"` }
WalletInfo single wallet record https://github.com/Chia-Network/chia-blockchain/blob/main/chia/wallet/wallet_info.py#L12 @TODO Streamable
type WalletType ¶
type WalletType uint8
WalletType types of wallets This matches constants on the chia-blockchain end as well. Don't change to arbitrary values. https://github.com/Chia-Network/chia-blockchain/blob/main/chia/wallet/util/wallet_types.py#L12
type WebsocketBlockchainState ¶
type WebsocketBlockchainState struct {
BlockchainState BlockchainState `json:"blockchain_state"`
}
WebsocketBlockchainState is how blockchain_state comes across in the websockets (wrapped) https://github.com/Chia-Network/chia-blockchain/blob/main/chia/rpc/full_node_rpc_api.py#L123
type WebsocketRequest ¶
type WebsocketRequest struct { Command string `json:"command"` Ack bool `json:"ack"` Origin string `json:"origin"` Destination string `json:"destination"` RequestID string `json:"request_id"` Data interface{} `json:"data"` }
WebsocketRequest defines a request sent over the websocket connection
type WebsocketResponse ¶
type WebsocketResponse struct { Command string `json:"command"` Ack bool `json:"ack"` Origin string `json:"origin"` Destination string `json:"destination"` RequestID string `json:"request_id"` Data json.RawMessage `json:"data"` }
WebsocketResponse defines the response structure received over the websocket connection
type WebsocketSubscription ¶
type WebsocketSubscription struct {
Service string `json:"service"`
}
WebsocketSubscription is the Data for a new subscribe request
Source Files ¶
- block.go
- bytes.go
- bytes100.go
- bytes32.go
- bytes48.go
- bytes96.go
- classgroup.go
- coin.go
- coinrecord.go
- connections.go
- crawler.go
- endofslotbundle.go
- farmer.go
- foliage.go
- harvester.go
- keychain.go
- keyssignatures.go
- nft.go
- peerinfo.go
- pooltarget.go
- program.go
- proofofspace.go
- signagepoint.go
- slot.go
- spend.go
- state.go
- subepochsummary.go
- timelord.go
- timestamp.go
- transaction.go
- uint128.go
- vdf.go
- wallet.go
- websocket.go