API

Token Voter 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

deposit_v0

Accounts

NameMutabilitySignerDocs
token_voterimmutno
collectionimmutno
collection_metadataimmutno
collection_master_editionimmutno
receiptimmutno
mintimmutno
metadataimmutno
master_editionimmutno
receipt_token_accountimmutno
recipientimmutno
vaultimmutno
token_accountimmutno
payerimmutno
deposit_mintimmutno
system_programimmutno
token_programimmutno
associated_token_programimmutno
token_metadata_programimmutno
rentimmutno

Args

NameTypeDocs
args[object Object]

initialize_token_voter_v0

Accounts

NameMutabilitySignerDocs
payerimmutno
token_voterimmutno
collectionimmutno
metadataimmutno
master_editionimmutno
token_accountimmutno
mintimmutno
rentimmutno
token_programimmutno
associated_token_programimmutno
token_metadata_programimmutno
system_programimmutno

Args

NameTypeDocs
args[object Object]

relinquish_vote_v0

Accounts

NameMutabilitySignerDocs
refundimmutnoAccount to receive sol refund if marker is closed
markerimmutno
token_voterimmutno
voterimmutno
receiptimmutno
mintimmutno
token_accountimmutno
proposalimmutno
proposal_configimmutno
state_controllerimmutno
on_vote_hookimmutno
proposal_programimmutno
system_programimmutno

Args

NameTypeDocs
args[object Object]

vote_v0

Accounts

NameMutabilitySignerDocs
payerimmutno
markerimmutno
token_voterimmutno
voterimmutno
receiptimmutno
mintimmutno
token_accountimmutno
proposalimmutno
proposal_configimmutno
state_controllerimmutno
on_vote_hookimmutno
proposal_programimmutno
system_programimmutno

Args

NameTypeDocs
args[object Object]

withdraw_v0

Accounts

NameMutabilitySignerDocs
token_voterimmutno
collectionimmutno
collection_metadataimmutno
receiptimmutno
mintimmutno
metadataimmutno
master_editionimmutno
receipt_token_accountimmutno
vaultimmutno
token_accountimmutno
payerimmutno
refundimmutno
ownerimmutno
deposit_mintimmutno
system_programimmutno
token_programimmutno
associated_token_programimmutno
token_metadata_programimmutno

Args

NameTypeDocs

Accounts

ProposalConfigV0

undefined

ProposalV0

undefined

ReceiptV0

undefined

TokenVoterV0

undefined

VoteMarkerV0

undefined

Types

Choice

FieldType
weightu128
namestring
uristring

DepositArgsV0

FieldType
amountu64
metadata_uristring

InitializeTokenVoterArgsV0

FieldType
namestring
authoritypubkey
collection_uristring

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

ReceiptV0

FieldType
token_voterpubkey
mintpubkey
amountu64
num_active_votesu64
bump_seedu8

RelinquishVoteArgsV0

FieldType
choiceu16

TokenVoterV0

FieldType
authoritypubkey
deposit_mintpubkey
collectionpubkey
namestring
bump_seedu8

VoteArgsV0

FieldType
choiceu16

VoteMarkerV0

FieldType
voterpubkey
token_voterpubkey
proposalpubkey
mintpubkey
choicesu16
bump_seedu8
Previous