Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • MergeMiner

Index

Constructors

constructor

  • new MergeMiner(mergeMine: MergeMine, pool: { data: AnchorTypeDef<({ name: "MergePool"; type: { fields: [{ name: "primaryMint"; type: "publicKey" }, { name: "bump"; type: "u8" }, { name: "replicaMint"; type: "publicKey" }, { name: "mmCount"; type: "u64" }, { name: "totalPrimaryBalance"; type: "u64" }, { name: "totalReplicaBalance"; type: "u64" }, { name: "reserved"; type: { array: ["u64", 16] } }]; kind: "struct" } } & { name: "MergePool" }) & never, AnchorDefined<QuarryMergeMineIDL, Record<string, never>>>; key: PublicKey }, mm: { data: AnchorTypeDef<never & ({ name: "MergeMiner"; type: { fields: [{ name: "pool"; type: "publicKey" }, { name: "owner"; type: "publicKey" }, { name: "bump"; type: "u8" }, { name: "index"; type: "u64" }, { name: "primaryBalance"; type: "u64" }, { name: "replicaBalance"; type: "u64" }]; kind: "struct" } } & { name: "MergeMiner" }), AnchorDefined<QuarryMergeMineIDL, Record<string, never>>>; key: PublicKey }): MergeMiner
  • Parameters

    • mergeMine: MergeMine
    • pool: { data: AnchorTypeDef<({ name: "MergePool"; type: { fields: [{ name: "primaryMint"; type: "publicKey" }, { name: "bump"; type: "u8" }, { name: "replicaMint"; type: "publicKey" }, { name: "mmCount"; type: "u64" }, { name: "totalPrimaryBalance"; type: "u64" }, { name: "totalReplicaBalance"; type: "u64" }, { name: "reserved"; type: { array: ["u64", 16] } }]; kind: "struct" } } & { name: "MergePool" }) & never, AnchorDefined<QuarryMergeMineIDL, Record<string, never>>>; key: PublicKey }
      • data: AnchorTypeDef<({ name: "MergePool"; type: { fields: [{ name: "primaryMint"; type: "publicKey" }, { name: "bump"; type: "u8" }, { name: "replicaMint"; type: "publicKey" }, { name: "mmCount"; type: "u64" }, { name: "totalPrimaryBalance"; type: "u64" }, { name: "totalReplicaBalance"; type: "u64" }, { name: "reserved"; type: { array: ["u64", 16] } }]; kind: "struct" } } & { name: "MergePool" }) & never, AnchorDefined<QuarryMergeMineIDL, Record<string, never>>>
      • key: PublicKey
    • mm: { data: AnchorTypeDef<never & ({ name: "MergeMiner"; type: { fields: [{ name: "pool"; type: "publicKey" }, { name: "owner"; type: "publicKey" }, { name: "bump"; type: "u8" }, { name: "index"; type: "u64" }, { name: "primaryBalance"; type: "u64" }, { name: "replicaBalance"; type: "u64" }]; kind: "struct" } } & { name: "MergeMiner" }), AnchorDefined<QuarryMergeMineIDL, Record<string, never>>>; key: PublicKey }
      • data: AnchorTypeDef<never & ({ name: "MergeMiner"; type: { fields: [{ name: "pool"; type: "publicKey" }, { name: "owner"; type: "publicKey" }, { name: "bump"; type: "u8" }, { name: "index"; type: "u64" }, { name: "primaryBalance"; type: "u64" }, { name: "replicaBalance"; type: "u64" }]; kind: "struct" } } & { name: "MergeMiner" }), AnchorDefined<QuarryMergeMineIDL, Record<string, never>>>
      • key: PublicKey

    Returns MergeMiner

Properties

Readonly mergeMine

mergeMine: MergeMine

Readonly mm

mm: { data: AnchorTypeDef<never & ({ name: "MergeMiner"; type: { fields: [{ name: "pool"; type: "publicKey" }, { name: "owner"; type: "publicKey" }, { name: "bump"; type: "u8" }, { name: "index"; type: "u64" }, { name: "primaryBalance"; type: "u64" }, { name: "replicaBalance"; type: "u64" }]; kind: "struct" } } & { name: "MergeMiner" }), AnchorDefined<QuarryMergeMineIDL, Record<string, never>>>; key: PublicKey }

Type declaration

  • data: AnchorTypeDef<never & ({ name: "MergeMiner"; type: { fields: [{ name: "pool"; type: "publicKey" }, { name: "owner"; type: "publicKey" }, { name: "bump"; type: "u8" }, { name: "index"; type: "u64" }, { name: "primaryBalance"; type: "u64" }, { name: "replicaBalance"; type: "u64" }]; kind: "struct" } } & { name: "MergeMiner" }), AnchorDefined<QuarryMergeMineIDL, Record<string, never>>>
  • key: PublicKey

Readonly pool

