Operator helper functions.

Hierarchy

  • Operator

Constructors

  • Parameters

    • sdk: QuarrySDK
    • key: PublicKey
    • data: AnchorTypeDef<{ name: "Operator"; type: { fields: [{ name: "base"; type: "publicKey" }, { name: "bump"; type: "u8" }, { name: "rewarder"; type: "publicKey" }, { name: "admin"; type: "publicKey" }, { name: "rateSetter"; type: "publicKey" }, { name: "quarryCreator"; type: "publicKey" }, { name: "shareAllocator"; type: "publicKey" }, { name: "lastModifiedTs"; type: "i64" }, { name: "generation"; type: "u64" }]; kind: "struct" } } & { name: "Operator" }, AnchorDefined<QuarryOperatorIDL, Record<string, never>>>

    Returns Operator

Properties

data: AnchorTypeDef<{ name: "Operator"; type: { fields: [{ name: "base"; type: "publicKey" }, { name: "bump"; type: "u8" }, { name: "rewarder"; type: "publicKey" }, { name: "admin"; type: "publicKey" }, { name: "rateSetter"; type: "publicKey" }, { name: "quarryCreator"; type: "publicKey" }, { name: "shareAllocator"; type: "publicKey" }, { name: "lastModifiedTs"; type: "i64" }, { name: "generation"; type: "u64" }]; kind: "struct" } } & { name: "Operator" }, AnchorDefined<QuarryOperatorIDL, Record<string, never>>>
key: PublicKey

Accessors

  • get program(): AnchorProgram<QuarryOperatorIDL, { operator: AnchorTypeDef<{ name: "Operator"; type: { fields: [{ name: "base"; type: "publicKey" }, { name: "bump"; type: "u8" }, { name: "rewarder"; type: "publicKey" }, { name: "admin"; type: "publicKey" }, { name: "rateSetter"; type: "publicKey" }, { name: "quarryCreator"; type: "publicKey" }, { name: "shareAllocator"; type: "publicKey" }, { name: "lastModifiedTs"; type: "i64" }, { name: "generation"; type: "u64" }]; kind: "struct" } } & { name: "Operator" }, AnchorDefined<QuarryOperatorIDL, Record<string, never>>> }, AnchorDefined<QuarryOperatorIDL, Record<string, never>>, MakeInstructions<[{ accounts: [{ isMut: false; isSigner: true; name: "base" }, { isMut: true; isSigner: false; name: "operator"; pda: { seeds: [{ kind: "const"; type: "string"; value: "Operator" }, { kind: "account"; path: "base"; type: "publicKey" }] } }, { isMut: true; isSigner: false; name: "rewarder" }, { isMut: false; isSigner: false; name: "admin" }]; args: [{ name: "bump"; type: "u8" }]; name: "createOperator" }, { accounts: [{ isMut: false; isSigner: true; name: "base" }, { isMut: true; isSigner: false; name: "operator"; pda: { seeds: [{ kind: "const"; type: "string"; value: "Operator" }, { kind: "account"; path: "base"; type: "publicKey" }] } }, { isMut: true; isSigner: false; name: "rewarder" }, { isMut: false; isSigner: false; name: "admin" }]; args: []; name: "createOperatorV2" }, { accounts: [{ isMut: true; isSigner: false; name: "operator" }, { isMut: false; isSigner: true; name: "admin" }, { isMut: false; isSigner: false; name: "delegate" }]; args: []; name: "setAdmin" }], AnchorDefined<QuarryOperatorIDL, Record<string, never>>>, MakeInstructions<unknown, AnchorDefined<QuarryOperatorIDL, Record<string, never>>>>
  • Returns AnchorProgram<QuarryOperatorIDL, { operator: AnchorTypeDef<{ name: "Operator"; type: { fields: [{ name: "base"; type: "publicKey" }, { name: "bump"; type: "u8" }, { name: "rewarder"; type: "publicKey" }, { name: "admin"; type: "publicKey" }, { name: "rateSetter"; type: "publicKey" }, { name: "quarryCreator"; type: "publicKey" }, { name: "shareAllocator"; type: "publicKey" }, { name: "lastModifiedTs"; type: "i64" }, { name: "generation"; type: "u64" }]; kind: "struct" } } & { name: "Operator" }, AnchorDefined<QuarryOperatorIDL, Record<string, never>>> }, AnchorDefined<QuarryOperatorIDL, Record<string, never>>, MakeInstructions<[{ accounts: [{ isMut: false; isSigner: true; name: "base" }, { isMut: true; isSigner: false; name: "operator"; pda: { seeds: [{ kind: "const"; type: "string"; value: "Operator" }, { kind: "account"; path: "base"; type: "publicKey" }] } }, { isMut: true; isSigner: false; name: "rewarder" }, { isMut: false; isSigner: false; name: "admin" }]; args: [{ name: "bump"; type: "u8" }]; name: "createOperator" }, { accounts: [{ isMut: false; isSigner: true; name: "base" }, { isMut: true; isSigner: false; name: "operator"; pda: { seeds: [{ kind: "const"; type: "string"; value: "Operator" }, { kind: "account"; path: "base"; type: "publicKey" }] } }, { isMut: true; isSigner: false; name: "rewarder" }, { isMut: false; isSigner: false; name: "admin" }]; args: []; name: "createOperatorV2" }, { accounts: [{ isMut: true; isSigner: false; name: "operator" }, { isMut: false; isSigner: true; name: "admin" }, { isMut: false; isSigner: false; name: "delegate" }]; args: []; name: "setAdmin" }], AnchorDefined<QuarryOperatorIDL, Record<string, never>>>, MakeInstructions<unknown, AnchorDefined<QuarryOperatorIDL, Record<string, never>>>>

  • get withDelegateAccounts(): { delegate: PublicKey; operator: PublicKey; quarryMineProgram: PublicKey; rewarder: PublicKey }
  • Returns { delegate: PublicKey; operator: PublicKey; quarryMineProgram: PublicKey; rewarder: PublicKey }

    • delegate: PublicKey
    • operator: PublicKey
    • quarryMineProgram: PublicKey
    • rewarder: PublicKey

Methods

  • Parameters

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

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

  • Parameters

    • newAnnualRate: u64

    Returns TransactionEnvelope

  • Parameters

    • newFamineTs: u64
    • quarry: PublicKey

    Returns TransactionEnvelope

  • Parameters

    • __namedParameters: { quarry: PublicKey; share: number }
      • quarry: PublicKey
      • share: number

    Returns TransactionEnvelope

  • Parameters

    • __namedParameters: { admin?: PublicKey; baseKP?: Signer; payer?: PublicKey; rewarder: PublicKey; sdk: QuarrySDK }
      • Optional admin?: PublicKey
      • Optional baseKP?: Signer
      • Optional payer?: PublicKey
      • rewarder: PublicKey
      • sdk: QuarrySDK

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

Generated using TypeDoc