@glamsystems/glam-sdk 0.1.19 → 0.1.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -37
- package/index.cjs.js +241 -76
- package/index.esm.js +241 -77
- package/package.json +2 -2
- package/src/client/drift.d.ts +1 -0
- package/src/client/kamino.d.ts +36 -12
- package/src/client/price.d.ts +4 -6
- package/src/client.d.ts +3 -1
- package/src/constants.d.ts +4 -0
- package/src/utils/priorityfee.d.ts +1 -1
- package/target/idl/glam_protocol.json +1 -0
- package/target/types/glam_protocol.d.ts +1 -0
- package/target/types/glam_protocol.ts +1 -0
package/src/client/price.d.ts
CHANGED
|
@@ -1,22 +1,20 @@
|
|
|
1
1
|
import { PublicKey, TransactionInstruction } from "@solana/web3.js";
|
|
2
2
|
import { BN } from "@coral-xyz/anchor";
|
|
3
|
+
import { KaminoLendingClient } from "./kamino";
|
|
3
4
|
import { BaseClient } from "./base";
|
|
4
5
|
import { PriceDenom } from "../models";
|
|
5
6
|
export declare class PriceClient {
|
|
6
7
|
readonly base: BaseClient;
|
|
7
|
-
|
|
8
|
+
readonly klend: KaminoLendingClient;
|
|
9
|
+
constructor(base: BaseClient, klend: KaminoLendingClient);
|
|
8
10
|
/**
|
|
9
11
|
* !! This is a convenience method that calculates the AUM of the vault based on priced assets.
|
|
10
12
|
* !! It doesn't reflect the actual AUM of the vault.
|
|
11
13
|
* !! If the vault has not been priced or pricing data is outdated, the number is NOT meaningful.
|
|
12
14
|
*/
|
|
13
15
|
getAum(glamState: PublicKey): Promise<BN>;
|
|
16
|
+
priceKaminoIxs(glamState: PublicKey, priceDenom: PriceDenom): Promise<any[]>;
|
|
14
17
|
priceVaultIxs(glamState: PublicKey, priceDenom: PriceDenom): Promise<TransactionInstruction[]>;
|
|
15
|
-
remainingAccountsForPricingKamino: (glamState: PublicKey) => Promise<{
|
|
16
|
-
pubkey: PublicKey;
|
|
17
|
-
isSigner: boolean;
|
|
18
|
-
isWritable: boolean;
|
|
19
|
-
}[]>;
|
|
20
18
|
remainingAccountsForPricingMeteora: (glamState: PublicKey) => Promise<{
|
|
21
19
|
pubkey: PublicKey;
|
|
22
20
|
isSigner: boolean;
|
package/src/client.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ import { WSolClient } from "./client/wsol";
|
|
|
8
8
|
import { StakingClient } from "./client/staking";
|
|
9
9
|
import { StateClient } from "./client/state";
|
|
10
10
|
import { MintClient } from "./client/mint";
|
|
11
|
-
import { KaminoLendingClient } from "./client/kamino";
|
|
11
|
+
import { KaminoFarmClient, KaminoLendingClient } from "./client/kamino";
|
|
12
12
|
import { MeteoraDlmmClient } from "./client/meteora";
|
|
13
13
|
import { InvestorClient } from "./client/investor";
|
|
14
14
|
import { PriceClient } from "./client/price";
|
|
@@ -30,6 +30,7 @@ export declare class GlamClient extends BaseClient {
|
|
|
30
30
|
private _state?;
|
|
31
31
|
private _mint?;
|
|
32
32
|
private _kaminoLending?;
|
|
33
|
+
private _kaminoFarm?;
|
|
33
34
|
private _meteoraDlmm?;
|
|
34
35
|
constructor(config?: GlamClientConfig);
|
|
35
36
|
get drift(): DriftClient;
|
|
@@ -43,5 +44,6 @@ export declare class GlamClient extends BaseClient {
|
|
|
43
44
|
get state(): StateClient;
|
|
44
45
|
get mint(): MintClient;
|
|
45
46
|
get kaminoLending(): KaminoLendingClient;
|
|
47
|
+
get kaminoFarm(): KaminoFarmClient;
|
|
46
48
|
get meteoraDlmm(): MeteoraDlmmClient;
|
|
47
49
|
}
|
package/src/constants.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { VersionedTransaction } from "@solana/web3.js";
|
|
2
|
-
export type PriorityLevel = "Min" | "Low" | "Medium" | "High" | "VeryHigh" | "UnsafeMax" | "Default";
|
|
2
|
+
export type PriorityLevel = "Recommended" | "Min" | "Low" | "Medium" | "High" | "VeryHigh" | "UnsafeMax" | "Default";
|
|
3
3
|
export declare const getPriorityFeeEstimate: (heliusApiKey: string, tx?: VersionedTransaction, accountKeys?: string[], priorityLevel?: PriorityLevel) => Promise<number>;
|