Hierarchy

  • MinerWrapper

Constructors

  • Parameters

    • quarry: QuarryWrapper
    • authority: PublicKey
    • minerKey: PublicKey
    • tokenVaultKey: PublicKey

      (associated w/ minerKey)

    • stakedTokenATA: PublicKey

      Staked token ATA (associated w/ authority)

    Returns MinerWrapper

Properties

authority: PublicKey
minerKey: PublicKey
stakedTokenATA: PublicKey
tokenVaultKey: PublicKey

Accessors

  • get userClaimAccounts(): ContextAccounts<NonNullable<[{ isMut: false; isSigner: true; name: "authority" }, { isMut: true; isSigner: false; name: "miner" }, { isMut: true; isSigner: false; name: "quarry" }, { isMut: false; isSigner: false; name: "unusedMinerVault" }, { isMut: false; isSigner: false; name: "unusedTokenAccount" }, { isMut: false; isSigner: false; name: "tokenProgram" }, { isMut: false; isSigner: false; name: "rewarder" }] & IdlAccountItem[]>>
  • Generates stake accounts for the user.

    Returns

    Returns ContextAccounts<NonNullable<[{ isMut: false; isSigner: true; name: "authority" }, { isMut: true; isSigner: false; name: "miner" }, { isMut: true; isSigner: false; name: "quarry" }, { isMut: false; isSigner: false; name: "unusedMinerVault" }, { isMut: false; isSigner: false; name: "unusedTokenAccount" }, { isMut: false; isSigner: false; name: "tokenProgram" }, { isMut: false; isSigner: false; name: "rewarder" }] & IdlAccountItem[]>>

  • get userStakeAccounts(): ContextAccounts<[{ isMut: false; isSigner: true; name: "authority" }, { isMut: true; isSigner: false; name: "miner" }, { isMut: true; isSigner: false; name: "quarry" }, { isMut: true; isSigner: false; name: "minerVault" }, { isMut: true; isSigner: false; name: "tokenAccount" }, { isMut: false; isSigner: false; name: "tokenProgram" }, { isMut: false; isSigner: false; name: "rewarder" }]>
  • Generates stake accounts for the user.

    Returns

    Returns ContextAccounts<[{ isMut: false; isSigner: true; name: "authority" }, { isMut: true; isSigner: false; name: "miner" }, { isMut: true; isSigner: false; name: "quarry" }, { isMut: true; isSigner: false; name: "minerVault" }, { isMut: true; isSigner: false; name: "tokenAccount" }, { isMut: false; isSigner: false; name: "tokenProgram" }, { isMut: false; isSigner: false; name: "rewarder" }]>

Methods

  • Claims an amount of tokens.

    Returns

    Returns Promise<TransactionEnvelope>

  • Claims an amount of tokens.

    Returns

    Returns Promise<TransactionEnvelope>

  • Creates the ATA of the user's staked token if it doesn't exist.

    Returns Promise<null | TransactionEnvelope>

  • Stakes the current wallet's tokens into the pool.

    Returns

    Parameters

    • amount: TokenAmount

    Returns TransactionEnvelope

  • Withdraws the current wallet's tokens from the pool.

    Returns

    Parameters

    • amount: TokenAmount

    Returns TransactionEnvelope

Generated using TypeDoc