@glamsystems/glam-sdk 1.1.0 → 1.1.1-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.
Files changed (141) hide show
  1. package/index.cjs.d.ts +0 -1
  2. package/index.cjs.js +120789 -1
  3. package/index.esm.d.ts +0 -1
  4. package/index.esm.js +120308 -1
  5. package/package.json +15 -27
  6. package/target/idl/glam_mint-staging.json +480 -1
  7. package/target/idl/glam_mint.json +247 -1
  8. package/target/types/glam_mint-staging.ts +480 -1
  9. package/target/types/glam_mint.ts +247 -1
  10. package/LICENSE +0 -201
  11. package/buffer-layout.d.ts +0 -88
  12. package/src/assets.d.ts +0 -39
  13. package/src/client/access.d.ts +0 -57
  14. package/src/client/base.d.ts +0 -234
  15. package/src/client/bridge.d.ts +0 -205
  16. package/src/client/bridgeRegistry.d.ts +0 -32
  17. package/src/client/cctp.d.ts +0 -164
  18. package/src/client/epi.d.ts +0 -228
  19. package/src/client/fees.d.ts +0 -33
  20. package/src/client/invest.d.ts +0 -37
  21. package/src/client/jupiter-lend/borrow.d.ts +0 -92
  22. package/src/client/jupiter-lend/earn.d.ts +0 -64
  23. package/src/client/jupiter-lend/index.d.ts +0 -3
  24. package/src/client/jupiter-lend/shared.d.ts +0 -129
  25. package/src/client/jupiter.d.ts +0 -53
  26. package/src/client/kamino/farm.d.ts +0 -39
  27. package/src/client/kamino/index.d.ts +0 -4
  28. package/src/client/kamino/lending.d.ts +0 -94
  29. package/src/client/kamino/types.d.ts +0 -56
  30. package/src/client/kamino/vaults.d.ts +0 -39
  31. package/src/client/loopscale/borrow.d.ts +0 -118
  32. package/src/client/loopscale/core.d.ts +0 -604
  33. package/src/client/loopscale/index.d.ts +0 -5
  34. package/src/client/loopscale/lend.d.ts +0 -123
  35. package/src/client/loopscale/vault.d.ts +0 -43
  36. package/src/client/marinade.d.ts +0 -42
  37. package/src/client/mint.d.ts +0 -143
  38. package/src/client/orca.d.ts +0 -255
  39. package/src/client/phoenix.d.ts +0 -214
  40. package/src/client/price.d.ts +0 -182
  41. package/src/client/stake-pool.d.ts +0 -39
  42. package/src/client/stake.d.ts +0 -34
  43. package/src/client/state.d.ts +0 -56
  44. package/src/client/timelock.d.ts +0 -31
  45. package/src/client/vault.d.ts +0 -98
  46. package/src/client.d.ts +0 -82
  47. package/src/clientConfig.d.ts +0 -32
  48. package/src/constants.d.ts +0 -111
  49. package/src/deser/base.d.ts +0 -18
  50. package/src/deser/index.d.ts +0 -4
  51. package/src/deser/integrationPolicies.d.ts +0 -195
  52. package/src/deser/kaminoLayouts.d.ts +0 -264
  53. package/src/deser/loopscaleLayouts.d.ts +0 -157
  54. package/src/deser/tokenAclLayouts.d.ts +0 -67
  55. package/src/error.d.ts +0 -29
  56. package/src/glamExports.d.ts +0 -6260
  57. package/src/globalConfig.d.ts +0 -27
  58. package/src/index.d.ts +0 -24
  59. package/src/models/acl.d.ts +0 -43
  60. package/src/models/index.d.ts +0 -8
  61. package/src/models/mint.d.ts +0 -57
  62. package/src/models/state.d.ts +0 -94
  63. package/src/models/types.d.ts +0 -28
  64. package/src/protocols.d.ts +0 -29
  65. package/src/utils/accounts.d.ts +0 -71
  66. package/src/utils/bitmask.d.ts +0 -53
  67. package/src/utils/blockhash.d.ts +0 -11
  68. package/src/utils/common.d.ts +0 -73
  69. package/src/utils/computeBudget.d.ts +0 -15
  70. package/src/utils/evm.d.ts +0 -10
  71. package/src/utils/fraction.d.ts +0 -29
  72. package/src/utils/glamPDAs.d.ts +0 -15
  73. package/src/utils/helius.d.ts +0 -66
  74. package/src/utils/index.d.ts +0 -17
  75. package/src/utils/jupiterApi.d.ts +0 -95
  76. package/src/utils/lookupTables.d.ts +0 -83
  77. package/src/utils/phoenixApi.d.ts +0 -146
  78. package/src/utils/pkmap.d.ts +0 -87
  79. package/src/utils/pkset.d.ts +0 -73
  80. package/src/utils/positionCategorizer.d.ts +0 -38
  81. package/src/utils/rpc.d.ts +0 -18
  82. package/src/utils/timelock.d.ts +0 -52
  83. package/src/utils/transaction.d.ts +0 -13
  84. package/target/idl/ext_bridge-staging.json +0 -2379
  85. package/target/idl/ext_bridge.json +0 -2379
  86. package/target/idl/ext_drift.json +0 -5464
  87. package/target/idl/ext_epi-staging.json +0 -2862
  88. package/target/idl/ext_epi.json +0 -2862
  89. package/target/idl/ext_loopscale-staging.json +0 -4708
  90. package/target/idl/ext_loopscale.json +0 -4708
  91. package/target/idl/ext_marinade-staging.json +0 -1587
  92. package/target/idl/ext_phoenix-staging.json +0 -3525
  93. package/target/idl/ext_phoenix.json +0 -3525
  94. package/target/idl/mock_layerzero_endpoint.json +0 -144
  95. package/target/idl/mock_layerzero_oft.json +0 -155
  96. package/target/idl/mock_wormhole_verify_vaa_shim.json +0 -58
  97. package/target/types/ext_bridge-staging.d.ts +0 -2385
  98. package/target/types/ext_bridge-staging.ts +0 -2385
  99. package/target/types/ext_bridge.d.ts +0 -2385
  100. package/target/types/ext_bridge.ts +0 -2385
  101. package/target/types/ext_cctp-staging.d.ts +0 -1268
  102. package/target/types/ext_cctp.d.ts +0 -1268
  103. package/target/types/ext_drift.d.ts +0 -5470
  104. package/target/types/ext_drift.ts +0 -5470
  105. package/target/types/ext_epi-staging.d.ts +0 -2868
  106. package/target/types/ext_epi-staging.ts +0 -2868
  107. package/target/types/ext_epi.d.ts +0 -2868
  108. package/target/types/ext_epi.ts +0 -2868
  109. package/target/types/ext_jupiter-staging.d.ts +0 -1966
  110. package/target/types/ext_jupiter.d.ts +0 -1966
  111. package/target/types/ext_kamino-staging.d.ts +0 -3433
  112. package/target/types/ext_kamino.d.ts +0 -3433
  113. package/target/types/ext_loopscale-staging.d.ts +0 -4714
  114. package/target/types/ext_loopscale-staging.ts +0 -4714
  115. package/target/types/ext_loopscale.d.ts +0 -4714
  116. package/target/types/ext_loopscale.ts +0 -4714
  117. package/target/types/ext_marinade-staging.d.ts +0 -1593
  118. package/target/types/ext_marinade-staging.ts +0 -1593
  119. package/target/types/ext_marinade.d.ts +0 -1593
  120. package/target/types/ext_orca-staging.d.ts +0 -2829
  121. package/target/types/ext_orca.d.ts +0 -2829
  122. package/target/types/ext_phoenix-staging.d.ts +0 -3531
  123. package/target/types/ext_phoenix-staging.ts +0 -3531
  124. package/target/types/ext_phoenix.d.ts +0 -3531
  125. package/target/types/ext_phoenix.ts +0 -3531
  126. package/target/types/ext_spl-staging.d.ts +0 -1274
  127. package/target/types/ext_spl.d.ts +0 -1274
  128. package/target/types/ext_stake_pool-staging.d.ts +0 -1622
  129. package/target/types/ext_stake_pool.d.ts +0 -1622
  130. package/target/types/glam_config.d.ts +0 -755
  131. package/target/types/glam_mint-staging.d.ts +0 -8802
  132. package/target/types/glam_mint.d.ts +0 -6349
  133. package/target/types/glam_policies.d.ts +0 -477
  134. package/target/types/glam_protocol-staging.d.ts +0 -3362
  135. package/target/types/glam_protocol.d.ts +0 -2783
  136. package/target/types/mock_layerzero_endpoint.d.ts +0 -150
  137. package/target/types/mock_layerzero_endpoint.ts +0 -150
  138. package/target/types/mock_layerzero_oft.d.ts +0 -161
  139. package/target/types/mock_layerzero_oft.ts +0 -161
  140. package/target/types/mock_wormhole_verify_vaa_shim.d.ts +0 -64
  141. package/target/types/mock_wormhole_verify_vaa_shim.ts +0 -64
