Version: v0.0.0-...-4027801 Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Jul 8, 2018 License: MIT Imports: 5 Imported by: 0




View Source
const (

View Source
const (
	UnitT_Null UnitT = UnitT("")

	BallT_Null BallT = BallT("")

	AssetT_Null AssetT = AssetT("")

	AddressT_Null AddressT = AddressT("")

	LevelT_Null LevelT = LevelT(-1)

	MCIndexT_Null MCIndexT = MCIndexT(-1)

	DelayT_Null DelayT = DelayT(-1)

	AmountT_Null AmountT = AmountT(-666)
View Source
const (
	HASHB64_SIZE = 44
	CHASH_SIZE   = 32


This section is empty.


This section is empty.


type AddressT

type AddressT CHashT

AddressT = CHashT

func (AddressT) IsNull

func (address AddressT) IsNull() bool

func (AddressT) OrNull

func (address AddressT) OrNull() *AddressT

func (*AddressT) UnmarshalText

func (address *AddressT) UnmarshalText(text []byte) error

type AddressesT

type AddressesT []AddressT

func (AddressesT) IndexOf

func (addresses AddressesT) IndexOf(address AddressT) int

type AmountT

type AmountT BigIntT

func (AmountT) IsNull

func (amount AmountT) IsNull() bool

[tbd] verify this

type AssetT

type AssetT HashBase64T

func (AssetT) IsNull

func (asset AssetT) IsNull() bool

func (AssetT) OrNull

func (asset AssetT) OrNull() *AssetT

func (*AssetT) UnmarshalText

func (unit *AssetT) UnmarshalText(text []byte) error

type AsyncFunctorT

type AsyncFunctorT = func() ErrorT

type AsyncFunctorsT

type AsyncFunctorsT = []AsyncFunctorT

type AuthentifierT

type AuthentifierT string

type AuthentifiersT

type AuthentifiersT = map[PathT]AuthentifierT

type AuthorT

type AuthorT struct {
	Address       AddressT       `json:"address"`
	Definition    DefinitionT    `json:"definition,omitempty"`
	Authentifiers AuthentifiersT `json:"authentifiers,omitempty"`

type AuthorsT

type AuthorsT = []AuthorT

type BallT

type BallT HashBase64T

func (BallT) IsNull

func (ball BallT) IsNull() bool

func (*BallT) UnmarshalText

func (ball *BallT) UnmarshalText(text []byte) error

type BallsT

type BallsT = []BallT

type BigIntT

type BigIntT = int64

type CHash160T

type CHash160T string

type CHashT

type CHashT = CHash160T
const (
	//	CHashT_Undefined CHashT = CHashT("")
	CHashT_Null CHashT = CHashT("")

func (CHashT) IndexOf

func (hash CHashT) IndexOf(hashes refCHashesT) int

func (CHashT) IsNull

func (hash CHashT) IsNull() bool

func (hash CHashT) Undefined() bool { return len(hash) == 0 }

func (CHashT) OrNull

func (hash CHashT) OrNull() *CHashT

func (*CHashT) UnmarshalText

func (unit *CHashT) UnmarshalText(text []byte) error

type CHashesT

type CHashesT = []CHashT

type ContentHashT

type ContentHashT = CHashT

type ContributionT

type ContributionT struct {
	Payer_unit UnitT
	Address    AddressT
	Amount     AmountT

type ContributionsT

type ContributionsT = []ContributionT

type DataFeedT

type DataFeedT = map[string]interface{}

type DefinitionT

type DefinitionT interface{}

[fyi] high order typed json content

type DelayT

type DelayT int

func (DelayT) IsNull

func (delay DelayT) IsNull() bool

type DenominationT

type DenominationT int64

func (DenominationT) IsNull

func (denomination DenominationT) IsNull() bool

type ErrorT

type ErrorT = error

type HashBase64T

type HashBase64T string

type HashHexT

type HashHexT string

type InputIndexT

type InputIndexT int

type InputT

type InputT struct {
	Type                  string        `json:"type,omitempty"`
	Unit                  UnitT         `json:"unit,omitempty"`
	Message_index         MessageIndexT `json:"message_index,omitempty"`
	Output_index          OutputIndexT  `json:"output_index,omitempty"`
	From_main_chain_index MCIndexT      `json:"from_main_chain_index,omitempty"`
	To_main_chain_index   MCIndexT      `json:"to_main_chain_index,omitempty"`
	Address               AddressT      `json:"address,omitempty"`
	Amount                AmountT       `json:"amount,omitempty"`
	Serial_number         SerialNumberT `json:"serial_number,omitempty"`

type InputsT

type InputsT = []InputT

type JointT

type JointT struct {
	Unit UnitT

type LevelT

type LevelT int

func (LevelT) IsNull

func (level LevelT) IsNull() bool

func (*LevelT) UnmarshalJSON

func (level *LevelT) UnmarshalJSON(json []byte) error

func (*LevelT) UnmarshalText

func (level *LevelT) UnmarshalText(text []byte) error

type MCIndexT

type MCIndexT int

func (MCIndexT) IsNull

func (mcindex MCIndexT) IsNull() bool

func (*MCIndexT) MarshalJSON

func (mcindex *MCIndexT) MarshalJSON() ([]byte, error)

func (MCIndexT) OrNull

func (mcindex MCIndexT) OrNull() *MCIndexT

type MCIndexesT

type MCIndexesT = []MCIndexT

type MessageIndexT

type MessageIndexT int

type MessageT

type MessageT struct {
	App              string   `json:"app"`
	Payload_hash     string   `json:"payload_hash"`
	Payload_location string   `json:"payload_location"`
	Payload          PayloadT `json:"payload"`

	// [fyi] "text" and other
	PayloadText string `json:"-"`

	Payload_uri      *string `json:"payload_uri,omitempty""`
	Payload_uri_hash *string `json:"payload_uri_hash,omitempty"`

	Spend_proofs SpendProofsT `json:"spend_proofs,omitempty"`

type MessagesT

type MessagesT = []MessageT

type OutputIndexT

type OutputIndexT int

type OutputT

type OutputT struct {
	Address AddressT `json:"address"`
	Amount  AmountT  `json:"amount"`

type OutputsT

type OutputsT = []OutputT

type PaidWitnessEventT

type PaidWitnessEventT struct {
	Unit    UnitT
	Address AddressT
	Delay   DelayT

type PaidWitnessEventsT

type PaidWitnessEventsT = []PaidWitnessEventT

type PathT

type PathT string

type PayloadT

type PayloadT struct {
	Denomination DenominationT `json:"denomination,omitempty"`
	Inputs       InputsT       `json:"inputs,omitempty"`
	Outputs      OutputsT      `json:"outputs,omitempty"`
	Asset        AssetT        `json:"asset,omitempty"`
	Timestamp    int64         `json:"timestamp,omitempty"`

	// [fyi] "address_definition_change"
	Definition_chash CHashT   `json:"defnition_chash,omitempty"`
	Address          AddressT `json:"address,omitempty"`

	// [fyi] "poll"
	Question string   `json:"question,omitempty"`
	Choices  []string `json:"choices,omitempty"`

	// [fyi] "vote"
	Unit   UnitT  `json:"unit,omitempty"`
	Choice string `json:"choice,omitempty"`

	// [fyi] "attestation"
	Profile map[string]string `json:"profile,omitempty"`

	Cap int64 `json:"cap,omitempty"`

	Is_private             bool `json:"is_private,omitempty"`
	Is_transferrable       bool `json:"is_transferrable,omitempty"`
	Auto_destroy           bool `json:"auto_destroy,omitempty"`
	Fixed_denominations    bool `json:"fixed_denominations,omitempty"`
	Issued_by_definer_only bool `json:"issued_by_definer_only,omitempty"`
	Cosigned_by_definer    bool `json:"cosigned_by_definer,omitempty"`
	Spender_attested       bool `json:"spender_attested,omitempty"`

	Issue_condition    interface{} `json:"issue_condition,omitempty"`
	Transfer_condition interface{} `json:"transfer_condition,omitempty"`

	Attestors     AddressesT `json:"attestors,omitempty"`
	Denominations []struct {
		Denomination DenominationT `json:"denomination,omitempty"`
		Count_coins  BigIntT       `json:"count_coins"`
	} `json:"denominations,omitempty"`

	// [fyi] "data_feed"
	DataFeed DataFeedT `json:"datafeed,omitempty"`

type PropsT

type PropsT struct {
	Creation_date            TimeT
	Version                  string
	Alt                      string
	Witness_list_unit        UnitT
	Last_ball_unit           UnitT
	Content_hash             ContentHashT
	Headers_commission       int
	Payload_commission       int
	Is_free                  int
	Is_on_main_chain         int
	Main_chain_index         MCIndexT
	Latest_included_mc_index MCIndexT
	Level                    LevelT
	Witnessed_level          LevelT
	Is_stable                int
	Sequence                 string
	Best_parent_unit         UnitT

[fyi] per DB table units

type PropssT

type PropssT = []PropsT

type SHA1HexT

type SHA1HexT string

type SerialNumberT

type SerialNumberT BigIntT

func (SerialNumberT) IsNull

func (serno SerialNumberT) IsNull() bool

func (SerialNumberT) OrNull

func (serno SerialNumberT) OrNull() *SerialNumberT

type ShareT

type ShareT int64

[fyi] in percents

type SpendProofT

type SpendProofT struct {
	Address     AddressT `json:"address"`
	Spend_proof string   `json:"spend_proof"`

type SpendProofsT

type SpendProofsT = []SpendProofT

type TimeT

type TimeT = time.Time

TimeT time.Time

type UnitPropsBallT

type UnitPropsBallT struct {
	Ball BallT

type UnitPropsBallsT

type UnitPropsBallsT = []UnitPropsBallT

type UnitPropsT

type UnitPropsT struct {
	Unit UnitT

type UnitPropssT

type UnitPropssT = []UnitPropsT

type UnitT

type UnitT HashBase64T

func (UnitT) IsNull

func (unit UnitT) IsNull() bool

func (UnitT) MarshalText

func (unit UnitT) MarshalText() ([]byte, error)

func (UnitT) OrNull

func (unit UnitT) OrNull() *UnitT

func (*UnitT) UnmarshalText

func (unit *UnitT) UnmarshalText(text []byte) error

type UnitsT

type UnitsT []UnitT

UnitsT = []UnitT

func (UnitsT) Compare

func (units UnitsT) Compare(units_ UnitsT) int

func (UnitsT) IndexOf

func (units UnitsT) IndexOf(unit UnitT) int

func (*UnitsT) Join

func (units *UnitsT) Join(sep string) string

func (UnitsT) Uniq

func (units UnitsT) Uniq() UnitsT

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL