goosefx-stake-rewards-sdk
Version:
A SDK for interfacing with the GooseFX stake rewards program
77 lines • 4.29 kB
JavaScript
;
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.CRANK_AMOUNT = exports.TOKEN_SEEDS = exports.SEVEN_DAYS = exports.ADDRESSES = void 0;
const web3_js_1 = require("@solana/web3.js");
const anchor = __importStar(require("@project-serum/anchor"));
const buffer_1 = require("buffer");
exports.ADDRESSES = {
MAINNET: {
GOFX_MINT: new web3_js_1.PublicKey('GFX1ZjR2P15tmrSwow6FjyDYcEkoFb4p4gJCpLBjaxHD'),
USDC_MINT: new web3_js_1.PublicKey('EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v'),
CONTROLLER_PROGRAM_ID: new web3_js_1.PublicKey('8KJx48PYGHVC9fxzRRtYp4x4CM2HyYCm2EjVuAP4vvrx'),
GFX_CONTROLLER: new web3_js_1.PublicKey('8CxKnuJeoeQXFwiG6XiGY2akBjvJA5k3bE52BfnuEmNQ'),
SSL_PROGRAM_ID: new web3_js_1.PublicKey('GFXSwpZBSU9LF1gHRpRv2u967ACKKncFnfy3VKyQqwhp'),
STAKE_POOL: new web3_js_1.PublicKey('Eu8eZF1dfR1hXUwHbngEsDBf3kMhLuRSSaYcr67USBbj'),
USDC_REWARD_VAULT: new web3_js_1.PublicKey('7QUUirYGtKRnNjTXqjofX3oDsRnAwNw5ngSz9e8EQdec'),
GOFX_VAULT: new web3_js_1.PublicKey('D9DhGq6MctzCzABhFybyuj3KHj3QbeG5H3JzXMGysY3T'),
GOFX_UNSTAKED_VAULT: new web3_js_1.PublicKey('5GZjjTaiB6FW8kgBwh8egSBuRk7HEBkzdUGrHmf3QzJt'),
SSL_SWAP_FEE_COLLECTOR: new web3_js_1.PublicKey("GFXSwpZBSU9LF1gHRpRv2u967ACKKncFnfy3VKyQqwhp")
},
DEVNET: {
GOFX_MINT: new web3_js_1.PublicKey('GFXMaFQyhNSfjLcjyT1p1iHyJUT8kWbGkH3WXudynuYU'),
USDC_MINT: new web3_js_1.PublicKey('USDC4bFm2MkhE24BJy8VTT3r2Pr14V6E7fX6fm4w2q9'),
CONTROLLER_PROGRAM_ID: new web3_js_1.PublicKey('3Gwyhoudx8XgYry8dzKQ2GGsofkUdm7VZUvddHxchL3x'),
GFX_CONTROLLER: new web3_js_1.PublicKey('ApkmzBaTPUAeVj3QuqDcz6iLE6xZSLd29nke4McqrKw5'),
SSL_PROGRAM_ID: new web3_js_1.PublicKey('JYe7AcuQ7CqhkGvchJGvSKF8ei41FuDKb1h47qkbFNf'),
STAKE_POOL: new web3_js_1.PublicKey('Eu8eZF1dfR1hXUwHbngEsDBf3kMhLuRSSaYcr67USBbj'),
USDC_REWARD_VAULT: new web3_js_1.PublicKey('8G6dPFQcdrqGwyb7sJSCthNQr1b6WsN5j7cJzFMfE3iG'),
GOFX_VAULT: new web3_js_1.PublicKey('37QhJWmUX4gNDiYsadxjqkoWZRUeb3ahVaUtrFawtTXy'),
GOFX_UNSTAKED_VAULT: new web3_js_1.PublicKey('28BSkwKCGDMfUcKLZzLUgKtZzRKAFei1wYJ5deHxLjku'),
SSL_SWAP_FEE_COLLECTOR: new web3_js_1.PublicKey("11111111111111111111111111111111")
},
};
exports.SEVEN_DAYS = 7 * 24 * 60 * 60 * 1000;
exports.TOKEN_SEEDS = {
gofxVaultSigner: buffer_1.Buffer.from('gofx_vault', 'utf-8'),
gofxUnstakedSigner: buffer_1.Buffer.from('gofx_unstaked', 'utf-8'),
feeCollector: buffer_1.Buffer.from('fees_collected', 'utf-8'),
usdcRewardSigner: buffer_1.Buffer.from('usdc_reward_vault', 'utf-8'),
stakePool: buffer_1.Buffer.from('stake_pool', 'utf-8'),
userMetaData: buffer_1.Buffer.from('user_metadata', 'utf-8'),
gfxSSLPair: buffer_1.Buffer.from('GFX-SSL-Pair', 'utf-8'),
};
exports.CRANK_AMOUNT = new anchor.BN(0.0);
//# sourceMappingURL=index.js.map