types

package
v0.0.0-...-67a64fa Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AtTime

type AtTime time.Time

func (AtTime) MarshalJSON

func (t AtTime) MarshalJSON() ([]byte, error)

func (*AtTime) UnmarshalJSON

func (t *AtTime) UnmarshalJSON(b []byte) error

type ConfigResponse

type ConfigResponse struct {
	Data struct {
		Name        string `json:"name"`
		Description string `json:"description"`
		DaoURI      any    `json:"dao_uri"`
	} `json:"data"`
}

type Content

type Content struct {
	Type        string `json:"@type"`
	Title       string `json:"title"`
	Description string `json:"description"`
}

type ContractProposal

type ContractProposal struct {
	Title           string `json:"title"`
	Description     string `json:"description"`
	Proposer        string `json:"proposer"`
	StartHeight     int    `json:"start_height"`
	MinVotingPeriod any    `json:"min_voting_period"`
	Expiration      struct {
		AtTime AtTime `json:"at_time"`
	} `json:"expiration"`
	Threshold struct {
		ThresholdQuorum struct {
			Threshold struct {
				Percent string `json:"percent"`
			} `json:"threshold"`
			Quorum struct {
				Percent string `json:"percent"`
			} `json:"quorum"`
		} `json:"threshold_quorum"`
	} `json:"threshold"`
	TotalPower string `json:"total_power"`
	Msgs       []struct {
		Custom struct {
			SubmitAdminProposal struct {
				AdminProposal struct {
					ParamChangeProposal struct {
						Title        string `json:"title"`
						Description  string `json:"description"`
						ParamChanges []struct {
							Subspace string `json:"subspace"`
							Key      string `json:"key"`
							Value    string `json:"value"`
						} `json:"param_changes"`
					} `json:"param_change_proposal"`
				} `json:"admin_proposal"`
			} `json:"submit_admin_proposal"`
		} `json:"custom"`
	} `json:"msgs"`
	Status ContractProposalStatus `json:"status"`
	Votes  struct {
		Yes     string `json:"yes"`
		No      string `json:"no"`
		Abstain string `json:"abstain"`
	} `json:"votes"`
	AllowRevoting bool `json:"allow_revoting"`
}

type ContractProposalStatus

type ContractProposalStatus event.ContractProposalStatus

func (*ContractProposalStatus) MarshalJSON

func (s *ContractProposalStatus) MarshalJSON() ([]byte, error)

func (*ContractProposalStatus) UnmarshalJSON

func (s *ContractProposalStatus) UnmarshalJSON(data []byte) error

type CreditsVaultAllocationResponse

type CreditsVaultAllocationResponse struct {
	Data struct {
		AllocatedAmount string `json:"allocated_amount"`
		WithdrawnAmount string `json:"withdrawn_amount"`
		Schedule        struct {
			StartTime int64 `json:"start_time"`
			Cliff     int   `json:"cliff"`
			Duration  int   `json:"duration"`
		} `json:"schedule"`
	} `json:"data"`
}

type ListProposalsResponse

type ListProposalsResponse struct {
	Data struct {
		Proposals []struct {
			ID       int              `json:"id"`
			Proposal ContractProposal `json:"proposal"`
		} `json:"proposals"`
	} `json:"data"`
}

type Pagination

type Pagination struct {
	TotalCount int `json:"total_count"`
	Offset     int `json:"offset"`
	Limit      int `json:"limit"`
	NextKey    int `json:"next_key"`
}

type Proposal

type Proposal struct {
	ProposalId      int            `json:"proposal_id,string"`
	Content         Content        `json:"content"`
	Status          ProposalStatus `json:"status"`
	VotingStartTime time.Time      `json:"voting_start_time"`
	VotingEndTime   time.Time      `json:"voting_end_time"`
}

type ProposalModulesResponse

type ProposalModulesResponse struct {
	Data []struct {
		Address string `json:"address"`
		Prefix  string `json:"prefix"`
		Status  string `json:"status"`
	} `json:"data"`
}

type ProposalResponse

type ProposalResponse struct {
	Proposal Proposal `json:"proposal"`
}

type ProposalStatus

type ProposalStatus event.ProposalStatus

func (*ProposalStatus) MarshalJSON

func (s *ProposalStatus) MarshalJSON() ([]byte, error)

func (*ProposalStatus) UnmarshalJSON

func (s *ProposalStatus) UnmarshalJSON(data []byte) error

type ProposalsResponse

type ProposalsResponse struct {
	Proposals []Proposal `json:"proposals"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL