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

initializeTokenVoterV0

Accounts

NameMutabilitySignerDocs
payermutyes
tokenVotermutno
collectionmutno
metadatamutno
masterEditionmutno
tokenAccountmutno
mintimmutno
rentimmutno
tokenProgramimmutno
associatedTokenProgramimmutno
tokenMetadataProgramimmutno
systemProgramimmutno

Args

NameTypeDocs
argsInitializeTokenVoterArgsV0

depositV0

Accounts

NameMutabilitySignerDocs
tokenVoterimmutno
collectionimmutno
collectionMetadatamutno
collectionMasterEditionmutno
receiptmutno
mintmutno
metadatamutno
masterEditionmutno
receiptTokenAccountmutno
recipientimmutno
vaultmutno
tokenAccountmutno
payermutyes
depositMintimmutno
systemProgramimmutno
tokenProgramimmutno
associatedTokenProgramimmutno
tokenMetadataProgramimmutno
rentimmutno

Args

NameTypeDocs
argsDepositArgsV0

relinquishVoteV0

Accounts

NameMutabilitySignerDocs
refundmutnoAccount to receive sol refund if marker is closed
markermutno
tokenVoterimmutno
voterimmutyes
receiptmutno
mintimmutno
tokenAccountimmutno
proposalmutno
proposalConfigimmutno
stateControllermutno
onVoteHookimmutno
proposalProgramimmutno
systemProgramimmutno

Args

NameTypeDocs
argsRelinquishVoteArgsV0

voteV0

Accounts

NameMutabilitySignerDocs
payermutyes
markermutno
tokenVoterimmutno
voterimmutyes
receiptmutno
mintimmutno
tokenAccountimmutno
proposalmutno
proposalConfigimmutno
stateControllermutno
onVoteHookimmutno
proposalProgramimmutno
systemProgramimmutno

Args

NameTypeDocs
argsVoteArgsV0

withdrawV0

Accounts

NameMutabilitySignerDocs
tokenVoterimmutno
collectionimmutno
collectionMetadatamutno
receiptmutno
mintmutno
metadatamutno
masterEditionmutno
receiptTokenAccountmutno
vaultmutno
tokenAccountmutno
payermutyes
refundmutno
ownerimmutyes
depositMintimmutno
systemProgramimmutno
tokenProgramimmutno
associatedTokenProgramimmutno
tokenMetadataProgramimmutno
rentimmutno

Args

NameTypeDocs

Accounts

TokenVoterV0

FieldType
authoritypublicKey
depositMintpublicKey
collectionpublicKey
namestring
bumpSeedu8

ReceiptV0

FieldType
tokenVoterpublicKey
mintpublicKey
amountu64
numActiveVotesu64
bumpSeedu8

VoteMarkerV0

FieldType
voterpublicKey
tokenVoterpublicKey
proposalpublicKey
mintpublicKey
choicesu16
bumpSeedu8

Types

DepositArgsV0

FieldType
amountu64
metadataUristring

InitializeTokenVoterArgsV0

FieldType
namestring
authoritypublicKey
collectionUristring

RelinquishVoteArgsV0

FieldType
choiceu16

VoteArgsV0

FieldType
choiceu16

UseMethod

VariantFields
Burn
Multiple
Single

CollectionDetails

VariantFields
V1size: u64
Previous