Constructors
constructor
- new QuarryWrapper(sdk: QuarrySDK, token: Token, rewarderData: AnchorTypeDef<Object, AnchorDefined<AnchorQuarryMine, Record<string, never>>>, quarryData: AnchorTypeDef<Object, AnchorDefined<AnchorQuarryMine, Record<string, never>>>, key: PublicKey): QuarryWrapper
-
Parameters
-
-
token: Token
-
rewarderData: AnchorTypeDef<Object, AnchorDefined<AnchorQuarryMine, Record<string, never>>>
-
quarryData: AnchorTypeDef<Object, AnchorDefined<AnchorQuarryMine, Record<string, never>>>
-
key: PublicKey
Properties
Readonly
key
key: PublicKey
Readonly
quarryData
quarry
Data
: AnchorTypeDef<Object, AnchorDefined<AnchorQuarryMine, Record<string, never>>>
Readonly
rewarderData
rewarder
Data
: AnchorTypeDef<Object, AnchorDefined<AnchorQuarryMine, Record<string, never>>>
Readonly
token
token: Token
Accessors
provider
- get provider(): Provider
-
Returns Provider
Methods
computeAnnualRewardsRate
- computeAnnualRewardsRate(): u64
-
Returns u64
createMiner
- createMiner(__namedParameters?: { authority?: PublicKey }): Promise<PendingMiner>
-
Parameters
-
__namedParameters: { authority?: PublicKey } = {}
-
Optional
authority?: PublicKey
createMinerWrapper
- createMinerWrapper(authority: PublicKey, minerKey: PublicKey, tokenVaultKey: PublicKey, stakedTokenATA: PublicKey): MinerWrapper
-
Parameters
-
authority: PublicKey
-
minerKey: PublicKey
-
tokenVaultKey: PublicKey
-
stakedTokenATA: PublicKey
getMiner
- getMiner(authority: PublicKey): Promise<null | AnchorTypeDef<Object, AnchorDefined<AnchorQuarryMine, Record<string, never>>>>
-
Returns Promise<null | AnchorTypeDef<Object, AnchorDefined<AnchorQuarryMine, Record<string, never>>>>
getMinerActions
- getMinerActions(authority?: PublicKey): Promise<MinerWrapper>
-
Parameters
-
authority: PublicKey = ...
getMinerAddress
- getMinerAddress(authority: PublicKey): Promise<PublicKey>
-
Returns Promise<PublicKey>
setFamine
- setFamine(famineTs: u64): TransactionEnvelope
-
Returns TransactionEnvelope
setRewardsShare
- setRewardsShare(share: u64): TransactionEnvelope
-
Returns TransactionEnvelope
Static
fromData
- fromData(provider: Provider, rewarder: ProgramAccount<AnchorTypeDef<Object, AnchorDefined<AnchorQuarryMine, Record<string, never>>>>, quarry: ProgramAccount<AnchorTypeDef<Object, AnchorDefined<AnchorQuarryMine, Record<string, never>>>>): QuarryWrapper
-
Parameters
-
provider: Provider
-
rewarder: ProgramAccount<AnchorTypeDef<Object, AnchorDefined<AnchorQuarryMine, Record<string, never>>>>
-
quarry: ProgramAccount<AnchorTypeDef<Object, AnchorDefined<AnchorQuarryMine, Record<string, never>>>>
Static
load
- load(__namedParameters: { key: PublicKey; sdk: QuarrySDK; token: Token }): Promise<QuarryWrapper>
-
Parameters
-
__namedParameters: { key: PublicKey; sdk: QuarrySDK; token: Token }
-
key: PublicKey
-
-
token: Token
The token being staked.