Skip to main content
Version: 1.1.0

Protocol Documentation

Table of Contents​

Top

centerchain/income/v1/genesis.proto​

AccountStream​

AccountStream is a holder's checkpoint into a stream.

FieldTypeLabelDescription
addressstring
eligibility_denomstring
reward_denomstring
reward_indexstringreward_index is the stream index at the last settle.
pendingstringpending is the claimable reward accrued but not yet paid.
last_updateint64

GenesisState​

FieldTypeLabelDescription
paramsParams
income_configsIncomeConfigrepeated
streamsStreamrepeated
account_streamsAccountStreamrepeated
nft_claimablesNFTClaimablerepeated

IncomeConfig​

IncomeConfig is the per-denom (or per class id) income configuration.

FieldTypeLabelDescription
denomstringdenom is the eligibility bank denom or NFT class id.
yield_addressstringyield_address is the bank account that receives distribute/push funding.
has_incomebool
distributed_totalstringdistributed_total is the cumulative amount distributed for this eligibility denom.

NFTClaimable​

NFTClaimable is an earmarked reward attached to one NFT token.

FieldTypeLabelDescription
class_idstring
token_idstring
reward_denomstring
amountstringamount is the remaining claimable balance (0 after claim).
statusstringstatus is "active" or "claimed".

Stream​

Stream is the global reward-per-share accumulator for one eligibility/reward pair.

FieldTypeLabelDescription
eligibility_denomstring
reward_denomstring
indexstringindex is the reward-per-share accumulator, scaled by 10^18.
total_distributedstringtotal_distributed is the cumulative reward deposited into this stream.
last_updateint64

Scalar Value Types​

.proto TypeNotesC++JavaPythonGoC#PHPRuby
doubledoubledoublefloatfloat64doublefloatFloat
floatfloatfloatfloatfloat32floatfloatFloat
int32Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead.int32intintint32intintegerBignum or Fixnum (as required)
int64Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead.int64longint/longint64longinteger/stringBignum
uint32Uses variable-length encoding.uint32intint/longuint32uintintegerBignum or Fixnum (as required)
uint64Uses variable-length encoding.uint64longint/longuint64ulonginteger/stringBignum or Fixnum (as required)
sint32Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s.int32intintint32intintegerBignum or Fixnum (as required)
sint64Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s.int64longint/longint64longinteger/stringBignum
fixed32Always four bytes. More efficient than uint32 if values are often greater than 2^28.uint32intintuint32uintintegerBignum or Fixnum (as required)
fixed64Always eight bytes. More efficient than uint64 if values are often greater than 2^56.uint64longint/longuint64ulonginteger/stringBignum
sfixed32Always four bytes.int32intintint32intintegerBignum or Fixnum (as required)
sfixed64Always eight bytes.int64longint/longint64longinteger/stringBignum
boolboolbooleanbooleanboolboolbooleanTrueClass/FalseClass
stringA string must always contain UTF-8 encoded or 7-bit ASCII text.stringStringstr/unicodestringstringstringString (UTF-8)
bytesMay contain any arbitrary sequence of bytes.stringByteStringstr[]byteByteStringstringString (ASCII-8BIT)