@glamsystems/glam-sdk 1.0.12-alpha.1 → 1.0.12-alpha.3
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 +1307 -2196
- package/index.esm.js +1305 -2197
- package/package.json +1 -1
- package/src/client/base.d.ts +1 -1
- package/src/client/fees.d.ts +0 -3
- package/src/client/jupiter.d.ts +3 -0
- package/src/client/kamino/lending.d.ts +6 -0
- package/src/client/stake.d.ts +1 -1
- package/src/client/state.d.ts +0 -2
- package/src/deser/driftLayouts.d.ts +4 -0
- package/src/deser/integrationPolicies.d.ts +3 -3
- package/src/error.d.ts +23 -2
- package/src/glamExports.d.ts +29 -0
- package/src/models/state.d.ts +0 -4
- package/src/react/query-keys.d.ts +1 -0
- package/src/utils/transaction.d.ts +5 -2
- package/target/idl/ext_cctp.json +0 -6
- package/target/idl/ext_drift-staging.json +0 -6
- package/target/idl/ext_drift.json +0 -6
- package/target/idl/ext_kamino-staging.json +313 -6
- package/target/idl/ext_kamino.json +205 -6
- package/target/idl/ext_marinade.json +0 -6
- package/target/idl/ext_spl-staging.json +0 -6
- package/target/idl/ext_spl.json +0 -6
- package/target/idl/ext_stake_pool-staging.json +0 -6
- package/target/idl/ext_stake_pool.json +0 -6
- package/target/idl/glam_mint-staging.json +0 -6
- package/target/idl/glam_mint.json +0 -229
- package/target/idl/glam_protocol-staging.json +0 -271
- package/target/idl/glam_protocol.json +129 -1086
- package/target/types/ext_cctp.d.ts +0 -6
- package/target/types/ext_cctp.ts +0 -6
- package/target/types/ext_drift-staging.ts +0 -6
- package/target/types/ext_drift.d.ts +0 -6
- package/target/types/ext_drift.ts +0 -6
- package/target/types/ext_kamino-staging.ts +313 -6
- package/target/types/ext_kamino.d.ts +205 -6
- package/target/types/ext_kamino.ts +205 -6
- package/target/types/ext_marinade.d.ts +0 -6
- package/target/types/ext_marinade.ts +0 -6
- package/target/types/ext_offchain.d.ts +0 -6
- package/target/types/ext_spl-staging.ts +0 -6
- package/target/types/ext_spl.d.ts +0 -6
- package/target/types/ext_spl.ts +0 -6
- package/target/types/ext_stake_pool-staging.ts +0 -6
- package/target/types/ext_stake_pool.d.ts +0 -6
- package/target/types/ext_stake_pool.ts +0 -6
- package/target/types/glam_mint-staging.ts +0 -6
- package/target/types/glam_mint.d.ts +0 -229
- package/target/types/glam_mint.ts +0 -229
- package/target/types/glam_protocol-staging.ts +0 -271
- package/target/types/glam_protocol.d.ts +129 -1086
- package/target/types/glam_protocol.ts +128 -1085
package/package.json
CHANGED
package/src/client/base.d.ts
CHANGED
|
@@ -136,7 +136,7 @@ export declare class BaseClient {
|
|
|
136
136
|
type?: string;
|
|
137
137
|
}): Promise<StateModel[]>;
|
|
138
138
|
fetchProtocolPolicy<T>(integProgramId: PublicKey, protocolBitflag: number, policyClass: {
|
|
139
|
-
decode(buffer: Buffer): T;
|
|
139
|
+
decode(buffer: Buffer, staging?: boolean): T;
|
|
140
140
|
}): Promise<T | null>;
|
|
141
141
|
}
|
|
142
142
|
/**
|
package/src/client/fees.d.ts
CHANGED
|
@@ -6,8 +6,6 @@ declare class TxBuilder extends BaseTxBuilder<FeesClient> {
|
|
|
6
6
|
crystallizeFeesTx(txOptions?: TxOptions): Promise<VersionedTransaction>;
|
|
7
7
|
claimFeesIxs(glamSigner: PublicKey): Promise<TransactionInstruction[]>;
|
|
8
8
|
claimFeesTx(txOptions?: TxOptions): Promise<VersionedTransaction>;
|
|
9
|
-
chargeProtocolFeeIxs(glamSigner: PublicKey): Promise<TransactionInstruction[]>;
|
|
10
|
-
chargeProtocolFeeTx(txOptions?: TxOptions): Promise<VersionedTransaction>;
|
|
11
9
|
setProtocolFeesIx(baseFeeBps: number, flowFeeBps: number, signer?: PublicKey): Promise<TransactionInstruction>;
|
|
12
10
|
setProtocolFeesTx(baseFeeBps: number, flowFeeBps: number, txOptions?: TxOptions): Promise<VersionedTransaction>;
|
|
13
11
|
}
|
|
@@ -26,7 +24,6 @@ export declare class FeesClient {
|
|
|
26
24
|
getClaimedFees(): Promise<any>;
|
|
27
25
|
crystallizeFees(txOptions?: TxOptions): Promise<TransactionSignature>;
|
|
28
26
|
claimFees(txOptions?: TxOptions): Promise<TransactionSignature>;
|
|
29
|
-
chargeProtocolFee(txOptions?: TxOptions): Promise<TransactionSignature>;
|
|
30
27
|
setProtocolFees(baseFeeBps: number, flowFeeBps: number, txOptions?: TxOptions): Promise<TransactionSignature>;
|
|
31
28
|
}
|
|
32
29
|
export {};
|
package/src/client/jupiter.d.ts
CHANGED
|
@@ -11,11 +11,13 @@ declare class TxBuilder extends BaseTxBuilder<JupiterSwapClient> {
|
|
|
11
11
|
quoteParams?: QuoteParams;
|
|
12
12
|
quoteResponse?: QuoteResponse;
|
|
13
13
|
swapInstructions?: SwapInstructions;
|
|
14
|
+
trackingAccount?: PublicKey;
|
|
14
15
|
}, glamSigner: PublicKey): Promise<[TransactionInstruction[], PublicKey[]]>;
|
|
15
16
|
swapTx(options: {
|
|
16
17
|
quoteParams?: QuoteParams;
|
|
17
18
|
quoteResponse?: QuoteResponse;
|
|
18
19
|
swapInstructions?: SwapInstructions;
|
|
20
|
+
trackingAccount?: PublicKey;
|
|
19
21
|
}, txOptions?: TxOptions): Promise<VersionedTransaction>;
|
|
20
22
|
getPreInstructions: (signer: PublicKey, inputMint: PublicKey, outputMint: PublicKey, amount: BN, outputTokenProgram?: PublicKey) => Promise<TransactionInstruction[]>;
|
|
21
23
|
toTransactionInstruction: (ix: JupiterInstruction) => TransactionInstruction;
|
|
@@ -30,6 +32,7 @@ export declare class JupiterSwapClient {
|
|
|
30
32
|
quoteParams?: QuoteParams;
|
|
31
33
|
quoteResponse?: QuoteResponse;
|
|
32
34
|
swapInstructions?: SwapInstructions;
|
|
35
|
+
trackingAccount?: PublicKey;
|
|
33
36
|
}, txOptions?: TxOptions): Promise<TransactionSignature>;
|
|
34
37
|
}
|
|
35
38
|
export {};
|
|
@@ -35,6 +35,8 @@ declare class TxBuilder extends BaseTxBuilder<KaminoLendingClient> {
|
|
|
35
35
|
withdrawTx(market: PublicKey, asset: PublicKey, amount: BN, txOptions?: TxOptions): Promise<VersionedTransaction>;
|
|
36
36
|
borrowIxs(market: PublicKey, asset: PublicKey, amount: BN, glamSigner: PublicKey): Promise<TransactionInstruction[]>;
|
|
37
37
|
borrowTx(market: PublicKey, asset: PublicKey, amount: BN, txOptions?: TxOptions): Promise<VersionedTransaction>;
|
|
38
|
+
requestElevationGroupIxs(lendingMarket: PublicKey, elevationGroup: number, glamSigner: PublicKey): Promise<TransactionInstruction[]>;
|
|
39
|
+
requestElevationGroupTx(lendingMarket: PublicKey, elevationGroup: number, txOptions?: TxOptions): Promise<VersionedTransaction>;
|
|
38
40
|
repayIxs(market: PublicKey, asset: PublicKey, amount: BN, glamSigner: PublicKey): Promise<TransactionInstruction[]>;
|
|
39
41
|
repayTx(market: PublicKey, asset: PublicKey, amount: BN, txOptions?: TxOptions): Promise<VersionedTransaction>;
|
|
40
42
|
}
|
|
@@ -61,6 +63,10 @@ export declare class KaminoLendingClient {
|
|
|
61
63
|
* Borrows asset from the lending market.
|
|
62
64
|
*/
|
|
63
65
|
borrow(market: PublicKey | string, asset: PublicKey | string, amount: BN | number, txOptions?: TxOptions): Promise<TransactionSignature>;
|
|
66
|
+
/**
|
|
67
|
+
* Requests an elevation group for an obligation.
|
|
68
|
+
*/
|
|
69
|
+
requestElevationGroup(market: PublicKey | string, elevationGroup: number, txOptions?: TxOptions): Promise<TransactionSignature>;
|
|
64
70
|
/**
|
|
65
71
|
* Repays asset to the lending market.
|
|
66
72
|
*/
|
package/src/client/stake.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ declare class TxBuilder extends BaseTxBuilder<StakeClient> {
|
|
|
12
12
|
mergeStakeTx(destinationStake: PublicKey, sourceStake: PublicKey, txOptions?: TxOptions): Promise<VersionedTransaction>;
|
|
13
13
|
splitStakeIxs(existingStake: PublicKey, lamports: BN, glamSigner: PublicKey): Promise<[TransactionInstruction[], PublicKey]>;
|
|
14
14
|
splitStakeTx(existingStake: PublicKey, lamports: BN, txOptions?: TxOptions): Promise<[VersionedTransaction, PublicKey]>;
|
|
15
|
-
moveStakeIx(sourceStake: PublicKey, destinationStake: PublicKey, amount: BN, glamSigner: PublicKey): Promise<
|
|
15
|
+
moveStakeIx(sourceStake: PublicKey, destinationStake: PublicKey, amount: BN, glamSigner: PublicKey): Promise<any>;
|
|
16
16
|
moveStakeTx(sourceStake: PublicKey, destinationStake: PublicKey, amount: BN, txOptions?: TxOptions): Promise<VersionedTransaction>;
|
|
17
17
|
}
|
|
18
18
|
export declare class StakeClient {
|
package/src/client/state.d.ts
CHANGED
|
@@ -16,8 +16,6 @@ export type UpdateStateParams = {
|
|
|
16
16
|
timelockDuration?: number;
|
|
17
17
|
assets?: PublicKey[];
|
|
18
18
|
borrowable?: PublicKey[];
|
|
19
|
-
reduceOnly?: boolean;
|
|
20
|
-
anyLst?: boolean;
|
|
21
19
|
};
|
|
22
20
|
declare class TxBuilder extends BaseTxBuilder<StateClient> {
|
|
23
21
|
initializeIx(params: InitStateParams, glamSigner: PublicKey): Promise<[TransactionInstruction, PublicKey]>;
|
|
@@ -69,6 +69,10 @@ export declare class DriftVaultDepositor extends Decodable {
|
|
|
69
69
|
padding: BN[];
|
|
70
70
|
static _layout: any;
|
|
71
71
|
get netShares(): BN;
|
|
72
|
+
/** Rebase shares to match the vault's current shares base. */
|
|
73
|
+
private rebaseShares;
|
|
74
|
+
/** Net shares rebased to the vault's current shares base. */
|
|
75
|
+
netSharesRebased(vaultSharesBase: number): BN;
|
|
72
76
|
}
|
|
73
77
|
export declare class DriftVault extends Decodable {
|
|
74
78
|
discriminator: number[];
|
|
@@ -41,10 +41,10 @@ export declare class DriftProtocolPolicy {
|
|
|
41
41
|
borrowAllowlist: PublicKey[];
|
|
42
42
|
orderPriceToleranceBps: number;
|
|
43
43
|
static _layout: any;
|
|
44
|
-
static
|
|
44
|
+
static _stagingLayout: any;
|
|
45
45
|
constructor(spotMarketsAllowlist: number[], perpMarketsAllowlist: number[], borrowAllowlist: PublicKey[], orderPriceToleranceBps?: number);
|
|
46
|
-
static decode(buffer: Buffer<ArrayBufferLike
|
|
47
|
-
encode(): Buffer;
|
|
46
|
+
static decode(buffer: Buffer<ArrayBufferLike>, staging?: boolean): DriftProtocolPolicy;
|
|
47
|
+
encode(staging?: boolean): Buffer;
|
|
48
48
|
}
|
|
49
49
|
export declare class KaminoLendingPolicy {
|
|
50
50
|
marketsAllowlist: PublicKey[];
|
package/src/error.d.ts
CHANGED
|
@@ -1,7 +1,28 @@
|
|
|
1
1
|
import { TransactionError } from "@solana/web3.js";
|
|
2
2
|
export declare class GlamError extends Error {
|
|
3
3
|
message: string;
|
|
4
|
-
rawError
|
|
4
|
+
rawError: TransactionError | null | undefined;
|
|
5
5
|
programLogs?: string[];
|
|
6
|
-
constructor(message: string, rawError
|
|
6
|
+
constructor(message: string, rawError: TransactionError | null | undefined, programLogs?: string[]);
|
|
7
7
|
}
|
|
8
|
+
/**
|
|
9
|
+
* Extract the program ID that failed from transaction logs.
|
|
10
|
+
* Looks for "Program <ID> failed:" log lines.
|
|
11
|
+
*/
|
|
12
|
+
export declare function extractFailedProgramId(logs?: string[] | null): string | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* Resolve a custom program error code to a human-readable message.
|
|
15
|
+
* When programId is provided, matches against the specific program's IDL
|
|
16
|
+
* to avoid collisions between programs using the same error code range.
|
|
17
|
+
* Accepts either a decimal number or a hex string (e.g. "0xBB80").
|
|
18
|
+
*/
|
|
19
|
+
export declare function resolveErrorCode(code: number | string, staging?: boolean, programId?: string): string | undefined;
|
|
20
|
+
/**
|
|
21
|
+
* Parse the error message from a transaction error.
|
|
22
|
+
* Environment-agnostic: handles Anchor errors, program error codes,
|
|
23
|
+
* simulation failures, and common RPC/network errors.
|
|
24
|
+
*
|
|
25
|
+
* Callers (GUI, CLI) can handle environment-specific error types
|
|
26
|
+
* (e.g. WalletSignTransactionError) before delegating to this function.
|
|
27
|
+
*/
|
|
28
|
+
export declare function parseTxError(error: any): string;
|
package/src/glamExports.d.ts
CHANGED
|
@@ -1810,6 +1810,35 @@ export declare function getGlamMintIdl(staging: boolean): {
|
|
|
1810
1810
|
};
|
|
1811
1811
|
}[];
|
|
1812
1812
|
docs?: undefined;
|
|
1813
|
+
} | {
|
|
1814
|
+
name: string;
|
|
1815
|
+
discriminator: number[];
|
|
1816
|
+
accounts: ({
|
|
1817
|
+
name: string;
|
|
1818
|
+
writable: boolean;
|
|
1819
|
+
signer?: undefined;
|
|
1820
|
+
address?: undefined;
|
|
1821
|
+
} | {
|
|
1822
|
+
name: string;
|
|
1823
|
+
writable: boolean;
|
|
1824
|
+
signer: boolean;
|
|
1825
|
+
address?: undefined;
|
|
1826
|
+
} | {
|
|
1827
|
+
name: string;
|
|
1828
|
+
address: string;
|
|
1829
|
+
writable?: undefined;
|
|
1830
|
+
signer?: undefined;
|
|
1831
|
+
})[];
|
|
1832
|
+
args: ({
|
|
1833
|
+
name: string;
|
|
1834
|
+
type: string;
|
|
1835
|
+
} | {
|
|
1836
|
+
name: string;
|
|
1837
|
+
type: {
|
|
1838
|
+
option: string;
|
|
1839
|
+
};
|
|
1840
|
+
})[];
|
|
1841
|
+
docs?: undefined;
|
|
1813
1842
|
} | {
|
|
1814
1843
|
name: string;
|
|
1815
1844
|
discriminator: number[];
|
package/src/models/state.d.ts
CHANGED
|
@@ -4,7 +4,6 @@ import { PublicKey } from "@solana/web3.js";
|
|
|
4
4
|
import { Mint } from "@solana/spl-token";
|
|
5
5
|
import { BN } from "@coral-xyz/anchor";
|
|
6
6
|
import { MintModel } from "./mint";
|
|
7
|
-
import type { FeeStructure } from "./mint";
|
|
8
7
|
import type { RequestQueue } from "./types";
|
|
9
8
|
import type { IntegrationAcl, DelegateAcl } from "./acl";
|
|
10
9
|
export type StateAccount = IdlAccounts<GlamProtocol>["stateAccount"];
|
|
@@ -22,12 +21,9 @@ export declare class StateIdlModel implements StateModelType {
|
|
|
22
21
|
owner: PublicKey | null;
|
|
23
22
|
portfolioManagerName: number[] | null;
|
|
24
23
|
borrowable: PublicKey[] | null;
|
|
25
|
-
reduceOnly: boolean | null;
|
|
26
|
-
anyLst: boolean | null;
|
|
27
24
|
timelockDuration: number | null;
|
|
28
25
|
integrationAcls: IntegrationAcl[] | null;
|
|
29
26
|
delegateAcls: DelegateAcl[] | null;
|
|
30
|
-
feeStructure: FeeStructure | null;
|
|
31
27
|
constructor(data: Partial<StateModelType>);
|
|
32
28
|
}
|
|
33
29
|
/**
|
|
@@ -18,6 +18,7 @@ export declare const queryKeys: {
|
|
|
18
18
|
readonly jupDexes: (cluster: string) => readonly ["global", "jup-dexes", string];
|
|
19
19
|
readonly driftMarkets: (cluster: string) => readonly ["global", "drift-markets", string];
|
|
20
20
|
readonly kaminoMarkets: (cluster: string) => readonly ["global", "kamino-markets", string];
|
|
21
|
+
readonly kaminoVaults: (cluster: string) => readonly ["global", "kamino-vaults", string];
|
|
21
22
|
readonly priorityFee: (cluster: string) => readonly ["global", "priority-fee", string];
|
|
22
23
|
};
|
|
23
24
|
readonly vaultGraph: {
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { Connection, PublicKey, TransactionInstruction, AddressLookupTableAccount } from "@solana/web3.js";
|
|
2
2
|
/**
|
|
3
|
-
* Parses program logs to extract error message
|
|
3
|
+
* Parses program logs to extract error message.
|
|
4
|
+
* Checks in order: Anchor "Error Message:", insufficient funds/lamports,
|
|
5
|
+
* and custom program error codes (resolved via IDL when possible).
|
|
6
|
+
* Returns "Unknown error" if no recognizable error pattern is found.
|
|
4
7
|
*/
|
|
5
|
-
export declare function parseProgramLogs(logs
|
|
8
|
+
export declare function parseProgramLogs(logs: string[], staging: boolean): string;
|
|
6
9
|
export declare const getSimulationResult: (connection: Connection, instructions: Array<TransactionInstruction>, payer: PublicKey, lookupTables?: Array<AddressLookupTableAccount>, staging?: boolean) => Promise<{
|
|
7
10
|
unitsConsumed?: number;
|
|
8
11
|
error?: Error;
|
package/target/idl/ext_cctp.json
CHANGED
|
@@ -1307,6 +1307,206 @@
|
|
|
1307
1307
|
}
|
|
1308
1308
|
]
|
|
1309
1309
|
},
|
|
1310
|
+
{
|
|
1311
|
+
"name": "lending_liquidate_obligation_and_redeem_reserve_collateral_v2",
|
|
1312
|
+
"discriminator": [
|
|
1313
|
+
179,
|
|
1314
|
+
45,
|
|
1315
|
+
146,
|
|
1316
|
+
167,
|
|
1317
|
+
246,
|
|
1318
|
+
239,
|
|
1319
|
+
18,
|
|
1320
|
+
242
|
|
1321
|
+
],
|
|
1322
|
+
"accounts": [
|
|
1323
|
+
{
|
|
1324
|
+
"name": "glam_state",
|
|
1325
|
+
"writable": true
|
|
1326
|
+
},
|
|
1327
|
+
{
|
|
1328
|
+
"name": "glam_vault",
|
|
1329
|
+
"writable": true,
|
|
1330
|
+
"pda": {
|
|
1331
|
+
"seeds": [
|
|
1332
|
+
{
|
|
1333
|
+
"kind": "const",
|
|
1334
|
+
"value": [
|
|
1335
|
+
118,
|
|
1336
|
+
97,
|
|
1337
|
+
117,
|
|
1338
|
+
108,
|
|
1339
|
+
116
|
|
1340
|
+
]
|
|
1341
|
+
},
|
|
1342
|
+
{
|
|
1343
|
+
"kind": "account",
|
|
1344
|
+
"path": "glam_state"
|
|
1345
|
+
}
|
|
1346
|
+
],
|
|
1347
|
+
"program": {
|
|
1348
|
+
"kind": "account",
|
|
1349
|
+
"path": "glam_protocol_program"
|
|
1350
|
+
}
|
|
1351
|
+
}
|
|
1352
|
+
},
|
|
1353
|
+
{
|
|
1354
|
+
"name": "glam_signer",
|
|
1355
|
+
"writable": true,
|
|
1356
|
+
"signer": true
|
|
1357
|
+
},
|
|
1358
|
+
{
|
|
1359
|
+
"name": "integration_authority",
|
|
1360
|
+
"pda": {
|
|
1361
|
+
"seeds": [
|
|
1362
|
+
{
|
|
1363
|
+
"kind": "const",
|
|
1364
|
+
"value": [
|
|
1365
|
+
105,
|
|
1366
|
+
110,
|
|
1367
|
+
116,
|
|
1368
|
+
101,
|
|
1369
|
+
103,
|
|
1370
|
+
114,
|
|
1371
|
+
97,
|
|
1372
|
+
116,
|
|
1373
|
+
105,
|
|
1374
|
+
111,
|
|
1375
|
+
110,
|
|
1376
|
+
45,
|
|
1377
|
+
97,
|
|
1378
|
+
117,
|
|
1379
|
+
116,
|
|
1380
|
+
104,
|
|
1381
|
+
111,
|
|
1382
|
+
114,
|
|
1383
|
+
105,
|
|
1384
|
+
116,
|
|
1385
|
+
121
|
|
1386
|
+
]
|
|
1387
|
+
}
|
|
1388
|
+
]
|
|
1389
|
+
}
|
|
1390
|
+
},
|
|
1391
|
+
{
|
|
1392
|
+
"name": "cpi_program",
|
|
1393
|
+
"address": "KLend2g3cP87fffoy8q1mQqGKjrxjC8boSyAYavgmjD"
|
|
1394
|
+
},
|
|
1395
|
+
{
|
|
1396
|
+
"name": "glam_protocol_program",
|
|
1397
|
+
"address": "gstgptmbgJVi5f8ZmSRVZjZkDQwqKa3xWuUtD5WmJHz"
|
|
1398
|
+
},
|
|
1399
|
+
{
|
|
1400
|
+
"name": "system_program",
|
|
1401
|
+
"address": "11111111111111111111111111111111"
|
|
1402
|
+
},
|
|
1403
|
+
{
|
|
1404
|
+
"name": "obligation",
|
|
1405
|
+
"writable": true
|
|
1406
|
+
},
|
|
1407
|
+
{
|
|
1408
|
+
"name": "lending_market"
|
|
1409
|
+
},
|
|
1410
|
+
{
|
|
1411
|
+
"name": "lending_market_authority"
|
|
1412
|
+
},
|
|
1413
|
+
{
|
|
1414
|
+
"name": "repay_reserve",
|
|
1415
|
+
"writable": true
|
|
1416
|
+
},
|
|
1417
|
+
{
|
|
1418
|
+
"name": "repay_reserve_liquidity_mint"
|
|
1419
|
+
},
|
|
1420
|
+
{
|
|
1421
|
+
"name": "repay_reserve_liquidity_supply",
|
|
1422
|
+
"writable": true
|
|
1423
|
+
},
|
|
1424
|
+
{
|
|
1425
|
+
"name": "withdraw_reserve",
|
|
1426
|
+
"writable": true
|
|
1427
|
+
},
|
|
1428
|
+
{
|
|
1429
|
+
"name": "withdraw_reserve_liquidity_mint"
|
|
1430
|
+
},
|
|
1431
|
+
{
|
|
1432
|
+
"name": "withdraw_reserve_collateral_mint",
|
|
1433
|
+
"writable": true
|
|
1434
|
+
},
|
|
1435
|
+
{
|
|
1436
|
+
"name": "withdraw_reserve_collateral_supply",
|
|
1437
|
+
"writable": true
|
|
1438
|
+
},
|
|
1439
|
+
{
|
|
1440
|
+
"name": "withdraw_reserve_liquidity_supply",
|
|
1441
|
+
"writable": true
|
|
1442
|
+
},
|
|
1443
|
+
{
|
|
1444
|
+
"name": "withdraw_reserve_liquidity_fee_receiver",
|
|
1445
|
+
"writable": true
|
|
1446
|
+
},
|
|
1447
|
+
{
|
|
1448
|
+
"name": "user_source_liquidity",
|
|
1449
|
+
"writable": true
|
|
1450
|
+
},
|
|
1451
|
+
{
|
|
1452
|
+
"name": "user_destination_collateral",
|
|
1453
|
+
"writable": true
|
|
1454
|
+
},
|
|
1455
|
+
{
|
|
1456
|
+
"name": "user_destination_liquidity",
|
|
1457
|
+
"writable": true
|
|
1458
|
+
},
|
|
1459
|
+
{
|
|
1460
|
+
"name": "collateral_token_program"
|
|
1461
|
+
},
|
|
1462
|
+
{
|
|
1463
|
+
"name": "repay_liquidity_token_program"
|
|
1464
|
+
},
|
|
1465
|
+
{
|
|
1466
|
+
"name": "withdraw_liquidity_token_program"
|
|
1467
|
+
},
|
|
1468
|
+
{
|
|
1469
|
+
"name": "instruction_sysvar_account"
|
|
1470
|
+
},
|
|
1471
|
+
{
|
|
1472
|
+
"name": "collateral_obligation_farm_user_state",
|
|
1473
|
+
"writable": true,
|
|
1474
|
+
"optional": true
|
|
1475
|
+
},
|
|
1476
|
+
{
|
|
1477
|
+
"name": "collateral_reserve_farm_state",
|
|
1478
|
+
"writable": true,
|
|
1479
|
+
"optional": true
|
|
1480
|
+
},
|
|
1481
|
+
{
|
|
1482
|
+
"name": "debt_obligation_farm_user_state",
|
|
1483
|
+
"writable": true,
|
|
1484
|
+
"optional": true
|
|
1485
|
+
},
|
|
1486
|
+
{
|
|
1487
|
+
"name": "debt_reserve_farm_state",
|
|
1488
|
+
"writable": true,
|
|
1489
|
+
"optional": true
|
|
1490
|
+
},
|
|
1491
|
+
{
|
|
1492
|
+
"name": "farms_program"
|
|
1493
|
+
}
|
|
1494
|
+
],
|
|
1495
|
+
"args": [
|
|
1496
|
+
{
|
|
1497
|
+
"name": "liquidity_amount",
|
|
1498
|
+
"type": "u64"
|
|
1499
|
+
},
|
|
1500
|
+
{
|
|
1501
|
+
"name": "min_acceptable_received_liquidity_amount",
|
|
1502
|
+
"type": "u64"
|
|
1503
|
+
},
|
|
1504
|
+
{
|
|
1505
|
+
"name": "max_allowed_ltv_override_percent",
|
|
1506
|
+
"type": "u64"
|
|
1507
|
+
}
|
|
1508
|
+
]
|
|
1509
|
+
},
|
|
1310
1510
|
{
|
|
1311
1511
|
"name": "lending_repay_obligation_liquidity_v2",
|
|
1312
1512
|
"discriminator": [
|
|
@@ -1452,6 +1652,114 @@
|
|
|
1452
1652
|
}
|
|
1453
1653
|
]
|
|
1454
1654
|
},
|
|
1655
|
+
{
|
|
1656
|
+
"name": "lending_request_elevation_group",
|
|
1657
|
+
"discriminator": [
|
|
1658
|
+
162,
|
|
1659
|
+
119,
|
|
1660
|
+
197,
|
|
1661
|
+
54,
|
|
1662
|
+
246,
|
|
1663
|
+
84,
|
|
1664
|
+
55,
|
|
1665
|
+
153
|
|
1666
|
+
],
|
|
1667
|
+
"accounts": [
|
|
1668
|
+
{
|
|
1669
|
+
"name": "glam_state",
|
|
1670
|
+
"writable": true
|
|
1671
|
+
},
|
|
1672
|
+
{
|
|
1673
|
+
"name": "glam_vault",
|
|
1674
|
+
"writable": true,
|
|
1675
|
+
"pda": {
|
|
1676
|
+
"seeds": [
|
|
1677
|
+
{
|
|
1678
|
+
"kind": "const",
|
|
1679
|
+
"value": [
|
|
1680
|
+
118,
|
|
1681
|
+
97,
|
|
1682
|
+
117,
|
|
1683
|
+
108,
|
|
1684
|
+
116
|
|
1685
|
+
]
|
|
1686
|
+
},
|
|
1687
|
+
{
|
|
1688
|
+
"kind": "account",
|
|
1689
|
+
"path": "glam_state"
|
|
1690
|
+
}
|
|
1691
|
+
],
|
|
1692
|
+
"program": {
|
|
1693
|
+
"kind": "account",
|
|
1694
|
+
"path": "glam_protocol_program"
|
|
1695
|
+
}
|
|
1696
|
+
}
|
|
1697
|
+
},
|
|
1698
|
+
{
|
|
1699
|
+
"name": "glam_signer",
|
|
1700
|
+
"writable": true,
|
|
1701
|
+
"signer": true
|
|
1702
|
+
},
|
|
1703
|
+
{
|
|
1704
|
+
"name": "integration_authority",
|
|
1705
|
+
"pda": {
|
|
1706
|
+
"seeds": [
|
|
1707
|
+
{
|
|
1708
|
+
"kind": "const",
|
|
1709
|
+
"value": [
|
|
1710
|
+
105,
|
|
1711
|
+
110,
|
|
1712
|
+
116,
|
|
1713
|
+
101,
|
|
1714
|
+
103,
|
|
1715
|
+
114,
|
|
1716
|
+
97,
|
|
1717
|
+
116,
|
|
1718
|
+
105,
|
|
1719
|
+
111,
|
|
1720
|
+
110,
|
|
1721
|
+
45,
|
|
1722
|
+
97,
|
|
1723
|
+
117,
|
|
1724
|
+
116,
|
|
1725
|
+
104,
|
|
1726
|
+
111,
|
|
1727
|
+
114,
|
|
1728
|
+
105,
|
|
1729
|
+
116,
|
|
1730
|
+
121
|
|
1731
|
+
]
|
|
1732
|
+
}
|
|
1733
|
+
]
|
|
1734
|
+
}
|
|
1735
|
+
},
|
|
1736
|
+
{
|
|
1737
|
+
"name": "cpi_program",
|
|
1738
|
+
"address": "KLend2g3cP87fffoy8q1mQqGKjrxjC8boSyAYavgmjD"
|
|
1739
|
+
},
|
|
1740
|
+
{
|
|
1741
|
+
"name": "glam_protocol_program",
|
|
1742
|
+
"address": "gstgptmbgJVi5f8ZmSRVZjZkDQwqKa3xWuUtD5WmJHz"
|
|
1743
|
+
},
|
|
1744
|
+
{
|
|
1745
|
+
"name": "system_program",
|
|
1746
|
+
"address": "11111111111111111111111111111111"
|
|
1747
|
+
},
|
|
1748
|
+
{
|
|
1749
|
+
"name": "obligation",
|
|
1750
|
+
"writable": true
|
|
1751
|
+
},
|
|
1752
|
+
{
|
|
1753
|
+
"name": "lending_market"
|
|
1754
|
+
}
|
|
1755
|
+
],
|
|
1756
|
+
"args": [
|
|
1757
|
+
{
|
|
1758
|
+
"name": "elevation_group",
|
|
1759
|
+
"type": "u8"
|
|
1760
|
+
}
|
|
1761
|
+
]
|
|
1762
|
+
},
|
|
1455
1763
|
{
|
|
1456
1764
|
"name": "lending_withdraw_obligation_collateral_and_redeem_reserve_collateral_v2",
|
|
1457
1765
|
"discriminator": [
|
|
@@ -2221,12 +2529,6 @@
|
|
|
2221
2529
|
},
|
|
2222
2530
|
{
|
|
2223
2531
|
"name": "OracleConfigs"
|
|
2224
|
-
},
|
|
2225
|
-
{
|
|
2226
|
-
"name": "ReduceOnly"
|
|
2227
|
-
},
|
|
2228
|
-
{
|
|
2229
|
-
"name": "AnyLst"
|
|
2230
2532
|
}
|
|
2231
2533
|
]
|
|
2232
2534
|
}
|
|
@@ -3091,6 +3393,11 @@
|
|
|
3091
3393
|
"type": "u64",
|
|
3092
3394
|
"value": "1"
|
|
3093
3395
|
},
|
|
3396
|
+
{
|
|
3397
|
+
"name": "PROTO_KAMINO_LENDING_PERM_LIQUIDATE",
|
|
3398
|
+
"type": "u64",
|
|
3399
|
+
"value": "32"
|
|
3400
|
+
},
|
|
3094
3401
|
{
|
|
3095
3402
|
"name": "PROTO_KAMINO_LENDING_PERM_REPAY",
|
|
3096
3403
|
"type": "u64",
|