pool: { data: AnchorTypeDef<({ name: "MergePool"; type: { fields: [{ name: "primaryMint"; type: "publicKey" }, { name: "bump"; type: "u8" }, { name: "replicaMint"; type: "publicKey" }, { name: "mmCount"; type: "u64" }, { name: "totalPrimaryBalance"; type: "u64" }, { name: "totalReplicaBalance"; type: "u64" }, { name: "reserved"; type: { array: ["u64", 16] } }]; kind: "struct" } } & { name: "MergePool" }) & never, AnchorDefined<QuarryMergeMineIDL, Record<string, never>>>; key: PublicKey }

Type declaration

  • data: AnchorTypeDef<({ name: "MergePool"; type: { fields: [{ name: "primaryMint"; type: "publicKey" }, { name: "bump"; type: "u8" }, { name: "replicaMint"; type: "publicKey" }, { name: "mmCount"; type: "u64" }, { name: "totalPrimaryBalance"; type: "u64" }, { name: "totalReplicaBalance"; type: "u64" }, { name: "reserved"; type: { array: ["u64", 16] } }]; kind: "struct" } } & { name: "MergePool" }) & never, AnchorDefined<QuarryMergeMineIDL, Record<string, never>>>
  • key: PublicKey

Accessors

commonStakeAccounts

  • get commonStakeAccounts(): Pick<QuarryStakeAccounts, "pool" | "tokenProgram" | "mm" | "mineProgram" | "unusedAccount">

primaryMint

  • get primaryMint(): PublicKey

program

  • get program(): AnchorProgram<QuarryMergeMineIDL, { mergeMiner: AnchorTypeDef<never & ({ name: "MergeMiner"; type: { fields: [{ name: "pool"; type: "publicKey" }, { name: "owner"; type: "publicKey" }, { name: "bump"; type: "u8" }, { name: "index"; type: "u64" }, { name: "primaryBalance"; type: "u64" }, { name: "replicaBalance"; type: "u64" }]; kind: "struct" } } & { name: "MergeMiner" }), AnchorDefined<QuarryMergeMineIDL, Record<string, never>>>; mergePool: AnchorTypeDef<({ name: "MergePool"; type: { fields: [{ name: "primaryMint"; type: "publicKey" }, { name: "bump"; type: "u8" }, { name: "replicaMint"; type: "publicKey" }, { name: "mmCount"; type: "u64" }, { name: "totalPrimaryBalance"; type: "u64" }, { name: "totalReplicaBalance"; type: "u64" }, { name: "reserved"; type: { array: ["u64", 16] } }]; kind: "struct" } } & { name: "MergePool" }) & never, AnchorDefined<QuarryMergeMineIDL, Record<string, never>>> }, AnchorDefined<QuarryMergeMineIDL, Record<string, never>>, MakeInstructions<[{ accounts: [{ isMut: true; isSigner: false; name: "pool" }, { isMut: false; isSigner: false; name: "primaryMint" }, { isMut: true; isSigner: false; name: "replicaMint" }, { isMut: true; isSigner: true; name: "payer" }, { isMut: false; isSigner: false; name: "tokenProgram" }, { isMut: false; isSigner: false; name: "systemProgram" }, { isMut: false; isSigner: false; name: "rent" }]; args: [{ name: "bump"; type: "u8" }, { name: "mintBump"; type: "u8" }]; name: "newPool" }, { accounts: [{ isMut: false; isSigner: false; name: "pool" }, { isMut: false; isSigner: false; name: "owner" }, { isMut: true; isSigner: false; name: "mm" }, { isMut: true; isSigner: true; name: "payer" }, { isMut: false; isSigner: false; name: "systemProgram" }]; args: [{ name: "bump"; type: "u8" }]; name: "initMergeMiner" }, { accounts: [{ isMut: false; isSigner: false; name: "pool" }, { isMut: false; isSigner: false; name: "mm" }, { isMut: true; isSigner: false; name: "miner" }, { isMut: true; isSigner: false; name: "quarry" }, { isMut: false; isSigner: false; name: "rewarder" }, { isMut: false; isSigner: false; name: "tokenMint" }, { isMut: false; isSigner: false; name: "minerVault" }]; args: [{ name: "bump"; type: "u8" }]; name: "initMiner" }], AnchorDefined<QuarryMergeMineIDL, Record<string, never>>>, MakeInstructions<unknown, AnchorDefined<QuarryMergeMineIDL, Record<string, never>>>>
  • Returns AnchorProgram<QuarryMergeMineIDL, { mergeMiner: AnchorTypeDef<never & ({ name: "MergeMiner"; type: { fields: [{ name: "pool"; type: "publicKey" }, { name: "owner"; type: "publicKey" }, { name: "bump"; type: "u8" }, { name: "index"; type: "u64" }, { name: "primaryBalance"; type: "u64" }, { name: "replicaBalance"; type: "u64" }]; kind: "struct" } } & { name: "MergeMiner" }), AnchorDefined<QuarryMergeMineIDL, Record<string, never>>>; mergePool: AnchorTypeDef<({ name: "MergePool"; type: { fields: [{ name: "primaryMint"; type: "publicKey" }, { name: "bump"; type: "u8" }, { name: "replicaMint"; type: "publicKey" }, { name: "mmCount"; type: "u64" }, { name: "totalPrimaryBalance"; type: "u64" }, { name: "totalReplicaBalance"; type: "u64" }, { name: "reserved"; type: { array: ["u64", 16] } }]; kind: "struct" } } & { name: "MergePool" }) & never, AnchorDefined<QuarryMergeMineIDL, Record<string, never>>> }, AnchorDefined<QuarryMergeMineIDL, Record<string, never>>, MakeInstructions<[{ accounts: [{ isMut: true; isSigner: false; name: "pool" }, { isMut: false; isSigner: false; name: "primaryMint" }, { isMut: true; isSigner: false; name: "replicaMint" }, { isMut: true; isSigner: true; name: "payer" }, { isMut: false; isSigner: false; name: "tokenProgram" }, { isMut: false; isSigner: false; name: "systemProgram" }, { isMut: false; isSigner: false; name: "rent" }]; args: [{ name: "bump"; type: "u8" }, { name: "mintBump"; type: "u8" }]; name: "newPool" }, { accounts: [{ isMut: false; isSigner: false; name: "pool" }, { isMut: false; isSigner: false; name: "owner" }, { isMut: true; isSigner: false; name: "mm" }, { isMut: true; isSigner: true; name: "payer" }, { isMut: false; isSigner: false; name: "systemProgram" }]; args: [{ name: "bump"; type: "u8" }]; name: "initMergeMiner" }, { accounts: [{ isMut: false; isSigner: false; name: "pool" }, { isMut: false; isSigner: false; name: "mm" }, { isMut: true; isSigner: false; name: "miner" }, { isMut: true; isSigner: false; name: "quarry" }, { isMut: false; isSigner: false; name: "rewarder" }, { isMut: false; isSigner: false; name: "tokenMint" }, { isMut: false; isSigner: false; name: "minerVault" }]; args: [{ name: "bump"; type: "u8" }]; name: "initMiner" }], AnchorDefined<QuarryMergeMineIDL, Record<string, never>>>, MakeInstructions<unknown, AnchorDefined<QuarryMergeMineIDL, Record<string, never>>>>

