UNPKG

@surec/oracle

Version:

Typescript SDK for the Sure Oracle to be used to bring off-chain data on-chain

31 lines 1.46 kB
import { Commitment, Connection, PublicKey, Signer, TransactionInstruction } from '@solana/web3.js'; import { ProposalType } from './program.js'; export declare const validateKeys: (keys: { v: PublicKey; n: string; }[]) => void; export declare type ProposalStatus = 'Voting' | 'Reveal' | 'Creating reward distribution' | 'Calculate Reward' | 'Reward Payout' | 'Failed'; export declare const getProposalStatus: (proposal: ProposalType) => ProposalStatus; export declare type CauseOfFailedProposal = 'NotEnoughVotes' | 'Unknown'; export declare const proposalFailReason: (proposal: ProposalType) => CauseOfFailedProposal; export declare type VoteStatus = 'Voting' | 'Reveal vote' | 'Calculate Reward' | 'Collect Reward' | 'Failed'; export declare const getVoteStatus: (proposal: ProposalType) => VoteStatus; export declare const createProposalHash: ({ name }: { name: string; }) => Buffer; declare type ATAInput = { connection: Connection; payer: Signer; mint: PublicKey; owner: PublicKey; allowOwnerOffCurve?: boolean; commitment?: Commitment; programId?: PublicKey; associatedTokenProgramId?: PublicKey; }; export declare const getOrCreateAssociatedTokenAccountIx: ({ connection, payer, mint, owner, allowOwnerOffCurve, commitment, programId, associatedTokenProgramId, }: ATAInput) => Promise<{ instruction: TransactionInstruction | null; address: PublicKey; }>; export {}; //# sourceMappingURL=utils.d.ts.map