Skip to content

Has anyone actually gotten this sdk to work? #34

@jongan69

Description

@jongan69

None of the examples actually use an npm import, only local imports

What your documentation says:

import StakeForFee from "@meteora-ag/m3m3";
import { PublicKey } from "@solana/web3.js";
import { Wallet, AnchorProvider } from "@project-serum/anchor";

// Connection, Wallet, and AnchorProvider to interact with the network
const mainnetConnection = new Connection("https://api.mainnet-beta.solana.com");
const mockWallet = new Wallet(new Keypair());
const provider = new AnchorProvider(mainnetConnection, mockWallet, {
  commitment: "confirmed",
});
// Alternatively, to use Solana Wallet Adapter

const poolAddress = new PublicKey(
  "G2MRSjNjCbFUmMf32Z1aXYhy6pc1ihLyYg6orKedyjJG"
);
const m3m3 = await StakeForFee.create(connection, poolAddress);

What I get:

TypeError: StakeForFee.create is not a function

I've tried with both

  • import StakeForFee, { U64_MAX } from "@meteora-ag/m3m3";
  • import StakeForFee, { U64_MAX } from "@meteora-ag/stake-for-fee";

Would love some clarity on what I am doing wrong, I want to claim fees using a script but can not do so using this sdk and am going in circles

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions