API

Proposal 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_proposal_config_v0

Accounts

NameMutabilitySignerDocs
payerimmutno
ownerimmutno
proposal_configimmutno
system_programimmutno

Args

NameTypeDocs
args[object Object]

initialize_proposal_v0

Accounts

NameMutabilitySignerDocs
payerimmutno
namespaceimmutnoEvery proposal must have a namespace to prevent seed collision
proposalimmutno
ownerimmutno
proposal_configimmutno
system_programimmutno

Args

NameTypeDocs
args[object Object]

update_proposal_config_v0

Accounts

NameMutabilitySignerDocs
proposal_configimmutno
authorityimmutno

Args

NameTypeDocs
args[object Object]

update_state_v0

Accounts

NameMutabilitySignerDocs
state_controllerimmutno
proposalimmutno
proposal_configimmutno

Args

NameTypeDocs
args[object Object]

vote_v0

Accounts

NameMutabilitySignerDocs
vote_controllerimmutno
voterimmutno
state_controllerimmutno
proposal_configimmutno
proposalimmutno
on_vote_hookimmutno

Args

NameTypeDocs
args[object Object]

Accounts

ProposalConfigV0

undefined

ProposalV0

undefined

Types

Choice

FieldType
weightu128
namestring
uristring

ChoiceArg

FieldType
namestring
uristring

InitializeProposalArgsV0

FieldType
seedbytes
namestring
uristring
max_choices_per_voteru16
choices[object Object]
tagsstring

InitializeProposalConfigArgsV0

FieldType
namestring
vote_controllerpubkey
state_controllerpubkey
on_vote_hookpubkey
authoritypubkey

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

UpdateProposalConfigArgsV0

FieldType
vote_controllerpubkey
state_controllerpubkey
on_vote_hookpubkey
authoritypubkey

UpdateStateArgsV0

FieldType
new_state[object Object]

VoteArgsV0

FieldType
choiceu16
weightu128
remove_votebool
Previous