@mithraic-labs/psylend-utils
Advanced tools
Comparing version 0.0.1 to 0.0.3-rc1
@@ -1,2 +0,1 @@ | ||
import { PublicKey } from "@solana/web3.js"; | ||
import * as instructions from "./instructions"; | ||
@@ -6,13 +5,5 @@ import * as pdas from "./pdas"; | ||
import * as tools from "./tools"; | ||
export { instructions, pdas, types, tools }; | ||
export declare const dexDevnetProgramKey: PublicKey; | ||
export declare const dexMainnetProgramKey: PublicKey; | ||
export declare const psyLendDevnetProgramKey: PublicKey; | ||
export declare const psyLendLocalnetProgramKey: PublicKey; | ||
export declare const psyFiDevnetProgramKey: PublicKey; | ||
export declare const psyFiLocalnetProgramKey: PublicKey; | ||
/** | ||
* On all networks (devnet, local, main) | ||
*/ | ||
export declare const euroPrimitiveProgramKey: PublicKey; | ||
import * as keys from "./keys"; | ||
export { instructions, pdas, types, tools, keys }; | ||
export { PsyLend, PsyLendIdl } from "./idl"; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -1,2 +0,2 @@ | ||
import { Program } from "@project-serum/anchor"; | ||
import { Program, BN } from "@project-serum/anchor"; | ||
import { PublicKey, Keypair } from "@solana/web3.js"; | ||
@@ -3,0 +3,0 @@ import { reserveBumpSeeds, reserveAccounts } from "./pdas"; |
@@ -1,2 +0,3 @@ | ||
import { Program } from "@project-serum/anchor"; | ||
/// <reference types="node" /> | ||
import { BN, Program } from "@project-serum/anchor"; | ||
import { Keypair, PublicKey } from "@solana/web3.js"; | ||
@@ -79,2 +80,11 @@ import { reserveBumpSeeds, reserveAccounts } from "./pdas"; | ||
/** | ||
* Returns the balance of a token account, in whatever currency the account is in. | ||
* | ||
* Requires spl-token 2.0 or later | ||
* @param program | ||
* @param account | ||
* @returns | ||
*/ | ||
export declare const getTokenAccountBalance: (program: Program, account: PublicKey) => Promise<number>; | ||
/** | ||
* Sends a tx that creates a zeroed out market, and {@link initMarketIx} | ||
@@ -117,21 +127,21 @@ * @param program | ||
/** | ||
* Sends a tx that creates a reserve, and {@link initPsyfiReserveIx} | ||
* @param program | ||
* @param bumpSeeds | ||
* @param reserveConfig | ||
* @param market | ||
* @param marketAuthority | ||
* @param owner | ||
* @param pythOracleProduct | ||
* @param pythOraclePrice | ||
* @param reserve | ||
* @param reserveAccounts | ||
* @param dexMarket | ||
* @param quoteTokenMint | ||
* @param tokenMint | ||
* @param psyfiVault | ||
* @param psyfiCollateralMint | ||
* @param isDevnet | ||
* @param payer | ||
*/ | ||
* Sends a tx that creates a reserve, and {@link initPsyfiReserveIx} | ||
* @param program | ||
* @param bumpSeeds | ||
* @param reserveConfig | ||
* @param market | ||
* @param marketAuthority | ||
* @param owner | ||
* @param pythOracleProduct | ||
* @param pythOraclePrice | ||
* @param reserve | ||
* @param reserveAccounts | ||
* @param dexMarket | ||
* @param quoteTokenMint | ||
* @param tokenMint | ||
* @param psyfiVault | ||
* @param psyfiCollateralMint | ||
* @param isDevnet | ||
* @param payer | ||
*/ | ||
export declare const createAndInitPsyfiReserve: (program: Program, bumpSeeds: reserveBumpSeeds, reserveConfig: ReserveConfig, market: PublicKey, marketAuthority: PublicKey, owner: PublicKey, pythOracleProduct: PublicKey, pythOraclePrice: PublicKey, reserve: Keypair, reserveAccounts: reserveAccounts, dexMarket: PublicKey, quoteTokenMint: PublicKey, tokenMint: PublicKey, psyfiVault: PublicKey, psyfiCollateralMint: PublicKey, isDevnet: boolean, payer: Keypair) => Promise<ReserveAccount>; | ||
@@ -152,2 +162,8 @@ /** | ||
}>; | ||
/** | ||
* Reads a U192 from some buffer and returns a BN with equivalent value | ||
* @param buff - some buffer containing a U192 `Number` | ||
* @param start - index to begin reading | ||
*/ | ||
export declare const readU192FromBuffer: (buff: Buffer, start: number) => BN; | ||
//# sourceMappingURL=tools.d.ts.map |
@@ -11,2 +11,7 @@ /// <reference types="node" /> | ||
/** | ||
* All interests and percentages, such as discount rates, fees, liquidation premium, etc are stored | ||
* under the hood multiplied by this amount, e.g. 5% is stored as .05 * 10,000 = 500 | ||
*/ | ||
export declare const COMMON_DENOM = 10000; | ||
/** | ||
* Note: Market is 16384, plus 8 for overhead. | ||
@@ -13,0 +18,0 @@ */ |
{ | ||
"name": "@mithraic-labs/psylend-utils", | ||
"version": "0.0.1", | ||
"version": "0.0.3-rc1", | ||
"description": "Instructions and utilities for interacting with the PsyLend protocol", | ||
@@ -32,5 +32,6 @@ "main": "dist/index.js", | ||
"@project-serum/serum": "^0.13.65", | ||
"@solana/spl-token": "^0.2.0", | ||
"@solana/web3.js": "^1.30.2" | ||
"spl2": "npm:@solana/spl-token@^0.2.0", | ||
"@solana/web3.js": "^1.30.2", | ||
"@pythnetwork/client": "2.7.3" | ||
} | ||
} |
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
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
428151
19
10905
5
1
+ Added@pythnetwork/client@2.7.3
+ Added@pythnetwork/client@2.7.3(transitive)
- Removed@solana/spl-token@^0.2.0