provider

  • get provider(): Provider

replicaMint

  • get replicaMint(): PublicKey

Methods

claimPrimaryRewards

  • claimPrimaryRewards(rewarder: PublicKey): Promise<TransactionEnvelope>

claimReplicaRewards

  • claimReplicaRewards(rewarder: PublicKey): Promise<TransactionEnvelope>

claimRewardsCommon

  • claimRewardsCommon(quarryMint: PublicKey, stake: QuarryStakeAccounts, mmOwner?: PublicKey): Promise<TransactionEnvelope>

deposit

  • deposit(amount: { amount: TokenAmount; rewarder: PublicKey }): Promise<TransactionEnvelope>
  • Deposit primary tokens into the merge miner.

    Parameters

    • amount: { amount: TokenAmount; rewarder: PublicKey }
      • amount: TokenAmount
      • rewarder: PublicKey

    Returns Promise<TransactionEnvelope>

getPrimaryStakeAccounts

getReplicaStakeAccounts

stakePrimaryMiner

  • stakePrimaryMiner(rewarder: PublicKey): Promise<TransactionEnvelope>
  • Deposits tokens into the primary quarry. (Not recommended-- you probably want {@link MergeMiner#deposit}.)

    Parameters

    • rewarder: PublicKey

    Returns Promise<TransactionEnvelope>

stakeReplicaMiner

  • stakeReplicaMiner(rewarder: PublicKey): Promise<TransactionEnvelope>

unstakeAllReplica

  • unstakeAllReplica(rewarder: PublicKey): Promise<TransactionEnvelope>
  • Unstakes all replica tokens from a quarry. You must call this function for each replica miner before unstaking the primary.

    Parameters

    • rewarder: PublicKey

    Returns Promise<TransactionEnvelope>

unstakePrimaryMiner

  • unstakePrimaryMiner(rewarder: PublicKey, amount: TokenAmount): Promise<TransactionEnvelope>
  • Withdraws primary tokens from the quarry. (Not recommended-- you probably want {@link MergeMiner#withdraw}.)

    Parameters

    • rewarder: PublicKey
    • amount: TokenAmount

    Returns Promise<TransactionEnvelope>

withdraw

  • withdraw(amount: { amount: TokenAmount; rewarder: PublicKey }): Promise<TransactionEnvelope>
  • Withdraw staked tokens from a merge miner.

    Parameters

    • amount: { amount: TokenAmount; rewarder: PublicKey }
      • amount: TokenAmount
      • rewarder: PublicKey

    Returns Promise<TransactionEnvelope>

withdrawPrimaryFromMM

  • withdrawPrimaryFromMM(): Promise<TransactionEnvelope>
  • Withdraws unstaked primary tokens from the merge miner. (Not recommended-- you probably want {@link MergeMiner#withdraw}.)

    Returns Promise<TransactionEnvelope>

withdrawTokens

  • withdrawTokens(withdrawMint: PublicKey): Promise<TransactionEnvelope>

Generated using TypeDoc