@flipflop-sdk/node
Version:
FlipFlop Node.js SDK for programmatic token operations
99 lines • 5.22 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.TOKEN_PARAMS = exports.ORACLE_SEED = exports.OPERATION_SEED = exports.TICK_ARRAY_SEED = exports.POOL_LPMINT_SEED = exports.POOL_AUTH_SEED = exports.POOL_VAULT_SEED = exports.POOL_SEED = exports.AMM_CONFIG_SEED = exports.AUTH_SEED = exports.LAUNCH_RULE_SEEDS = exports.POOL_SEEDS = exports.MINT_VAULT_OWNER_SEEDS = exports.EXTRA_ACCOUNT_META_LIST = exports.CODE_ACCOUNT_SEED = exports.REFERRAL_CODE_SEED = exports.SYSTEM_CONFIG_SEEDS = exports.REFUND_SEEDS = exports.REFERRAL_SEED = exports.FREEZE_SEED = exports.CONFIG_DATA_SEED = exports.MINT_SEED = exports.METADATA_SEED = exports.RENT_PROGRAM_ID = exports.TOKEN_METADATA_PROGRAM_ID = void 0;
const anchor_1 = require("@coral-xyz/anchor");
const web3_js_1 = require("@solana/web3.js");
const anchor = __importStar(require("@coral-xyz/anchor"));
exports.TOKEN_METADATA_PROGRAM_ID = new web3_js_1.PublicKey("metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s");
exports.RENT_PROGRAM_ID = new web3_js_1.PublicKey("SysvarRent111111111111111111111111111111111");
exports.METADATA_SEED = "metadata";
exports.MINT_SEED = "fair_mint";
exports.CONFIG_DATA_SEED = "config_data";
exports.FREEZE_SEED = "freeze";
exports.REFERRAL_SEED = "referral";
exports.REFUND_SEEDS = "refund";
exports.SYSTEM_CONFIG_SEEDS = "system_config_v1.1";
exports.REFERRAL_CODE_SEED = "referral_code";
exports.CODE_ACCOUNT_SEED = "code_account";
exports.EXTRA_ACCOUNT_META_LIST = "extra-account-metas";
exports.MINT_VAULT_OWNER_SEEDS = "mint-vault-owner";
exports.POOL_SEEDS = "pool";
exports.LAUNCH_RULE_SEEDS = "launch_rule";
exports.AUTH_SEED = "vault_and_lp_mint_auth_seed";
exports.AMM_CONFIG_SEED = Buffer.from(anchor.utils.bytes.utf8.encode("amm_config"));
exports.POOL_SEED = Buffer.from(anchor.utils.bytes.utf8.encode("pool"));
exports.POOL_VAULT_SEED = Buffer.from(anchor.utils.bytes.utf8.encode("pool_vault"));
exports.POOL_AUTH_SEED = Buffer.from(anchor.utils.bytes.utf8.encode("vault_and_lp_mint_auth_seed"));
exports.POOL_LPMINT_SEED = Buffer.from(anchor.utils.bytes.utf8.encode("pool_lp_mint"));
exports.TICK_ARRAY_SEED = Buffer.from(anchor.utils.bytes.utf8.encode("tick_array"));
exports.OPERATION_SEED = Buffer.from(anchor.utils.bytes.utf8.encode("operation"));
exports.ORACLE_SEED = Buffer.from(anchor.utils.bytes.utf8.encode("observation"));
exports.TOKEN_PARAMS = {
// ######
standard: {
// must be same as program default params
targetEras: new anchor_1.BN(1),
epochesPerEra: new anchor_1.BN("250"),
targetSecondsPerEpoch: new anchor_1.BN("2000"),
reduceRatio: new anchor_1.BN("50"),
initialMintSize: new anchor_1.BN("20000000000000"),
initialTargetMintSizePerEpoch: new anchor_1.BN("200000000000000"),
feeRate: new anchor_1.BN("200000000"),
liquidityTokensRatio: new anchor_1.BN("20"),
},
// "meme": { // config for mainnet, 125 - 557 SOL
// targetEras: new BN(1),
// epochesPerEra: new BN('250'),
// targetSecondsPerEpoch: new BN('2000'),
// reduceRatio: new BN('75'),
// initialMintSize: new BN('100000000000000'),
// initialTargetMintSizePerEpoch: new BN('1000000000000000'),
// feeRate: new BN('50000000'),
// liquidityTokensRatio: new BN('20'),
// },
meme: {
// config for mainnet, 100 - 557 SOL
targetEras: new anchor_1.BN(1),
epochesPerEra: new anchor_1.BN("250"),
targetSecondsPerEpoch: new anchor_1.BN("2000"),
reduceRatio: new anchor_1.BN("75"),
initialMintSize: new anchor_1.BN("100000000000000"),
initialTargetMintSizePerEpoch: new anchor_1.BN("1000000000000000"),
feeRate: new anchor_1.BN("40000000"),
liquidityTokensRatio: new anchor_1.BN("20"),
},
};
//# sourceMappingURL=constants.js.map