API

State Controller SDK

Quick tip

If you are looking for a quick start guide, check out the Getting Started guide. We also have some react examples here.

Instructions

initialize_resolution_settings_v0

Accounts

NameMutabilitySignerDocs
payerimmutno
resolution_settingsimmutno
system_programimmutno

Args

NameTypeDocs
args[object Object]

on_vote_v0

Accounts

NameMutabilitySignerDocs
voterimmutno
vote_controllerimmutno
state_controllerimmutno
proposalimmutno
proposal_configimmutno

Args

NameTypeDocs
args[object Object]

resolve_v0

Accounts

NameMutabilitySignerDocs
state_controllerimmutno
proposalimmutno
proposal_configimmutno
proposal_programimmutno

Args

NameTypeDocs

update_state_v0

Accounts

NameMutabilitySignerDocs
ownerimmutno
proposalimmutno
proposal_configimmutno
state_controllerimmutno
proposal_programimmutno

Args

NameTypeDocs
args[object Object]

Accounts

ProposalConfigV0

undefined

ProposalV0

undefined

ResolutionSettingsV0

undefined

Types

Choice

FieldType
weightu128
namestring
uristring

InitializeResolutionSettingsArgsV0

FieldType
namestring
settings[object Object]

ProposalConfigV0

FieldType
vote_controllerpubkey
state_controllerpubkey
on_vote_hookpubkey
namestring
bump_seedu8
authoritypubkey

ProposalState

VariantFields
Draft
Cancelled
Votingstart_ts: i64
Resolvedchoices: [object Object], end_ts: i64
Customname: string, bin: bytes

ProposalV0

FieldType
namespacepubkey
ownerpubkey
state[object Object]
created_ati64
proposal_configpubkey
max_choices_per_voteru16
seedbytes
namestring
uristring
tagsstring
choices[object Object]
bump_seedu8

ResolutionNode

VariantFields
Resolvedchoices: [object Object]
EndTimestampend_ts: i64
OffsetFromStartTsoffset: i64
ChoiceVoteWeightweight_threshold: u128
ChoicePercentagepercentage: i32
Topn: u16
NumResolvedn: u16
And
Or
Notchoice_name: string
TotalWeightweight_threshold: u128
ChoicePercentageOfCurrentpercentage: i32

ResolutionSettingsV0

FieldType
namestring
settings[object Object]
bump_seedu8

ResolutionStrategy

FieldType
nodes[object Object]

UpdateStateArgsV0

FieldType
new_state[object Object]

VoteArgsV0

FieldType
choiceu16
weightu128
remove_votebool
Previous