UNPKG

@ajna-finance/sdk

Version:

A typescript SDK that can be used to create Dapps in Ajna ecosystem.

14 lines (13 loc) 743 B
import { BigNumber } from 'ethers'; import { ProposalInfo, ProposalInfoArray } from '../types'; type Votes = [proposalId: string, votesUsed: string]; /** * Scale the votes to use the full voting power based on a set of votes provided * @param {BigNumber} votingPower Voting power * @param {Array<Votes>} votes Array of proposalIds and vote used * @returns {Array<Votes>} Array of proposalIds and new votes calculated */ export declare const optimize: (votingPower: BigNumber, votes: Array<Votes>) => Array<Votes>; export declare function findBestProposals(proposals: Array<ProposalInfo>, tokensAvailable: number): Array<ProposalInfo>; export declare const formatProposalInfo: (proposalInfo: ProposalInfoArray) => ProposalInfo; export {};