Documentation ¶
Index ¶
- func AddPeriods(ctx context.Context, api *eos.API, daoContract eos.AccountName, ...) ([]docgraph.Document, error)
- func Apply(ctx context.Context, api *eos.API, contract eos.AccountName, ...) (string, error)
- func ClaimPay(ctx context.Context, api *eos.API, contract, claimer eos.AccountName, ...) (string, error)
- func CloseProposal(ctx context.Context, api *eos.API, contract, closer eos.AccountName, ...) (string, error)
- func CreateBallot(ctx context.Context, api *eos.API, telosDecide, creator eos.AccountName, ...) (string, error)
- func CreateOldAssignment(t *testing.T, ctx context.Context, api *eos.API, ...) (docgraph.Document, error)
- func CreatePayout(ctx context.Context, api *eos.API, ...) (docgraph.Document, error)
- func CreatePretend(ctx context.Context, api *eos.API, ...) (docgraph.Document, error)
- func CreateRoot(ctx context.Context, api *eos.API, contract eos.AccountName) (string, error)
- func DefaultProgressBar(counter int) *progressbar.ProgressBar
- func DocumentVote(ctx context.Context, api *eos.API, contract, proposer eos.AccountName, ...) error
- func Enroll(ctx context.Context, api *eos.API, contract eos.AccountName, ...) (string, error)
- func EnrollMembers(ctx context.Context, api *eos.API, contract eos.AccountName)
- func EraseAllDocuments(ctx context.Context, api *eos.API, contract eos.AccountName)
- func GetBalance(ctx context.Context, api *eos.API, tokenContract, member string) eos.Asset
- func GetEscrowBalance(ctx context.Context, api *eos.API, escrowContract, member string) eos.Asset
- func GetVotingPower(ctx context.Context, api *eos.API, telosDecide, voter eos.AccountName) eos.Asset
- func InitTD(ctx context.Context, api *eos.API, telosDecide eos.AccountName) (string, error)
- func Issue(ctx context.Context, api *eos.API, token, issuer eos.AccountName, ...) (string, error)
- func IssueHVoice(ctx context.Context, api *eos.API, contract, auth eos.AccountName, ...) (string, error)
- func MigrateHVoice(ctx context.Context, api *eos.API, contract, daoContract eos.AccountName, ...) (string, error)
- func Mint(ctx context.Context, api *eos.API, ...) (string, error)
- func NewTreasury(ctx context.Context, api *eos.API, ...) (string, error)
- func OpenBallot(ctx context.Context, api *eos.API, telosDecide, creator eos.AccountName, ...) (string, error)
- func ProposalVote(ctx context.Context, api *eos.API, contract, voter eos.AccountName, ...) (string, error)
- func ProposalVoteWithoutNotes(ctx context.Context, api *eos.API, contract, voter eos.AccountName, ...) (string, error)
- func Propose(ctx context.Context, api *eos.API, contract, proposer eos.AccountName, ...) (string, error)
- func ProposeAssExtension(ctx context.Context, api *eos.API, contract, proposer eos.AccountName, ...) (string, error)
- func ProposeAssignment(ctx context.Context, api *eos.API, ...) (string, error)
- func ProposeBadge(ctx context.Context, api *eos.API, contract, proposer eos.AccountName, ...) (string, error)
- func ProposeBadgeAssignment(ctx context.Context, api *eos.API, ...) (string, error)
- func ProposeEdit(ctx context.Context, api *eos.API, contract, proposer eos.AccountName, ...) (string, error)
- func ProposePayout(ctx context.Context, api *eos.API, ...) (string, error)
- func ProposePayoutWithPeriod(ctx context.Context, api *eos.API, ...) (string, error)
- func ProposeRole(ctx context.Context, api *eos.API, contract, proposer eos.AccountName, ...) (string, error)
- func RegVoter(ctx context.Context, api *eos.API, telosDecide, registrant eos.AccountName) (string, error)
- func RemSetting(ctx context.Context, api *eos.API, contract eos.AccountName, settingAtt string) (string, error)
- func ReplaceContent2(groups []docgraph.ContentGroup, label string, value *docgraph.FlexValue) error
- func SetAssetSetting(ctx context.Context, api *eos.API, contract eos.AccountName, label string, ...) (string, error)
- func SetIntSetting(ctx context.Context, api *eos.API, contract eos.AccountName, label string, ...) (string, error)
- func SetNameSetting(ctx context.Context, api *eos.API, contract eos.AccountName, label string, ...) (string, error)
- func SetSetting(ctx context.Context, api *eos.API, contract eos.AccountName, configAtt string, ...) (string, error)
- func SetupCreateAssignment(ctx context.Context, api *eos.API, ...) (docgraph.Document, error)
- func SetupCreateBadge(ctx context.Context, api *eos.API, ...) (docgraph.Document, error)
- func SetupCreateRole(ctx context.Context, api *eos.API, ...) (docgraph.Document, error)
- func TelosDecideVote(ctx context.Context, api *eos.API, telosDecide, voter eos.AccountName, ...) (string, error)
- func Transfer(ctx context.Context, api *eos.API, token, from, to eos.AccountName, ...) (string, error)
- func TransferHVoice(ctx context.Context, api *eos.API, contract, auth eos.AccountName, ...) (string, error)
- func UpdateAssignments(ctx context.Context, api *eos.API, contract eos.AccountName) error
- func UpdatePeriods(ctx context.Context, api *eos.API, contract eos.AccountName) error
- func VotePass(ctx context.Context, api *eos.API, ...) (string, error)
- type Account
- type CloseDocProp
- type IssueHVoiceArgs
- type Lock
- type MigrateHVoiceArgs
- type Period
- type Proposal
- type QrAction
- type Scope
- type SeedsExchConfigTable
- type SeedsPriceHistory
- type Stats
- type TransferHVoiceArgs
- type Vote
- type VoteProposal
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddPeriods ¶
func AddPeriods(ctx context.Context, api *eos.API, daoContract eos.AccountName, predecessor eos.Checksum256, numPeriods int, periodDuration time.Duration) ([]docgraph.Document, error)
AddPeriods adds the number of periods with the corresponding duration to the DAO
func Apply ¶
func Apply(ctx context.Context, api *eos.API, contract eos.AccountName, applicant eos.AccountName, notes string) (string, error)
Apply applies for membership to the DAO
func ClaimPay ¶
func ClaimPay(ctx context.Context, api *eos.API, contract, claimer eos.AccountName, assignmentHash eos.Checksum256, periodID uint64) (string, error)
ClaimPay claims a period of pay for an assignment
func CloseProposal ¶
func CloseProposal(ctx context.Context, api *eos.API, contract, closer eos.AccountName, proposalHash eos.Checksum256) (string, error)
CloseProposal ...
func CreateBallot ¶
func CreateOldAssignment ¶
func CreateOldAssignment(t *testing.T, ctx context.Context, api *eos.API, contract, member eos.AccountName, memberDocHash, roleDocHash, startPeriodHash eos.Checksum256, assignment string) (docgraph.Document, error)
Creates an assignment without the INIT_TIME_SHARE, CURRENT_TIME_SHARE & LAST_TIME_SHARE nodes
func CreatePayout ¶
func CreatePayout(ctx context.Context, api *eos.API, contract, telosDecide, proposer, recipient eos.AccountName, usdAmount eos.Asset, deferred int64, data []byte) (docgraph.Document, error)
CreatePayout ...
func CreatePretend ¶
func CreatePretend(ctx context.Context, api *eos.API, contract, telosDecide, member eos.AccountName) (docgraph.Document, error)
CreatePretend ...
func CreateRoot ¶
CreateRoot creates the root node
func DefaultProgressBar ¶
func DefaultProgressBar(counter int) *progressbar.ProgressBar
DefaultProgressBar ...
func DocumentVote ¶
func DocumentVote(ctx context.Context, api *eos.API, contract, proposer eos.AccountName, badgeHash eos.Checksum256, notes string, startPeriod, endPeriod uint64) error
DocumentVote ....
func Enroll ¶
func Enroll(ctx context.Context, api *eos.API, contract eos.AccountName, enroller, applicant eos.AccountName) (string, error)
Enroll an applicant in the DAO
func EnrollMembers ¶
EnrollMembers ...
func EraseAllDocuments ¶
EraseAllDocuments ...
func GetBalance ¶
GetBalance return the token balance
func GetEscrowBalance ¶
GetEscrowBalance returns the total amount locked in escrow for this user
func GetVotingPower ¶
func GetVotingPower(ctx context.Context, api *eos.API, telosDecide, voter eos.AccountName) eos.Asset
GetVotingPower ...
func Issue ¶
func Issue(ctx context.Context, api *eos.API, token, issuer eos.AccountName, amount eos.Asset) (string, error)
Issue ...
func IssueHVoice ¶
func MigrateHVoice ¶
func Mint ¶
func Mint(ctx context.Context, api *eos.API, telosDecide, issuer, receiver eos.AccountName, amount eos.Asset) (string, error)
Mint ...
func NewTreasury ¶
func NewTreasury(ctx context.Context, api *eos.API, telosDecide, treasuryManager eos.AccountName) (string, error)
NewTreasury ...
func OpenBallot ¶
func ProposalVote ¶
func ProposalVote( ctx context.Context, api *eos.API, contract, voter eos.AccountName, vote string, proposalHash eos.Checksum256, notes string) (string, error)
ProposalVote
func ProposalVoteWithoutNotes ¶
func ProposalVoteWithoutNotes( ctx context.Context, api *eos.API, contract, voter eos.AccountName, vote string, proposalHash eos.Checksum256) (string, error)
ProposalVote
func Propose ¶
func Propose(ctx context.Context, api *eos.API, contract, proposer eos.AccountName, proposal Proposal) (string, error)
Propose ...
func ProposeAssExtension ¶
func ProposeAssignment ¶
func ProposeAssignment(ctx context.Context, api *eos.API, contract, proposer, assignee eos.AccountName, roleHash, startPeriod eos.Checksum256, assignment string) (string, error)
ProposeAssignment creates a proposal for an new assignment
func ProposeBadge ¶
func ProposeBadge(ctx context.Context, api *eos.API, contract, proposer eos.AccountName, content string) (string, error)
ProposeBadge proposes the badge to the specified DAO contract
func ProposeBadgeAssignment ¶
func ProposeBadgeAssignment(ctx context.Context, api *eos.API, contract, proposer, assignee eos.AccountName, badgeHash, startPeriod eos.Checksum256, assignment string) (string, error)
ProposeBadgeAssignment proposes the badge assignment to the specified DAO contract
func ProposeEdit ¶
func ProposeEdit(ctx context.Context, api *eos.API, contract, proposer eos.AccountName, original docgraph.Document, edit string) (string, error)
ProposeEdit creates an edit proposal
func ProposePayout ¶
func ProposePayout(ctx context.Context, api *eos.API, contract, proposer, recipient eos.AccountName, usdAmount eos.Asset, deferred int64, payout string) (string, error)
ProposePayout ...
func ProposePayoutWithPeriod ¶
func ProposePayoutWithPeriod(ctx context.Context, api *eos.API, contract, proposer, recipient eos.AccountName, endPeriod eos.Checksum256, usdAmount eos.Asset, deferred int64, payout string) (string, error)
ProposePayoutWithPeriod creates a proposal for an new payout/contribution
func ProposeRole ¶
func ProposeRole(ctx context.Context, api *eos.API, contract, proposer eos.AccountName, role string) (string, error)
ProposeRole creates a proposal for an new assignment
func RegVoter ¶
func RegVoter(ctx context.Context, api *eos.API, telosDecide, registrant eos.AccountName) (string, error)
RegVoter ...
func RemSetting ¶
func RemSetting(ctx context.Context, api *eos.API, contract eos.AccountName, settingAtt string) (string, error)
RemSetting ...
func ReplaceContent2 ¶
func SetAssetSetting ¶
func SetIntSetting ¶
func SetIntSetting(ctx context.Context, api *eos.API, contract eos.AccountName, label string, value int64) (string, error)
SetIntSetting is a helper for setting a single name type configuration item
func SetNameSetting ¶
func SetNameSetting(ctx context.Context, api *eos.API, contract eos.AccountName, label string, value eos.AccountName) (string, error)
SetNameSetting is a helper for setting a single name type configuration item
func SetSetting ¶
func SetSetting(ctx context.Context, api *eos.API, contract eos.AccountName, configAtt string, flexValue *docgraph.FlexValue) (string, error)
SetSetting sets a single attribute on the configuration
func SetupCreateAssignment ¶
func SetupCreateAssignment(ctx context.Context, api *eos.API, contract, telosDecide, member eos.AccountName, parentType, assignmentType eos.Name, data []byte) (docgraph.Document, error)
CreateAssignment ...
func SetupCreateBadge ¶
func SetupCreateBadge(ctx context.Context, api *eos.API, contract, telosDecide, member eos.AccountName, data []byte) (docgraph.Document, error)
CreateBadge ...
func SetupCreateRole ¶
func SetupCreateRole(ctx context.Context, api *eos.API, contract, telosDecide, member eos.AccountName, data []byte) (docgraph.Document, error)
CreateRole ...
func TelosDecideVote ¶
func TelosDecideVote(ctx context.Context, api *eos.API, telosDecide, voter eos.AccountName, ballot, passFail eos.Name) (string, error)
TelosDecideVote ...
func Transfer ¶
func Transfer(ctx context.Context, api *eos.API, token, from, to eos.AccountName, amount eos.Asset, memo string) (string, error)
Transfer ...
func TransferHVoice ¶
func UpdateAssignments ¶
func UpdatePeriods ¶
UpdatePeriods ...
Types ¶
type Account ¶
type Account struct { Balance eos.Asset `json:"balance"` LastDecayPeriod eos.Uint64 `json:"last_decay_period"` }
type CloseDocProp ¶
type CloseDocProp struct {
ProposalHash eos.Checksum256 `json:"proposal_hash"`
}
CloseDocProp is closing proposals for document proposals
type IssueHVoiceArgs ¶
type IssueHVoiceArgs struct { To eos.AccountName Quantity eos.Asset Memo string }
type Lock ¶
type Lock struct { ID uint64 `json:"id"` LockType eos.Name `json:"lock_type"` Sponsor eos.Name `json:"sponsor"` Beneficiary eos.Name `json:"beneficiary"` Quantity eos.Asset `json:"quantity"` TriggerEvent eos.Name `json:"trigger_event"` TriggerSource eos.Name `json:"trigger_source"` VestingDate eos.BlockTimestamp `json:"vesting_date"` Notes string `json:"notes"` CreatedDate eos.BlockTimestamp `json:"created_date"` UpdatedDate eos.BlockTimestamp `json:"updated_date"` }
Lock is an escrow lock
type MigrateHVoiceArgs ¶
type MigrateHVoiceArgs struct { DaoContract eos.AccountName TrailContract eos.AccountName }
type Period ¶
type Period struct { PeriodID uint64 `json:"period_id"` StartTime eos.BlockTimestamp `json:"start_date"` EndTime eos.BlockTimestamp `json:"end_date"` Phase string `json:"phase"` }
Period represents a period of time aligning to a payroll period, typically a week
type Proposal ¶
type Proposal struct { Proposer eos.AccountName `json:"proposer"` ProposalType eos.Name `json:"proposal_type"` ContentGroups []docgraph.ContentGroup `json:"content_groups"` }
Proposal is a document to be proposed
type QrAction ¶
type QrAction struct { Timestamp time.Time `json:"@timestamp"` TrxID string `json:"trx_id"` ActionContract string ActionName string Data string }
QrAction ...
type Scope ¶
type Scope struct { Code eos.Name `json:"code"` Scope eos.Name `json:"scope"` Table eos.Name `json:"table"` Payer eos.Name `json:"payer"` Count uint64 `json:"count"` }
Scope ...
type SeedsExchConfigTable ¶
type SeedsExchConfigTable struct { SeedsPerUsd eos.Asset `json:"seeds_per_usd"` TlosPerUsd eos.Asset `json:"tlos_per_usd"` CitizenLimit eos.Asset `json:"citizen_limit"` ResidentLimit eos.Asset `json:"resident_limit"` VisitorLimit eos.Asset `json:"visitor_limit"` }
SeedsExchConfigTable ...
type SeedsPriceHistory ¶
type SeedsPriceHistory struct { ID uint64 `json:"id"` SeedsUSD eos.Asset `json:"seeds_usd"` Date eos.TimePoint `json:"date"` }
SeedsPriceHistory ...
type Stats ¶
type Stats struct { Supply eos.Asset `json:"supply"` MaxSupply eos.Asset `json:"max_supply"` Name eos.AccountName `json:"name"` DecayPerPeriod string `json:"decay_per_period"` DecayPeriod eos.Uint64 `json:"last_decay_period"` }
type TransferHVoiceArgs ¶
type TransferHVoiceArgs struct { From eos.AccountName To eos.AccountName Quantity eos.Asset Memo string }
type Vote ¶
type Vote struct { Voter eos.AccountName `json:"voter"` BallotName eos.Name `json:"ballot_name"` Options []eos.Name `json:"options"` }
Vote represents a set of options being cast as a vote to Telos Decide
type VoteProposal ¶
type VoteProposal struct { Voter eos.AccountName `json:"voter"` ProposalHash eos.Checksum256 `json:"proposal_hash"` Vote string `json:"vote"` Notes string `json:"notes"` }
VoteProposal votes for a proposal (native ballot)