@glamsystems/glam-sdk 1.0.14-alpha.5 → 1.1.0-alpha.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glamsystems/glam-sdk",
3
- "version": "1.0.14-alpha.5",
3
+ "version": "1.1.0-alpha.0",
4
4
  "description": "TypeScript SDK for the GLAM Protocol",
5
5
  "main": "./index.cjs.js",
6
6
  "module": "./index.esm.js",
package/src/assets.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { PublicKey } from "@solana/web3.js";
2
+ import { PkMap } from "./utils/pkmap";
2
3
  export declare const STAKE_POOLS: {
3
4
  name: string;
4
5
  symbol: string;
@@ -27,14 +28,12 @@ export interface AssetMeta {
27
28
  decimals: number;
28
29
  oracle: PublicKey;
29
30
  programId: PublicKey;
30
- oracleSource?: string;
31
+ oracleSource: string;
31
32
  }
32
33
  /**
33
- * Legacy asset metadata snapshot retained for backward compatibility.
34
+ * Transforms the LST list into a map of asset metas.
34
35
  *
35
- * Runtime consumers should prefer the onchain-backed helpers in `globalConfig.ts`.
36
- * Note that we use functional prices for LSTs, and the oracle pubkey of a LST
36
+ * We use functional prices for LSTs, and the oracle pubkey of a LST
37
37
  * asset is the pool state.
38
38
  */
39
- export declare const ASSETS_MAINNET: Map<string, AssetMeta>;
40
- export declare const ASSETS_TESTS: Map<string, AssetMeta>;
39
+ export declare const ASSETS_MAINNET: PkMap<AssetMeta>;
@@ -2,12 +2,12 @@ import * as anchor from "@coral-xyz/anchor";
2
2
  import { BN } from "@coral-xyz/anchor";
3
3
  import { Wallet } from "@coral-xyz/anchor";
4
4
  import { AddressLookupTableAccount, Connection, Keypair, PublicKey, Transaction, TransactionInstruction, TransactionSignature, VersionedTransaction } from "@solana/web3.js";
5
- import { ExtBridgeProgram, ExtEpiProgram, ExtCctpProgram, ExtKaminoProgram, ExtMarinadeProgram, ExtSplProgram, ExtStakePoolProgram, GlamMintProgram, GlamProtocolProgram } from "../glamExports";
5
+ import { ExtBridgeProgram, ExtEpiProgram, ExtCctpProgram, ExtKaminoProgram, ExtMarinadeProgram, ExtLoopscaleProgram, ExtNeutralProgram, ExtSplProgram, ExtStakePoolProgram, GlamMintProgram, GlamProtocolProgram } from "../glamExports";
6
6
  import { ClusterNetwork, GlamClientConfig } from "../clientConfig";
7
- import type { GlobalConfigAccount } from "../globalConfig";
7
+ import { GlobalConfig } from "../globalConfig";
8
8
  import { RequestQueue, StateAccount, StateModel } from "../models";
9
9
  import { BlockhashWithCache } from "../utils/blockhash";
10
- import { JupiterApiClient } from "../utils";
10
+ import { JupiterApiClient, PkMap } from "../utils";
11
11
  import { AssetMeta } from "../assets";
12
12
  export type TxOptions = {
13
13
  signer?: PublicKey;
@@ -47,6 +47,8 @@ export declare class BaseClient {
47
47
  private _extCctpProgram?;
48
48
  private _extBridgeProgram?;
49
49
  private _extEpiProgram?;
50
+ private _extLoopscaleProgram?;
51
+ private _extNeutralProgram?;
50
52
  private _statePda?;
51
53
  private _globalConfig?;
52
54
  private _globalConfigPromise?;
@@ -62,6 +64,8 @@ export declare class BaseClient {
62
64
  get extCctpProgram(): ExtCctpProgram;
63
65
  get extBridgeProgram(): ExtBridgeProgram;
64
66
  get extEpiProgram(): ExtEpiProgram;
67
+ get extLoopscaleProgram(): ExtLoopscaleProgram;
68
+ get extNeutralProgram(): ExtNeutralProgram;
65
69
  get isVaultConnected(): boolean;
66
70
  get statePda(): PublicKey;
67
71
  set statePda(statePda: PublicKey);
@@ -125,11 +129,11 @@ export declare class BaseClient {
125
129
  isLockupEnabled(): Promise<boolean>;
126
130
  fetchGlobalConfig(options?: {
127
131
  refresh?: boolean;
128
- }): Promise<GlobalConfigAccount>;
132
+ }): Promise<GlobalConfig>;
129
133
  fetchAssetMetas(options?: {
130
134
  refresh?: boolean;
131
- }): Promise<Map<string, AssetMeta>>;
132
- refreshAssetMetaCache(): Promise<Map<string, AssetMeta>>;
135
+ }): Promise<PkMap<AssetMeta>>;
136
+ refreshAssetMetaCache(): Promise<PkMap<AssetMeta>>;
133
137
  getAssetMeta(assetMint: string | PublicKey, options?: {
134
138
  refresh?: boolean;
135
139
  }): Promise<AssetMeta>;
@@ -1,8 +1,9 @@
1
1
  import { BN } from "@coral-xyz/anchor";
2
- import { AccountMeta, Keypair, PublicKey, TransactionInstruction, TransactionSignature, VersionedTransaction } from "@solana/web3.js";
2
+ import { Keypair, PublicKey, TransactionInstruction, TransactionSignature, VersionedTransaction } from "@solana/web3.js";
3
3
  import { BaseClient, BaseTxBuilder, TxOptions } from "./base";
4
4
  import { LayerzeroOftRouteProfile } from "./bridgeRegistry";
5
5
  import { LayerzeroOftPolicy, LayerzeroOftRoute, RouteManagementMode } from "../deser/integrationPolicies";
6
+ export declare const LAYERZERO_OFT_PROTOCOL: number;
6
7
  type BufferLike = Uint8Array | number[] | Buffer;
7
8
  type RouteManagementModeArg = RouteManagementMode | number | {
8
9
  unmanagedOnly: Record<string, never>;
@@ -20,11 +21,8 @@ export type OftTransferParams = {
20
21
  sourceAmount: BN;
21
22
  providerInstructions: TransactionInstruction[];
22
23
  providerReceipt: PublicKey;
23
- sourceTokenAccount?: PublicKey;
24
24
  managed?: boolean;
25
25
  providerSigners?: Keypair[];
26
- prepareRemainingAccounts?: AccountMeta[];
27
- commitRemainingAccounts?: AccountMeta[];
28
26
  };
29
27
  export type LayerzeroOftSendParams = {
30
28
  transferId?: PublicKey;
@@ -32,7 +30,7 @@ export type LayerzeroOftSendParams = {
32
30
  sourceAmount: BN;
33
31
  destinationChain: number;
34
32
  destinationRecipient: PublicKey;
35
- nativeFee: BN;
33
+ nativeFeeLamports: BN;
36
34
  minAmountLd?: BN;
37
35
  lzTokenFee?: BN;
38
36
  options?: BufferLike;
@@ -68,6 +66,10 @@ type BridgeTransferRecordAccount = {
68
66
  providerSequence: BN;
69
67
  committedSlot: BN;
70
68
  };
69
+ export declare function getActiveRegistryTransfers(registry: {
70
+ managedTransferCount: BN | number;
71
+ transfers: any[];
72
+ }): any[];
71
73
  export declare function deriveLayerzeroNoncePda(endpointProgram: PublicKey, sender: PublicKey, destinationChain: number, destinationRecipient: PublicKey): PublicKey;
72
74
  export declare function deriveOftAuxiliaryAccountSeed(glamState: PublicKey, transferId: PublicKey): Promise<string>;
73
75
  export declare function deriveOftAuxiliaryAccount(glamSigner: PublicKey, glamState: PublicKey, transferId: PublicKey, tokenProgram: PublicKey): Promise<{
@@ -85,8 +87,6 @@ declare class TxBuilder extends BaseTxBuilder<BridgeClient> {
85
87
  auxiliaryTokenAccount: PublicKey;
86
88
  sourceTokenAccount: PublicKey;
87
89
  }>;
88
- priceManagedTransfersIxs(): Promise<TransactionInstruction[]>;
89
- priceManagedTransfersTx(txOptions?: TxOptions): Promise<VersionedTransaction>;
90
90
  }
91
91
  declare class LayerzeroOftBridgeProtocolClient {
92
92
  readonly bridge: BridgeClient;
@@ -154,7 +154,6 @@ export declare class BridgeClient {
154
154
  preparedSlot: BN;
155
155
  bump: number;
156
156
  } | null>;
157
- fetchTransferRecord(transferId: PublicKey): Promise<BridgeTransferRecordAccount>;
158
157
  fetchTransferRecordNullable(transferId: PublicKey): Promise<BridgeTransferRecordAccount | null>;
159
158
  addLayerzeroOftRoute(route: LayerzeroOftRouteInput, txOptions?: TxOptions): Promise<TransactionSignature>;
160
159
  updateLayerzeroOftRoute(route: LayerzeroOftRouteInput, txOptions?: TxOptions): Promise<TransactionSignature>;
@@ -180,6 +179,5 @@ export declare class BridgeClient {
180
179
  private extendLookupTables;
181
180
  settleManagedTransfer(transferId: PublicKey, txOptions?: TxOptions): Promise<string>;
182
181
  validateManagedTransfer(transferId: PublicKey, txOptions?: TxOptions): Promise<string>;
183
- priceManagedTransfers(txOptions?: TxOptions): Promise<string>;
184
182
  }
185
183
  export {};
@@ -18,10 +18,10 @@ export type JupiterSwapV2OracleAccounts = {
18
18
  };
19
19
  export type JupiterSwapV2Options = JupiterSwapOptions & {
20
20
  skipQuotePriceCheck?: boolean;
21
- oracleAccounts?: JupiterSwapV2OracleAccounts;
22
21
  };
23
22
  declare class TxBuilder extends BaseTxBuilder<JupiterSwapClient> {
24
23
  private resolveSwapInstructionContext;
24
+ getSwapV2OracleAccounts(inputMint: PublicKey, outputMint: PublicKey, skipQuotePriceCheck: boolean): Promise<JupiterSwapV2OracleAccounts>;
25
25
  /**
26
26
  * Returns the instructions for a Jupiter swap and the lookup tables
27
27
  */
@@ -29,7 +29,7 @@ declare class TxBuilder extends BaseTxBuilder<JupiterSwapClient> {
29
29
  swapV2Ixs(options: JupiterSwapV2Options, glamSigner: PublicKey): Promise<[TransactionInstruction[], PublicKey[]]>;
30
30
  swapTx(options: JupiterSwapOptions, txOptions?: TxOptions): Promise<VersionedTransaction>;
31
31
  swapV2Tx(options: JupiterSwapV2Options, txOptions?: TxOptions): Promise<VersionedTransaction>;
32
- getPreInstructions: (signer: PublicKey, inputMint: PublicKey, outputMint: PublicKey, amount: BN, outputTokenProgram?: PublicKey) => Promise<TransactionInstruction[]>;
32
+ getPreInstructions(signer: PublicKey, inputMint: PublicKey, outputMint: PublicKey, amount: BN, outputTokenProgram?: PublicKey): Promise<TransactionInstruction[]>;
33
33
  toTransactionInstruction: (ix: JupiterInstruction) => TransactionInstruction;
34
34
  }
35
35
  export declare class JupiterSwapClient {
@@ -0,0 +1,84 @@
1
+ import { BN } from "@coral-xyz/anchor";
2
+ import { PublicKey, TransactionInstruction, TransactionSignature, VersionedTransaction, AccountMeta } from "@solana/web3.js";
3
+ import { BaseClient, BaseTxBuilder, TxOptions } from "./base";
4
+ export declare const LOOPSCALE_BS_AUTH: PublicKey;
5
+ export type LoopscaleExpectedLoanValues = {
6
+ expectedApy: BN;
7
+ expectedLqt: [number, number, number, number, number];
8
+ };
9
+ export type CreateLoanParams = {
10
+ nonce: BN;
11
+ };
12
+ export type DepositCollateralParams = {
13
+ amount: BN;
14
+ assetType: number;
15
+ assetIdentifier: PublicKey;
16
+ assetIndexGuidance: Buffer;
17
+ };
18
+ export type UpdateWeightMatrixParams = {
19
+ collateralIndex: number;
20
+ weightMatrix: [number, number, number, number, number];
21
+ expectedLoanValues: LoopscaleExpectedLoanValues;
22
+ assetIndexGuidance: Buffer;
23
+ };
24
+ export type BorrowPrincipalParams = {
25
+ amount: BN;
26
+ assetIndexGuidance: Buffer;
27
+ duration: number;
28
+ expectedLoanValues: LoopscaleExpectedLoanValues;
29
+ skipSolUnwrap: boolean;
30
+ };
31
+ export type CreateLoanAccounts = {
32
+ loan: PublicKey;
33
+ };
34
+ export type DepositCollateralAccounts = {
35
+ loan: PublicKey;
36
+ depositMint: PublicKey;
37
+ borrowerCollateralTa?: PublicKey;
38
+ loanCollateralTa?: PublicKey;
39
+ assetIdentifier?: PublicKey;
40
+ tokenProgram?: PublicKey;
41
+ associatedTokenProgram?: PublicKey;
42
+ };
43
+ export type UpdateWeightMatrixAccounts = {
44
+ loan: PublicKey;
45
+ };
46
+ export type BorrowPrincipalAccounts = {
47
+ loan: PublicKey;
48
+ strategy: PublicKey;
49
+ marketInformation: PublicKey;
50
+ principalMint: PublicKey;
51
+ borrowerTa?: PublicKey;
52
+ strategyTa?: PublicKey;
53
+ tokenProgram?: PublicKey;
54
+ associatedTokenProgram?: PublicKey;
55
+ remainingAccounts?: AccountMeta[];
56
+ };
57
+ export declare function getLoopscaleEventAuthorityPda(programId?: PublicKey): PublicKey;
58
+ export declare function getLoopscaleLoanPda(borrower: PublicKey, nonce: BN | bigint | number, programId?: PublicKey): PublicKey;
59
+ declare class TxBuilder extends BaseTxBuilder<LoopscaleClient> {
60
+ createLoanIx(params: CreateLoanParams, accounts: CreateLoanAccounts, signer?: PublicKey): Promise<TransactionInstruction>;
61
+ createLoanTx(params: CreateLoanParams, accounts: CreateLoanAccounts, txOptions?: TxOptions): Promise<VersionedTransaction>;
62
+ depositCollateralIx(params: DepositCollateralParams, accounts: DepositCollateralAccounts, signer?: PublicKey): Promise<TransactionInstruction>;
63
+ depositCollateralTx(params: DepositCollateralParams, accounts: DepositCollateralAccounts, txOptions?: TxOptions): Promise<VersionedTransaction>;
64
+ updateWeightMatrixIx(params: UpdateWeightMatrixParams, accounts: UpdateWeightMatrixAccounts, signer?: PublicKey): Promise<TransactionInstruction>;
65
+ updateWeightMatrixTx(params: UpdateWeightMatrixParams, accounts: UpdateWeightMatrixAccounts, txOptions?: TxOptions): Promise<VersionedTransaction>;
66
+ borrowPrincipalIx(params: BorrowPrincipalParams, accounts: BorrowPrincipalAccounts, signer?: PublicKey): Promise<TransactionInstruction>;
67
+ borrowPrincipalTx(params: BorrowPrincipalParams, accounts: BorrowPrincipalAccounts, txOptions?: TxOptions): Promise<VersionedTransaction>;
68
+ }
69
+ export declare class LoopscaleClient {
70
+ readonly base: BaseClient;
71
+ readonly txBuilder: TxBuilder;
72
+ constructor(base: BaseClient);
73
+ getIntegrationAuthorityPda(): PublicKey;
74
+ getEventAuthorityPda(): PublicKey;
75
+ getBsAuth(): PublicKey;
76
+ getLoanPda(nonce: BN | bigint | number, borrower?: PublicKey): PublicKey;
77
+ getLoanTokenAta(loan: PublicKey, mint: PublicKey, tokenProgram?: PublicKey): PublicKey;
78
+ getStrategyTokenAta(strategy: PublicKey, mint: PublicKey, tokenProgram?: PublicKey): PublicKey;
79
+ createLoan(params: CreateLoanParams, accounts: CreateLoanAccounts, txOptions?: TxOptions): Promise<TransactionSignature>;
80
+ depositCollateral(params: DepositCollateralParams, accounts: DepositCollateralAccounts, txOptions?: TxOptions): Promise<TransactionSignature>;
81
+ updateWeightMatrix(params: UpdateWeightMatrixParams, accounts: UpdateWeightMatrixAccounts, txOptions?: TxOptions): Promise<TransactionSignature>;
82
+ borrowPrincipal(params: BorrowPrincipalParams, accounts: BorrowPrincipalAccounts, txOptions?: TxOptions): Promise<TransactionSignature>;
83
+ }
84
+ export {};
@@ -0,0 +1,111 @@
1
+ import { BN } from "@coral-xyz/anchor";
2
+ import { PublicKey, TransactionInstruction, TransactionSignature, VersionedTransaction } from "@solana/web3.js";
3
+ import { BaseClient, BaseTxBuilder, TxOptions } from "./base";
4
+ import { NeutralPolicy } from "../deser/integrationPolicies";
5
+ export declare const NEUTRAL_PROTOCOL = 1;
6
+ export declare const NEUTRAL_BUNDLE_DISCRIMINATOR: Buffer<ArrayBuffer>;
7
+ export type InitializeBundleDepositorAccounts = {
8
+ bundle: PublicKey;
9
+ userBundleAccount?: PublicKey;
10
+ };
11
+ export type RequestDepositAccounts = {
12
+ bundle: PublicKey;
13
+ userTokenAccount?: PublicKey;
14
+ pendingDepositTokenAccount?: PublicKey;
15
+ treasuryAccount?: PublicKey;
16
+ userBundleAccount?: PublicKey;
17
+ assetAddress?: PublicKey;
18
+ oracleData?: PublicKey;
19
+ bundleTempData?: PublicKey;
20
+ pendingBundleAssetAuthority?: PublicKey;
21
+ tokenProgram?: PublicKey;
22
+ };
23
+ export type NeutralBundleView = {
24
+ treasuryAccount: PublicKey;
25
+ assetAddress: PublicKey;
26
+ assetDecimals: number;
27
+ permissioned: boolean;
28
+ };
29
+ export declare class NeutralBundleAccount {
30
+ readonly _address: PublicKey;
31
+ discriminator: number[];
32
+ name: number[];
33
+ manager: PublicKey;
34
+ keeper: PublicKey;
35
+ treasuryAccount: PublicKey;
36
+ allocatedReceivers: PublicKey[];
37
+ bundleUnderlyingBalance: BN;
38
+ maxDepositAmount: BN;
39
+ withdrawalDelay: BN;
40
+ performanceFee: number;
41
+ managementFeeBps: number;
42
+ depositFee: number;
43
+ withdrawalFee: number;
44
+ managerPfeeShares: BN;
45
+ currentAllocationBps: number;
46
+ oracleBuffer: BN;
47
+ totalShares: BN;
48
+ assetPrecision: BN;
49
+ assetAddress: PublicKey;
50
+ assetDecimals: number;
51
+ withdrawalTMin: BN;
52
+ withdrawalTMax: BN;
53
+ withdrawalCurve: number;
54
+ permissionned: boolean;
55
+ managerMfeeShares: BN;
56
+ minDepositAmount: BN;
57
+ oracleUpdateTimeLimit: BN;
58
+ oracleMaxAge: BN;
59
+ withdrawalRedemptionRequestCutoffTs: BN;
60
+ withdrawalRedemptionUnlockCurrentCycleTs: BN;
61
+ withdrawalRedemptionUnlockNextCycleTs: BN;
62
+ padding: number[];
63
+ static _layout: any;
64
+ static decode(address: PublicKey, buffer: Buffer): NeutralBundleAccount;
65
+ getAddress(): PublicKey;
66
+ get permissioned(): boolean;
67
+ toView(): NeutralBundleView;
68
+ }
69
+ export declare function getNeutralUserBundlePda(authority: PublicKey, bundle: PublicKey): PublicKey;
70
+ export declare function getNeutralOracleDataPda(bundle: PublicKey): PublicKey;
71
+ export declare function getNeutralBundleTempDataPda(bundle: PublicKey): PublicKey;
72
+ export declare function getNeutralPendingBundleAssetAuthorityPda(bundle: PublicKey): PublicKey;
73
+ export declare function getNeutralPendingDepositTokenAccountPda(pendingBundleAssetAuthority: PublicKey, assetAddress: PublicKey): PublicKey;
74
+ declare class TxBuilder extends BaseTxBuilder<NeutralClient> {
75
+ setNeutralPolicyIx(policy: NeutralPolicy, signer?: PublicKey): Promise<TransactionInstruction>;
76
+ setNeutralPolicyTx(policy: NeutralPolicy, txOptions?: TxOptions): Promise<VersionedTransaction>;
77
+ initializeBundleDepositorIx(accounts: InitializeBundleDepositorAccounts, signer?: PublicKey): Promise<TransactionInstruction>;
78
+ initializeBundleDepositorTx(accounts: InitializeBundleDepositorAccounts, txOptions?: TxOptions): Promise<VersionedTransaction>;
79
+ initializePermissionedBundleDepositorIx(accounts: InitializeBundleDepositorAccounts, signer?: PublicKey): Promise<TransactionInstruction>;
80
+ initializePermissionedBundleDepositorTx(accounts: InitializeBundleDepositorAccounts, txOptions?: TxOptions): Promise<VersionedTransaction>;
81
+ requestDepositIx(accounts: RequestDepositAccounts, amount: BN | bigint | number | string, signer?: PublicKey): Promise<TransactionInstruction>;
82
+ requestDepositTx(accounts: RequestDepositAccounts, amount: BN | bigint | number | string, txOptions?: TxOptions): Promise<VersionedTransaction>;
83
+ }
84
+ export declare class NeutralClient {
85
+ readonly base: BaseClient;
86
+ readonly txBuilder: TxBuilder;
87
+ constructor(base: BaseClient);
88
+ baseAccounts(signer?: PublicKey): {
89
+ glamState: PublicKey;
90
+ glamVault: PublicKey;
91
+ glamSigner: PublicKey;
92
+ integrationAuthority: PublicKey;
93
+ cpiProgram: PublicKey;
94
+ glamProtocolProgram: PublicKey;
95
+ systemProgram: PublicKey;
96
+ };
97
+ getIntegrationAuthorityPda(): PublicKey;
98
+ getUserBundlePda(bundle: PublicKey): PublicKey;
99
+ getOracleDataPda(bundle: PublicKey): PublicKey;
100
+ getBundleTempDataPda(bundle: PublicKey): PublicKey;
101
+ getPendingBundleAssetAuthorityPda(bundle: PublicKey): PublicKey;
102
+ fetchBundle(bundle: PublicKey): Promise<NeutralBundleAccount>;
103
+ fetchPolicy(): Promise<NeutralPolicy | null>;
104
+ setPolicy(policy: NeutralPolicy, txOptions?: TxOptions): Promise<TransactionSignature>;
105
+ allowlistBundle(bundle: PublicKey, txOptions?: TxOptions): Promise<TransactionSignature>;
106
+ initializeBundleDepositor(bundle: PublicKey, txOptions?: TxOptions): Promise<TransactionSignature>;
107
+ initializePermissionedBundleDepositor(bundle: PublicKey, txOptions?: TxOptions): Promise<TransactionSignature>;
108
+ requestDeposit(bundle: PublicKey, amount: BN | bigint | number | string, txOptions?: TxOptions): Promise<TransactionSignature>;
109
+ requestDepositUiAmount(bundle: PublicKey, amount: number | string, txOptions?: TxOptions): Promise<TransactionSignature>;
110
+ }
111
+ export {};
@@ -7,6 +7,7 @@ import { PkMap, PkSet } from "../utils";
7
7
  import { KVaultState, Reserve } from "../deser";
8
8
  import { JupiterApiClient, TokenListItem } from "../utils/jupiterApi";
9
9
  import { BridgeClient } from "./bridge";
10
+ import { EpiClient } from "./epi";
10
11
  /**
11
12
  * Represents a single asset holding within a vault.
12
13
  *
@@ -52,22 +53,28 @@ export declare class VaultHoldings {
52
53
  add(holding: Holding): void;
53
54
  toJson(): string;
54
55
  }
56
+ type PricingChunk = {
57
+ ixs: TransactionInstruction[];
58
+ kaminoReserves: PublicKey[];
59
+ };
55
60
  export declare class PriceClient {
56
61
  readonly base: BaseClient;
57
62
  readonly klend: KaminoLendingClient;
58
63
  readonly kvaults: KaminoVaultsClient;
59
64
  readonly bridge: BridgeClient;
65
+ readonly epi: EpiClient;
60
66
  private readonly getJupiterApi;
61
67
  private _stateModel;
62
68
  private _lookupTables;
63
69
  private _kaminoVaults;
64
70
  private _priceVaultIxsQueue;
65
- constructor(base: BaseClient, klend: KaminoLendingClient, kvaults: KaminoVaultsClient, bridge: BridgeClient, getJupiterApi: () => JupiterApiClient);
71
+ constructor(base: BaseClient, klend: KaminoLendingClient, kvaults: KaminoVaultsClient, bridge: BridgeClient, epi: EpiClient, getJupiterApi: () => JupiterApiClient);
66
72
  get jupiterApi(): JupiterApiClient;
67
73
  get cachedStateModel(): StateModel | null;
68
74
  set cachedStateModel(stateModel: StateModel);
69
75
  get lookupTables(): PublicKey[];
70
76
  get kaminoVaults(): PublicKey[];
77
+ private getKaminoObligationReserveSets;
71
78
  /**
72
79
  * Fetches all holdings in the vault.
73
80
  *
@@ -104,12 +111,12 @@ export declare class PriceClient {
104
111
  * Returns an instruction that prices Kamino obligations.
105
112
  * If there are no Kamino obligations, returns null.
106
113
  */
107
- priceKaminoObligationsIxs(): Promise<TransactionInstruction[]>;
108
- priceKaminoVaultSharesIx(): Promise<TransactionInstruction[] | null>;
114
+ priceKaminoObligationsIxs(): Promise<PricingChunk>;
115
+ priceKaminoVaultSharesIx(): Promise<PricingChunk | null>;
109
116
  /**
110
117
  * Returns an instruction that prices vault balance and tokens
111
118
  */
112
- priceVaultTokensIx(): Promise<TransactionInstruction[]>;
119
+ priceVaultTokensIx(): Promise<PricingChunk>;
113
120
  /**
114
121
  * Returns an instruction that prices stake accounts.
115
122
  * If there are no stake accounts, returns null.
@@ -117,6 +124,7 @@ export declare class PriceClient {
117
124
  priceStakeAccountsIx(): Promise<TransactionInstruction | null>;
118
125
  priceVaultIxs(): Promise<TransactionInstruction[]>;
119
126
  private enqueuePriceVaultIxs;
127
+ private priceManagedTransfersIxs;
120
128
  private priceEpiValidatedPositionsIx;
121
129
  private _priceVaultIxsImpl;
122
130
  validateAumIx(): Promise<TransactionInstruction>;
@@ -126,3 +134,4 @@ export declare class PriceClient {
126
134
  PublicKey[]
127
135
  ]>;
128
136
  }
137
+ export {};
package/src/client.d.ts CHANGED
@@ -16,6 +16,8 @@ import { StakePoolClient } from "./client/stake-pool";
16
16
  import { CctpClient } from "./client/cctp";
17
17
  import { BridgeClient } from "./client/bridge";
18
18
  import { EpiClient } from "./client/epi";
19
+ import { LoopscaleClient } from "./client/loopscale";
20
+ import { NeutralClient } from "./client/neutral";
19
21
  /**
20
22
  * Main entrypoint for the GLAM SDK
21
23
  *
@@ -40,6 +42,8 @@ export declare class GlamClient extends BaseClient {
40
42
  private _cctp?;
41
43
  private _bridge?;
42
44
  private _epi?;
45
+ private _loopscale?;
46
+ private _neutral?;
43
47
  constructor(config?: GlamClientConfig);
44
48
  get invest(): InvestClient;
45
49
  get fees(): FeesClient;
@@ -59,4 +63,6 @@ export declare class GlamClient extends BaseClient {
59
63
  get cctp(): CctpClient;
60
64
  get bridge(): BridgeClient;
61
65
  get epi(): EpiClient;
66
+ get loopscale(): LoopscaleClient;
67
+ get neutral(): NeutralClient;
62
68
  }
@@ -44,6 +44,8 @@ export declare const MEMO_PROGRAM: PublicKey;
44
44
  export declare const ALT_PROGRAM_ID: PublicKey;
45
45
  export declare const TOKEN_MESSENGER_MINTER_V2: PublicKey;
46
46
  export declare const MESSAGE_TRANSMITTER_V2: PublicKey;
47
+ export declare const LOOPSCALE_PROGRAM_ID: PublicKey;
48
+ export declare const NTBUNDLE_PROGRAM_ID: PublicKey;
47
49
  /**
48
50
  * Token ACL (sRFC-37)
49
51
  */
@@ -43,6 +43,20 @@ export declare class KaminoVaultsPolicy {
43
43
  static decode(buffer: Buffer<ArrayBufferLike>): KaminoVaultsPolicy;
44
44
  encode(): Buffer;
45
45
  }
46
+ export declare class LoopscalePolicy {
47
+ strategiesAllowlist: PublicKey[];
48
+ static _layout: any;
49
+ constructor(strategiesAllowlist: PublicKey[]);
50
+ static decode(buffer: Buffer<ArrayBufferLike>): LoopscalePolicy;
51
+ encode(): Buffer;
52
+ }
53
+ export declare class NeutralPolicy {
54
+ bundlesAllowlist: PublicKey[];
55
+ static _layout: any;
56
+ constructor(bundlesAllowlist: PublicKey[]);
57
+ static decode(buffer: Buffer<ArrayBufferLike>): NeutralPolicy;
58
+ encode(): Buffer;
59
+ }
46
60
  export declare class CctpPolicy {
47
61
  allowedDestinations: {
48
62
  domain: number;