Skip to content
Discussion options

You must be logged in to vote

I found this doc, it might give you some ideas.

I don't have a good solution right now, and i'm asking around.

This thread might also be helpful.

A pretty complex solution I can think of.

import { Aptos, AptosConfig, Network } from "@aptos-labs/ts-sdk";

const config = new AptosConfig({
  network: Network.MAINNET,
});
export const aptos = new Aptos(config);

export const calculateReward = async () =>
  {
    const delegatorAddr =
      "0x42b7cd08d63005d04c8dd0ed5e7e1acab3cf20bf77dab114ba5a2806d0b97be2";
    const poolAddress =
      "0x9bfd93ebaa1efd65515642942a607eeca53a0188c04c21ced646d2f0b9f551e8";

    const [activeStake, inactiveStake, pendingInactiveStake] = await aptos.view(
      {

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@buzzlamicjihad
Comment options

@jcbrand
Comment options

@0x-j
Comment options

0x-j May 11, 2024
Maintainer

Answer selected by 0x-j
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
staking Questions about staking APT
3 participants