import type { ConsensusConfig, ConsensusState } from "./types"; import type { Pool } from "../lend"; import type { Algodv2, SuggestedParams, Transaction, Address, TransactionBoxReference } from "algosdk"; /** * * Returns information regarding the given consensus application. * * @param algodClient - Algorand client to query * @param consensusConfig - consensus application and xALGO config * @returns ConsensusState current state of the consensus application */ declare function getConsensusState(algodClient: Algodv2, consensusConfig: ConsensusConfig): Promise; declare function prepareDummyTransaction(consensusConfig: ConsensusConfig, senderAddr: string, params: SuggestedParams, foreignAccounts?: Address[], boxes?: TransactionBoxReference[]): Transaction; /** * * Returns a group transaction to stake ALGO and get xALGO immediately. * * @param consensusConfig - consensus application and xALGO config * @param consensusState - current state of the consensus application * @param senderAddr - account address for the sender * @param receiverAddr - account address to receive the xALGO at (typically the user) * @param amount - amount of ALGO to send * @param minReceivedAmount - min amount of xALGO expected to receive * @param params - suggested params for the transactions with the fees overwritten * @param note - optional note to distinguish who is the minter (must pass to be eligible for revenue share) * @returns Transaction[] stake transactions */ declare function prepareImmediateStakeTransactions(consensusConfig: ConsensusConfig, consensusState: ConsensusState, senderAddr: string, receiverAddr: string, amount: number | bigint, minReceivedAmount: number | bigint, params: SuggestedParams, note?: Uint8Array): Transaction[]; /** * * Returns a group transaction to stake ALGO and deposit the xALGO received. * * @param consensusConfig - consensus application and xALGO config * @param consensusState - current state of the consensus application * @param pool - pool application to deposit into * @param poolManagerAppId - pool manager application * @param senderAddr - account address for the sender * @param receiverAddr - account address to receive the deposit (typically the user's deposit escrow or loan escrow) * @param amount - amount of ALGO to send * @param minXAlgoReceivedAmount - min amount of xALGO expected to receive * @param params - suggested params for the transactions with the fees overwritten * @param note - optional note to distinguish who is the minter (must pass to be eligible for revenue share) * @returns Transaction[] stake transactions */ declare function prepareImmediateStakeAndDepositTransactions(consensusConfig: ConsensusConfig, consensusState: ConsensusState, pool: Pool, poolManagerAppId: number, senderAddr: string, receiverAddr: string, amount: number | bigint, minXAlgoReceivedAmount: number | bigint, params: SuggestedParams, note?: Uint8Array): Transaction[]; /** * * Returns a group transaction to stake ALGO and get xALGO after 320 rounds. * * @param consensusConfig - consensus application and xALGO config * @param consensusState - current state of the consensus application * @param senderAddr - account address for the sender * @param receiverAddr - account address to receive the xALGO at (typically the user) * @param amount - amount of ALGO to send * @param nonce - used to generate the delayed mint box (must be two bytes in length) * @param params - suggested params for the transactions with the fees overwritten * @param includeBoxMinBalancePayment - whether to include ALGO payment to app for box min balance * @param note - optional note to distinguish who is the minter (must pass to be eligible for revenue share) * @returns Transaction[] stake transactions */ declare function prepareDelayedStakeTransactions(consensusConfig: ConsensusConfig, consensusState: ConsensusState, senderAddr: string, receiverAddr: string, amount: number | bigint, nonce: Uint8Array, params: SuggestedParams, includeBoxMinBalancePayment?: boolean, note?: Uint8Array): Transaction[]; /** * * Returns a group transaction to claim xALGO from delayed stake after 320 rounds. * * @param consensusConfig - consensus application and xALGO config * @param consensusState - current state of the consensus application * @param senderAddr - account address for the sender * @param minterAddr - account address for the user who submitted the delayed stake * @param receiverAddr - account address for the receiver of the xALGO * @param nonce - what was used to generate the delayed mint box * @param params - suggested params for the transactions with the fees overwritten * @returns Transaction[] stake transactions */ declare function prepareClaimDelayedStakeTransactions(consensusConfig: ConsensusConfig, consensusState: ConsensusState, senderAddr: string, minterAddr: string, receiverAddr: string, nonce: Uint8Array, params: SuggestedParams): Transaction[]; /** * * Returns a group transaction to unstake xALGO and get ALGO. * * @param consensusConfig - consensus application and xALGO config * @param consensusState - current state of the consensus application * @param senderAddr - account address for the sender * @param receiverAddr - account address to receive the xALGO at (typically the user) * @param amount - amount of xALGO to send * @param minReceivedAmount - min amount of ALGO expected to receive * @param params - suggested params for the transactions with the fees overwritten * @param note - optional note to distinguish who is the burner (must pass to be eligible for revenue share) * @returns Transaction[] unstake transactions */ declare function prepareUnstakeTransactions(consensusConfig: ConsensusConfig, consensusState: ConsensusState, senderAddr: string, receiverAddr: string, amount: number | bigint, minReceivedAmount: number | bigint, params: SuggestedParams, note?: Uint8Array): Transaction[]; /** * * Returns a group transaction to claim xALGO fees. * * @param consensusConfig - consensus application and xALGO config * @param consensusState - current state of the consensus application * @param senderAddr - account address for the sender * @param receiverAddr - account address to receive the ALGO fees * @param params - suggested params for the transactions with the fees overwritten * @returns Transaction[] claim fees transactions */ declare function prepareClaimConsensusFeesTransactions(consensusConfig: ConsensusConfig, consensusState: ConsensusState, senderAddr: string, receiverAddr: string, params: SuggestedParams): Transaction[]; /** * * Only for third-party node runners. * Returns a transaction to set the proposer admin which can register online/offline. * * @param consensusConfig - consensus application and xALGO config * @param consensusState - current state of the consensus application * @param senderAddr - account address for the sender * @param proposerAddr - account address of the proposer * @param newProposerAdminAddr - admin which you want to set * @param params - suggested params for the transactions with the fees overwritten * @returns Transaction set proposer admin transaction */ declare function prepareSetProposerAdminTransaction(consensusConfig: ConsensusConfig, consensusState: ConsensusState, senderAddr: string, proposerAddr: string, newProposerAdminAddr: string, params: SuggestedParams): Transaction; /** * * Only for third-party node runners. * Returns a transaction to register a proposer online. * * @param consensusConfig - consensus application and xALGO config * @param consensusState - current state of the consensus application * @param senderAddr - account address for the sender * @param proposerAddr - account address of the proposer * @param voteKey - vote key * @param selectionKey - selection key * @param stateProofKey - state proof key * @param voteFirstRound - vote first round * @param voteLastRound - vote last round * @param voteKeyDilution - vote key dilution * @param params - suggested params for the transactions with the fees overwritten * @returns Transaction register online transaction */ declare function prepareRegisterProposerOnlineTransactions(consensusConfig: ConsensusConfig, consensusState: ConsensusState, senderAddr: string, proposerAddr: string, voteKey: Buffer, selectionKey: Buffer, stateProofKey: Buffer, voteFirstRound: number | bigint, voteLastRound: number | bigint, voteKeyDilution: number | bigint, params: SuggestedParams): Transaction[]; /** * * Only for third-party node runners. * Returns a transaction to register a proposer offline. * * @param consensusConfig - consensus application and xALGO config * @param consensusState - current state of the consensus application * @param senderAddr - account address for the sender * @param proposerAddr - account address of the proposer * @param params - suggested params for the transactions with the fees overwritten * @returns Transaction register offline transaction */ declare function prepareRegisterProposerOfflineTransaction(consensusConfig: ConsensusConfig, consensusState: ConsensusState, senderAddr: string, proposerAddr: string, params: SuggestedParams): Transaction; export { getConsensusState, prepareDummyTransaction, prepareImmediateStakeTransactions, prepareImmediateStakeAndDepositTransactions, prepareDelayedStakeTransactions, prepareClaimDelayedStakeTransactions, prepareUnstakeTransactions, prepareClaimConsensusFeesTransactions, prepareSetProposerAdminTransaction, prepareRegisterProposerOnlineTransactions, prepareRegisterProposerOfflineTransaction, }; //# sourceMappingURL=consensus.d.ts.map