Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@quarryprotocol/quarry-sdk

Package Overview
Dependencies
Maintainers
1
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@quarryprotocol/quarry-sdk - npm Package Compare versions

Comparing version 3.0.0 to 4.0.0

12

CHANGELOG.md

@@ -8,2 +8,14 @@ # Quarry Protocol Changelog

## [v4.0.0]
### Breaking
- Upgrade to Anchor v0.23.0 ([#409](https://github.com/QuarryProtocol/quarry/pull/409)).
## [v3.0.0]
### Breaking
- Upgrade to Anchor v0.22.0 ([#409](https://github.com/QuarryProtocol/quarry/pull/409)).
## [v2.0.1]

@@ -10,0 +22,0 @@

4

dist/cjs/idls/quarry_merge_mine.d.ts
export declare type QuarryMergeMineIDL = {
version: "3.0.0";
version: "4.0.0";
name: "quarry_merge_mine";

@@ -967,3 +967,3 @@ instructions: [

export declare type AnchorQuarryMergeMine = {
version: "3.0.0";
version: "4.0.0";
name: "quarry_merge_mine";

@@ -970,0 +970,0 @@ instructions: [

@@ -6,3 +6,3 @@ "use strict";

exports.AnchorQuarryMergeMineIDL = {
version: "3.0.0",
version: "4.0.0",
name: "quarry_merge_mine",

@@ -972,3 +972,3 @@ instructions: [

exports.QuarryMergeMineJSON = {
version: "3.0.0",
version: "4.0.0",
name: "quarry_merge_mine",

@@ -975,0 +975,0 @@ instructions: [

export declare type QuarryMineIDL = {
version: "3.0.0";
version: "4.0.0";
name: "quarry_mine";

@@ -1039,3 +1039,3 @@ instructions: [

export declare type AnchorQuarryMine = {
version: "3.0.0";
version: "4.0.0";
name: "quarry_mine";

@@ -1042,0 +1042,0 @@ instructions: [

@@ -6,3 +6,3 @@ "use strict";

exports.AnchorQuarryMineIDL = {
version: "3.0.0",
version: "4.0.0",
name: "quarry_mine",

@@ -1044,3 +1044,3 @@ instructions: [

exports.QuarryMineJSON = {
version: "3.0.0",
version: "4.0.0",
name: "quarry_mine",

@@ -1047,0 +1047,0 @@ instructions: [

export declare type QuarryMintWrapperIDL = {
version: "3.0.0";
version: "4.0.0";
name: "quarry_mint_wrapper";

@@ -486,3 +486,3 @@ instructions: [

export declare type AnchorQuarryMintWrapper = {
version: "3.0.0";
version: "4.0.0";
name: "quarry_mint_wrapper";

@@ -489,0 +489,0 @@ instructions: [

@@ -6,3 +6,3 @@ "use strict";

exports.AnchorQuarryMintWrapperIDL = {
version: "3.0.0",
version: "4.0.0",
name: "quarry_mint_wrapper",

@@ -491,3 +491,3 @@ instructions: [

exports.QuarryMintWrapperJSON = {
version: "3.0.0",
version: "4.0.0",
name: "quarry_mint_wrapper",

@@ -494,0 +494,0 @@ instructions: [

export declare type QuarryOperatorIDL = {
version: "3.0.0";
version: "4.0.0";
name: "quarry_operator";

@@ -389,3 +389,3 @@ instructions: [

export declare type AnchorQuarryOperator = {
version: "3.0.0";
version: "4.0.0";
name: "quarry_operator";

@@ -392,0 +392,0 @@ instructions: [

@@ -6,3 +6,3 @@ "use strict";

exports.AnchorQuarryOperatorIDL = {
version: "3.0.0",
version: "4.0.0",
name: "quarry_operator",

@@ -394,3 +394,3 @@ instructions: [

exports.QuarryOperatorJSON = {
version: "3.0.0",
version: "4.0.0",
name: "quarry_operator",

@@ -397,0 +397,0 @@ instructions: [

export declare type QuarryRedeemerIDL = {
version: "3.0.0";
version: "4.0.0";
name: "quarry_redeemer";

@@ -217,3 +217,3 @@ instructions: [

export declare type AnchorQuarryRedeemer = {
version: "3.0.0";
version: "4.0.0";
name: "quarry_redeemer";

@@ -220,0 +220,0 @@ instructions: [

@@ -6,3 +6,3 @@ "use strict";

exports.AnchorQuarryRedeemerIDL = {
version: "3.0.0",
version: "4.0.0",
name: "quarry_redeemer",

@@ -222,3 +222,3 @@ instructions: [

exports.QuarryRedeemerJSON = {
version: "3.0.0",
version: "4.0.0",
name: "quarry_redeemer",

@@ -225,0 +225,0 @@ instructions: [

export declare type QuarryRegistryIDL = {
version: "3.0.0";
version: "4.0.0";
name: "quarry_registry";

@@ -98,3 +98,3 @@ instructions: [

export declare type AnchorQuarryRegistry = {
version: "3.0.0";
version: "4.0.0";
name: "quarry_registry";

@@ -101,0 +101,0 @@ instructions: [

@@ -6,3 +6,3 @@ "use strict";

exports.AnchorQuarryRegistryIDL = {
version: "3.0.0",
version: "4.0.0",
name: "quarry_registry",

@@ -103,3 +103,3 @@ instructions: [

exports.QuarryRegistryJSON = {
version: "3.0.0",
version: "4.0.0",
name: "quarry_registry",

@@ -106,0 +106,0 @@ instructions: [

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
(0, tslib_1.__exportStar)(require("./constants"), exports);
(0, tslib_1.__exportStar)(require("./programs"), exports);
(0, tslib_1.__exportStar)(require("./sdk"), exports);
(0, tslib_1.__exportStar)(require("./wrappers"), exports);
tslib_1.__exportStar(require("./constants"), exports);
tslib_1.__exportStar(require("./programs"), exports);
tslib_1.__exportStar(require("./sdk"), exports);
tslib_1.__exportStar(require("./wrappers"), exports);
//# sourceMappingURL=index.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
(0, tslib_1.__exportStar)(require("./mine"), exports);
(0, tslib_1.__exportStar)(require("./mintWrapper"), exports);
(0, tslib_1.__exportStar)(require("./operator"), exports);
(0, tslib_1.__exportStar)(require("./quarryMergeMine"), exports);
(0, tslib_1.__exportStar)(require("./redeemer"), exports);
(0, tslib_1.__exportStar)(require("./registry"), exports);
tslib_1.__exportStar(require("./mine"), exports);
tslib_1.__exportStar(require("./mintWrapper"), exports);
tslib_1.__exportStar(require("./operator"), exports);
tslib_1.__exportStar(require("./quarryMergeMine"), exports);
tslib_1.__exportStar(require("./redeemer"), exports);
tslib_1.__exportStar(require("./registry"), exports);
//# sourceMappingURL=index.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
(0, tslib_1.__exportStar)(require("../idls/quarry_mine"), exports);
tslib_1.__exportStar(require("../idls/quarry_mine"), exports);
//# sourceMappingURL=mine.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
(0, tslib_1.__exportStar)(require("../idls/quarry_mint_wrapper"), exports);
tslib_1.__exportStar(require("../idls/quarry_mint_wrapper"), exports);
//# sourceMappingURL=mintWrapper.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
(0, tslib_1.__exportStar)(require("../idls/quarry_operator"), exports);
tslib_1.__exportStar(require("../idls/quarry_operator"), exports);
//# sourceMappingURL=operator.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
(0, tslib_1.__exportStar)(require("../idls/quarry_merge_mine"), exports);
tslib_1.__exportStar(require("../idls/quarry_merge_mine"), exports);
//# sourceMappingURL=quarryMergeMine.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
(0, tslib_1.__exportStar)(require("../idls/quarry_redeemer"), exports);
tslib_1.__exportStar(require("../idls/quarry_redeemer"), exports);
//# sourceMappingURL=redeemer.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
(0, tslib_1.__exportStar)(require("../idls/quarry_registry"), exports);
tslib_1.__exportStar(require("../idls/quarry_registry"), exports);
//# sourceMappingURL=registry.js.map

@@ -62,3 +62,3 @@ "use strict";

loadRedeemer({ iouMint, redemptionMint, }) {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
return yield redeemer_1.RedeemerWrapper.load({ iouMint, redemptionMint, sdk: this });

@@ -68,3 +68,3 @@ });

createRedeemer({ iouMint, redemptionMint, }) {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
return yield redeemer_1.RedeemerWrapper.createRedeemer({

@@ -83,3 +83,3 @@ iouMint,

loadOperator(key) {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
return yield operator_1.Operator.load({

@@ -96,3 +96,3 @@ sdk: this,

createOperator({ rewarder, baseKP = web3_js_1.Keypair.generate(), admin = this.provider.wallet.publicKey, payer = this.provider.wallet.publicKey, }) {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
return yield operator_1.Operator.createOperator({

@@ -99,0 +99,0 @@ sdk: this,

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
(0, tslib_1.__exportStar)(require("./mergeMine"), exports);
(0, tslib_1.__exportStar)(require("./mine"), exports);
(0, tslib_1.__exportStar)(require("./mintWrapper"), exports);
(0, tslib_1.__exportStar)(require("./operator"), exports);
(0, tslib_1.__exportStar)(require("./redeemer"), exports);
(0, tslib_1.__exportStar)(require("./registry"), exports);
tslib_1.__exportStar(require("./mergeMine"), exports);
tslib_1.__exportStar(require("./mine"), exports);
tslib_1.__exportStar(require("./mintWrapper"), exports);
tslib_1.__exportStar(require("./operator"), exports);
tslib_1.__exportStar(require("./redeemer"), exports);
tslib_1.__exportStar(require("./registry"), exports);
//# sourceMappingURL=index.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
(0, tslib_1.__exportStar)(require("./mergeMiner"), exports);
(0, tslib_1.__exportStar)(require("./mergePool"), exports);
(0, tslib_1.__exportStar)(require("./pda"), exports);
(0, tslib_1.__exportStar)(require("./quarryMergeMine"), exports);
tslib_1.__exportStar(require("./mergeMiner"), exports);
tslib_1.__exportStar(require("./mergePool"), exports);
tslib_1.__exportStar(require("./pda"), exports);
tslib_1.__exportStar(require("./quarryMergeMine"), exports);
//# sourceMappingURL=index.js.map

@@ -34,3 +34,3 @@ "use strict";

deposit({ amount, rewarder, }) {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
const owner = this.provider.wallet.publicKey;

@@ -60,3 +60,3 @@ const { address: ata, instruction } = yield (0, token_utils_1.getOrCreateATA)({

stakePrimaryMiner(rewarder) {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
const stake = yield this.getPrimaryStakeAccounts(rewarder);

@@ -83,3 +83,3 @@ const mmPrimaryTokenAccount = yield (0, token_utils_1.getATAAddress)({

stakeReplicaMiner(rewarder) {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
const stake = yield this.getReplicaStakeAccounts(rewarder);

@@ -144,3 +144,3 @@ const [quarry] = yield (0, __2.findQuarryAddress)(rewarder, this.replicaMint);

withdraw({ amount, rewarder, }) {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
const withdrawPrimary = yield this.unstakePrimaryMiner(rewarder, amount);

@@ -157,3 +157,3 @@ const withdrawPrimaryFromMM = yield this.withdrawTokens(amount.token.mintAccount);

unstakeAllReplica(rewarder) {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
const stake = yield this.getReplicaStakeAccounts(rewarder);

@@ -182,3 +182,3 @@ const replicaMintTokenAccount = yield (0, token_utils_1.getATAAddress)({

unstakePrimaryMiner(rewarder, amount) {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
const stake = yield this.getPrimaryStakeAccounts(rewarder);

@@ -206,3 +206,3 @@ const mmPrimaryTokenAccount = yield (0, token_utils_1.getATAAddress)({

withdrawPrimaryFromMM() {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
const owner = this.provider.wallet.publicKey;

@@ -241,3 +241,3 @@ const mmPrimaryAccount = yield (0, token_utils_1.getATAAddress)({

withdrawTokens(withdrawMint) {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
const owner = this.provider.wallet.publicKey;

@@ -272,3 +272,3 @@ const mmPrimaryAccount = yield (0, token_utils_1.getATAAddress)({

claimPrimaryRewards(rewarder) {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
return yield this.claimRewardsCommon(this.primaryMint, yield this.getPrimaryStakeAccounts(rewarder));

@@ -282,3 +282,3 @@ });

claimReplicaRewards(rewarder) {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
return yield this.claimRewardsCommon(this.replicaMint, yield this.getReplicaStakeAccounts(rewarder));

@@ -293,3 +293,3 @@ });

claimRewardsCommon(quarryMint, stake, mmOwner = this.provider.wallet.publicKey) {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
const rewarderKey = stake.rewarder;

@@ -340,3 +340,3 @@ const rewarder = yield this.mergeMine.sdk.programs.Mine.account.rewarder.fetch(rewarderKey);

getReplicaStakeAccounts(rewarder) {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
const [quarry] = yield (0, __2.findQuarryAddress)(rewarder, this.replicaMint);

@@ -355,3 +355,3 @@ const [miner] = yield (0, __2.findMinerAddress)(quarry, this.mm.key);

getPrimaryStakeAccounts(rewarder) {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
const [quarry] = yield (0, __2.findQuarryAddress)(rewarder, this.primaryMint);

@@ -358,0 +358,0 @@ const [miner] = yield (0, __2.findMinerAddress)(quarry, this.mm.key);

@@ -19,3 +19,3 @@ "use strict";

reloadData() {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
this._data = yield this.mergeMine.program.account.mergePool.fetch(this.key);

@@ -26,3 +26,3 @@ return this._data;

data() {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
if (this._data) {

@@ -46,3 +46,3 @@ return this._data;

deposit({ amount, rewarder, mmOwner = this.provider.wallet.publicKey, }) {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
const poolData = yield this.data();

@@ -101,3 +101,3 @@ const { address: ata, instruction } = yield (0, token_utils_1.getOrCreateATA)({

stakePrimaryMiner(rewarder, mergeMiner) {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
const { provider } = this.mergeMine;

@@ -126,3 +126,3 @@ const data = yield this.data();

stakeReplicaMiner(rewarder, mergeMiner) {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
const poolData = yield this.data();

@@ -188,3 +188,3 @@ const stake = yield this.getReplicaStakeAccounts(rewarder, mergeMiner);

withdraw({ amount, rewarder, mergeMiner, }) {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
const withdrawPrimary = yield this.unstakePrimaryMiner(rewarder, mergeMiner, amount);

@@ -201,3 +201,3 @@ const withdrawPrimaryFromMM = yield this.withdrawTokens(amount.token.mintAccount, mergeMiner);

unstakeAllReplica(rewarder, mergeMiner) {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
const poolData = yield this.data();

@@ -227,3 +227,3 @@ const stake = yield this.getReplicaStakeAccounts(rewarder, mergeMiner);

unstakePrimaryMiner(rewarder, mergeMiner, amount) {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
const poolData = yield this.data();

@@ -252,3 +252,3 @@ const stake = yield this.getPrimaryStakeAccounts(rewarder, mergeMiner);

withdrawTokens(withdrawMint, mergeMiner) {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
const owner = this.provider.wallet.publicKey;

@@ -283,3 +283,3 @@ const mmPrimaryAccount = yield (0, token_utils_1.getATAAddress)({

claimPrimaryRewards(rewarder, mergeMiner) {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
const poolData = yield this.data();

@@ -294,3 +294,3 @@ return yield this.claimRewardsCommon(poolData.primaryMint, yield this.getPrimaryStakeAccounts(rewarder, mergeMiner));

claimReplicaRewards(rewarder, mergeMiner) {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
const poolData = yield this.data();

@@ -306,3 +306,3 @@ return yield this.claimRewardsCommon(poolData.replicaMint, yield this.getReplicaStakeAccounts(rewarder, mergeMiner));

claimRewardsCommon(quarryMint, stake, mmOwner = this.provider.wallet.publicKey) {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
const rewarder = yield this.mergeMine.sdk.programs.Mine.account.rewarder.fetch(stake.rewarder);

@@ -351,3 +351,3 @@ const [minter] = yield (0, __1.findMinterAddress)(rewarder.mintWrapper, stake.rewarder, this.mergeMine.sdk.programs.MintWrapper.programId);

getReplicaStakeAccounts(rewarder, mergeMiner) {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
const poolData = yield this.data();

@@ -367,3 +367,3 @@ const [quarry] = yield (0, pda_1.findQuarryAddress)(rewarder, poolData.replicaMint);

getPrimaryStakeAccounts(rewarder, mergeMiner) {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
const poolData = yield this.data();

@@ -370,0 +370,0 @@ const [quarry] = yield (0, pda_1.findQuarryAddress)(rewarder, poolData.primaryMint);

@@ -12,3 +12,3 @@ "use strict";

*/
const findPoolAddress = ({ programId = constants_1.QUARRY_ADDRESSES.MergeMine, primaryMint, }) => (0, tslib_1.__awaiter)(void 0, void 0, void 0, function* () {
const findPoolAddress = ({ programId = constants_1.QUARRY_ADDRESSES.MergeMine, primaryMint, }) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
return yield web3_js_1.PublicKey.findProgramAddress([anchor_1.utils.bytes.utf8.encode("MergePool"), primaryMint.toBuffer()], programId);

@@ -21,3 +21,3 @@ });

*/
const findReplicaMintAddress = ({ programId = constants_1.QUARRY_ADDRESSES.MergeMine, primaryMint, }) => (0, tslib_1.__awaiter)(void 0, void 0, void 0, function* () {
const findReplicaMintAddress = ({ programId = constants_1.QUARRY_ADDRESSES.MergeMine, primaryMint, }) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
const [pool] = yield (0, exports.findPoolAddress)({ programId, primaryMint });

@@ -31,3 +31,3 @@ return yield web3_js_1.PublicKey.findProgramAddress([anchor_1.utils.bytes.utf8.encode("ReplicaMint"), pool.toBuffer()], programId);

*/
const findMergeMinerAddress = ({ programId = constants_1.QUARRY_ADDRESSES.MergeMine, pool, owner, }) => (0, tslib_1.__awaiter)(void 0, void 0, void 0, function* () {
const findMergeMinerAddress = ({ programId = constants_1.QUARRY_ADDRESSES.MergeMine, pool, owner, }) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
return yield web3_js_1.PublicKey.findProgramAddress([anchor_1.utils.bytes.utf8.encode("MergeMiner"), pool.toBuffer(), owner.toBuffer()], programId);

@@ -34,0 +34,0 @@ });

@@ -30,3 +30,3 @@ "use strict";

newPool({ primaryMint, payer = this.provider.wallet.publicKey, }) {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
const [primaryMintRaw] = yield Promise.all([

@@ -67,3 +67,3 @@ this.provider.getAccountInfo(primaryMint),

fetchMergePoolData(key) {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
return {

@@ -76,3 +76,3 @@ key,

fetchMergeMinerData(key) {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
return {

@@ -85,3 +85,3 @@ key,

findPoolAddress({ primaryMint, }) {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
const [pool] = yield (0, pda_2.findPoolAddress)({

@@ -95,3 +95,3 @@ programId: this.program.programId,

findMergeMinerAddress({ owner = this.provider.wallet.publicKey, pool, }) {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
const [mm] = yield (0, pda_2.findMergeMinerAddress)({

@@ -111,3 +111,3 @@ programId: this.program.programId,

newMM({ owner = this.provider.wallet.publicKey, payer = this.provider.wallet.publicKey, pool: { key: poolKey, data: { primaryMint }, }, rewarder, rewardsMint, }) {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
const [mm, bump] = yield (0, pda_2.findMergeMinerAddress)({

@@ -157,3 +157,3 @@ programId: this.program.programId,

getOrCreatePrimary({ mint, pool, mm, payer = this.provider.wallet.publicKey, rewarder, }) {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
const [quarryKey] = yield (0, pda_1.findQuarryAddress)(rewarder, mint);

@@ -196,3 +196,3 @@ const [minerKey, minerBump] = yield (0, pda_1.findMinerAddress)(quarryKey, mm);

initMiner({ mint, pool, mm, payer = this.provider.wallet.publicKey, rewarder, }) {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
const [quarryKey] = yield (0, pda_1.findQuarryAddress)(rewarder, mint);

@@ -234,3 +234,3 @@ const [minerKey, minerBump] = yield (0, pda_1.findMinerAddress)(quarryKey, mm);

loadMM({ mmKey }) {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
const mm = yield this.fetchMergeMinerData(mmKey);

@@ -237,0 +237,0 @@ const pool = yield this.fetchMergePoolData(mm.data.pool);

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
(0, tslib_1.__exportStar)(require("./mine"), exports);
(0, tslib_1.__exportStar)(require("./miner"), exports);
(0, tslib_1.__exportStar)(require("./payroll"), exports);
(0, tslib_1.__exportStar)(require("./pda"), exports);
(0, tslib_1.__exportStar)(require("./quarry"), exports);
(0, tslib_1.__exportStar)(require("./rewarder"), exports);
(0, tslib_1.__exportStar)(require("./types"), exports);
tslib_1.__exportStar(require("./mine"), exports);
tslib_1.__exportStar(require("./miner"), exports);
tslib_1.__exportStar(require("./payroll"), exports);
tslib_1.__exportStar(require("./pda"), exports);
tslib_1.__exportStar(require("./quarry"), exports);
tslib_1.__exportStar(require("./rewarder"), exports);
tslib_1.__exportStar(require("./types"), exports);
//# sourceMappingURL=index.js.map

@@ -20,3 +20,3 @@ "use strict";

createRewarder({ mintWrapper, baseKP = web3_js_1.Keypair.generate(), authority = this.program.provider.wallet.publicKey, }) {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
const [rewarderKey, bump] = yield (0, pda_1.findRewarderAddress)(baseKP.publicKey, this.program.programId);

@@ -60,3 +60,3 @@ const mintWrapperDataRaw = yield this.provider.getAccountInfo(mintWrapper);

loadRewarderWrapper(rewarder) {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
const rewarderData = yield this.program.account.rewarder.fetch(rewarder);

@@ -63,0 +63,0 @@ return new rewarder_1.RewarderWrapper(this, rewarder, rewarderData);

@@ -100,3 +100,3 @@ "use strict";

_getOrCreateStakedAssociatedTokenAccountInternal() {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
return yield (0, token_utils_1.getOrCreateATA)({

@@ -113,3 +113,3 @@ provider: this.provider,

createATAIfNotExists() {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
const { instruction } = yield this._getOrCreateStakedAssociatedTokenAccountInternal();

@@ -143,3 +143,3 @@ if (!instruction) {

fetchData() {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
return yield this.program.account.miner.fetch(this.minerKey);

@@ -153,3 +153,3 @@ });

claim() {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
const instructions = [];

@@ -156,0 +156,0 @@ const { address: rewardsTokenAccount, instruction: ataInstruction } = yield (0, token_utils_1.getOrCreateATA)({

@@ -6,3 +6,3 @@ "use strict";

const token_utils_1 = require("@saberhq/token-utils");
const bn_js_1 = (0, tslib_1.__importDefault)(require("bn.js"));
const bn_js_1 = tslib_1.__importDefault(require("bn.js"));
exports.ZERO = new bn_js_1.default(0);

@@ -9,0 +9,0 @@ exports.BASE_TEN = new bn_js_1.default(10);

@@ -8,7 +8,7 @@ "use strict";

const constants_1 = require("../../constants");
const findRewarderAddress = (base, programID = constants_1.QUARRY_ADDRESSES.Mine) => (0, tslib_1.__awaiter)(void 0, void 0, void 0, function* () {
const findRewarderAddress = (base, programID = constants_1.QUARRY_ADDRESSES.Mine) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
return yield web3_js_1.PublicKey.findProgramAddress([Buffer.from(anchor_1.utils.bytes.utf8.encode("Rewarder")), base.toBytes()], programID);
});
exports.findRewarderAddress = findRewarderAddress;
const findQuarryAddress = (rewarder, tokenMint, programID = constants_1.QUARRY_ADDRESSES.Mine) => (0, tslib_1.__awaiter)(void 0, void 0, void 0, function* () {
const findQuarryAddress = (rewarder, tokenMint, programID = constants_1.QUARRY_ADDRESSES.Mine) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
return yield web3_js_1.PublicKey.findProgramAddress([

@@ -21,3 +21,3 @@ Buffer.from(anchor_1.utils.bytes.utf8.encode("Quarry")),

exports.findQuarryAddress = findQuarryAddress;
const findMinerAddress = (quarry, authority, programID = constants_1.QUARRY_ADDRESSES.Mine) => (0, tslib_1.__awaiter)(void 0, void 0, void 0, function* () {
const findMinerAddress = (quarry, authority, programID = constants_1.QUARRY_ADDRESSES.Mine) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
return yield web3_js_1.PublicKey.findProgramAddress([

@@ -24,0 +24,0 @@ Buffer.from(anchor_1.utils.bytes.utf8.encode("Miner")),

@@ -51,3 +51,3 @@ "use strict";

static load({ sdk, token, key, }) {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
const program = sdk.programs.Mine;

@@ -82,3 +82,3 @@ const quarryData = yield program.account.quarry.fetch(key);

getMinerAddress(authority) {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
const [key] = yield (0, pda_1.findMinerAddress)(this.key, authority, this.program.programId);

@@ -94,3 +94,3 @@ return key;

getMiner(authority) {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
try {

@@ -110,3 +110,3 @@ return yield this.program.account.miner.fetch(yield this.getMinerAddress(authority));

getMinerActions(authority = this.program.provider.wallet.publicKey) {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
const miner = yield this.getMinerAddress(authority);

@@ -171,3 +171,3 @@ const stakedTokenATA = yield (0, token_utils_1.getATAAddress)({

createMiner({ authority = this.program.provider.wallet.publicKey, } = {}) {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
const [miner, bump] = yield (0, pda_1.findMinerAddress)(this.key, authority, this.program.programId);

@@ -174,0 +174,0 @@ const { address: minerVault, instruction: createATATX } = yield (0, token_utils_1.getOrCreateATA)({

@@ -23,3 +23,3 @@ "use strict";

getQuarry(token) {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
const quarryKey = yield this.getQuarryKey(token);

@@ -39,3 +39,3 @@ return yield quarry_1.QuarryWrapper.load({

getQuarryKey(token) {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
return yield this.getQuarryKeyForMint(token.mintAccount);

@@ -50,3 +50,3 @@ });

getQuarryKeyForMint(mint) {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
const [quarryKey] = yield (0, pda_1.findQuarryAddress)(this.rewarderKey, mint, this.program.programId);

@@ -62,3 +62,3 @@ return quarryKey;

createQuarry({ token, authority = this.program.provider.wallet.publicKey, }) {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
const [quarryKey, bump] = yield (0, pda_1.findQuarryAddress)(this.rewarderKey, token.mintAccount, this.program.programId);

@@ -107,3 +107,3 @@ const ix = this.program.instruction.createQuarry(bump, {

setAndSyncAnnualRewards(newAnnualRate, mints) {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
const tx = yield this.syncQuarryRewards(mints);

@@ -119,5 +119,5 @@ return this.setAnnualRewards({ newAnnualRate }).combine(tx);

syncQuarryRewards(mints) {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
const instructions = [];
yield Promise.all(mints.map((m) => (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
yield Promise.all(mints.map((m) => tslib_1.__awaiter(this, void 0, void 0, function* () {
const quarry = yield this.getQuarryKeyForMint(m);

@@ -124,0 +124,0 @@ instructions.push(this.program.instruction.updateQuarryRewards({

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
(0, tslib_1.__exportStar)(require("./mintWrapper"), exports);
(0, tslib_1.__exportStar)(require("./pda"), exports);
(0, tslib_1.__exportStar)(require("./types"), exports);
tslib_1.__exportStar(require("./mintWrapper"), exports);
tslib_1.__exportStar(require("./pda"), exports);
tslib_1.__exportStar(require("./types"), exports);
//# sourceMappingURL=index.js.map

@@ -18,3 +18,3 @@ "use strict";

newWrapper({ hardcap, tokenMint, baseKP = web3_js_1.Keypair.generate(), tokenProgram = token_utils_1.TOKEN_PROGRAM_ID, admin = this.program.provider.wallet.publicKey, payer = this.program.provider.wallet.publicKey, }) {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
const [mintWrapper, nonce] = yield (0, pda_1.findMintWrapperAddress)(baseKP.publicKey, this.program.programId);

@@ -40,4 +40,4 @@ return {

newWrapperAndMint(_a) {
var { mintKP = web3_js_1.Keypair.generate(), decimals = 6 } = _a, newWrapperArgs = (0, tslib_1.__rest)(_a, ["mintKP", "decimals"]);
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
var { mintKP = web3_js_1.Keypair.generate(), decimals = 6 } = _a, newWrapperArgs = tslib_1.__rest(_a, ["mintKP", "decimals"]);
return tslib_1.__awaiter(this, void 0, void 0, function* () {
const provider = this.provider;

@@ -65,3 +65,3 @@ const { mintWrapper, tx: initMintProxyTX } = yield this.newWrapper(Object.assign(Object.assign({}, newWrapperArgs), { tokenMint: mintKP.publicKey }));

fetchMintWrapper(wrapper) {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
const accountInfo = yield this.program.provider.connection.getAccountInfo(wrapper);

@@ -80,3 +80,3 @@ if (!accountInfo) {

fetchMinter(wrapper, authority) {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
const [minterAddress] = yield (0, pda_1.findMinterAddress)(wrapper, authority, this.program.programId);

@@ -91,3 +91,3 @@ const accountInfo = yield this.program.provider.connection.getAccountInfo(minterAddress);

newMinter(wrapper, authority) {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
const [minter, bump] = yield (0, pda_1.findMinterAddress)(wrapper, authority, this.program.programId);

@@ -117,3 +117,3 @@ return this.provider.newTX([

minterUpdate(wrapper, authority, allowance) {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
const [minter] = yield (0, pda_1.findMinterAddress)(wrapper, authority, this.program.programId);

@@ -141,3 +141,3 @@ return this.provider.newTX([

newMinterWithAllowance(wrapper, authority, allowance) {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
const newMinter = yield this.newMinter(wrapper, authority);

@@ -173,3 +173,3 @@ const updateAllowance = yield this.minterUpdate(wrapper, authority, allowance);

performMintTo({ amount, mintWrapper, minterAuthority = this.provider.wallet.publicKey, destOwner = this.provider.wallet.publicKey, }) {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
const ata = yield (0, token_utils_1.getOrCreateATA)({

@@ -201,3 +201,3 @@ provider: this.provider,

performMint({ amount, minter, }) {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
const minterData = minter.accountInfo.data;

@@ -204,0 +204,0 @@ const ata = yield (0, token_utils_1.getOrCreateATA)({

@@ -8,7 +8,7 @@ "use strict";

const constants_1 = require("../../constants");
const findMintWrapperAddress = (base, programID = constants_1.QUARRY_ADDRESSES.MintWrapper) => (0, tslib_1.__awaiter)(void 0, void 0, void 0, function* () {
const findMintWrapperAddress = (base, programID = constants_1.QUARRY_ADDRESSES.MintWrapper) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
return yield web3_js_1.PublicKey.findProgramAddress([Buffer.from(anchor_1.utils.bytes.utf8.encode("MintWrapper")), base.toBytes()], programID);
});
exports.findMintWrapperAddress = findMintWrapperAddress;
const findMinterAddress = (wrapper, authority, programID = constants_1.QUARRY_ADDRESSES.MintWrapper) => (0, tslib_1.__awaiter)(void 0, void 0, void 0, function* () {
const findMinterAddress = (wrapper, authority, programID = constants_1.QUARRY_ADDRESSES.MintWrapper) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
return yield web3_js_1.PublicKey.findProgramAddress([

@@ -15,0 +15,0 @@ Buffer.from(anchor_1.utils.bytes.utf8.encode("MintWrapperMinter")),

@@ -27,3 +27,3 @@ "use strict";

reload() {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
const data = yield this.program.account.operator.fetch(this.key);

@@ -34,3 +34,3 @@ return new Operator(this.sdk, this.key, data);

static load({ sdk, key, }) {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
const program = sdk.programs.Operator;

@@ -45,3 +45,3 @@ const data = (yield program.account.operator.fetchNullable(key));

static createOperator({ sdk, rewarder, baseKP = web3_js_1.Keypair.generate(), admin = sdk.provider.wallet.publicKey, payer = sdk.provider.wallet.publicKey, }) {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
const [operatorKey, bump] = yield (0, pda_1.findOperatorAddress)(baseKP.publicKey, sdk.programs.Operator.programId);

@@ -138,3 +138,3 @@ return {

delegateCreateQuarry({ tokenMint, payer = this.sdk.provider.wallet.publicKey, }) {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
const [quarry, bump] = yield (0, __1.findQuarryAddress)(this.data.rewarder, tokenMint, this.sdk.programs.Mine.programId);

@@ -141,0 +141,0 @@ return {

@@ -8,3 +8,3 @@ "use strict";

const constants_1 = require("../../constants");
const findOperatorAddress = (base, programID = constants_1.QUARRY_ADDRESSES.Operator) => (0, tslib_1.__awaiter)(void 0, void 0, void 0, function* () {
const findOperatorAddress = (base, programID = constants_1.QUARRY_ADDRESSES.Operator) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
return yield web3_js_1.PublicKey.findProgramAddress([anchor_1.utils.bytes.utf8.encode("Operator"), base.toBytes()], programID);

@@ -11,0 +11,0 @@ });

@@ -9,3 +9,3 @@ "use strict";

const pda_1 = require("./pda");
(0, tslib_1.__exportStar)(require("./pda"), exports);
tslib_1.__exportStar(require("./pda"), exports);
class RedeemerWrapper {

@@ -23,3 +23,3 @@ constructor(sdk, iouMint, redemptionMint, key, data) {

static load({ sdk, iouMint, redemptionMint, }) {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
const [redeemer] = yield (0, pda_1.findRedeemerKey)({ iouMint, redemptionMint });

@@ -32,3 +32,3 @@ const program = sdk.programs.Redeemer;

static createRedeemer({ sdk, iouMint, redemptionMint, }) {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
const { provider } = sdk;

@@ -63,3 +63,3 @@ const [redeemer, bump] = yield (0, pda_1.findRedeemerKey)({ iouMint, redemptionMint });

redeemTokensIx(args) {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
return this.program.instruction.redeemTokens(args.tokenAmount, {

@@ -71,3 +71,3 @@ accounts: yield this.getRedeemTokenAccounts(args),

redeemTokens(args) {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
return new solana_contrib_1.TransactionEnvelope(this.sdk.provider, [

@@ -79,3 +79,3 @@ yield this.redeemTokensIx(args),

getVaultAddress() {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
return yield (0, token_utils_1.getATAAddress)({

@@ -88,3 +88,3 @@ mint: this.redemptionMint,

getRedeemTokenAccounts(args) {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
const { iouSource, redemptionDestination, sourceAuthority } = args;

@@ -91,0 +91,0 @@ return {

@@ -8,3 +8,3 @@ "use strict";

const __1 = require("../..");
const findRedeemerKey = ({ iouMint, redemptionMint, }) => (0, tslib_1.__awaiter)(void 0, void 0, void 0, function* () {
const findRedeemerKey = ({ iouMint, redemptionMint, }) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
return web3_js_1.PublicKey.findProgramAddress([

@@ -11,0 +11,0 @@ anchor_1.utils.bytes.utf8.encode("Redeemer"),

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
(0, tslib_1.__exportStar)(require("./pda"), exports);
(0, tslib_1.__exportStar)(require("./registry"), exports);
tslib_1.__exportStar(require("./pda"), exports);
tslib_1.__exportStar(require("./registry"), exports);
//# sourceMappingURL=index.js.map

@@ -8,3 +8,3 @@ "use strict";

const constants_1 = require("../../constants");
const findRegistryAddress = (rewarderKey, programID = constants_1.QUARRY_ADDRESSES.Registry) => (0, tslib_1.__awaiter)(void 0, void 0, void 0, function* () {
const findRegistryAddress = (rewarderKey, programID = constants_1.QUARRY_ADDRESSES.Registry) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
return yield web3_js_1.PublicKey.findProgramAddress([anchor_1.utils.bytes.utf8.encode("QuarryRegistry"), rewarderKey.toBytes()], programID);

@@ -11,0 +11,0 @@ });

@@ -22,3 +22,3 @@ "use strict";

newRegistry({ numQuarries, rewarderKey, payer = this.provider.wallet.publicKey, }) {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
const [registry, bump] = yield (0, pda_1.findRegistryAddress)(rewarderKey, this.program.programId);

@@ -42,3 +42,3 @@ const createRegistryTX = new solana_contrib_1.TransactionEnvelope(this.provider, [

syncQuarry({ tokenMint, rewarderKey, }) {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
const [registry] = yield (0, pda_1.findRegistryAddress)(rewarderKey, this.program.programId);

@@ -45,0 +45,0 @@ const [quarry] = yield (0, mine_1.findQuarryAddress)(rewarderKey, tokenMint, this.sdk.programs.Mine.programId);

export declare type QuarryMergeMineIDL = {
version: "3.0.0";
version: "4.0.0";
name: "quarry_merge_mine";

@@ -967,3 +967,3 @@ instructions: [

export declare type AnchorQuarryMergeMine = {
version: "3.0.0";
version: "4.0.0";
name: "quarry_merge_mine";

@@ -970,0 +970,0 @@ instructions: [

import { generateErrorMap } from "@saberhq/anchor-contrib";
export const AnchorQuarryMergeMineIDL = {
version: "3.0.0",
version: "4.0.0",
name: "quarry_merge_mine",

@@ -968,3 +968,3 @@ instructions: [

export const QuarryMergeMineJSON = {
version: "3.0.0",
version: "4.0.0",
name: "quarry_merge_mine",

@@ -971,0 +971,0 @@ instructions: [

export declare type QuarryMineIDL = {
version: "3.0.0";
version: "4.0.0";
name: "quarry_mine";

@@ -1039,3 +1039,3 @@ instructions: [

export declare type AnchorQuarryMine = {
version: "3.0.0";
version: "4.0.0";
name: "quarry_mine";

@@ -1042,0 +1042,0 @@ instructions: [

import { generateErrorMap } from "@saberhq/anchor-contrib";
export const AnchorQuarryMineIDL = {
version: "3.0.0",
version: "4.0.0",
name: "quarry_mine",

@@ -1040,3 +1040,3 @@ instructions: [

export const QuarryMineJSON = {
version: "3.0.0",
version: "4.0.0",
name: "quarry_mine",

@@ -1043,0 +1043,0 @@ instructions: [

export declare type QuarryMintWrapperIDL = {
version: "3.0.0";
version: "4.0.0";
name: "quarry_mint_wrapper";

@@ -486,3 +486,3 @@ instructions: [

export declare type AnchorQuarryMintWrapper = {
version: "3.0.0";
version: "4.0.0";
name: "quarry_mint_wrapper";

@@ -489,0 +489,0 @@ instructions: [

import { generateErrorMap } from "@saberhq/anchor-contrib";
export const AnchorQuarryMintWrapperIDL = {
version: "3.0.0",
version: "4.0.0",
name: "quarry_mint_wrapper",

@@ -487,3 +487,3 @@ instructions: [

export const QuarryMintWrapperJSON = {
version: "3.0.0",
version: "4.0.0",
name: "quarry_mint_wrapper",

@@ -490,0 +490,0 @@ instructions: [

export declare type QuarryOperatorIDL = {
version: "3.0.0";
version: "4.0.0";
name: "quarry_operator";

@@ -389,3 +389,3 @@ instructions: [

export declare type AnchorQuarryOperator = {
version: "3.0.0";
version: "4.0.0";
name: "quarry_operator";

@@ -392,0 +392,0 @@ instructions: [

import { generateErrorMap } from "@saberhq/anchor-contrib";
export const AnchorQuarryOperatorIDL = {
version: "3.0.0",
version: "4.0.0",
name: "quarry_operator",

@@ -390,3 +390,3 @@ instructions: [

export const QuarryOperatorJSON = {
version: "3.0.0",
version: "4.0.0",
name: "quarry_operator",

@@ -393,0 +393,0 @@ instructions: [

export declare type QuarryRedeemerIDL = {
version: "3.0.0";
version: "4.0.0";
name: "quarry_redeemer";

@@ -217,3 +217,3 @@ instructions: [

export declare type AnchorQuarryRedeemer = {
version: "3.0.0";
version: "4.0.0";
name: "quarry_redeemer";

@@ -220,0 +220,0 @@ instructions: [

import { generateErrorMap } from "@saberhq/anchor-contrib";
export const AnchorQuarryRedeemerIDL = {
version: "3.0.0",
version: "4.0.0",
name: "quarry_redeemer",

@@ -218,3 +218,3 @@ instructions: [

export const QuarryRedeemerJSON = {
version: "3.0.0",
version: "4.0.0",
name: "quarry_redeemer",

@@ -221,0 +221,0 @@ instructions: [

export declare type QuarryRegistryIDL = {
version: "3.0.0";
version: "4.0.0";
name: "quarry_registry";

@@ -98,3 +98,3 @@ instructions: [

export declare type AnchorQuarryRegistry = {
version: "3.0.0";
version: "4.0.0";
name: "quarry_registry";

@@ -101,0 +101,0 @@ instructions: [

import { generateErrorMap } from "@saberhq/anchor-contrib";
export const AnchorQuarryRegistryIDL = {
version: "3.0.0",
version: "4.0.0",
name: "quarry_registry",

@@ -99,3 +99,3 @@ instructions: [

export const QuarryRegistryJSON = {
version: "3.0.0",
version: "4.0.0",
name: "quarry_registry",

@@ -102,0 +102,0 @@ instructions: [

{
"name": "@quarryprotocol/quarry-sdk",
"version": "3.0.0",
"version": "4.0.0",
"description": "Quarry Protocol SDK",

@@ -33,35 +33,35 @@ "keywords": [

"devDependencies": {
"@project-serum/anchor": "^0.22.0",
"@rushstack/eslint-patch": "^1.1.0",
"@saberhq/anchor-contrib": "^1.12.45",
"@saberhq/chai-solana": "^1.12.45",
"@saberhq/eslint-config": "^1.12.45",
"@saberhq/solana-contrib": "^1.12.45",
"@saberhq/token-utils": "^1.12.45",
"@saberhq/tsconfig": "^1.12.45",
"@solana/web3.js": "^1.35.1",
"@project-serum/anchor": "^0.23.0",
"@rushstack/eslint-patch": "^1.1.1",
"@saberhq/anchor-contrib": "^1.12.55",
"@saberhq/chai-solana": "^1.12.55",
"@saberhq/eslint-config": "^1.12.55",
"@saberhq/solana-contrib": "^1.12.55",
"@saberhq/token-utils": "^1.12.55",
"@saberhq/tsconfig": "^1.12.55",
"@solana/web3.js": "^1.36.0",
"@types/bn.js": "^5.1.0",
"@types/chai": "^4.3.0",
"@types/mocha": "^9.1.0",
"@types/node": "^17.0.19",
"@types/node": "^17.0.22",
"@types/prettier": "^2.4.4",
"bn.js": "^5.2.0",
"chai": "=4.3.4",
"eslint": "^8.9.0",
"eslint": "^8.11.0",
"eslint-import-resolver-node": "^0.3.6",
"eslint-plugin-import": "^2.25.4",
"husky": "^7.0.4",
"jsbi": "^4.1.0",
"lint-staged": "^12.3.4",
"mocha": "^9.2.1",
"prettier": "^2.5.1",
"ts-node": "^10.5.0",
"typedoc": "^0.22.12",
"typescript": "^4.5.5"
"jsbi": "^4.2.0",
"lint-staged": "^12.3.7",
"mocha": "^9.2.2",
"prettier": "^2.6.0",
"ts-node": "^10.7.0",
"typedoc": "^0.22.13",
"typescript": "^4.6.2"
},
"peerDependencies": {
"@project-serum/anchor": ">=0.19",
"@saberhq/anchor-contrib": "^1.11",
"@saberhq/solana-contrib": "^1.11",
"@saberhq/token-utils": "^1.11",
"@saberhq/anchor-contrib": "^1.12",
"@saberhq/solana-contrib": "^1.12",
"@saberhq/token-utils": "^1.12",
"@solana/web3.js": "^1",

@@ -90,3 +90,3 @@ "bn.js": "^5.2.0",

},
"packageManager": "yarn@3.1.1"
"packageManager": "yarn@3.2.0"
}
import { generateErrorMap } from "@saberhq/anchor-contrib";
export type QuarryMintWrapperIDL = {
version: "3.0.0";
version: "4.0.0";
name: "quarry_mint_wrapper";

@@ -488,3 +488,3 @@ instructions: [

export type AnchorQuarryMintWrapper = {
version: "3.0.0";
version: "4.0.0";
name: "quarry_mint_wrapper";

@@ -974,3 +974,3 @@ instructions: [

export const AnchorQuarryMintWrapperIDL: AnchorQuarryMintWrapper = {
version: "3.0.0",
version: "4.0.0",
name: "quarry_mint_wrapper",

@@ -1459,3 +1459,3 @@ instructions: [

export const QuarryMintWrapperJSON: QuarryMintWrapperIDL = {
version: "3.0.0",
version: "4.0.0",
name: "quarry_mint_wrapper",

@@ -1462,0 +1462,0 @@ instructions: [

import { generateErrorMap } from "@saberhq/anchor-contrib";
export type QuarryOperatorIDL = {
version: "3.0.0";
version: "4.0.0";
name: "quarry_operator";

@@ -391,3 +391,3 @@ instructions: [

export type AnchorQuarryOperator = {
version: "3.0.0";
version: "4.0.0";
name: "quarry_operator";

@@ -780,3 +780,3 @@ instructions: [

export const AnchorQuarryOperatorIDL: AnchorQuarryOperator = {
version: "3.0.0",
version: "4.0.0",
name: "quarry_operator",

@@ -1168,3 +1168,3 @@ instructions: [

export const QuarryOperatorJSON: QuarryOperatorIDL = {
version: "3.0.0",
version: "4.0.0",
name: "quarry_operator",

@@ -1171,0 +1171,0 @@ instructions: [

import { generateErrorMap } from "@saberhq/anchor-contrib";
export type QuarryRedeemerIDL = {
version: "3.0.0";
version: "4.0.0";
name: "quarry_redeemer";

@@ -219,3 +219,3 @@ instructions: [

export type AnchorQuarryRedeemer = {
version: "3.0.0";
version: "4.0.0";
name: "quarry_redeemer";

@@ -436,3 +436,3 @@ instructions: [

export const AnchorQuarryRedeemerIDL: AnchorQuarryRedeemer = {
version: "3.0.0",
version: "4.0.0",
name: "quarry_redeemer",

@@ -652,3 +652,3 @@ instructions: [

export const QuarryRedeemerJSON: QuarryRedeemerIDL = {
version: "3.0.0",
version: "4.0.0",
name: "quarry_redeemer",

@@ -655,0 +655,0 @@ instructions: [

import { generateErrorMap } from "@saberhq/anchor-contrib";
export type QuarryRegistryIDL = {
version: "3.0.0";
version: "4.0.0";
name: "quarry_registry";

@@ -100,3 +100,3 @@ instructions: [

export type AnchorQuarryRegistry = {
version: "3.0.0";
version: "4.0.0";
name: "quarry_registry";

@@ -198,3 +198,3 @@ instructions: [

export const AnchorQuarryRegistryIDL: AnchorQuarryRegistry = {
version: "3.0.0",
version: "4.0.0",
name: "quarry_registry",

@@ -295,3 +295,3 @@ instructions: [

export const QuarryRegistryJSON: QuarryRegistryIDL = {
version: "3.0.0",
version: "4.0.0",
name: "quarry_registry",

@@ -298,0 +298,0 @@ instructions: [

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc