UNPKG

fbonds-core

Version:

Banx protocol sdk

34 lines (33 loc) 1.12 kB
import { web3 } from '@coral-xyz/anchor'; interface VoteAccountsToCreate { proposalPubkey: web3.PublicKey; proposalVariantPubkey: web3.PublicKey; adventurePubkey: web3.PublicKey; adventureSubscriptionSnapshot: web3.PublicKey; userPubkey: web3.PublicKey; } interface VoteAccounts extends VoteAccountsToCreate { previousProposalVariantPubkey: web3.PublicKey; } type CreateVote = (params: { programId: web3.PublicKey; connection: web3.Connection; accounts: VoteAccountsToCreate; sendTxn: (transaction: web3.Transaction, signers: web3.Signer[]) => Promise<void>; }) => Promise<{ instructions: web3.TransactionInstruction[]; signers: web3.Signer[]; }>; type Vote = (params: { programId: web3.PublicKey; connection: web3.Connection; accounts: VoteAccounts; sendTxn: (transaction: web3.Transaction, signers: web3.Signer[]) => Promise<void>; }) => Promise<{ instructions: web3.TransactionInstruction[]; signers: web3.Signer[]; }>; export declare const createVote: CreateVote; export declare const updateVote: Vote; export declare const vote: Vote; export {};