Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • MergeMine

Index

Constructors

constructor

Properties

Readonly sdk

Accessors

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>>>>

programs

provider

  • get provider(): Provider

Methods

fetchMergeMinerData

  • fetchMergeMinerData(key: PublicKey): Promise<{ 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 }>
  • Parameters

    • key: PublicKey

    Returns Promise<{ 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 }>

fetchMergePoolData

  • fetchMergePoolData(key: PublicKey): Promise<{ 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 }>
  • Parameters

    • key: PublicKey

    Returns Promise<{ 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 }>

findMergeMinerAddress

  • findMergeMinerAddress(__namedParameters: { owner?: PublicKey; pool: PublicKey }): Promise<PublicKey>

findPoolAddress

  • findPoolAddress(__namedParameters: { primaryMint: PublicKey }): Promise<PublicKey>

getOrCreatePrimary

  • getOrCreatePrimary(__namedParameters: { mint: PublicKey; mm: PublicKey; payer?: PublicKey; pool: PublicKey; rewarder: PublicKey }): Promise<{ ixs: TransactionInstruction[]; miner: PublicKey }>
  • Parameters

    • __namedParameters: { mint: PublicKey; mm: PublicKey; payer?: PublicKey; pool: PublicKey; rewarder: PublicKey }
      • mint: PublicKey
      • mm: PublicKey
      • Optional payer?: PublicKey
      • pool: PublicKey
      • rewarder: PublicKey

    Returns Promise<{ ixs: TransactionInstruction[]; miner: PublicKey }>

initMiner

  • initMiner(__namedParameters: { mint: PublicKey; mm: PublicKey; payer?: PublicKey; pool: PublicKey; rewarder: PublicKey }): Promise<{ miner: PublicKey; tx: TransactionEnvelope }>
  • Parameters

    • __namedParameters: { mint: PublicKey; mm: PublicKey; payer?: PublicKey; pool: PublicKey; rewarder: PublicKey }
      • mint: PublicKey
      • mm: PublicKey
      • Optional payer?: PublicKey
      • pool: PublicKey
      • rewarder: PublicKey

    Returns Promise<{ miner: PublicKey; tx: TransactionEnvelope }>

loadMM

  • loadMM(__namedParameters: { mmKey: PublicKey }): Promise<MergeMiner>

newMM

  • newMM(param0: { owner?: PublicKey; payer?: PublicKey; pool: { data: Pick<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>>>, "primaryMint">; key: PublicKey }; rewarder: PublicKey; rewardsMint: PublicKey }): Promise<{ key: PublicKey; tx: TransactionEnvelope }>
  • Creates a new MM.

    Parameters

    • param0: { owner?: PublicKey; payer?: PublicKey; pool: { data: Pick<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>>>, "primaryMint">; key: PublicKey }; rewarder: PublicKey; rewardsMint: PublicKey }
      • Optional owner?: PublicKey
      • Optional payer?: PublicKey
      • pool: { data: Pick<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>>>, "primaryMint">; key: PublicKey }
        • data: Pick<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>>>, "primaryMint">
        • key: PublicKey
      • rewarder: PublicKey

        Rewarder to deposit into.

      • rewardsMint: PublicKey

        Mint received as rewards from the initial rewarder.

    Returns Promise<{ key: PublicKey; tx: TransactionEnvelope }>

newPool

  • newPool(__namedParameters: { payer?: PublicKey; primaryMint: PublicKey }): Promise<{ key: PublicKey; replicaToken: Token; tx: TransactionEnvelope }>
  • Creates a new pool.

    Parameters

    • __namedParameters: { payer?: PublicKey; primaryMint: PublicKey }
      • Optional payer?: PublicKey
      • primaryMint: PublicKey

        Primary mint.

    Returns Promise<{ key: PublicKey; replicaToken: Token; tx: TransactionEnvelope }>

Generated using TypeDoc