Function prepareImmediateStakeAndDepositTransactions

    • Returns a group transaction to stake ALGO and deposit the xALGO received.

      Parameters

      • consensusConfig: ConsensusConfig

        consensus application and xALGO config

      • consensusState: ConsensusState

        current state of the consensus application

      • pool: Pool

        pool application to deposit into

      • poolManagerAppId: number

        pool manager application

      • senderAddr: string

        account address for the sender

      • receiverAddr: string

        account address to receive the deposit (typically the user's deposit escrow or loan escrow)

      • amount: number | bigint

        amount of ALGO to send

      • minXAlgoReceivedAmount: number | bigint

        min amount of xALGO expected to receive

      • params: SuggestedParams

        suggested params for the transactions with the fees overwritten

      • Optionalnote: Uint8Array<ArrayBufferLike>

        optional note to distinguish who is the minter (must pass to be eligible for revenue share)

      Returns Transaction[]

      Transaction[] stake transactions