@glamsystems/glam-sdk 0.1.26 → 0.1.27
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/index.cjs.js +536 -95
- package/index.esm.js +536 -96
- package/package.json +1 -1
- package/src/client/base.d.ts +1 -1
- package/src/client/drift.d.ts +8 -8
- package/src/client/kamino.d.ts +18 -1
- package/src/client/price.d.ts +5 -3
- package/src/client/vault.d.ts +1 -1
- package/src/client.d.ts +3 -1
- package/src/constants.d.ts +1 -0
- package/src/{layouts/drift-vault.d.ts → deser/driftLayouts.d.ts} +17 -0
- package/src/deser/kaminoLayouts.d.ts +55 -0
- package/src/utils/driftTypes.d.ts +1 -0
- package/target/idl/glam_protocol.json +147 -3
- package/target/types/glam_protocol.d.ts +145 -1
- package/target/types/glam_protocol.ts +147 -3
package/package.json
CHANGED
package/src/client/base.d.ts
CHANGED
|
@@ -42,7 +42,7 @@ export declare class BaseClient {
|
|
|
42
42
|
get detectedCluster(): ClusterNetwork;
|
|
43
43
|
get statePda(): PublicKey;
|
|
44
44
|
set statePda(statePda: PublicKey);
|
|
45
|
-
isMainnet(): boolean;
|
|
45
|
+
get isMainnet(): boolean;
|
|
46
46
|
isPhantom(): boolean;
|
|
47
47
|
/**
|
|
48
48
|
* Get metadata of an asset for pricing
|
package/src/client/drift.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as anchor from "@coral-xyz/anchor";
|
|
2
2
|
import { PublicKey, VersionedTransaction, TransactionSignature, TransactionInstruction } from "@solana/web3.js";
|
|
3
3
|
import { MarketType, OrderParams, PositionDirection, SpotPosition, PerpPosition, ModifyOrderParams, OracleSource, SpotBalanceType, MarginMode, Order } from "../utils/driftTypes";
|
|
4
|
-
import { DriftVault } from "../
|
|
4
|
+
import { DriftVault } from "../deser/driftLayouts";
|
|
5
5
|
import { BaseClient, TxOptions } from "./base";
|
|
6
6
|
import { AccountMeta } from "@solana/web3.js";
|
|
7
7
|
import { StateModel } from "../models";
|
|
@@ -89,17 +89,17 @@ export declare class DriftClient {
|
|
|
89
89
|
userStats: PublicKey;
|
|
90
90
|
};
|
|
91
91
|
get driftStatePda(): PublicKey;
|
|
92
|
-
fetchAndParseSpotMarket(marketIndex: number): Promise<SpotMarket>;
|
|
93
|
-
fetchAndParseSpotMarkets(marketIndexes: number[]): Promise<SpotMarket[]>;
|
|
94
|
-
fetchAndParsePerpMarket(marketIndex: number): Promise<PerpMarket>;
|
|
95
|
-
fetchAndParsePerpMarkets(marketIndexes: number[]): Promise<PerpMarket[]>;
|
|
96
|
-
fetchMarketConfigs(): Promise<DriftMarketConfigs>;
|
|
92
|
+
fetchAndParseSpotMarket(marketIndex: number, skipCache?: boolean): Promise<SpotMarket>;
|
|
93
|
+
fetchAndParseSpotMarkets(marketIndexes: number[], skipCache?: boolean): Promise<SpotMarket[]>;
|
|
94
|
+
fetchAndParsePerpMarket(marketIndex: number, skipCache?: boolean): Promise<PerpMarket>;
|
|
95
|
+
fetchAndParsePerpMarkets(marketIndexes: number[], skipCache?: boolean): Promise<PerpMarket[]>;
|
|
96
|
+
fetchMarketConfigs(skipCache?: boolean): Promise<DriftMarketConfigs>;
|
|
97
97
|
charsToName(chars: number[] | Buffer): string;
|
|
98
|
-
fetchDriftUser(subAccountId?: number): Promise<DriftUser | null>;
|
|
98
|
+
fetchDriftUser(subAccountId?: number, skipCache?: boolean): Promise<DriftUser | null>;
|
|
99
99
|
/**
|
|
100
100
|
* @deprecated
|
|
101
101
|
*/
|
|
102
|
-
fetchPolicyConfig(
|
|
102
|
+
fetchPolicyConfig(stateModel: StateModel): Promise<{
|
|
103
103
|
driftAccessControl: number;
|
|
104
104
|
driftDelegatedAccount: anchor.web3.PublicKey;
|
|
105
105
|
driftMarketIndexesPerp: number[];
|
package/src/client/kamino.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { BN } from "@coral-xyz/anchor";
|
|
2
|
-
import { PublicKey, VersionedTransaction, TransactionSignature, TransactionInstruction } from "@solana/web3.js";
|
|
2
|
+
import { PublicKey, VersionedTransaction, TransactionSignature, TransactionInstruction, AccountMeta } from "@solana/web3.js";
|
|
3
3
|
import { BaseClient, TxOptions } from "./base";
|
|
4
|
+
import { KVaultAllocation, KVaultState } from "../deser/kaminoLayouts";
|
|
4
5
|
interface ParsedReserve {
|
|
5
6
|
address: PublicKey;
|
|
7
|
+
market: PublicKey;
|
|
6
8
|
farmCollateral: PublicKey | null;
|
|
7
9
|
farmDebt: PublicKey | null;
|
|
8
10
|
liquidityMint: PublicKey;
|
|
@@ -133,4 +135,19 @@ export declare class KaminoFarmClient {
|
|
|
133
135
|
harvest(txOptions?: TxOptions): Promise<TransactionSignature>;
|
|
134
136
|
harvestTx(txOptions?: TxOptions): Promise<VersionedTransaction>;
|
|
135
137
|
}
|
|
138
|
+
export declare class KaminoVaultsClient {
|
|
139
|
+
readonly base: BaseClient;
|
|
140
|
+
readonly kaminoLending: KaminoLendingClient;
|
|
141
|
+
private vaultStates;
|
|
142
|
+
private shareMintToVaultPdaMap;
|
|
143
|
+
constructor(base: BaseClient, kaminoLending: KaminoLendingClient);
|
|
144
|
+
deposit(vault: PublicKey, amount: number, txOptions?: TxOptions): Promise<TransactionSignature>;
|
|
145
|
+
withdraw(vault: PublicKey, amount: number, txOptions?: TxOptions): Promise<TransactionSignature>;
|
|
146
|
+
findAndParseKaminoVaults(): Promise<KVaultState[]>;
|
|
147
|
+
getVaultPdasByShareMints(mints: PublicKey[]): Promise<PublicKey[]>;
|
|
148
|
+
fetchAndParseVaultState(vault: PublicKey): Promise<KVaultState>;
|
|
149
|
+
composeRemainingAccounts(allocationStrategies: KVaultAllocation[]): Promise<AccountMeta[]>;
|
|
150
|
+
depositTx(vault: PublicKey, amount: BN, txOptions?: TxOptions): Promise<VersionedTransaction>;
|
|
151
|
+
withdrawTx(vault: PublicKey, amount: number, txOptions?: TxOptions): Promise<VersionedTransaction>;
|
|
152
|
+
}
|
|
136
153
|
export {};
|
package/src/client/price.d.ts
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { PublicKey, TransactionInstruction } from "@solana/web3.js";
|
|
2
|
-
import { KaminoLendingClient } from "./kamino";
|
|
2
|
+
import { KaminoLendingClient, KaminoVaultsClient } from "./kamino";
|
|
3
3
|
import { BaseClient } from "./base";
|
|
4
4
|
import { PriceDenom } from "../models";
|
|
5
5
|
import { DriftClient, DriftVaultsClient } from "./drift";
|
|
6
6
|
export declare class PriceClient {
|
|
7
7
|
readonly base: BaseClient;
|
|
8
8
|
readonly klend: KaminoLendingClient;
|
|
9
|
+
readonly kvaults: KaminoVaultsClient;
|
|
9
10
|
readonly drift: DriftClient;
|
|
10
|
-
readonly
|
|
11
|
-
constructor(base: BaseClient, klend: KaminoLendingClient, drift: DriftClient,
|
|
11
|
+
readonly dvaults: DriftVaultsClient;
|
|
12
|
+
constructor(base: BaseClient, klend: KaminoLendingClient, kvaults: KaminoVaultsClient, drift: DriftClient, dvaults: DriftVaultsClient);
|
|
12
13
|
/**
|
|
13
14
|
* !! This is a convenience method that calculates the AUM of the vault based on priced assets.
|
|
14
15
|
* !! It doesn't reflect the actual AUM of the vault.
|
|
@@ -20,6 +21,7 @@ export declare class PriceClient {
|
|
|
20
21
|
* If there are no Kamino obligations, returns null.
|
|
21
22
|
*/
|
|
22
23
|
priceKaminoObligationsIx(priceDenom: PriceDenom): Promise<TransactionInstruction | null>;
|
|
24
|
+
priceKaminoVaultSharesIx(priceDenom: PriceDenom): Promise<TransactionInstruction | null>;
|
|
23
25
|
/**
|
|
24
26
|
* Returns an instruction that prices the all Drift users (aka sub-accounts) controlled by the GLAM vault.
|
|
25
27
|
* These Drift users must share the same user_stats that's also controlled by the GLAM vault.
|
package/src/client/vault.d.ts
CHANGED
|
@@ -22,6 +22,6 @@ export declare class VaultClient {
|
|
|
22
22
|
closeTokenAccountsTx(accounts: PublicKey[], txOptions: TxOptions): Promise<VersionedTransaction>;
|
|
23
23
|
depositSolTx(lamports: number | BN, wrap?: boolean, txOptions?: TxOptions): Promise<VersionedTransaction>;
|
|
24
24
|
depositTx(asset: PublicKey, amount: number | BN, txOptions: TxOptions): Promise<VersionedTransaction>;
|
|
25
|
-
withdrawIxs(asset: PublicKey, amount: number | BN, txOptions
|
|
25
|
+
withdrawIxs(asset: PublicKey, amount: number | BN, txOptions?: TxOptions): Promise<TransactionInstruction[]>;
|
|
26
26
|
withdrawTx(asset: PublicKey, amount: number | BN, txOptions: TxOptions): Promise<VersionedTransaction>;
|
|
27
27
|
}
|
package/src/client.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ import { VaultClient } from "./client/vault";
|
|
|
8
8
|
import { StakingClient } from "./client/staking";
|
|
9
9
|
import { StateClient } from "./client/state";
|
|
10
10
|
import { MintClient } from "./client/mint";
|
|
11
|
-
import { KaminoFarmClient, KaminoLendingClient } from "./client/kamino";
|
|
11
|
+
import { KaminoFarmClient, KaminoLendingClient, KaminoVaultsClient } from "./client/kamino";
|
|
12
12
|
import { MeteoraDlmmClient } from "./client/meteora";
|
|
13
13
|
import { InvestorClient } from "./client/investor";
|
|
14
14
|
import { PriceClient } from "./client/price";
|
|
@@ -32,6 +32,7 @@ export declare class GlamClient extends BaseClient {
|
|
|
32
32
|
private _mint?;
|
|
33
33
|
private _kaminoLending?;
|
|
34
34
|
private _kaminoFarm?;
|
|
35
|
+
private _kaminoVaults?;
|
|
35
36
|
private _meteoraDlmm?;
|
|
36
37
|
constructor(config?: GlamClientConfig);
|
|
37
38
|
get drift(): DriftClient;
|
|
@@ -47,5 +48,6 @@ export declare class GlamClient extends BaseClient {
|
|
|
47
48
|
get mint(): MintClient;
|
|
48
49
|
get kaminoLending(): KaminoLendingClient;
|
|
49
50
|
get kaminoFarm(): KaminoFarmClient;
|
|
51
|
+
get kaminoVaults(): KaminoVaultsClient;
|
|
50
52
|
get meteoraDlmm(): MeteoraDlmmClient;
|
|
51
53
|
}
|
package/src/constants.d.ts
CHANGED
|
@@ -34,6 +34,7 @@ export declare const MERKLE_DISTRIBUTOR_PROGRAM: PublicKey;
|
|
|
34
34
|
export declare const TRANSFER_HOOK_PROGRAM: PublicKey;
|
|
35
35
|
export declare const METEORA_DLMM_PROGRAM: PublicKey;
|
|
36
36
|
export declare const KAMINO_LENDING_PROGRAM: PublicKey;
|
|
37
|
+
export declare const KAMINO_VAULTS_PROGRAM: PublicKey;
|
|
37
38
|
export declare const KAMINO_FARM_PROGRAM: PublicKey;
|
|
38
39
|
export declare const MEMO_PROGRAM: PublicKey;
|
|
39
40
|
/**
|
|
@@ -49,3 +49,20 @@ export interface DriftVault {
|
|
|
49
49
|
cumulativeFuel: BN;
|
|
50
50
|
padding: BN[];
|
|
51
51
|
}
|
|
52
|
+
export declare const DriftSpotMarket: any;
|
|
53
|
+
export interface DriftSpotMarket {
|
|
54
|
+
discriminator: number[];
|
|
55
|
+
marketPda: PublicKey;
|
|
56
|
+
oracle: PublicKey;
|
|
57
|
+
mint: PublicKey;
|
|
58
|
+
vault: PublicKey;
|
|
59
|
+
name: number[];
|
|
60
|
+
padding1: number[];
|
|
61
|
+
cumulativeDepositInterest: BN;
|
|
62
|
+
cumulativeBorrowInterest: BN;
|
|
63
|
+
padding2: number[];
|
|
64
|
+
decimals: number;
|
|
65
|
+
marketIndex: number;
|
|
66
|
+
padding3: number;
|
|
67
|
+
oracleSource: number;
|
|
68
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { BN } from "@coral-xyz/anchor";
|
|
2
|
+
import { PublicKey } from "@solana/web3.js";
|
|
3
|
+
export declare const VaultAllocationLayout: any;
|
|
4
|
+
export declare const KVaultStateLayout: any;
|
|
5
|
+
export interface KVaultAllocation {
|
|
6
|
+
reserve: PublicKey;
|
|
7
|
+
ctokenVault: PublicKey;
|
|
8
|
+
targetAllocationWeight: BN;
|
|
9
|
+
tokenAllocationCap: BN;
|
|
10
|
+
ctokenVaultBump: BN;
|
|
11
|
+
configPadding: BN[];
|
|
12
|
+
ctokenAllocation: BN;
|
|
13
|
+
lastInvestSlot: BN;
|
|
14
|
+
tokenTargetAllocationSf: BN;
|
|
15
|
+
statePadding: BN[];
|
|
16
|
+
}
|
|
17
|
+
export interface KVaultState {
|
|
18
|
+
discriminator: number[];
|
|
19
|
+
vaultAdminAuthority: PublicKey;
|
|
20
|
+
baseVaultAuthority: PublicKey;
|
|
21
|
+
baseVaultAuthorityBump: BN;
|
|
22
|
+
tokenMint: PublicKey;
|
|
23
|
+
tokenMintDecimals: BN;
|
|
24
|
+
tokenVault: PublicKey;
|
|
25
|
+
tokenProgram: PublicKey;
|
|
26
|
+
sharesMint: PublicKey;
|
|
27
|
+
sharesMintDecimals: BN;
|
|
28
|
+
tokenAvailable: BN;
|
|
29
|
+
sharesIssued: BN;
|
|
30
|
+
availableCrankFunds: BN;
|
|
31
|
+
padding0: BN;
|
|
32
|
+
performanceFeeBps: BN;
|
|
33
|
+
managementFeeBps: BN;
|
|
34
|
+
lastFeeChargeTimestamp: BN;
|
|
35
|
+
prevAumSf: BN;
|
|
36
|
+
pendingFeesSf: BN;
|
|
37
|
+
vaultAllocationStrategy: KVaultAllocation[];
|
|
38
|
+
padding1: BN[];
|
|
39
|
+
minDepositAmount: BN;
|
|
40
|
+
minWithdrawAmount: BN;
|
|
41
|
+
minInvestAmount: BN;
|
|
42
|
+
minInvestDelaySlots: BN;
|
|
43
|
+
crankFundFeePerReserve: BN;
|
|
44
|
+
pendingAdmin: PublicKey;
|
|
45
|
+
cumulativeEarnedInterestSf: BN;
|
|
46
|
+
cumulativeMgmtFeesSf: BN;
|
|
47
|
+
cumulativePerfFeesSf: BN;
|
|
48
|
+
name: number[];
|
|
49
|
+
vaultLookupTable: PublicKey;
|
|
50
|
+
vaultFarm: PublicKey;
|
|
51
|
+
creationTimestamp: BN;
|
|
52
|
+
padding2: BN;
|
|
53
|
+
allocationAdmin: PublicKey;
|
|
54
|
+
padding3: BN[];
|
|
55
|
+
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"address": "GLAMbTqav9N9witRjswJ8enwp9vv5G8bsSJ2kPJ4rcyc",
|
|
3
3
|
"metadata": {
|
|
4
4
|
"name": "glam_protocol",
|
|
5
|
-
"version": "0.4.
|
|
5
|
+
"version": "0.4.29",
|
|
6
6
|
"spec": "0.1.0",
|
|
7
7
|
"description": "Glam Protocol"
|
|
8
8
|
},
|
|
@@ -4252,10 +4252,12 @@
|
|
|
4252
4252
|
],
|
|
4253
4253
|
"accounts": [
|
|
4254
4254
|
{
|
|
4255
|
-
"name": "glam_state"
|
|
4255
|
+
"name": "glam_state",
|
|
4256
|
+
"writable": true
|
|
4256
4257
|
},
|
|
4257
4258
|
{
|
|
4258
4259
|
"name": "glam_vault",
|
|
4260
|
+
"writable": true,
|
|
4259
4261
|
"pda": {
|
|
4260
4262
|
"seeds": [
|
|
4261
4263
|
{
|
|
@@ -4347,10 +4349,12 @@
|
|
|
4347
4349
|
],
|
|
4348
4350
|
"accounts": [
|
|
4349
4351
|
{
|
|
4350
|
-
"name": "glam_state"
|
|
4352
|
+
"name": "glam_state",
|
|
4353
|
+
"writable": true
|
|
4351
4354
|
},
|
|
4352
4355
|
{
|
|
4353
4356
|
"name": "glam_vault",
|
|
4357
|
+
"writable": true,
|
|
4354
4358
|
"pda": {
|
|
4355
4359
|
"seeds": [
|
|
4356
4360
|
{
|
|
@@ -6630,6 +6634,146 @@
|
|
|
6630
6634
|
}
|
|
6631
6635
|
]
|
|
6632
6636
|
},
|
|
6637
|
+
{
|
|
6638
|
+
"name": "price_kamino_vault_shares",
|
|
6639
|
+
"discriminator": [
|
|
6640
|
+
112,
|
|
6641
|
+
92,
|
|
6642
|
+
238,
|
|
6643
|
+
224,
|
|
6644
|
+
145,
|
|
6645
|
+
105,
|
|
6646
|
+
38,
|
|
6647
|
+
249
|
|
6648
|
+
],
|
|
6649
|
+
"accounts": [
|
|
6650
|
+
{
|
|
6651
|
+
"name": "glam_state",
|
|
6652
|
+
"writable": true
|
|
6653
|
+
},
|
|
6654
|
+
{
|
|
6655
|
+
"name": "glam_vault",
|
|
6656
|
+
"pda": {
|
|
6657
|
+
"seeds": [
|
|
6658
|
+
{
|
|
6659
|
+
"kind": "const",
|
|
6660
|
+
"value": [
|
|
6661
|
+
118,
|
|
6662
|
+
97,
|
|
6663
|
+
117,
|
|
6664
|
+
108,
|
|
6665
|
+
116
|
|
6666
|
+
]
|
|
6667
|
+
},
|
|
6668
|
+
{
|
|
6669
|
+
"kind": "account",
|
|
6670
|
+
"path": "glam_state"
|
|
6671
|
+
}
|
|
6672
|
+
]
|
|
6673
|
+
}
|
|
6674
|
+
},
|
|
6675
|
+
{
|
|
6676
|
+
"name": "signer",
|
|
6677
|
+
"writable": true,
|
|
6678
|
+
"signer": true
|
|
6679
|
+
},
|
|
6680
|
+
{
|
|
6681
|
+
"name": "kamino_lending_program",
|
|
6682
|
+
"address": "KLend2g3cP87fffoy8q1mQqGKjrxjC8boSyAYavgmjD"
|
|
6683
|
+
},
|
|
6684
|
+
{
|
|
6685
|
+
"name": "sol_oracle"
|
|
6686
|
+
},
|
|
6687
|
+
{
|
|
6688
|
+
"name": "glam_config",
|
|
6689
|
+
"pda": {
|
|
6690
|
+
"seeds": [
|
|
6691
|
+
{
|
|
6692
|
+
"kind": "const",
|
|
6693
|
+
"value": [
|
|
6694
|
+
103,
|
|
6695
|
+
108,
|
|
6696
|
+
111,
|
|
6697
|
+
98,
|
|
6698
|
+
97,
|
|
6699
|
+
108,
|
|
6700
|
+
95,
|
|
6701
|
+
99,
|
|
6702
|
+
111,
|
|
6703
|
+
110,
|
|
6704
|
+
102,
|
|
6705
|
+
105,
|
|
6706
|
+
103
|
|
6707
|
+
]
|
|
6708
|
+
}
|
|
6709
|
+
],
|
|
6710
|
+
"program": {
|
|
6711
|
+
"kind": "const",
|
|
6712
|
+
"value": [
|
|
6713
|
+
10,
|
|
6714
|
+
11,
|
|
6715
|
+
0,
|
|
6716
|
+
83,
|
|
6717
|
+
72,
|
|
6718
|
+
16,
|
|
6719
|
+
46,
|
|
6720
|
+
144,
|
|
6721
|
+
46,
|
|
6722
|
+
42,
|
|
6723
|
+
79,
|
|
6724
|
+
22,
|
|
6725
|
+
157,
|
|
6726
|
+
123,
|
|
6727
|
+
21,
|
|
6728
|
+
242,
|
|
6729
|
+
192,
|
|
6730
|
+
146,
|
|
6731
|
+
1,
|
|
6732
|
+
78,
|
|
6733
|
+
88,
|
|
6734
|
+
59,
|
|
6735
|
+
102,
|
|
6736
|
+
9,
|
|
6737
|
+
190,
|
|
6738
|
+
226,
|
|
6739
|
+
92,
|
|
6740
|
+
189,
|
|
6741
|
+
187,
|
|
6742
|
+
232,
|
|
6743
|
+
83,
|
|
6744
|
+
220
|
|
6745
|
+
]
|
|
6746
|
+
}
|
|
6747
|
+
}
|
|
6748
|
+
},
|
|
6749
|
+
{
|
|
6750
|
+
"name": "pyth_oracle",
|
|
6751
|
+
"optional": true
|
|
6752
|
+
},
|
|
6753
|
+
{
|
|
6754
|
+
"name": "switchboard_price_oracle",
|
|
6755
|
+
"optional": true
|
|
6756
|
+
},
|
|
6757
|
+
{
|
|
6758
|
+
"name": "switchboard_twap_oracle",
|
|
6759
|
+
"optional": true
|
|
6760
|
+
},
|
|
6761
|
+
{
|
|
6762
|
+
"name": "scope_prices",
|
|
6763
|
+
"optional": true
|
|
6764
|
+
}
|
|
6765
|
+
],
|
|
6766
|
+
"args": [
|
|
6767
|
+
{
|
|
6768
|
+
"name": "denom",
|
|
6769
|
+
"type": {
|
|
6770
|
+
"defined": {
|
|
6771
|
+
"name": "PriceDenom"
|
|
6772
|
+
}
|
|
6773
|
+
}
|
|
6774
|
+
}
|
|
6775
|
+
]
|
|
6776
|
+
},
|
|
6633
6777
|
{
|
|
6634
6778
|
"name": "price_meteora_positions",
|
|
6635
6779
|
"discriminator": [
|
|
@@ -8,7 +8,7 @@ export type GlamProtocol = {
|
|
|
8
8
|
"address": "GLAMbTqav9N9witRjswJ8enwp9vv5G8bsSJ2kPJ4rcyc";
|
|
9
9
|
"metadata": {
|
|
10
10
|
"name": "glamProtocol";
|
|
11
|
-
"version": "0.4.
|
|
11
|
+
"version": "0.4.29";
|
|
12
12
|
"spec": "0.1.0";
|
|
13
13
|
"description": "Glam Protocol";
|
|
14
14
|
};
|
|
@@ -4259,9 +4259,11 @@ export type GlamProtocol = {
|
|
|
4259
4259
|
"accounts": [
|
|
4260
4260
|
{
|
|
4261
4261
|
"name": "glamState";
|
|
4262
|
+
"writable": true;
|
|
4262
4263
|
},
|
|
4263
4264
|
{
|
|
4264
4265
|
"name": "glamVault";
|
|
4266
|
+
"writable": true;
|
|
4265
4267
|
"pda": {
|
|
4266
4268
|
"seeds": [
|
|
4267
4269
|
{
|
|
@@ -4354,9 +4356,11 @@ export type GlamProtocol = {
|
|
|
4354
4356
|
"accounts": [
|
|
4355
4357
|
{
|
|
4356
4358
|
"name": "glamState";
|
|
4359
|
+
"writable": true;
|
|
4357
4360
|
},
|
|
4358
4361
|
{
|
|
4359
4362
|
"name": "glamVault";
|
|
4363
|
+
"writable": true;
|
|
4360
4364
|
"pda": {
|
|
4361
4365
|
"seeds": [
|
|
4362
4366
|
{
|
|
@@ -6636,6 +6640,146 @@ export type GlamProtocol = {
|
|
|
6636
6640
|
}
|
|
6637
6641
|
];
|
|
6638
6642
|
},
|
|
6643
|
+
{
|
|
6644
|
+
"name": "priceKaminoVaultShares";
|
|
6645
|
+
"discriminator": [
|
|
6646
|
+
112,
|
|
6647
|
+
92,
|
|
6648
|
+
238,
|
|
6649
|
+
224,
|
|
6650
|
+
145,
|
|
6651
|
+
105,
|
|
6652
|
+
38,
|
|
6653
|
+
249
|
|
6654
|
+
];
|
|
6655
|
+
"accounts": [
|
|
6656
|
+
{
|
|
6657
|
+
"name": "glamState";
|
|
6658
|
+
"writable": true;
|
|
6659
|
+
},
|
|
6660
|
+
{
|
|
6661
|
+
"name": "glamVault";
|
|
6662
|
+
"pda": {
|
|
6663
|
+
"seeds": [
|
|
6664
|
+
{
|
|
6665
|
+
"kind": "const";
|
|
6666
|
+
"value": [
|
|
6667
|
+
118,
|
|
6668
|
+
97,
|
|
6669
|
+
117,
|
|
6670
|
+
108,
|
|
6671
|
+
116
|
|
6672
|
+
];
|
|
6673
|
+
},
|
|
6674
|
+
{
|
|
6675
|
+
"kind": "account";
|
|
6676
|
+
"path": "glamState";
|
|
6677
|
+
}
|
|
6678
|
+
];
|
|
6679
|
+
};
|
|
6680
|
+
},
|
|
6681
|
+
{
|
|
6682
|
+
"name": "signer";
|
|
6683
|
+
"writable": true;
|
|
6684
|
+
"signer": true;
|
|
6685
|
+
},
|
|
6686
|
+
{
|
|
6687
|
+
"name": "kaminoLendingProgram";
|
|
6688
|
+
"address": "KLend2g3cP87fffoy8q1mQqGKjrxjC8boSyAYavgmjD";
|
|
6689
|
+
},
|
|
6690
|
+
{
|
|
6691
|
+
"name": "solOracle";
|
|
6692
|
+
},
|
|
6693
|
+
{
|
|
6694
|
+
"name": "glamConfig";
|
|
6695
|
+
"pda": {
|
|
6696
|
+
"seeds": [
|
|
6697
|
+
{
|
|
6698
|
+
"kind": "const";
|
|
6699
|
+
"value": [
|
|
6700
|
+
103,
|
|
6701
|
+
108,
|
|
6702
|
+
111,
|
|
6703
|
+
98,
|
|
6704
|
+
97,
|
|
6705
|
+
108,
|
|
6706
|
+
95,
|
|
6707
|
+
99,
|
|
6708
|
+
111,
|
|
6709
|
+
110,
|
|
6710
|
+
102,
|
|
6711
|
+
105,
|
|
6712
|
+
103
|
|
6713
|
+
];
|
|
6714
|
+
}
|
|
6715
|
+
];
|
|
6716
|
+
"program": {
|
|
6717
|
+
"kind": "const";
|
|
6718
|
+
"value": [
|
|
6719
|
+
10,
|
|
6720
|
+
11,
|
|
6721
|
+
0,
|
|
6722
|
+
83,
|
|
6723
|
+
72,
|
|
6724
|
+
16,
|
|
6725
|
+
46,
|
|
6726
|
+
144,
|
|
6727
|
+
46,
|
|
6728
|
+
42,
|
|
6729
|
+
79,
|
|
6730
|
+
22,
|
|
6731
|
+
157,
|
|
6732
|
+
123,
|
|
6733
|
+
21,
|
|
6734
|
+
242,
|
|
6735
|
+
192,
|
|
6736
|
+
146,
|
|
6737
|
+
1,
|
|
6738
|
+
78,
|
|
6739
|
+
88,
|
|
6740
|
+
59,
|
|
6741
|
+
102,
|
|
6742
|
+
9,
|
|
6743
|
+
190,
|
|
6744
|
+
226,
|
|
6745
|
+
92,
|
|
6746
|
+
189,
|
|
6747
|
+
187,
|
|
6748
|
+
232,
|
|
6749
|
+
83,
|
|
6750
|
+
220
|
|
6751
|
+
];
|
|
6752
|
+
};
|
|
6753
|
+
};
|
|
6754
|
+
},
|
|
6755
|
+
{
|
|
6756
|
+
"name": "pythOracle";
|
|
6757
|
+
"optional": true;
|
|
6758
|
+
},
|
|
6759
|
+
{
|
|
6760
|
+
"name": "switchboardPriceOracle";
|
|
6761
|
+
"optional": true;
|
|
6762
|
+
},
|
|
6763
|
+
{
|
|
6764
|
+
"name": "switchboardTwapOracle";
|
|
6765
|
+
"optional": true;
|
|
6766
|
+
},
|
|
6767
|
+
{
|
|
6768
|
+
"name": "scopePrices";
|
|
6769
|
+
"optional": true;
|
|
6770
|
+
}
|
|
6771
|
+
];
|
|
6772
|
+
"args": [
|
|
6773
|
+
{
|
|
6774
|
+
"name": "denom";
|
|
6775
|
+
"type": {
|
|
6776
|
+
"defined": {
|
|
6777
|
+
"name": "priceDenom";
|
|
6778
|
+
};
|
|
6779
|
+
};
|
|
6780
|
+
}
|
|
6781
|
+
];
|
|
6782
|
+
},
|
|
6639
6783
|
{
|
|
6640
6784
|
"name": "priceMeteoraPositions";
|
|
6641
6785
|
"discriminator": [
|