Constructors
constructor
- new Operator(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>>>): Operator
-
Parameters
-
-
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>>>
Properties
Readonly
data
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>>>
Readonly
key
key: PublicKey
Accessors
program
- 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>>>>
withDelegateAccounts
- 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
delegateCreateQuarry
- delegateCreateQuarry(__namedParameters: { payer?: PublicKey; tokenMint: PublicKey }): Promise<{ quarry: PublicKey; tx: TransactionEnvelope }>
-
Parameters
-
__namedParameters: { payer?: PublicKey; tokenMint: PublicKey }
-
Optional
payer?: PublicKey
-
tokenMint: PublicKey
Returns Promise<{ quarry: PublicKey; tx: TransactionEnvelope }>
delegateSetAnnualRewards
- delegateSetAnnualRewards(newAnnualRate: u64): TransactionEnvelope
-
Returns TransactionEnvelope
delegateSetFamine
- delegateSetFamine(newFamineTs: u64, quarry: PublicKey): TransactionEnvelope
-
Parameters
-
newFamineTs: u64
-
quarry: PublicKey
Returns TransactionEnvelope
delegateSetRewardsShare
- delegateSetRewardsShare(__namedParameters: { quarry: PublicKey; share: number }): TransactionEnvelope
-
Parameters
-
__namedParameters: { quarry: PublicKey; share: number }
-
quarry: PublicKey
-
share: number
Returns TransactionEnvelope
setAdmin
- setAdmin(delegate: PublicKey): TransactionEnvelope
-
Returns TransactionEnvelope
setQuarryCreator
- setQuarryCreator(delegate: PublicKey): TransactionEnvelope
-
Returns TransactionEnvelope
setRateSetter
- setRateSetter(delegate: PublicKey): TransactionEnvelope
-
Returns TransactionEnvelope
setShareAllocator
- setShareAllocator(delegate: PublicKey): TransactionEnvelope
-
Returns TransactionEnvelope
Static
createOperator
- createOperator(__namedParameters: { admin?: PublicKey; baseKP?: Signer; payer?: PublicKey; rewarder: PublicKey; sdk: QuarrySDK }): Promise<{ key: PublicKey; tx: TransactionEnvelope }>
-
Parameters
-
__namedParameters: { admin?: PublicKey; baseKP?: Signer; payer?: PublicKey; rewarder: PublicKey; sdk: QuarrySDK }
-
Optional
admin?: PublicKey
-
Optional
baseKP?: Signer
-
Optional
payer?: PublicKey
-
rewarder: PublicKey
-
Returns Promise<{ key: PublicKey; tx: TransactionEnvelope }>
Static
load
- load(__namedParameters: { key: PublicKey; sdk: QuarrySDK }): Promise<null | Operator>
-
Parameters
-
__namedParameters: { key: PublicKey; sdk: QuarrySDK }
Returns Promise<null | Operator>
Operator helper functions.