Documentation
    Preparing search index...

    Function claimLendingRewardsPTB

    • Claim lending rewards in the PTB (Programmable Transaction Block)

      This function adds operations to a transaction block to claim rewards from the lending protocol. It supports different claiming methods including direct claiming, claiming with account capabilities, and custom coin handling (transfer or deposit).

      Parameters

      • tx: Transaction

        The transaction block to add reward claiming operations to

      • rewards: LendingReward[]

        Array of rewards to claim

      • Optionaloptions: Partial<
            EnvOption & AccountCapOption & {
                customCoinReceive?: {
                    depositNAVI?: { fallbackReceiveAddress?: string };
                    transfer?: string | TransactionResult;
                    type: "transfer" | "depositNAVI" | "skip";
                };
            },
        >

        Optional configuration including account capabilities and custom coin handling

        • customCoinReceive.type

          The type of custom coin handling, can be 'transfer', 'depositNAVI' or 'skip'

        • customCoinReceive.transfer

          The address to transfer the reward to, only used when options.customCoinReceive.type is 'transfer'

        • customCoinReceive.depositNAVI.fallbackReceiveAddress

          The address to transfer the reward to if the pool is full, only used when options.customCoinReceive.type is 'depositNAVI'

      Returns Promise<LendingClaimedReward[]>

      Array of claimed reward coins and their identifiers

      Error if reward fund not found or invalid configuration