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

initializeProposalV0

Accounts

NameMutabilitySignerDocs
payermutyes
namespaceimmutyesEvery proposal must have a namespace to prevent seed collision
proposalmutno
ownerimmutno
proposalConfigimmutno
systemProgramimmutno

Args

NameTypeDocs
argsInitializeProposalArgsV0

initializeProposalConfigV0

Accounts

NameMutabilitySignerDocs
payermutyes
ownerimmutyes
proposalConfigmutno
systemProgramimmutno

Args

NameTypeDocs
argsInitializeProposalConfigArgsV0

voteV0

Accounts

NameMutabilitySignerDocs
voteControllerimmutyes
voterimmutno
stateControllermutno
proposalConfigimmutno
proposalmutno
onVoteHookimmutno

Args

NameTypeDocs
argsVoteArgsV0

updateStateV0

Accounts

NameMutabilitySignerDocs
stateControllerimmutyes
proposalmutno
proposalConfigimmutno

Args

NameTypeDocs
argsUpdateStateArgsV0

updateProposalConfigV0

Accounts

NameMutabilitySignerDocs
proposalConfigmutno
authorityimmutyes

Args

NameTypeDocs
argsUpdateProposalConfigArgsV0

Accounts

ProposalConfigV0

FieldType
voteControllerpublicKey
stateControllerpublicKey
onVoteHookpublicKey
namestring
bumpSeedu8
authoritypublicKey

ProposalV0

FieldType
namespacepublicKey
ownerpublicKey
stateProposalState
createdAti64
proposalConfigpublicKey
maxChoicesPerVoteru16
seedbytes
namestring
uristring
tagsstring
choicesChoice
bumpSeedu8

Types

InitializeProposalConfigArgsV0

FieldType
namestring
voteControllerpublicKey
stateControllerpublicKey
onVoteHookpublicKey
authoritypublicKey

ChoiceArg

FieldType
namestring
uristring

InitializeProposalArgsV0

FieldType
seedbytes
namestring
uristring
maxChoicesPerVoteru16
choicesChoiceArg
tagsstring

UpdateProposalConfigArgsV0

FieldType
voteControllerpublicKey
stateControllerpublicKey
onVoteHookpublicKey
authoritypublicKey

UpdateStateArgsV0

FieldType
newStateProposalState

VoteArgsV0

FieldType
choiceu16
weightu128
removeVotebool

Choice

FieldType
weightu128
namestring
uristring

ProposalState

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