@@ -1,264 +0,0 @@
1
- import { BN } from "@coral-xyz/anchor";
2
- import { PublicKey } from "@solana/web3.js";
3
- import { BigFractionBytes } from "../utils";
4
- import { Decodable } from "./base";
5
- import Decimal from "decimal.js";
6
- export interface KVaultAllocation {
7
- reserve: PublicKey;
8
- ctokenVault: PublicKey;
9
- targetAllocationWeight: BN;
10
- tokenAllocationCap: BN;
11
- ctokenVaultBump: BN;
12
- configPadding: BN[];
13
- ctokenAllocation: BN;
14
- lastInvestSlot: BN;
15
- tokenTargetAllocationSf: BN;
16
- statePadding: BN[];
17
- }
18
- export declare class KVaultState extends Decodable {
19
- discriminator: number[];
20
- vaultAdminAuthority: PublicKey;
21
- baseVaultAuthority: PublicKey;
22
- baseVaultAuthorityBump: BN;
23
- tokenMint: PublicKey;
24
- tokenMintDecimals: BN;
25
- tokenVault: PublicKey;
26
- tokenProgram: PublicKey;
27
- sharesMint: PublicKey;
28
- sharesMintDecimals: BN;
29
- tokenAvailable: BN;
30
- sharesIssued: BN;
31
- availableCrankFunds: BN;
32
- padding0: BN;
33
- performanceFeeBps: BN;
34
- managementFeeBps: BN;
35
- lastFeeChargeTimestamp: BN;
36
- prevAumSf: BN;
37
- pendingFeesSf: BN;
38
- vaultAllocationStrategy: KVaultAllocation[];
39
- padding1: BN[];
40
- minDepositAmount: BN;
41
- minWithdrawAmount: BN;
42
- minInvestAmount: BN;
43
- minInvestDelaySlots: BN;
44
- crankFundFeePerReserve: BN;
45
- pendingAdmin: PublicKey;
46
- cumulativeEarnedInterestSf: BN;
47
- cumulativeMgmtFeesSf: BN;
48
- cumulativePerfFeesSf: BN;
49
- name: number[];
50
- vaultLookupTable: PublicKey;
51
- vaultFarm: PublicKey;
52
- creationTimestamp: BN;
53
- padding2: BN;
54
- allocationAdmin: PublicKey;
55
- padding3: BN[];
56
- static _layout: any;
57
- get nameStr(): string;
58
- get validAllocations(): KVaultAllocation[];
59
- }
60
- interface LastUpdate {
61
- slot: BN;
62
- stale: number;
63
- priceStatus: number;
64
- placeholder: number[];
65
- }
66
- interface PriceHeuristic {
67
- lower: BN;
68
- upper: BN;
69
- exp: BN;
70
- }
71
- interface ScopeConfiguration {
72
- priceFeed: PublicKey;
73
- priceChain: number[];
74
- twapChain: number[];
75
- }
76
- interface SwitchboardConfiguration {
77
- priceAggregator: PublicKey;
78
- twapAggregator: PublicKey;
79
- }
80
- interface PythConfiguration {
81
- price: PublicKey;
82
- }
83
- interface TokenInfo {
84
- name: number[];
85
- heuristic: PriceHeuristic;
86
- maxTwapDivergenceBps: BN;
87
- maxAgePriceSeconds: BN;
88
- maxAgeTwapSeconds: BN;
89
- scopeConfiguration: ScopeConfiguration;
90
- switchboardConfiguration: SwitchboardConfiguration;
91
- pythConfiguration: PythConfiguration;
92
- blockPriceUsage: number;
93
- reserved: number[];
94
- padding: BN[];
95
- }
96
- interface ReserveFees {
97
- borrowFeeSf: BN;
98
- flashLoanFeeSf: BN;
99
- padding: number[];
100
- }
101
- interface CurvePoint {
102
- utilizationRateBps: number;
103
- borrowRateBps: number;
104
- }
105
- interface BorrowRateCurve {
106
- points: CurvePoint[];
107
- }
108
- interface WithdrawalCaps {
109
- configCapacity: BN;
110
- currentTotal: BN;
111
- lastIntervalStartTimestamp: BN;
112
- configIntervalLengthSeconds: BN;
113
- }
114
- interface ReserveLiquidity {
115
- mintPubkey: PublicKey;
116
- supplyVault: PublicKey;
117
- feeVault: PublicKey;
118
- availableAmount: BN;
119
- borrowedAmountSf: BN;
120
- marketPriceSf: BN;
121
- marketPriceLastUpdatedTs: BN;
122
- mintDecimals: BN;
123
- depositLimitCrossedTimestamp: BN;
124
- borrowLimitCrossedTimestamp: BN;
125
- cumulativeBorrowRateBsf: BigFractionBytes;
126
- accumulatedProtocolFeesSf: BN;
127
- accumulatedReferrerFeesSf: BN;
128
- pendingReferrerFeesSf: BN;
129
- absoluteReferralRateSf: BN;
130
- tokenProgram: PublicKey;
131
- padding2: BN[];
132
- padding3: BN[];
133
- }
134
- interface ReserveCollateral {
135
- mintPubkey: PublicKey;
136
- mintTotalSupply: BN;
137
- supplyVault: PublicKey;
138
- padding1: BN[];
139
- padding2: BN[];
140
- }
141
- interface ReserveConfig {
142
- status: number;
143
- assetTier: number;
144
- hostFixedInterestRateBps: number;
145
- reserved2: number[];
146
- protocolOrderExecutionFeePct: number;
147
- protocolTakeRatePct: number;
148
- protocolLiquidationFeePct: number;
149
- loanToValuePct: number;
150
- liquidationThresholdPct: number;
151
- minLiquidationBonusBps: number;
152
- maxLiquidationBonusBps: number;
153
- badDebtLiquidationBonusBps: number;
154
- deleveragingMarginCallPeriodSecs: BN;
155
- deleveragingThresholdDecreaseBpsPerDay: BN;
156
- fees: ReserveFees;
157
- borrowRateCurve: BorrowRateCurve;
158
- borrowFactorPct: BN;
159
- depositLimit: BN;
160
- borrowLimit: BN;
161
- tokenInfo: TokenInfo;
162
- depositWithdrawalCap: WithdrawalCaps;
163
- debtWithdrawalCap: WithdrawalCaps;
164
- elevationGroups: number[];
165
- disableUsageAsCollOutsideEmode: number;
166
- utilizationLimitBlockBorrowingAbovePct: number;
167
- autodeleverageEnabled: number;
168
- reserved1: number[];
169
- borrowLimitOutsideElevationGroup: BN;
170
- borrowLimitAgainstThisCollateralInElevationGroup: BN[];
171
- }
172
- export declare class Reserve extends Decodable {
173
- discriminator: number[];
174
- version: BN;
175
- lastUpdate: LastUpdate;
176
- lendingMarket: PublicKey;
177
- farmCollateral: PublicKey;
178
- farmDebt: PublicKey;
179
- liquidity: ReserveLiquidity;
180
- reserveLiquidityPadding: BN[];
181
- collateral: ReserveCollateral;
182
- reserveCollateralPadding: BN[];
183
- config: ReserveConfig;
184
- configPadding: BN[];
185
- borrowedAmountOutsideElevationGroup: BN;
186
- borrowedAmountsAgainstThisReserveInElevationGroups: BN[];
187
- padding: BN[];
188
- static _layout: any;
189
- get cumulativeBorrowRate(): Decimal;
190
- /**
191
- * @returns the stale exchange rate between the collateral tokens and the liquidity - this is a decimal number scaled by 1e18
192
- */
193
- get collateralExchangeRate(): Decimal;
194
- get totalSupply(): Decimal;
195
- get borrowedAmount(): Decimal;
196
- get accumulatedProtocolFees(): Decimal;
197
- get accumulatedReferrerFees(): Decimal;
198
- get pendingReferrerFees(): Decimal;
199
- get scopePriceFeed(): PublicKey;
200
- get liquidityFeeReceiver(): PublicKey;
201
- get farmDebtNullable(): PublicKey | null;
202
- get farmCollateralNullable(): PublicKey | null;
203
- }
204
- interface ObligationCollateral {
205
- depositReserve: PublicKey;
206
- depositedAmount: BN;
207
- marketValueSf: BN;
208
- borrowedAmountAgainstThisCollateralInElevationGroup: BN;
209
- padding: BN[];
210
- }
211
- interface ObligationLiquidity {
212
- borrowReserve: PublicKey;
213
- cumulativeBorrowRateBsf: BigFractionBytes;
214
- padding: BN;
215
- borrowedAmountSf: BN;
216
- marketValueSf: BN;
217
- borrowFactorAdjustedMarketValueSf: BN;
218
- borrowedAmountOutsideElevationGroups: BN;
219
- padding2: BN[];
220
- }
221
- interface ObligationOrder {
222
- conditionThresholdSf: BN;
223
- opportunityParameterSf: BN;
224
- minExecutionBonusBps: number;
225
- maxExecutionBonusBps: number;
226
- conditionType: number;
227
- opportunityType: number;
228
- padding1: number[];
229
- padding2: BN[];
230
- }
231
- export declare class Obligation extends Decodable {
232
- discriminator: number[];
233
- tag: BN;
234
- lastUpdate: LastUpdate;
235
- lendingMarket: PublicKey;
236
- owner: PublicKey;
237
- deposits: ObligationCollateral[];
238
- lowestReserveDepositLiquidationLtv: BN;
239
- depositedValueSf: BN;
240
- borrows: ObligationLiquidity[];
241
- borrowFactorAdjustedDebtValueSf: BN;
242
- borrowedAssetsMarketValueSf: BN;
243
- allowedBorrowValueSf: BN;
244
- unhealthyBorrowValueSf: BN;
245
- depositsAssetTiers: number[];
246
- borrowsAssetTiers: number[];
247
- elevationGroup: number;
248
- numOfObsoleteDepositReserves: number;
249
- hasDebt: number;
250
- referrer: PublicKey;
251
- borrowingDisabled: number;
252
- autodeleverageTargetLtvPct: number;
253
- lowestReserveDepositMaxLtvPct: number;
254
- numOfObsoleteBorrowReserves: number;
255
- reserved: number[];
256
- highestBorrowFactorPct: BN;
257
- autodeleverageMarginCallStartedTimestamp: BN;
258
- orders: ObligationOrder[];
259
- padding3: BN[];
260
- static _layout: any;
261
- get activeDeposits(): ObligationCollateral[];
262
- get activeBorrows(): ObligationLiquidity[];
263
- }
264
- export {};
@@ -1,157 +0,0 @@
1
- import { BN } from "@coral-xyz/anchor";
2
- import { PublicKey } from "@solana/web3.js";
3
- import { Decodable } from "./base";
4
- export declare const STRATEGY_DURATION_COUNT = 5;
5
- interface ExternalYieldAccounts {
6
- externalYieldAccount: PublicKey;
7
- externalYieldVault: PublicKey;
8
- }
9
- interface CapMonitor {
10
- startTime1hr: BN;
11
- startTime24hr: BN;
12
- principal1hr: BN;
13
- principal24hr: BN;
14
- }
15
- export declare const LOOPSCALE_STRATEGY_ACCOUNT_DISCRIMINATOR: Buffer<ArrayBuffer>;
16
- export declare const LOOPSCALE_VAULT_DISCRIMINATOR: Buffer<ArrayBuffer>;
17
- export declare const LOOPSCALE_VAULT_STAKE_DISCRIMINATOR: Buffer<ArrayBuffer>;
18
- export declare function hasLoopscaleStrategyDiscriminator(data: Buffer): boolean;
19
- export declare class LoopscaleStrategy extends Decodable {
20
- discriminator: number[];
21
- version: number;
22
- nonce: PublicKey;
23
- bump: number;
24
- principalMint: PublicKey;
25
- lender: PublicKey;
26
- originationsEnabled: number;
27
- externalYieldSource: number;
28
- interestPerSecond: number[];
29
- lastAccruedTimestamp: BN;
30
- liquidityBuffer: BN;
31
- tokenBalance: BN;
32
- interestFee: BN;
33
- principalFee: BN;
34
- originationFee: BN;
35
- originationCap: BN;
36
- externalYieldAmount: BN;
37
- currentDeployedAmount: BN;
38
- outstandingInterestAmount: BN;
39
- feeClaimable: BN;
40
- cumulativePrincipalOriginated: BN;
41
- cumulativeInterestAccrued: BN;
42
- cumulativeLoanCount: BN;
43
- activeLoanCount: BN;
44
- marketInformation: PublicKey;
45
- collateralMap: BN[][];
46
- externalYieldAccounts: ExternalYieldAccounts;
47
- supplyMonitor: CapMonitor;
48
- withdrawMonitor: CapMonitor;
49
- borrowMonitor: CapMonitor;
50
- static _layout: any;
51
- /**
52
- * Returns the duration index whose collateral term for the given asset
53
- * matches `expectedApy`, or null if no populated slot matches.
54
- */
55
- durationIndexForApy(collateralAssetIndex: number, expectedApy: BN): number | null;
56
- /** Duration indexes that have a populated collateral term for the asset. */
57
- populatedDurationIndexes(collateralAssetIndex: number): number[];
58
- }
59
- export declare class LoopscaleVault extends Decodable {
60
- discriminator: number[];
61
- manager: PublicKey;
62
- nonce: PublicKey;
63
- bump: number;
64
- lpSupply: BN;
65
- lpMint: PublicKey;
66
- principalMint: PublicKey;
67
- cumulativePrincipalDeposited: BN;
68
- depositsEnabled: number;
69
- maxEarlyUnstakeFee: BN;
70
- static _layout: any;
71
- }
72
- export declare function hasLoopscaleVaultDiscriminator(data: Buffer): boolean;
73
- export declare function hasLoopscaleVaultStakeDiscriminator(data: Buffer): boolean;
74
- export declare const LOOPSCALE_LOAN_LEDGER_COUNT = 5;
75
- export declare const LOOPSCALE_LOAN_COLLATERAL_COUNT = 5;
76
- export declare const LOOPSCALE_LOAN_DISCRIMINATOR: Buffer<ArrayBuffer>;
77
- export declare function hasLoopscaleLoanDiscriminator(data: Buffer): boolean;
78
- export interface LoopscaleLoanDuration {
79
- duration: number;
80
- durationType: number;
81
- }
82
- export interface LoopscaleLedger {
83
- status: number;
84
- strategy: PublicKey;
85
- principalMint: PublicKey;
86
- marketInformation: PublicKey;
87
- principalDue: BN;
88
- principalRepaid: BN;
89
- interestOutstanding: BN;
90
- lastInterestUpdatedTime: BN;
91
- duration: LoopscaleLoanDuration;
92
- interestPerSecond: number[];
93
- startTime: BN;
94
- endTime: BN;
95
- apy: BN;
96
- }
97
- export interface LoopscaleCollateral {
98
- assetMint: PublicKey;
99
- amount: BN;
100
- assetType: number;
101
- assetIdentifier: PublicKey;
102
- }
103
- export declare class LoopscaleLoan extends Decodable {
104
- discriminator: number[];
105
- version: number;
106
- bump: number;
107
- status: number;
108
- borrower: PublicKey;
109
- nonce: BN;
110
- startTime: BN;
111
- ledgers: LoopscaleLedger[];
112
- collateral: LoopscaleCollateral[];
113
- weightMatrix: number[][];
114
- ltvMatrix: number[][];
115
- lqtMatrix: number[][];
116
- static _layout: any;
117
- /** Ledgers that are not in the empty/unused (status 0) state. */
118
- get activeLedgers(): LoopscaleLedger[];
119
- /** Collateral entries that hold a non-zero amount or a set identifier. */
120
- get activeCollateral(): LoopscaleCollateral[];
121
- }
122
- interface CollateralCaps {
123
- maxAllocationPct: BN;
124
- currentAllocationAmount: BN;
125
- }
126
- export interface LoopscaleAssetData {
127
- assetIdentifier: PublicKey;
128
- quoteMint: PublicKey;
129
- oracleAccount: PublicKey;
130
- oracleType: number;
131
- maxUncertainty: BN;
132
- maxAge: BN;
133
- decimals: number;
134
- ltv: BN;
135
- liquidationThreshold: BN;
136
- collateralCaps: CollateralCaps;
137
- }
138
- interface PrincipalCaps {
139
- max1hr: BN;
140
- max24hr: BN;
141
- maxOutstanding: BN;
142
- }
143
- export declare class LoopscaleMarketInformation extends Decodable {
144
- discriminator: number[];
145
- authority: PublicKey;
146
- delegate: PublicKey;
147
- principalMint: PublicKey;
148
- assetData: LoopscaleAssetData[];
149
- borrowCaps: PrincipalCaps;
150
- withdrawCaps: PrincipalCaps;
151
- supplyCaps: PrincipalCaps;
152
- version: number;
153
- static _layout: any;
154
- /** Index of `assetIdentifier` in the asset data table, or null if absent. */
155
- findAssetIndex(assetIdentifier: PublicKey): number | null;
156
- }
157
- export {};
@@ -1,67 +0,0 @@
1
- import { BN } from "@coral-xyz/anchor";
2
- import { PublicKey } from "@solana/web3.js";
3
- import { Decodable } from "./base";
4
- /**
5
- * Token ACL Gate ListConfig account layout.
6
- *
7
- * Onchain repr(C):
8
- * discriminator: u8
9
- * authority: Pubkey
10
- * seed: Pubkey
11
- * mode: u8
12
- * wallets_count: u64 (LE)
13
- *
14
- * PDA seeds: ["list_config", authority, seed]
15
- * Program: Token ACL Gate
16
- */
17
- export declare class TokenAclListConfig extends Decodable {
18
- discriminator: number;
19
- authority: PublicKey;
20
- seed: PublicKey;
21
- mode: number;
22
- walletsCount: BN;
23
- static _layout: any;
24
- get modeName(): string;
25
- }
26
- /**
27
- * Token ACL Gate WalletEntry account layout.
28
- *
29
- * Onchain repr(C):
30
- * discriminator: u8
31
- * wallet_address: Pubkey
32
- * list_config: Pubkey
33
- *
34
- * PDA seeds: ["wallet_entry", list_config, wallet]
35
- * Program: Token ACL Gate
36
- */
37
- export declare class TokenAclWalletEntry extends Decodable {
38
- discriminator: number;
39
- wallet: PublicKey;
40
- listConfig: PublicKey;
41
- static _layout: any;
42
- }
43
- /**
44
- * Token ACL MintConfig account layout.
45
- *
46
- * Onchain repr(C):
47
- * discriminator: u8
48
- * bump: u8
49
- * enable_permissionless_thaw: PodBool (u8)
50
- * enable_permissionless_freeze: PodBool (u8)
51
- * mint: Pubkey
52
- * freeze_authority: Pubkey
53
- * gating_program: Pubkey
54
- *
55
- * PDA seeds: ["MINT_CONFIG", mint]
56
- * Program: Token ACL
57
- */
58
- export declare class TokenAclMintConfig extends Decodable {
59
- discriminator: number;
60
- bump: number;
61
- enablePermissionlessThaw: number;
62
- enablePermissionlessFreeze: number;
63
- mint: PublicKey;
64
- freezeAuthority: PublicKey;
65
- gatingProgram: PublicKey;
66
- static _layout: any;
67
- }
package/src/error.d.ts DELETED
@@ -1,29 +0,0 @@
1
- import { TransactionError } from "@solana/web3.js";
2
- export declare class GlamError extends Error {
3
- message: string;
4
- rawError: TransactionError | null | undefined;
5
- programLogs?: string[];
6
- constructor(message: string, rawError: TransactionError | null | undefined, programLogs?: string[]);
7
- }
8
- /**
9
- * Extract the program ID that failed from transaction logs.
10
- * Looks for "Program <ID> failed:" log lines and returns the first match,
11
- * which corresponds to the innermost CPI that produced the root cause.
12
- */
13
- export declare function extractFailedProgramId(logs?: string[] | null): string | undefined;
14
- /**
15
- * Resolve a custom program error code to a human-readable message.
16
- * When programId is provided, matches against the specific program's IDL
17
- * to avoid collisions between programs using the same error code range.
18
- * Accepts either a decimal number or a hex string (e.g. "0xBB80").
19
- */
20
- export declare function resolveErrorCode(code: number | string, programId?: string, staging?: boolean): string | undefined;
21
- /**
22
- * Parse the error message from a transaction error.
23
- * Environment-agnostic: handles Anchor errors, program error codes,
24
- * simulation failures, and common RPC/network errors.
25
- *
26
- * Callers (GUI, CLI) can handle environment-specific error types
27
- * (e.g. WalletSignTransactionError) before delegating to this function.
28
- */
29
- export declare function parseTxError(error: any): string;